const wrapper = document.querySelector( '.wrapper' );
const content = document.querySelector( '.content' );
content.addEventListener( 'scroll', event => {
let scrollRange = content.scrollHeight - content.clientHeight;
let scrollProgress = content.scrollTop / scrollRange;
wrapper.style.setProperty( '--scroll-progress', scrollProgress );
} );