Skip to main content

NKD Studio

// Fade in animations on scroll document.addEventListener("DOMContentLoaded", function() { const hero = document.getElementById('hero-section'); if(hero) { setTimeout(() => { hero.classList.remove('opacity-0', 'translate-y-8'); }, 100); } const fadeElements = document.querySelectorAll('.fade-in-section'); const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.remove('opacity-0', 'translate-y-8'); entry.target.classList.add('opacity-100', 'translate-y-0'); } }); }); fadeElements.forEach(el => observer.observe(el)); });