Spaces:
Running
Running
| // Initialize animations and interactions | |
| document.addEventListener('DOMContentLoaded', () => { | |
| // Feature cards animation on scroll | |
| const featureCards = document.querySelectorAll('.feature-card'); | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.style.opacity = 1; | |
| entry.target.style.transform = 'translateY(0)'; | |
| } | |
| }); | |
| }, { threshold: 0.1 }); | |
| featureCards.forEach(card => { | |
| card.style.opacity = 0; | |
| card.style.transform = 'translateY(20px)'; | |
| card.style.transition = 'opacity 0.5s ease, transform 0.5s ease'; | |
| observer.observe(card); | |
| }); | |
| }); |