/* ==========================================================================
   Sections – page-specific layout for the coming-soon journey
   ========================================================================== */

/* ---- Header -------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-m) var(--ease-out), border-color var(--dur-m) var(--ease-out), backdrop-filter var(--dur-m);
}
.site-header.is-scrolled {
  background-color: rgba(2, 7, 22, 0.62);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
html.js .site-header__chip { opacity: 0; }

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  --world-h: clamp(230px, 30vw, 440px);
  position: relative;
  min-height: max(100svh, 700px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(26, 63, 184, 0.55) 0%, rgba(26, 63, 184, 0) 62%),
    linear-gradient(180deg, #020716 0%, #030a22 45%, #081a4f 100%);
}

.hero__content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding-top: clamp(112px, 15vh, 170px);
  padding-bottom: calc(var(--world-h) * 0.44);
  will-change: transform, opacity;
  pointer-events: none; /* let clicks reach the world behind it */
}
.hero__content > * { pointer-events: auto; }

.hero__eyebrow { margin-bottom: 30px; }

.hero__title {
  max-width: 12ch;
  text-wrap: balance;
  font-size: var(--fs-hero);
  font-weight: 600;
  letter-spacing: -0.048em;
  line-height: 0.98;
}
.hero__title .word {
  display: inline-block;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.hero__title .word > span { display: inline-block; }
.hero__title br { display: none; }
@media (min-width: 760px) {
  .hero__title { max-width: none; }
  .hero__title br { display: inline; }
}

.grad {
  background: linear-gradient(100deg, #ffffff 0%, #b9d1ff 22%, #5c8fff 45%, #b9d1ff 68%, #ffffff 90%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s var(--ease-in-out) infinite alternate;
}

.hero__caret {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  margin-left: 0.05em;
  background: var(--q-blue-400);
  box-shadow: 0 0 0.3em var(--q-blue-500);
  animation: caret-blink 1.2s steps(1) infinite;
}

.hero__lead {
  margin-top: 28px;
  max-width: 35rem;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-muted);
}

/* Pre-entrance states (only when JS runs) */
html.js .hero:not(.is-entering) :is(.hero__eyebrow, .hero__lead, [data-hero-panel], .hero__caret),
html.js .hero:not(.is-entering) .hero__title .word > span { opacity: 0; }
html.js .hero:not(.is-entered) :is(.world__layer, .sky__stars, .sky__moon, .sky__clouds, .hero__cue-inner) { opacity: 0; }

/* Scroll cue */
.hero__cue {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 4;
  translate: -50% 0;
  text-decoration: none;
  transition: opacity var(--dur-m) var(--ease-out);
}
.hero__cue-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-s) var(--ease-out);
}
.hero__cue:hover .hero__cue-inner { color: var(--q-white); }
.hero__cue-arrow { --u: 2px; animation: cue-bob 1.4s steps(2) infinite; }

/* ---- Sky ----------------------------------------------------------------- */

.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.sky__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 38% at 50% 34%, rgba(47, 107, 255, 0.16), transparent 70%),
    radial-gradient(30% 24% at 82% 20%, rgba(185, 209, 255, 0.07), transparent 70%);
}
.sky__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(141, 180, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 180, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: 50% 0;
  -webkit-mask-image: radial-gradient(60% 50% at 50% 38%, #000 0%, transparent 100%);
  mask-image: radial-gradient(60% 50% at 50% 38%, #000 0%, transparent 100%);
}
.sky__stars {
  position: absolute;
  inset: 0;
  will-change: transform;
  /* keep the reading area calm: no stars behind the copy */
  -webkit-mask-image: radial-gradient(34% 36% at 50% 46%, transparent 55%, #000 100%);
  mask-image: radial-gradient(34% 36% at 50% 46%, transparent 55%, #000 100%);
}
.sky__star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  opacity: var(--o);
  animation: twinkle var(--d) ease-in-out var(--delay) infinite;
}
.sky__star--big {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 6px rgba(185, 209, 255, 0.8);
}
.sky__sparkle {
  --u: calc(var(--world-px) * 0.6);
  position: absolute;
  opacity: 0;
  animation: sparkle var(--d) var(--ease-out) var(--delay) infinite;
}
.sky__sparkle svg { filter: drop-shadow(0 0 4px rgba(185, 209, 255, 0.9)); }
.sky__shooting {
  position: absolute;
  width: 140px;
  height: 2px;
  background: linear-gradient(90deg, #fff, rgba(141, 180, 255, 0.6) 30%, transparent);
  transform-origin: left center;
  border-radius: 2px;
}
.sky__moon {
  --u: var(--world-px);
  position: absolute;
  right: 11%;
  top: 17%;
  line-height: 0;
  will-change: transform;
}
.sky__moon::before {
  content: "";
  position: absolute;
  inset: -160%;
  background: radial-gradient(circle, rgba(185, 209, 255, 0.2), transparent 55%);
  animation: glow-breathe 7s ease-in-out infinite;
}
.sky__moon svg {
  position: relative;
  width: calc(12 * var(--u));
  height: calc(12 * var(--u));
  filter: drop-shadow(0 0 18px rgba(185, 209, 255, 0.45));
}
.sky__clouds { position: absolute; inset: 0; }
.sky__cloud {
  --u: var(--world-px);
  position: absolute;
  left: 0;
  line-height: 0;
  animation: drift var(--dur) linear var(--delay) infinite;
  will-change: transform;
}
.sky__cloud svg { width: calc(var(--sw) * var(--u)); height: calc(var(--sh) * var(--u)); }
.sky__cloud .px-W { fill: var(--q-blue-200); }
.sky__cloud .px-S { fill: var(--q-blue-400); }
.sky__spot {
  position: absolute;
  left: 0;
  top: 0;
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.11), transparent 60%);
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
  will-change: transform;
}
.sky.is-paused * { animation-play-state: paused; }

/* ---- World --------------------------------------------------------------- */

.world {
  position: absolute;
  inset: auto 0 0;
  height: var(--world-h);
  z-index: 2;
  pointer-events: none;
}
.world__layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.world__layer svg { width: 100%; height: 100%; }
.world__layer--far { inset: -16px -30px 0; }
.world__layer--hills { inset: -10px -40px 0; }
.world__layer--ground { inset: 0 -40px -10px; }

.world__far { fill: var(--world-far); }
.world__snow { fill: var(--world-snow); opacity: 0.5; }
.world__hills { fill: var(--world-hills); }
.world__trees { opacity: 0.62; }
.world__ground { fill: var(--world-ground); }
.world__edge { fill: var(--world-edge); }
.world__texture rect { fill: #0c1f5c; opacity: 0.7; }
.world__tufts rect { fill: #1f3f9c; }

.world__route {
  fill: none;
  stroke: var(--q-blue-300);
  stroke-width: 1;
  stroke-dasharray: 2 2;
  opacity: 0.5;
}
.world__route--visited {
  stroke: var(--q-white);
  opacity: 1;
}

.world__cp-inner,
.world__flag-inner,
.world__chest-inner,
.world__star-inner,
.world__cp-ring {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.world__flag-inner,
.world__chest-inner { transform-origin: 50% 100%; }
.world__cp-inner,
.world__flag-inner,
.world__chest-inner,
.world__hero { opacity: 0; }
.world__cp-inner rect { transition: fill 400ms var(--ease-out); }
.world__cp-inner.is-hit .px-L { fill: var(--px-W); }
.world__cp-inner.is-hit .px-W { fill: var(--px-B); }
.world__cp-ring { fill: none; stroke: var(--q-white); stroke-width: 0.6; opacity: 0; }

.world__star { opacity: 0; transition: opacity 400ms steps(3); }
.world__star.is-on { opacity: 1; animation: bob-step 1.2s steps(1) infinite; }
.world__star-inner { filter: url(#qw-glow); }

.world__head { fill: var(--q-white); }
.world__spark { fill: var(--q-white); }

.world__hero .px-alt { animation: eye-blink 4.8s steps(1) infinite; }
.world__hero-hit {
  fill: transparent;
  pointer-events: all;
  cursor: pointer;
}

/* ---- Shared section heads ------------------------------------------------ */

.section-head {
  display: grid;
  justify-items: start;
  gap: 22px;
  max-width: 42rem;
  margin-bottom: clamp(48px, 7vw, 84px);
}
.section-head h2,
.stop-demo__copy h2,
.route-teaser__copy h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.section-head__lead {
  max-width: 34rem;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---- Pixel map frame (HUD + canvas) ---------------------------------- */

.board__frame {
  padding: 14px;
  border-radius: var(--radius-l);
  background: linear-gradient(180deg, rgba(20, 42, 118, 0.42), rgba(6, 16, 48, 0.62));
  border: 1px solid var(--line-strong);
  box-shadow:
    0 50px 120px -50px rgba(47, 107, 255, 0.6),
    inset 0 1px 0 rgba(185, 209, 255, 0.14);
}
.board__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 8px 14px;
}
.board__bar:last-child { padding: 14px 8px 4px; }
.board__hud {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.board__hud b {
  font-weight: 400;
  color: var(--q-white);
  font-variant-numeric: tabular-nums;
}
.board__team { --u: 1.6px; }

.board__canvas {
  position: relative;
  aspect-ratio: 63 / 43;
  overflow: hidden;
  border-radius: 12px;
  background: var(--q-navy-950);
  box-shadow: inset 0 0 0 1px rgba(141, 180, 255, 0.12);
}
.board__map,
.board__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.board__block { fill: #0b1c50; }
.board__roof { fill: #142b7c; }
.board__park { fill: #0c2a6b; }
.board__tree { fill: var(--q-blue-400); opacity: 0.75; }
.board__water { fill: #0f2f8f; }
.board__wave { fill: var(--q-blue-300); opacity: 0.55; animation: wave 2.4s steps(1) infinite; }
/* ---- Footer -------------------------------------------------------------- */

.footer {
  position: relative;
  padding: 56px 0 calc(44px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 26, 74, 0.28), transparent 80%);
}
.footer__trail {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  margin-bottom: 36px;
}
.footer__node {
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--q-blue-400);
  box-shadow: 0 0 10px rgba(92, 143, 255, 0.7);
  scale: 0;
  transition: scale 500ms var(--ease-lift);
}
.footer__line {
  flex: 1;
  height: 2px;
  background-image: linear-gradient(90deg, var(--q-blue-300) 50%, transparent 50%);
  background-size: 8px 2px;
  opacity: 0.55;
  scale: 0 1;
  transform-origin: left center;
  transition: scale 800ms steps(12);
}
.footer__goal {
  --u: 3px;
  flex: none;
  opacity: 0;
  scale: 0.2;
  transition: opacity 300ms steps(3), scale 600ms var(--ease-lift);
}
.footer__goal svg { filter: drop-shadow(0 0 8px rgba(185, 209, 255, 0.9)); }
.footer__walker {
  --u: 2.4px;
  position: absolute;
  left: 0;
  bottom: calc(50% - 1px);
  width: calc(8 * var(--u));
  height: calc(10 * var(--u));
  opacity: 0;
}
.footer__walker > span { position: absolute; inset: 0; }
.footer__walker > span:last-child { opacity: 0; }

.footer__trail.is-revealed > :nth-child(1) { scale: 1; transition-delay: 0ms; }
.footer__trail.is-revealed > :nth-child(2) { scale: 1; transition-delay: 100ms; }
.footer__trail.is-revealed > :nth-child(3) { scale: 1; transition-delay: 900ms; }
.footer__trail.is-revealed > :nth-child(4) { scale: 1; transition-delay: 1000ms; }
.footer__trail.is-revealed > :nth-child(5) { scale: 1; transition-delay: 1800ms; }
.footer__trail.is-revealed > :nth-child(6) { scale: 1; transition-delay: 1900ms; }
.footer__trail.is-revealed .footer__goal { opacity: 1; scale: 1; transition-delay: 2700ms; animation: twinkle-goal 2.4s ease-in-out 3.3s infinite; }
.footer__trail.is-revealed .footer__walker {
  opacity: 1;
  animation: trail-walk 2.7s steps(34) 100ms forwards;
}
.footer__trail.is-revealed .footer__walker > span:first-child { animation: frame-a 0.3s steps(1) 100ms 9; }
.footer__trail.is-revealed .footer__walker > span:last-child { animation: frame-b 0.3s steps(1) 100ms 9; }

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.footer__tagline {
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}
.footer__copy { font-family: var(--font-mono); font-size: 0.8125rem; }
.footer__link {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color 200ms, text-decoration-color 200ms;
}
.footer__link:hover { color: var(--q-white); text-decoration-color: currentColor; }

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 960px) {
}

@media (max-width: 640px) {
  .site-header__inner { height: 64px; }
  .site-header__chip { font-size: 0.6875rem; padding: 0.45em 0.8em; }
  .hero { --world-h: clamp(226px, 60vw, 280px); }
  .hero__content { padding-top: 104px; padding-bottom: calc(var(--world-h) * 0.5); }
  .world__layer--far,
  .world__layer--hills,
  .world__layer--ground { inset: 0; }
  .hero__eyebrow { margin-bottom: 22px; }
  .hero__lead { margin-top: 20px; }
  .sky__moon { right: 8%; top: 13%; }
  .board__frame { padding: 10px; border-radius: 20px; }
  .board__bar { padding-inline: 4px; }
  .board__hud { font-size: 0.5625rem; gap: 7px; }
  .footer__row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

