window.addEventListener("scroll",()=>{document.getElementById("nav").classList.toggle("scrolled",window.scrollY>40);}); function toggleMenu(){ var m=document.getElementById("mobMenu"); var b=document.querySelector(".hbg"); m.classList.toggle("open"); b.classList.toggle("open"); } document.addEventListener("click",function(e){ var m=document.getElementById("mobMenu"); var b=document.querySelector(".hbg"); if(m&&m.classList.contains("open")&&!m.contains(e.target)&&!b.contains(e.target)){ m.classList.remove("open");b.classList.remove("open"); } }); document.addEventListener("DOMContentLoaded",()=>{ const obs=new IntersectionObserver((e)=>{e.forEach(x=>{if(x.isIntersecting)x.target.classList.add("vis");});},{threshold:.