// Intersection Observer for scroll animations const observerOptions = { threshold: 0.1, rootMargin: '0px 0px -50px 0px' }; const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.isIntersecting) { entry.target.classList.add('animate-fadeIn'); } }); }, observerOptions); document.querySelectorAll('section').forEach(section => { observer.observe(section); }); // Form handling const contactForm = document.querySelector('form'); if (contactForm) { contactForm.addEventListener('submit', (e) => { e.preventDefault(); // Here you would typically send the form data alert('Thank you for your message! We will get back to you soon.'); contactForm.reset(); }); } // Mobile menu toggle (handled in navbar component)