/* ==========================================================================
   MANDOCMD — wow.css
   hero marquee band · aurora · page wipe · sparks · scramble · magnetics
   ========================================================================== */

:root {
  --band-h: clamp(52px, 7.6vh, 74px);
}

/* ---------- hero marquee band (visible on the first page) ---------- */
.hero { padding-bottom: calc(var(--band-h) + 6px); }

.hero__band {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 4;
  border-block: 1px solid var(--line);
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.72), rgba(14, 14, 14, 0.98) 70%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding-block: clamp(9px, 1.2vw, 14px);
}

.hero__band .marquee__track { animation-duration: 26s; }
.hero__band .marquee__item { font-size: clamp(0.95rem, 1.9vw, 1.5rem); }

/* keep the readout and scroll cue clear of the band */
.hero__scroll { bottom: calc(var(--band-h) + 20px); }
body.on-hero .chapter { bottom: calc(var(--band-h) + 18px); }

@media (max-width: 720px) {
  .hero__scroll { bottom: calc(var(--band-h) + 12px); }
}

/* ---------- aurora ---------- */
.aurora {
  position: absolute;
  inset: -12%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.75;
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora__blob.a1 {
  width: 46vw; height: 46vw; left: -10%; top: -8%;
  background: radial-gradient(circle, rgba(242, 107, 29, 0.55), transparent 68%);
  animation: aurora-drift-a 23s ease-in-out infinite;
}

.aurora__blob.a2 {
  width: 40vw; height: 40vw; right: -8%; top: 6%;
  background: radial-gradient(circle, rgba(255, 138, 76, 0.3), rgba(242, 107, 29, 0.1) 55%, transparent 72%);
  animation: aurora-drift-b 31s ease-in-out infinite;
}

.aurora__blob.a3 {
  width: 34vw; height: 34vw; left: 34%; bottom: -16%;
  background: radial-gradient(circle, rgba(243, 233, 216, 0.16), transparent 70%);
  animation: aurora-drift-c 37s ease-in-out infinite;
}

@keyframes aurora-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6%, 8%, 0) scale(1.14); }
}
@keyframes aurora-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50% { transform: translate3d(-8%, 6%, 0) scale(0.92); }
}
@keyframes aurora-drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-5%, -7%, 0) scale(1.2); }
}

@media (max-width: 720px) {
  .aurora__blob.a1 { width: 80vw; height: 80vw; }
  .aurora__blob.a2 { width: 70vw; height: 70vw; }
  .aurora__blob.a3 { width: 60vw; height: 60vw; }
}

/* ---------- page-change wipe: speed streaks ---------- */
.wipe {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow: hidden;
  pointer-events: none;
}

.wipe i {
  position: absolute;
  left: 0;
  height: 2px;
  width: 42vw;
  opacity: 0;
  transform: translateX(-170%) rotate(-6deg);
  background: linear-gradient(90deg, transparent, rgba(242, 107, 29, 0.75) 62%, rgba(255, 238, 220, 0.95));
  box-shadow: 0 0 18px rgba(242, 107, 29, 0.55);
  will-change: transform, opacity;
}

.wipe i:nth-child(1) { top: 17%; width: 30vw; }
.wipe i:nth-child(2) { top: 36%; width: 54vw; height: 3px; }
.wipe i:nth-child(3) { top: 54%; width: 22vw; }
.wipe i:nth-child(4) { top: 68%; width: 46vw; }
.wipe i:nth-child(5) { top: 84%; width: 34vw; height: 3px; }

/* ---------- click sparks ---------- */
.sparks {
  position: fixed;
  inset: 0;
  z-index: 118;
  overflow: hidden;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--orange);
  box-shadow: 0 0 16px rgba(242, 107, 29, 0.9), 0 0 4px rgba(255, 255, 255, 0.6);
  will-change: transform, opacity;
}

/* ---------- hero entrance ---------- */
[data-hero-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out, ease-out), transform 0.9s var(--ease-out, ease-out);
}

[data-hero-reveal].in { opacity: 1; transform: none; }

/* the headline is driven letter by letter in hero.js */
.hero__title > [data-hero-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none;
}

/* ---------- magnetics ---------- */
.btn,
.hold__btn,
.nav__cta,
.pager button {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s, border-color 0.3s, color 0.3s;
  will-change: transform;
}

/* ---------- manifesto word fill ---------- */
.manifesto__big .w {
  opacity: 0.16;
  transition: opacity 0.45s ease;
}

.manifesto__big .w.on { opacity: 1; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .aurora__blob { animation: none; }
  .wipe { display: none; }
  .sparks { display: none; }
  [data-hero-reveal] { opacity: 1; transform: none; }
  .manifesto__big .w { opacity: 1; }
  .hero__band .marquee__track { animation-duration: 60s; }
}

/* ---------- page-to-page depth transition ---------- */
.page.is-in {
  animation: page-settle 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes page-settle {
  from { opacity: 0.62; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: none; }
}

/* ---------- badge pulse ring ---------- */
.hero__badge { position: relative; }

.hero__badge::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(242, 107, 29, 0.55);
  animation: badge-ring 3.4s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
  pointer-events: none;
}

@keyframes badge-ring {
  0% { transform: scale(0.92); opacity: 0.7; }
  70% { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .page.is-in { animation: none; }
  .hero__badge::after { animation: none; opacity: 0.35; }
}

/* ---------- cursor headlight: a warm mask that follows the pointer ---------- */
.hero__torch {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background:
    radial-gradient(circle at var(--tx, 50%) var(--ty, 45%), rgba(242, 107, 29, 0.18), transparent 58%),
    repeating-linear-gradient(0deg, rgba(243, 233, 216, 0.085) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(243, 233, 216, 0.085) 0 1px, transparent 1px 40px);
  -webkit-mask-image: radial-gradient(
    ellipse var(--rx, 0px) var(--ry, 0px) at var(--tx, 50%) var(--ty, 45%),
    #000 0%, rgba(0, 0, 0, 0.5) 38%, transparent 68%
  );
  mask-image: radial-gradient(
    ellipse var(--rx, 0px) var(--ry, 0px) at var(--tx, 50%) var(--ty, 45%),
    #000 0%, rgba(0, 0, 0, 0.5) 38%, transparent 68%
  );
}

body.torch-on .hero__torch { opacity: 1; }

/* ---------- odometer digits ---------- */
.odo {
  display: inline-flex;
  height: 1em;
  overflow: hidden;
  line-height: 1;
  vertical-align: bottom;
}

.odo__col {
  display: block;
  will-change: transform;
  transform: translateY(0);
}

.odo__col span {
  display: block;
  height: 1em;
}

/* ---------- rail glow that trails the active dot ---------- */
.pager__glow {
  position: absolute;
  left: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 107, 29, 0.5), transparent 70%);
  filter: blur(4px);
  pointer-events: none;
  transition: top 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
  opacity: 0;
}

/* ---------- velocity chromatic split on the hero headline ---------- */
.hero__title {
  text-shadow:
    calc(var(--ab, 0) * -1px) 0 rgba(242, 107, 29, 0.75),
    calc(var(--ab, 0) * 1px) 0 rgba(243, 233, 216, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .hero__torch { display: none; }
  .pager__glow { display: none; }
  .hero__title { text-shadow: none; }
}
