
/* =========================
    FadeIn Animation
========================== */
gsap.registerPlugin(ScrollTrigger);

gsap.utils.toArray("section").forEach((sec) => {

    gsap.from(sec, {
        opacity: 0,
        y: 60,
        duration: 1,
        scrollTrigger: {
            trigger: sec,
            start: "top 85%",
        }
    });

    gsap.utils.toArray(sec.children).forEach((child) => {
        gsap.from(child, {
            opacity: 0,
            y: 40,
            duration: 1.2,
            scrollTrigger: {
                trigger: child,
                start: "top 82%",
            }
        });
    });

});

gsap.from("footer > *", {
    opacity: 0,
    y: 40,
    duration: 1.6,
    ease: "power2.out",
    stagger: 0.15,
    scrollTrigger: {
        trigger: "footer",
        start: "top 70%",
        toggleActions: "play none none none",
    }
});
