/* ==========================================================================
   Motion: loading screen + initial states for scroll animations.
   Elements are only hidden when <html> has .motion (JS on, reduced-motion off).
   ========================================================================== */

/* Loader ---------------------------------------------------------------- */
.loader { display: none; }
html.is-loading { overflow: hidden; }
html.is-loading .loader {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: radial-gradient(circle at 50% 40%, #12493a 0%, var(--forest-950) 70%);
  color: var(--gold-300);
}
.loader__inner { display: grid; justify-items: center; gap: var(--sp-5); width: min(80vw, 320px); }
.loader__mark { position: relative; width: 100%; aspect-ratio: 800 / 644; }
.loader__mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.loader__ghost { filter: brightness(0) invert(1); opacity: 0.08; }
.loader__fill { clip-path: inset(100% 0 0 0); filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.35)); }
.loader__steam { position: absolute; left: 32%; top: 18%; width: 22%; color: var(--gold-300); opacity: 0; }
.loader__steam path { stroke-dasharray: 120; stroke-dashoffset: 120; animation: steam 2.2s var(--ease-in-out) infinite; }
.loader__steam path:nth-child(2) { animation-delay: 0.3s; }
.loader__steam path:nth-child(3) { animation-delay: 0.6s; }
.loader__meta { display: flex; justify-content: space-between; width: 100%; font-size: var(--fs-xs); letter-spacing: 0.22em; text-transform: uppercase; color: rgba(241, 234, 219, 0.7); }
.loader__count { font-variant-numeric: tabular-nums; color: var(--gold-300); }
.loader__bar { width: 100%; height: 1px; background: rgba(241, 234, 219, 0.15); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 100%; background: var(--gold-300); transform: scaleX(0); transform-origin: left; }

@keyframes steam {
  0% { stroke-dashoffset: 120; opacity: 0; }
  30% { opacity: 1; }
  100% { stroke-dashoffset: -120; opacity: 0; }
}

/* Hidden-until-animated states ------------------------------------------ */
html.motion [data-reveal],
html.motion [data-reveal-stagger] > *,
html.motion [data-hero-item] { opacity: 0; }
html.motion [data-hero-art] { opacity: 0; }

/* Split headings: each word sits in a mask and slides up */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.12em 0.16em 0.04em; margin: 0 -0.12em -0.16em -0.04em; }
.w__i { display: inline-block; will-change: transform; }
html.motion [data-split]:not(.is-split) { opacity: 0; }
html.motion [data-split].is-split .w__i { transform: translateY(110%); }

/* Steam on the hero */
.hero__steam path { stroke-dasharray: 140; stroke-dashoffset: 140; animation: steam 3.2s var(--ease-in-out) infinite; }
.hero__steam path:nth-child(2) { animation-delay: 0.6s; }
.hero__steam path:nth-child(3) { animation-delay: 1.2s; }

@media (prefers-reduced-motion: reduce) {
  .hero__steam path, .loader__steam path { animation: none; stroke-dashoffset: 0; opacity: 0.6; }
  .marquee__track { animation: none !important; }
}
