/* ============================================================
   LetSowan — coloring the funded story
   Dark, cinematic, photo-forward.
   ============================================================ */

:root {
  color-scheme: dark; /* stops Samsung Internet / Chrome force-dark from re-inverting us */
  --bg: #0a0a0b;
  --bg-raised: #111113;
  --ink: #e9e6df;
  --ink-dim: #9b968c;
  --ink-faint: #767268; /* dim, but still readable on #0a0a0b */
  --gold: #c9a86a;
  --gold-soft: rgba(201, 168, 106, 0.14);
  --line: rgba(233, 230, 223, 0.1);
  /* B612 + B612 Mono: the typeface Airbus commissioned for cockpit
     instrument displays — real aviation provenance for a flight UI */
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "B612", system-ui, sans-serif;
  --mono: "B612 Mono", "Courier New", Courier, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* author display rules (.btn etc.) must never resurrect [hidden] elements */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

/* hard horizontal clip: body{overflow-x:hidden} alone does not stop
   pan/zoom reveal on mobile browsers — clip on both elements does */
html, body {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400; /* B612 ships 400/700 only */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: -8%;               /* animation shifts ≤3% — no need to be 200% wide */
  width: 116%;
  height: 116%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 8s steps(10) infinite;
}
@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-3%, -3%); }
  80% { transform: translate(2%, 2%); }
}

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  background: linear-gradient(to bottom, rgba(10,10,11,0.85), transparent);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.nav-logo { width: 34px; height: 34px; color: var(--gold); }
.logo-ls {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  fill: currentColor;
}
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a { padding: 0.7rem 0.2rem; } /* honest tap targets */

/* mobile cluster: BATTLE STORM + MENU (hidden on desktop) */
.nav-mobile { display: none; align-items: center; gap: 0.5rem; }
.nav-storm--mini {
  color: var(--gold);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 0.5rem;
}
.nav-menu-btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
}
.nav-menu-btn[aria-expanded="true"] { color: var(--gold); border-color: var(--gold); }
.nav-menu {
  position: fixed;
  top: 3.9rem;
  left: 0.6rem;
  right: 0.6rem;
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  background: rgba(10, 10, 11, 0.97);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.nav-menu[hidden] { display: none; }
.nav-menu a, .nav-menu .lang-toggle {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  min-height: 44px;
  border: none;
  border-radius: 8px;
  background: transparent;
}
.nav-menu a:hover, .nav-menu a:focus-visible { color: var(--gold); background: rgba(201, 168, 106, 0.08); }
.nav-menu .lang-toggle { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: var(--gold); }

/* keyboard travellers get a visible trail */
a:focus-visible, button:focus-visible, canvas:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.lang-toggle {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  padding: 0.18rem 0.5rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 106, 0.45);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.lang-toggle:hover { background: var(--gold); color: #17130b; }

/* ============ Sections shared ============ */
section { padding: 4.6rem 2rem; max-width: 1150px; margin: 0 auto; scroll-margin-top: 4.5rem; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.2rem;
}
.section-num {
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.2em;
}
.section-head h2, .section-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: 0.01em;
}

/* ============ Hero ============ */
.hero {
  min-height: 100svh;
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem 4rem;
  /* static fallback — stays underneath, and is all you get without WebGL2 */
  background:
    radial-gradient(ellipse 80% 55% at 50% 115%, rgba(201,168,106,0.13), transparent 65%),
    radial-gradient(ellipse 60% 40% at 80% -10%, rgba(60,80,120,0.18), transparent 70%),
    var(--bg);
}
/* The Flight: one fixed canvas behind the whole page */
.flight-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.flight-canvas.is-on { opacity: 1; }
main, .footer { position: relative; z-index: 1; }
.nav { z-index: 100; } /* stays fixed (rule above must not touch its position) */

/* unified eased scroll (desktop): the page itself is moved by the flight loop */
body.smooth-on #smooth {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  will-change: transform;
}
body.gl-on .hero { background: transparent; }
/* content sections float as beats inside the flight */
body.gl-on section:not(.hero) {
  /* solid glass, no backdrop-filter: blur over a per-frame-moving backdrop
     forces constant recomposition and was the main scroll-lag source */
  background: rgba(13, 13, 15, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(1150px, calc(100% - 1.6rem));
  margin: 3rem auto;
  padding: 3.4rem clamp(1.2rem, 4vw, 2.8rem);
}
body.gl-on .footer {
  border-top: none;
  background: linear-gradient(to top, var(--bg) 35%, transparent);
  padding-top: 5rem;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 46% at 50% 46%, rgba(10,10,11,0.42), transparent 72%),
    linear-gradient(to bottom, rgba(10,10,11,0.72), transparent 26%, transparent 70%, var(--bg) 98%);
}
.hero > :not(.hero-veil) { position: relative; z-index: 2; }
.hero-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.6rem;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 8vw, 6.2rem); /* longer hook line than the old title */
  line-height: 1.06;
  letter-spacing: -0.01em;
}
.hero-title span { display: block; }
.hero-title em {
  font-style: italic;
  color: var(--gold);
}
.hero-sub {
  margin-top: 2rem;
  color: var(--ink-dim);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  letter-spacing: 0.04em;
}
.hero-cta { margin-top: 2.4rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 8px; /* instrument panel, not SaaS pill */
  font-family: var(--mono);
  font-size: 1rem;               /* research floor for CTA text is ~18px — primary goes higher */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;           /* a wrapped CTA is a broken CTA */
  text-align: center;
  transition: transform 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-primary {
  background: var(--gold);
  color: #17130b;
  font-weight: 700;
  font-size: 1.125rem;           /* 18px */
  padding: 1rem 2.3rem;
  box-shadow: 0 3px 16px rgba(201, 168, 106, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); background: #dbbe84; }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink-dim);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.hero-micro {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.hero-proof {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
}
.hero-scroll {
  position: absolute;
  bottom: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-faint);
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}
/* short viewports: the CTA row reaches the bottom — drop the hint entirely */
@media (max-height: 820px) {
  .hero-scroll { display: none; }
}

/* ============ Story ============ */
.story-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}
.story-lede {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.3;
  margin-bottom: 1.6rem;
}
.story-lede em { color: var(--gold); }
.story-text p + p { margin-top: 1.1rem; color: var(--ink-dim); }
.id-accent {
  font-style: italic;
  color: var(--gold);
}
.story-stats {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  border-left: 1px solid var(--line);
  padding-left: 2.2rem;
}
.stat-value, .stat-suffix {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--ink);
  line-height: 1;
}
.stat-suffix { color: var(--gold); }
.stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

/* hero game: the sim IS the hook now */
.hero-game {
  width: min(92vw, 620px);
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #041014;
}
.hero-game canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y; /* tap steers; scrolling stays free */
}
.hero-game-hint {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  padding: 0.45rem 0.8rem;
  border-top: 1px solid var(--line);
}
.hero-title--compact { font-size: clamp(2rem, 5.5vw, 4.2rem); }
.hero .hero-sub { margin-top: 1.4rem; }
/* short viewports: the game wins, the sub yields */
@media (max-height: 760px) {
  .hero .hero-sub { display: none; }
  .hero-game { margin-top: 1.4rem; }
}
/* Catatan — the notes pages (ID-only, article layout) */
.note-page { max-width: 46rem; margin: 0 auto; padding: 6.5rem 1.4rem 3rem; }
.note-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
}
.note-page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.15;
  margin: 0.6rem 0 0.4rem;
}
.note-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); margin-bottom: 2rem; }
.note-body p { color: var(--ink-dim); line-height: 1.75; margin-bottom: 1.1rem; }
.note-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--ink);
  margin: 2.2rem 0 0.8rem;
}
.note-body ol, .note-body ul { color: var(--ink-dim); line-height: 1.75; margin: 0 0 1.1rem 1.2rem; }
.note-body li { margin-bottom: 0.45rem; }
.note-body b, .note-body strong { color: var(--ink); }
.note-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(233, 230, 223, 0.07);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.08em 0.4em;
}
.note-callout {
  border-left: 3px solid var(--gold);
  background: rgba(201, 168, 106, 0.06);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem;
  margin: 1.4rem 0;
}
.note-callout p { margin: 0; }
.note-cta { margin: 2.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.note-list a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.25s;
}
.note-list a:hover { border-color: var(--gold); }
.note-list b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.note-list span { color: var(--ink-faint); font-size: 0.85rem; }

/* FAQ — the questions people actually ask (battle-storm page) */
.storm-faq { margin-top: 2.6rem; max-width: 46rem; }
.faq-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 1.4rem;
}
.faq-item { border-top: 1px solid var(--line); padding: 1rem 0 0.4rem; }
.faq-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.45rem; }
.faq-item p { color: var(--ink-dim); font-size: 0.92rem; line-height: 1.65; }

/* the three product truths — everything else lives on the dedicated page */
.hangar-truths {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
}
.hangar-truths li {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.5;
}
.hangar-truths li::before {
  content: "▸";
  color: var(--gold);
  margin-right: 0.55rem;
}

/* NO ORDER ACCESS — the security card */
.access-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}
.access-title {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.access-title::before {
  content: "▪";
  color: #6abe7a;
  margin-right: 0.5rem;
}

/* built in public */
.public-intro, .public-bridge {
  color: var(--ink-dim);
  max-width: 46rem;
}
.public-intro { margin: -1rem 0 2.2rem; }
.public-bridge { margin-top: 2.2rem; }
.public-bridge a { color: var(--gold); }
.story-stats--row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1.4rem;
}

.story-grid--solo { display: block; max-width: 46rem; }
.footer-close { margin-bottom: 0.7rem; color: var(--ink-dim); }

/* right column: the proof stack (footage, steps, boundaries) */
.hangar-side {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}
.hangar-side .hangar-real { margin: 0; max-width: none; }
.hangar-access {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}
.hangar-access li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  min-width: 0;
}
.hangar-access b { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.7rem; }
.hangar-access span { color: var(--ink-dim); }
.access-can { border-left-color: #6abe7a; }
.access-can b { color: #6abe7a; }
.access-cant { border-left-color: #d6564a; }
.access-cant b { color: #d6564a; }

/* Sabar Mode block — the differentiator gets its own stage */
.hangar-sabar {
  margin-top: 2.6rem;
  padding: 1.6rem 1.6rem 1.4rem;
  border: 1px solid rgba(201, 168, 106, 0.4);
  border-radius: 12px;
  background: rgba(201, 168, 106, 0.06);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 240px);
  gap: 1.6rem;
  align-items: start;
}
.sabar-shot { margin: 0; }
.sabar-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(201, 168, 106, 0.35);
  border-radius: 10px;
}
.sabar-shot figcaption {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
@media (max-width: 700px) {
  .hangar-sabar { grid-template-columns: 1fr; }
  .sabar-shot { max-width: 260px; }
}
.sabar-badge {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  color: #17130b;
  background: var(--gold);
  border-radius: 6px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
}
.sabar-lead { color: var(--ink); margin-bottom: 0.9rem; }
.sabar-list {
  list-style: none;
  color: var(--ink-dim);
  margin-bottom: 1.2rem;
}
.sabar-list li {
  padding-left: 1.4rem;
  position: relative;
  margin: 0.4rem 0;
}
.sabar-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--gold);
}
.sabar-trust {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--ink);
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

/* facts strip: quiet mono chips */
.hangar-facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.hangar-facts li {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}

/* ============ Journey timeline ============ */
.journey-intro { color: var(--ink-dim); margin: -1.4rem 0 3rem; }
.timeline {
  list-style: none;
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), var(--line) 70%);
}
.timeline-item {
  position: relative;
  padding-bottom: 2.8rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--gold);
}
.timeline-item--next .timeline-marker {
  background: var(--gold);
  box-shadow: 0 0 14px rgba(201,168,106,0.55);
}
.timeline-date {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.timeline-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0.3rem 0 0.4rem;
}
.timeline-body p { color: var(--ink-dim); max-width: 46rem; }
.timeline-item--next h3 { color: var(--gold); }
/* locked future chapters: the map goes further than funded
   (dim the body, not the item — .reveal.is-visible would override item opacity) */
.timeline-item--locked .timeline-body { opacity: 0.45; }
.timeline-item--locked .timeline-marker {
  border-style: dashed;
  border-color: var(--ink-faint);
  background: transparent;
}
.timeline-item--locked .timeline-date { color: var(--ink-faint); }
.timeline-item--locked h3 { color: var(--ink-dim); }

.journey-bridge {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  max-width: 46rem;
}
.journey-bridge a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 168, 106, 0.4);
}
.journey-bridge a:hover { border-bottom-color: var(--gold); }

/* ============ Hangar: Battle Storm ============ */
.nav-storm { color: var(--gold) !important; }
.hangar-intro { color: var(--ink-dim); margin: -1.4rem 0 2.6rem; max-width: 46rem; }
.hangar-intro em { color: var(--gold); font-style: italic; }
.hangar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.6rem;
  align-items: start;
}
/* grid items default to min-width:auto — the sim canvas's intrinsic width
   was forcing the whole section (and page) wider than small viewports */
.hangar-grid > *, .lab-ui > *, .story-grid > * { min-width: 0; }
.hangar-demo {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #0b0c10;
}
.hangar-demo canvas { display: block; width: 100%; height: auto; }
.hangar-demo-tag {
  position: absolute;
  right: 0.8rem;
  bottom: 0.6rem;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hangar-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.6rem;
  border: 1px solid rgba(201, 168, 106, 0.35);
  border-radius: 12px;
  background:
    radial-gradient(ellipse 120% 70% at 80% -10%, rgba(201, 168, 106, 0.10), transparent 60%),
    var(--bg-raised);
}
.hangar-item-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--ink-dim);
}
.hangar-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  letter-spacing: 0.04em;
}
.hangar-name em { font-style: italic; color: var(--gold); }
.hangar-desc { color: var(--ink-dim); }
.hangar-stats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hangar-stats li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--ink-dim);
}
.hangar-stats li::after {
  content: "";
  order: 2;
  flex: 1;
  border-bottom: 1px dotted rgba(201, 168, 106, 0.3);
}
.hangar-stats li span { order: 1; }
.hangar-stats li b { order: 3; color: var(--gold); font-weight: 400; }
.hangar-cta { margin-top: auto; display: flex; flex-direction: column; gap: 0.7rem; }
.hangar-btn { text-align: center; }
.hangar-soon { display: flex; flex-direction: column; gap: 0.7rem; }
.hangar-soon-badge {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(201, 168, 106, 0.5);
  border-radius: 6px;
  text-align: center;
  animation: boot-pulse 2.2s ease-in-out infinite;
}
.hangar-soon .btn { text-align: center; }
.hangar-fine { font-size: 0.78rem; color: var(--ink-faint); font-style: italic; }

/* real gameplay footage — the proof before the ask */
.hangar-real {
  margin: 0 0 1.6rem;
  max-width: 62rem;
}
.hangar-real video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(201, 168, 106, 0.35);
  border-radius: 12px;
  background: #041014;
}
.hangar-real-tag {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}
.hangar-real-tag::before {
  content: "●";
  color: var(--threat, #d6564a);
  margin-right: 0.5rem;
  font-size: 0.6rem;
  vertical-align: 1px;
}

/* what's inside the channel — the box, shown before the ask */
.hangar-box {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}
.hangar-box li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  min-width: 0;
}
.hangar-box li::before {
  content: "▸";
  color: var(--gold);
  margin-right: 0.35rem;
}
.hangar-box b { color: var(--ink); font-weight: 700; }
.hangar-box span { color: var(--ink-faint); }

/* what happens after the tap — three steps, no mystery */
.hangar-steps {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  text-align: center;
}

/* ============ Lab (secret waypoint) ============ */
.lab[hidden] { display: none !important; }
.lab-intro { color: var(--ink-dim); margin: -1.4rem 0 2.4rem; max-width: 46rem; }
.lab-ui {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 1.4rem;
  align-items: start;
}
.lab-controls {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
}
.lab-row { display: flex; flex-direction: column; gap: 0.35rem; }
.lab-row label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.lab-row select,
.lab-row input[type="text"] {
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  font-family: var(--sans);
}
.lab-row input[type="text"] { font-family: "Courier New", monospace; }
.lab-row select:focus, .lab-row input:focus { outline: 1px solid var(--gold); }
.lab-row input[type="range"] { accent-color: var(--gold); }
.lab-modes { flex-direction: row; gap: 0.4rem; }
.lab-btn {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.lab-btn:hover { border-color: var(--gold); color: var(--gold); }
.lab-btn.is-active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}
.lab-btn:disabled { opacity: 0.35; cursor: default; }
.lab-btn:disabled:hover { border-color: var(--line); color: var(--ink-dim); }
.lab-actions { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.lab-actions .lab-btn { flex: 1 1 45%; }
.lab-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #060607;
  min-height: 200px;
  transition: border-color 0.25s;
}
.lab-stage.is-drag { border-color: var(--gold); }
.lab-stage canvas { display: block; width: 100%; height: auto; }
.lab-drop-hint {
  position: absolute;
  right: 0.9rem;
  bottom: 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: none;
}

/* ============ Links ============ */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1rem;
  max-width: 640px;
}
.link-card {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  background: var(--bg-raised);
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.link-card:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
  transform: translateY(-2px);
}
.link-card--primary {
  border-color: rgba(201, 168, 106, 0.5);
  background: var(--gold-soft);
}
.link-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
}
.link-handle { color: var(--ink-dim); font-size: 0.88rem; }
.link-arrow {
  margin-left: auto;
  color: var(--gold);
  transition: transform 0.3s;
}
.link-card:hover .link-arrow { transform: translateX(4px); }

/* ============ Game layer: boot, HUD, juice ============ */
body.no-scroll { overflow: hidden; }

.boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: #060607;
  transition: opacity 0.7s ease;
}
.boot.boot-out { opacity: 0; pointer-events: none; }
.boot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  padding: 2rem;
  text-align: center;
}
.boot-logo { width: 64px; height: 64px; color: var(--gold); }
.boot-lines {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.85;
  min-height: 8.2em;
  text-align: left;
  white-space: pre-line;
}
.boot-progress {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.boot-bar {
  display: block;
  width: 220px;
  height: 3px;
  background: rgba(201, 168, 106, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
.boot-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.35s ease;
}
.boot-start {
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.22em;
  padding: 0.9rem 2.4rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 4px;
  cursor: pointer;
  animation: boot-pulse 1.6s ease-in-out infinite;
}
.boot-start:hover { background: var(--gold); color: #17130b; }
@keyframes boot-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(201,168,106, 0.0); }
  50% { box-shadow: 0 0 22px rgba(201,168,106, 0.35); }
}
.boot-skip {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hud {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  font-family: var(--mono);
  color: var(--gold);
}
.hud-path {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  height: 46vh;
  width: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 4% 0;
}
.hud-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), rgba(201,168,106,0.15));
}
.hud-dot {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(201,168,106,0.8);
  transition: top 0.25s linear;
}
.hud-wp {
  position: relative;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(10,10,11,0.8);
  pointer-events: auto;
  opacity: 0.75;
}
/* the dot stays 7px; the finger gets 45px */
.hud-wp::after { content: ""; position: absolute; inset: -19px; }
.hud-wp:hover { opacity: 1; box-shadow: 0 0 8px rgba(201,168,106,0.7); }
.hud-toast {
  position: absolute;
  top: 4.4rem;
  left: 50%;
  transform: translate(-50%, -12px);
  padding: 0.55rem 1.3rem;
  border: 1px solid rgba(201,168,106,0.5);
  border-radius: 4px;
  background: rgba(10,10,11,0.82);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hud-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* gold reticle cursor on pointer devices */
@media (hover: hover) {
  body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="5.5" fill="none" stroke="%23c9a86a" stroke-width="1.4"/><path d="M9 0v4M9 14v4M0 9h4M14 9h4" stroke="%23c9a86a" stroke-width="1.2"/></svg>') 9 9, auto;
  }
  a, button, select, label, input[type="range"], .lab-btn {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="6.5" fill="none" stroke="%23e1c48a" stroke-width="1.6"/><circle cx="10" cy="10" r="1.6" fill="%23e1c48a"/><path d="M10 0v3.4M10 16.6v3.4M0 10h3.4M16.6 10h3.4" stroke="%23e1c48a" stroke-width="1.3"/></svg>') 10 10, pointer;
  }
}

/* phones: real-device fixes — scrim for text over the bright sky (WCAG),
   thumb-zone CTA sizing, HUD kept out of the content's way */
@media (max-width: 768px) {
  .hero { padding: 5.5rem 1.2rem 6rem; }
  .hero-veil {
    background:
      linear-gradient(to bottom,
        rgba(10, 10, 11, 0.80) 0%,
        rgba(10, 10, 11, 0.46) 32%,
        rgba(10, 10, 11, 0.58) 62%,
        var(--bg) 97%);
  }
  .hero-title, .hero-kicker, .hero-proof { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
  .hero-sub { color: var(--ink); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65); }
  .hero-micro { color: var(--ink-dim); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65); }
  /* ALL buttons, not just the hero's — the hangar CTA was overflowing its pill */
  .btn {
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    padding: 1rem 1rem;          /* ~50px tall — thumb-zone tap target */
  }
  .btn-primary { font-size: 0.94rem; }
  .hangar-btn, .hangar-soon .btn { width: 100%; }
  /* the hangar card is narrower than the hero — its CTA needs to be tighter */
  .hangar-btn { font-size: 0.85rem; padding-left: 0.5rem; padding-right: 0.5rem; }
  .hangar-card { padding: 1.3rem 1rem; }
  /* solid nav bar: section content was colliding with the transparent nav text */
  .nav {
    background: linear-gradient(to bottom, rgba(10, 10, 11, 0.96) 72%, rgba(10, 10, 11, 0));
    padding-bottom: 1.3rem;
  }
}

@media (max-width: 860px) {
  .hud-path { display: none; }         /* thumbs live there */
    .hud-toast { font-size: 0.62rem; letter-spacing: 0.14em; max-width: 92vw; white-space: normal; text-align: center; }
  .boot-lines { font-size: 0.7rem; }
}

/* the landing gets a clear, card-free viewport before the footer */
.landing-stage { height: 55svh; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem 2rem 3.4rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.footer-logo {
  width: 40px;
  height: 40px;
  color: var(--gold);
  margin-bottom: 0.9rem;
  opacity: 0.85;
}

/* ============ Reveal on scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============ Responsive ============ */
@media (max-width: 860px) {
  section { padding: 4.5rem 1.4rem; }
  .story-grid { grid-template-columns: 1fr; gap: 2.6rem; }
  .story-stats {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 1.8rem 0 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
  }
  .lab-ui { grid-template-columns: 1fr; }
  .hangar-grid { grid-template-columns: 1fr; }
  /* proof before the ask when stacked */
  .hangar-side { order: -1; }
  .nav { padding: 0.9rem 1.2rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.76rem; } /* 12px floor, per the UX brief */
}

/* compact nav before it can ever exceed the viewport ("LINKS" was
   pushed off-screen on a real 412px phone) */
@media (max-width: 600px) {
  .nav-brand span { display: none; }
  .nav { padding: 0.5rem 0.9rem; }
  /* three items, all readable, all thumb-sized: logo · BATTLE STORM · MENU */
  .nav-links { display: none; }
  .nav-mobile { display: flex; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(2.1rem, 11vw, 3.4rem); } /* hook line must fit 360px wide */
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 100%; text-align: center; }
  section { padding: 3.6rem 1.1rem; }
  .section-head { margin-bottom: 2rem; }
  .stat-value, .stat-suffix { font-size: 2.1rem; }
  .timeline { padding-left: 1.6rem; }
  .timeline-marker { left: -1.6rem; }
}

/* touch devices: bigger targets, no hover-only hints, calmer grain */
@media (hover: none) {
  .grain { animation: none; }
  .lab-drop-hint { display: none; }
  .lab-btn { padding: 0.75rem 0.7rem; }
  .lab-row select, .lab-row input[type="text"] { padding: 0.65rem 0.7rem; }
  .nav-links a { padding: 0.4rem 0; }
}

/* iOS Safari zooms the page when focusing form controls under 16px */
@media (hover: none) {
  .lab-row select,
  .lab-row input[type="text"] { font-size: 16px; }
}

/* Galaxy Fold cover screens and other ~280px viewports */
@media (max-width: 380px) {
  .nav { padding: 0.4rem 0.5rem; }
  .nav-storm--mini { font-size: 0.75rem; letter-spacing: 0.04em; padding: 0.85rem 0.3rem; }
  .nav-menu-btn { padding: 0.75rem 0.6rem; }
  .btn { font-size: 0.78rem; padding: 0.95rem 0.55rem; }
  .btn-primary { font-size: 0.78rem; }
  /* B612 Mono runs wide — on fold-cover screens let labels wrap
     legibly instead of shrinking to dust */
  .hangar-btn, .hangar-soon .btn {
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.45;
  }
   /* no room without colliding with content */
}

/* notch / home-indicator safe areas (viewport-fit=cover) — phones only,
   so desktop spacing is untouched */
@supports (padding: env(safe-area-inset-bottom)) {
  @media (hover: none) {
    .nav {
      padding-left: calc(0.9rem + env(safe-area-inset-left));
      padding-right: calc(0.9rem + env(safe-area-inset-right));
      padding-top: calc(0.8rem + env(safe-area-inset-top));
    }
        .hud-path { right: calc(1rem + env(safe-area-inset-right)); }
    .footer { padding-bottom: calc(3.4rem + env(safe-area-inset-bottom)); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .boot-start { animation: none; }
  .hud-dot, .hud-toast { transition: none; }
  .hero-scroll { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
