/* ==========================================================================
   Faith Engine : MOTION — cinematic-but-calm. transform/opacity only.
   ALL non-essential motion is disabled under prefers-reduced-motion OR the
   app-level .faith--reduced-motion class. Sacred text never flies/scrambles/pulses.
   ========================================================================== */

/* Cinematic hero entrance (1–2s, one-shot). */
@keyframes faith-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes faith-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes faith-glow-drift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.8; }
  50% { transform: translate3d(2%, 1%, 0) scale(1.05); opacity: 1; }
  100% { transform: translate3d(-2%, -1%, 0) scale(1); opacity: 0.8; }
}

.faith-hero__content { animation: faith-rise var(--faith-motion-slow) var(--faith-ease) both; }
.faith-hero__layer--glow { animation: faith-glow-drift 14s ease-in-out infinite; }
.faith-hero__layer--depth, .faith-hero__layer--motif { animation: faith-fade var(--faith-motion-slow) var(--faith-ease) both; }

/* Staggered reveal for cards/tiles as they enter (JS adds .is-in). */
.faith-reveal, .faith-wcard, .faith-tile, .faith-panel { will-change: transform, opacity; }
.faith-wcard { opacity: 0; transform: translateY(14px); transition: opacity var(--faith-motion-medium) var(--faith-ease), transform var(--faith-motion-medium) var(--faith-ease); }
.faith-wcard.is-in { opacity: 1; transform: none; }
.faith-tile { opacity: 0; transform: translateY(10px); transition: opacity var(--faith-motion-medium) var(--faith-ease), transform var(--faith-motion-medium) var(--faith-ease); }
.faith-tile.is-in { opacity: 1; transform: none; }

/* Motif ambient drift (very slow; abstract layers only, never sacred symbols). */
@keyframes faith-motif-drift { 0% { transform: scale(1) translateY(0); } 100% { transform: scale(1.06) translateY(-1.5%); } }
.faith-hero__layer--motif { animation: faith-fade var(--faith-motion-slow) var(--faith-ease) both, faith-motif-drift 26s ease-in-out infinite alternate; }

/* Drawer / dialog transitions */
.faith-a11y__panel, .faith-report__panel { animation: faith-rise var(--faith-motion-medium) var(--faith-ease) both; }

/* Pause ambient motion when the tab is hidden (perf + battery). */
.faith-hidden .faith-hero__layer--glow, .faith-hidden .faith-hero__layer--motif { animation-play-state: paused; }

/* Honour reduced motion at every layer. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .faith-wcard, .faith-tile, .faith-hero__content { opacity: 1 !important; transform: none !important; }
}
.faith--reduced-motion .faith-hero__layer--glow,
.faith--reduced-motion .faith-hero__layer--motif { animation: none !important; }
.faith--reduced-motion .faith-wcard,
.faith--reduced-motion .faith-tile,
.faith--reduced-motion .faith-hero__content { animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
