/**
 * Motion & Animation Design Tokens
 * Scroll Reveals, Micro-Interactions & Hardware-Accelerated Keyframes
 * Brand: Rowtech (Pvt) Ltd
 */

/* =======================================================================
   1. Scroll Reveal Baseline States
   ======================================================================= */
.reveal {
    opacity: 0;
    will-change: transform, opacity;
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reveal Direction Variations */
.reveal-up {
    transform: translateY(32px);
}

.reveal-down {
    transform: translateY(-32px);
}

.reveal-left {
    transform: translateX(32px);
}

.reveal-right {
    transform: translateX(-32px);
}

.reveal-zoom {
    transform: scale(0.94);
}

/* Active Triggered State */
.reveal.is-revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* =======================================================================
   2. Staggered Delay Cascades (For Cards & Grid Systems)
   ======================================================================= */
.stagger-1 {
    transition-delay: 80ms;
}

.stagger-2 {
    transition-delay: 160ms;
}

.stagger-3 {
    transition-delay: 240ms;
}

.stagger-4 {
    transition-delay: 320ms;
}

.stagger-5 {
    transition-delay: 400ms;
}

.stagger-6 {
    transition-delay: 480ms;
}

/* =======================================================================
   3. Keyframe Animations
   ======================================================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseAccent {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(230, 126, 34, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0);
    }
}

@keyframes industrialShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* =======================================================================
   4. Utility Animation Classes
   ======================================================================= */
.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-pulse {
    animation: pulseAccent 2s infinite;
}

/* Accessibility: Respect OS-level motion reduction preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}