let initialScrollDone = false; window.addEventListener('wheel', (e) => { if (!initialScrollDone && e.deltaY > 0) { // Only trigger on initial downward scroll e.preventDefault(); window.scrollTo({ top: window.innerHeight, behavior: 'smooth' }); initialScrollDone = true; // Enable normal scrolling after a short delay setTimeout(() => { document.body.style.overflow = 'auto'; }, 10); } }); // Touch handling for mobile devices let startY; window.addEventListener('touchstart', (e) => { startY = e.touches[0].clientY; }); window.addEventListener('touchmove', (e) => { const currentY = e.touches[0].clientY; if (!initialScrollDone && currentY < startY) { // Only trigger on initial upward touch move e.preventDefault(); window.scrollTo({ top: window.innerHeight, behavior: 'smooth' }); initialScrollDone = true; // Enable normal scrolling after a short delay setTimeout(() => { document.body.style.overflow = 'auto'; }, 10); } });