/* ============================================================================
 * lumen-motion.css — five named motions + reduced-motion guard.
 *
 * Per the AI brief 2026-06-15 23:30 UTC.
 *
 * Single bezier (--cb-ease). Five keyframes: entrance, exit, focus, micro, hero.
 * Reduced-motion users get instant transitions site-wide.
 * ========================================================================== */

/* 1. Entrance — fade + slide-up */
@keyframes fadeUp {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
.m-entrance,
[data-reveal].is-revealed > *,
main > section.is-revealed > * {
    animation: fadeUp var(--dur-deliberate) var(--cb-ease) both;
}

/* 2. Exit — fade + scale-down (used by modals on close) */
@keyframes fadeOut {
    to { opacity: 0; transform: scale(0.96); visibility: hidden; }
}
.m-exit { animation: fadeOut var(--dur-fast) var(--cb-ease) both; }

/* 3. Focus — soft halo pulse (Pray icon active, primary CTA focus) */
@keyframes softPulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--page-accent) 50%, transparent); }
    70%  { box-shadow: 0 0 0 8px color-mix(in srgb, var(--page-accent) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--page-accent) 0%, transparent); }
}
.m-focus:focus-visible,
.btn-pray { animation: softPulse 2s var(--cb-ease) infinite; }

/* 4. Micro — button press */
@keyframes microPress {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}
.m-micro:active { animation: microPress var(--dur-instant) var(--cb-ease); }

/* 5. Hero — staggered fadeUp for hero text */
@keyframes heroIn {
    from { opacity: 0; transform: translateY(28px) scale(0.94); letter-spacing: 0.03em; }
    to   { opacity: 1; transform: none; letter-spacing: -0.012em; }
}
.m-hero { animation: heroIn var(--dur-deliberate) var(--cb-ease) both; }

/* Staggered children helper */
[data-stagger] > *:nth-child(1) { animation-delay: 0ms; }
[data-stagger] > *:nth-child(2) { animation-delay: 80ms; }
[data-stagger] > *:nth-child(3) { animation-delay: 160ms; }
[data-stagger] > *:nth-child(4) { animation-delay: 240ms; }
[data-stagger] > *:nth-child(5) { animation-delay: 320ms; }
[data-stagger] > *:nth-child(6) { animation-delay: 400ms; }
[data-stagger] > *:nth-child(7) { animation-delay: 480ms; }
[data-stagger] > *:nth-child(8) { animation-delay: 560ms; }

/* Global reduced-motion guard (per §7.4 of the brief) */
@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;
    }
}
