/* X89 — Chrome Mirage — motion.css — keyframes, transition utilities, stagger helpers, the specular-sweep utility, and the reduced-motion block. Rules obeyed throughout: - only transform / opacity / clip-path / background-position animate - box-shadow changes are one-shot transitions, never inside a loop - will-change is applied by JS and removed on transitionend */

/* Keyframes */

@keyframes marquee-run {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* Slow idle sheen across the primary CTA, every 5s */
@keyframes idle-sheen {
  0%, 62%  { background-position: 130% 50%; }
  92%,100% { background-position: -30% 50%; }
}

@keyframes live-pulse {
  0%, 100% { opacity: 1;  transform: scale(1); }
  50%      { opacity: .35; transform: scale(.78); }
}

@keyframes scale-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.13); }
  100% { transform: scale(1); }
}

@keyframes drain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* Hard specular sweep as a surface seats into place */
@keyframes seat-sweep {
  from { background-position: 140% 50%; }
  to   { background-position: -40% 50%; }
}

@keyframes rail-sheen {
  from { background-position: -60% 50%; }
  to   { background-position: 160% 50%; }
}

/* Odometer digit settle is driven by transform in timer.js;
   this is the one-shot housing flash when a column lands. */
@keyframes tick-flash {
  0%   { opacity: 0; }
  30%  { opacity: .5; }
  100% { opacity: 0; }
}

/* Reveal system — Elements rise 20px and fade over 520ms, with a specular band crossing the plate once as it lands. Children stagger via --i. */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity var(--d-reveal) var(--e-seat),
    transform var(--d-reveal) var(--e-seat);
  transition-delay: calc(var(--i, 0) * 55ms);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Without JS the .js gate never applies, so content is simply visible. */

/* The landing sweep — a one-shot band across the plate face */
.sweep-on-reveal { position: relative; overflow: hidden; }
.sweep-on-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: var(--specular);
  background-size: 240% 100%;
  background-position: 140% 50%;
  opacity: 0;
}
.sweep-on-reveal.is-revealed::after {
  animation: seat-sweep 700ms var(--e-out) calc(var(--i, 0) * 55ms + 160ms);
  opacity: 1;
  animation-fill-mode: backwards;
}

/* Manual sweep trigger used by motion.js (e.g. filter re-flow) */
.is-sweeping::after {
  animation: seat-sweep 620ms var(--e-out);
}

/* FLIP — games grid re-flow and tab indicator — motion.js sets --flip-x/--flip-y/--flip-s, then removes .is-flipping on the next frame so the element transitions back to its natural spot. */

.is-flipping {
  transition: none !important;
  transform: translate3d(var(--flip-x, 0), var(--flip-y, 0), 0) scale(var(--flip-s, 1));
}

.flip-settle {
  transition: transform var(--d-slow) var(--e-seat);
}

/* Cards filtered out of the grid */
.is-filtered-out {
  opacity: 0;
  transform: scale(.96);
  transition: opacity var(--d-ui) var(--e-seat), transform var(--d-ui) var(--e-seat);
  pointer-events: none;
}
.is-hidden { display: none !important; }

/* Odometer (countdown) */

.odo {
  position: relative;
  overflow: hidden;
  height: 1em;
  line-height: 1;
}

.odo__strip {
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 0, 0);
  transition: transform 220ms var(--e-roll);
  will-change: transform;
}

.odo__strip > span {
  height: 1em;
  line-height: 1;
  display: block;
  text-align: center;
}

/* Housing shadow so digits appear to roll behind the faceplate */
.odo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--groove) 0%,
    transparent 26%,
    transparent 74%,
    var(--groove) 100%
  );
  opacity: .85;
}

/* Utilities */

/* Reduced motion — everything above collapses to instant, legible states. — Nothing loops. Nothing translates. Content is always visible. */

@media (prefers-reduced-motion: reduce) {

  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  /* Reveals: show immediately, no rise */
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .sweep-on-reveal::after { display: none; }
  .is-sweeping::after { display: none; }

  /* Continuous loops are stopped and parked at a readable position */
  .marquee__track,
  .rail__track { animation: none !important; transform: none !important; }
  .marquee__viewport,
  .rail__viewport { overflow-x: auto; }

  .rail__sheen { display: none; }
  .btn--primary::after { animation: none !important; background-position: 130% 50%; }
  .badge--live .badge__dot { animation: none !important; opacity: 1; }
  .modal.is-open .modal__dialog::after { animation: none !important; opacity: 0; }
  .toast.is-shown .toast__drain { animation: none !important; transform: scaleX(1); }

  /* Odometer: digits swap without rolling */
  .odo__strip { transition: none !important; }

  /* Card tilt and parallax are switched off in JS as well */
  .game-card { transform: none !important; }
  .game-card__go { opacity: 1 !important; transform: none !important; }

  /* Accordion still opens, just without the row animation */
  .acc-item__panel { transition: none !important; }

  /* Carousel keeps snapping but not smooth-scrolling */
  .carousel__track { scroll-behavior: auto; }
  .carousel__slide { transform: none !important; opacity: 1 !important; }

  /* Drawer and modal appear without sliding */
  .drawer { transition: transform .001ms, visibility 0s !important; }
  .drawer__link { opacity: 1 !important; transform: none !important; }
}
