document.addEventListener('DOMContentLoaded', () => {
    if (window.gsap) {
        gsap.registerPlugin(window.ScrollTrigger);

        gsap.from('.gsap-fade-up', {
            y: 40,
            opacity: 0,
            duration: 1,
            ease: 'power3.out',
            stagger: 0.15,
            scrollTrigger: {
                trigger: '.gsap-fade-up',
                start: 'top 90%',
            },
        });

        gsap.from('.gsap-slide-left', {
            x: -80,
            opacity: 0,
            duration: 1,
            ease: 'power3.out',
            stagger: 0.15,
            scrollTrigger: {
                trigger: '.gsap-slide-left',
                start: 'top 92%',
            },
        });

        gsap.from('.gsap-hero-title', {
            y: 80,
            opacity: 0,
            duration: 1.2,
            ease: 'power3.out',
        });

        gsap.from('.gsap-hero-subtitle', {
            y: 60,
            opacity: 0,
            duration: 1,
            ease: 'power3.out',
            delay: 0.2,
        });

        gsap.from('.gsap-hero-cta', {
            y: 60,
            opacity: 0,
            duration: 1,
            ease: 'power3.out',
            delay: 0.35,
        });

        gsap.utils.toArray('.gsap-card').forEach((card) => {
            gsap.from(card, {
                y: 40,
                opacity: 0,
                duration: 0.9,
                ease: 'power3.out',
                scrollTrigger: {
                    trigger: card,
                    start: 'top 90%',
                },
            });
        });
    }
});
