/* ScrollAnimations.css - Scroll-triggered reveal animations */

/* Base state for scroll-animated elements - hidden */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1), transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    /* OxygenOS-like "Quint" curve */
    will-change: opacity, transform;
    /* Optimize performance */
    pointer-events: none;
    /* Prevent clicks while hidden */
}

/* Revealed state - visible and in position */
.scroll-animate.scroll-revealed {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    /* Re-enable clicks */
}

/* Stagger delays for grid items */
.scroll-animate[style*="animation-delay: 0.1s"] {
    transition-delay: 0.1s;
}

.scroll-animate[style*="animation-delay: 0.2s"] {
    transition-delay: 0.2s;
}

.scroll-animate[style*="animation-delay: 0.3s"] {
    transition-delay: 0.3s;
}

.scroll-animate[style*="animation-delay: 0.4s"] {
    transition-delay: 0.4s;
}

.scroll-animate[style*="animation-delay: 0.5s"] {
    transition-delay: 0.5s;
}

/* Alternative animation variants */
.scroll-animate.fade-up {
    opacity: 0;
    transform: translateY(60px);
}

.scroll-animate.fade-up.scroll-revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate.fade-left {
    opacity: 0;
    transform: translateX(-40px);
}

.scroll-animate.fade-left.scroll-revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate.fade-right {
    opacity: 0;
    transform: translateX(40px);
}

.scroll-animate.fade-right.scroll-revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate.scale-up {
    opacity: 0;
    transform: scale(0.9);
}

.scroll-animate.scale-up.scroll-revealed {
    opacity: 1;
    transform: scale(1);
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .scroll-animate.scroll-revealed {
        transform: none;
    }
}