/* ============================================================
   AI BOX — animations.css
   All @keyframes plus the scroll-reveal engine and its stagger
   delays. No other file may declare @keyframes.
   ============================================================ */

/* ---------- Scroll reveal (driven by js/observer.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.reveal.in { opacity: 1; transform: none; }

/* Stagger delays — data-delay="1" … "3" */
.reveal[data-delay='1'] { transition-delay: 80ms; }
.reveal[data-delay='2'] { transition-delay: 160ms; }
.reveal[data-delay='3'] { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Keyframes ---------- */

/* Video/poster cross-fade once playback starts (hero + box cards) */
@keyframes videoIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Hero scroll cue pulse */
@keyframes cue {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* Lightbox backdrop + dialog entrance */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* Keyframe animations run on their own clocks, so they are
   disabled here explicitly for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .scroll-cue::after { animation: none; }
  .hero__video.is-playing { animation: none; }
  .box-media__video.is-playing { animation: none; }
  .lightbox, .lightbox__dialog { animation: none; }
}
