window.addEventListener('scroll', function () {

    const navbar = document.querySelector('.custom-navbar');

    if(window.scrollY > 70){

        navbar.classList.add('scrolled');

    }else{

        navbar.classList.remove('scrolled');

    }

});