/* 
 * Pratinidhi Media Solutions - Animations
 * Defines micro-interactions and scroll reveal effects.
 * Respects user's motion preferences via prefers-reduced-motion.
 */

/* ==========================================================================
   Scroll Reveal — Fade Up
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Staggered Children Delays
   ========================================================================== */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* ==========================================================================
   Scale In
   ========================================================================== */
.scale-in {
    opacity: 0;
    transform: scale(0.92);
    transition: all 0.6s ease-out;
}

.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes pulseAccent {
    0%   { box-shadow: 0 0 0 0 rgba(229, 163, 42, 0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(229, 163, 42, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 163, 42, 0); }
}

.btn-accent {
    animation: pulseAccent 3s infinite;
}

.btn-accent:hover {
    animation: none;
}

/* ==========================================================================
   Drawer Link Stagger — Animate nav items when drawer opens
   ========================================================================== */
.drawer-nav-links li {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Each successive link delays a little more */
.drawer-nav-links li:nth-child(1) { transition-delay: 0.05s; }
.drawer-nav-links li:nth-child(2) { transition-delay: 0.10s; }
.drawer-nav-links li:nth-child(3) { transition-delay: 0.15s; }
.drawer-nav-links li:nth-child(4) { transition-delay: 0.20s; }
.drawer-nav-links li:nth-child(5) { transition-delay: 0.25s; }

.nav-open .drawer-nav-links li {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   Accessibility: Respect prefers-reduced-motion
   Users who have enabled "Reduce Motion" in their OS settings should not
   see animations — this is a WCAG requirement.
   ========================================================================== */
@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-up,
    .scale-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .drawer-nav-links li {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .btn-accent {
        animation: none !important;
    }
}
