/* Animation System — Scroll-Triggered Animations */

/* Base animation state — elements start hidden */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In (no transform) */
.animate-on-scroll.fade-in {
    transform: none;
}

.animate-on-scroll.fade-in.is-visible {
    transform: none;
}

/* Slide In Left */
.animate-on-scroll.slide-in-left {
    transform: translateX(-30px);
}

.animate-on-scroll.slide-in-left.is-visible {
    transform: translateX(0);
}

/* Slide In Right */
.animate-on-scroll.slide-in-right {
    transform: translateX(30px);
}

.animate-on-scroll.slide-in-right.is-visible {
    transform: translateX(0);
}

/* Stagger Pattern */
.stagger-parent {
    --stagger-delay: 100ms;
}

.stagger-parent .animate-on-scroll:nth-child(1) { transition-delay: calc(var(--stagger-delay) * 0); }
.stagger-parent .animate-on-scroll:nth-child(2) { transition-delay: calc(var(--stagger-delay) * 1); }
.stagger-parent .animate-on-scroll:nth-child(3) { transition-delay: calc(var(--stagger-delay) * 2); }
.stagger-parent .animate-on-scroll:nth-child(4) { transition-delay: calc(var(--stagger-delay) * 3); }
.stagger-parent .animate-on-scroll:nth-child(5) { transition-delay: calc(var(--stagger-delay) * 4); }
.stagger-parent .animate-on-scroll:nth-child(6) { transition-delay: calc(var(--stagger-delay) * 5); }
.stagger-parent .animate-on-scroll:nth-child(7) { transition-delay: calc(var(--stagger-delay) * 6); }
.stagger-parent .animate-on-scroll:nth-child(8) { transition-delay: calc(var(--stagger-delay) * 7); }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }
}
