/* ── K2 AeroSim website ───────────────────────────────────── */
:root {
  --bg: #06080f;
  --bg-2: #0a0e1a;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --muted: #9aa4b8;
  --accent: #ff6b35;
  --accent-2: #4cc9f0;
  --grad: linear-gradient(95deg, #ff6b35, #ff9e58 45%, #4cc9f0);
  --font-display: "Poppins", sans-serif;
  --font-body: "Poppins", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-card: "Poppins", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

::selection { background: rgba(255, 107, 53, 0.4); }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
code, pre { font-family: var(--font-mono); }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.hero-sub, .section-head p, .next-card p, .dl-sub, .page-hero p { text-wrap: pretty; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(6, 8, 15, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--grad);
  color: #06080f;
  -webkit-background-clip: border-box;
  padding: 2px 8px;
  border-radius: 6px;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.28em;
  font-size: 0.8rem;
  color: var(--muted);
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: #06080f !important;
  background: var(--accent);
  padding: 7px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(255, 107, 53, 0.45); }

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 24px 80px;
}
/* Soft warm/cool glow behind the hero — same language as the download card */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* both glows fade to nothing well inside the hero, so no edge shows at its bottom */
  background:
    radial-gradient(60% 44% at 50% 33%, rgba(255, 107, 53, 0.10), transparent 70%),
    radial-gradient(50% 30% at 50% 70%, rgba(76, 201, 240, 0.08), transparent 70%);
}
.hero-content { max-width: 880px; }
/* v1.0 announcement pill above the badge; links to the what's-new video */
.hero-release {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-bottom: 26px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 53, 0.40);
  background: rgba(255, 107, 53, 0.08);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  animation: heroReleaseGlow 3.2s ease-in-out infinite;
}
.hero-release:hover {
  border-color: rgba(255, 107, 53, 0.75);
  background: rgba(255, 107, 53, 0.14);
  transform: translateY(-1px);
}
.hero-release-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  border-radius: 999px;
  padding: 3px 10px;
}
.hero-release-arrow { transition: transform 0.2s; }
.hero-release:hover .hero-release-arrow { transform: translateX(3px); }
@keyframes heroReleaseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
  50% { box-shadow: 0 0 22px 0 rgba(255, 107, 53, 0.22); }
}
@media (prefers-reduced-motion: reduce) { .hero-release { animation: none; } }
@media (max-width: 520px) { .hero-release { font-size: 0.76rem; gap: 8px; } }
.hero-badge {
  display: block;
  font-family: var(--font-card);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.3em;
  color: var(--accent-2);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 700;
  line-height: 1.06;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 38px;
}
.hero-sub strong { color: var(--text); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.25s, background 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #0b0d14;
  box-shadow: 0 4px 24px rgba(255, 107, 53, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 34px rgba(255, 107, 53, 0.55); }
.btn-ghost {
  border: 1px solid var(--panel-border);
  color: var(--text);
  background: var(--panel);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-2px); }
.btn-big { font-size: 1.05rem; padding: 16px 32px; }

/* Hero terminal */
.hero-terminal {
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(8, 11, 20, 0.85);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--panel-border);
}
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a4154; }
.term-bar span:nth-child(1) { background: #ff5f57; }
.term-bar span:nth-child(2) { background: #febc2e; }
.term-bar span:nth-child(3) { background: #28c840; }
.term-bar em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.term-body {
  padding: 18px 20px;
  font-size: 0.8rem;
  line-height: 1.75;
  color: #9fe8c8;
  min-height: 196px;
  white-space: pre-wrap;
}
.term-body .dim { color: var(--muted); }

/* Promo video — framed like the hero terminal */
.video-frame {
  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(8, 11, 20, 0.85);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #04060c;
}

/* Custom player overlay — controls fade in on hover/focus, or while paused */
.vp { position: relative; background: #04060c; }
.vp.is-ready video { cursor: pointer; }
.vp-big, .vp-bar, .vp-progress, .vp-time {
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}
.vp:hover .vp-big, .vp:hover .vp-bar, .vp:hover .vp-progress, .vp:hover .vp-time,
.vp:focus-within .vp-big, .vp:focus-within .vp-bar, .vp:focus-within .vp-progress, .vp:focus-within .vp-time,
.vp.is-scrubbing .vp-progress, .vp.is-scrubbing .vp-time,
.vp.is-paused .vp-big, .vp.is-paused .vp-bar, .vp.is-paused .vp-progress, .vp.is-paused .vp-time { opacity: 1; }
.vp-big {
  position: absolute;
  top: 50%; left: 50%;
  width: 72px; height: 72px;
  margin: -36px 0 0 -36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(6, 8, 15, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.vp-big:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.vp-big svg { width: 28px; height: 28px; fill: currentColor; }
.vp-big .i-play { margin-left: 3px; }
.vp:not(.is-paused) .vp-big .i-play,
.vp.is-paused .vp-big .i-pause { display: none; }
.vp-bar {
  position: absolute;
  right: 14px; bottom: 16px;
  display: flex;
  gap: 8px;
}
.vp-btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(6, 8, 15, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
}
.vp-btn:hover { border-color: var(--accent-2); color: var(--accent-2); }
.vp-btn svg { width: 19px; height: 19px; fill: currentColor; }
.vp-btn svg .ln { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vp:not(.is-muted) .i-muted, .vp.is-muted .i-sound { display: none; }
/* Timeline: a 16px hit strip along the bottom edge; the visible track is 3px
   and thickens on hover / while dragging */
.vp-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  touch-action: none;
}
.vp-track {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
  transition: height 0.15s;
}
.vp-track span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
}
.vp-progress:hover .vp-track, .vp.is-scrubbing .vp-track, .vp-progress:focus-visible .vp-track { height: 6px; }
.vp-knob {
  position: absolute;
  left: 0; bottom: -3px;
  width: 13px; height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
  transform: scale(0);
  transition: transform 0.15s;
  pointer-events: none;
}
.vp-progress:hover .vp-knob, .vp.is-scrubbing .vp-knob, .vp-progress:focus-visible .vp-knob { transform: scale(1); }
.vp-tip {
  position: absolute;
  bottom: 18px; left: 0;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(6, 8, 15, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.vp-progress:hover .vp-tip, .vp.is-scrubbing .vp-tip { opacity: 1; }
.vp-time {
  position: absolute;
  left: 14px; bottom: 26px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(6, 8, 15, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.vp-progress:focus-visible { outline: none; }
.vp-progress:focus-visible .vp-track { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.vp-big:focus-visible, .vp-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.vp:fullscreen { display: flex; align-items: center; }
.vp:fullscreen video { height: 100%; aspect-ratio: auto; object-fit: contain; }
@media (hover: none) {
  /* Touch: keep the small buttons reachable without hover */
  .vp-bar, .vp-progress, .vp-time { opacity: 1; }
  .vp-track { height: 5px; }
  .vp-knob { transform: scale(1); }
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--accent);
  animation: scrollDot 1.8s infinite ease-in-out;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ── Metrics ── */
.metrics {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 24px 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.metric {
  text-align: center;
  padding: 34px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
}
.metric-num {
  font-family: var(--font-card);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metric-label { color: var(--muted); font-size: 0.86rem; margin-top: 6px; }
/* Below four-across, go 2×2 rather than leaving one card alone on its row */
@media (max-width: 981px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .metric { padding: 26px 12px; } }

/* ── Sections ── */
.section {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 110px 24px 30px;
}
.section-head { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--accent);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin: 20px 0 22px;
}
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* Card typography — everything inside a boxed card is set in the card font
   (code and pre stay monospace) */
.metric, .cap, .ws, .chip, .val-table, .beta-notice, .next-card, .dl-card,
.dev-entry, .dev-list li, .report-card,
.cap h3, .beta-head h2, .next-card h2, .dl-card h2, .dl-steps h3,
.next-card .kicker, .dl-card .kicker {
  font-family: var(--font-card);
}
.next-card .kicker, .dl-card .kicker { font-weight: 500; }
/* Card headings are small — drop the display font's negative tracking */
.cap h3, .beta-head h2, .next-card h2, .dl-card h2, .dl-steps h3 { letter-spacing: 0; }

/* Screenshot gallery */
/* Each card carries its workspace colour in --c (set inline on the figure) */
#gallery { counter-reset: shot; }
.shot {
  --c: var(--accent-2);
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--c) 9%, transparent)),
    var(--panel);
  overflow: hidden;
  counter-increment: shot;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.3s;
}
/* Accent bar along the top edge — runs the full width on hover */
.shot::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 1;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 35%, transparent));
  transform: scaleX(0.28);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.shot:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.5),
    0 0 46px -14px var(--c);
}
.shot:hover::before { transform: scaleX(1); }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
  background: #04060c;
  filter: saturate(0.92) brightness(0.93);
  transition: filter 0.3s;
}
.shot:hover img { filter: none; }
.shot figcaption {
  position: relative;
  flex: 1;
  padding: 16px 44px 18px 18px;
  border-top: 1px solid color-mix(in srgb, var(--c) 22%, rgba(255, 255, 255, 0.06));
  font-family: var(--font-card);
}
.shot figcaption strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}
/* Numbered chip in the card colour */
.shot figcaption strong::before {
  content: counter(shot, decimal-leading-zero);
  flex: none;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--c) 38%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  font-size: 0.7rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.shot figcaption span {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
}
.shot figcaption span::first-letter { text-transform: uppercase; }
/* "Opens larger" cue */
.shot figcaption::after {
  content: "\2197";
  position: absolute;
  top: 15px; right: 18px;
  font-size: 1rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.22);
  transition: color 0.25s, transform 0.25s;
}
.shot:hover figcaption::after { color: var(--c); transform: translate(2px, -2px); }
.shot-featured { margin-bottom: 20px; }
.shot-featured figcaption strong { font-size: 1.12rem; }
.shot-featured figcaption span { font-size: 0.92rem; }
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 20px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 5, 10, 0.93);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  gap: 14px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
}
.lightbox p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 860px;
  text-align: center;
}
.lightbox p strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-card);
  font-size: 1.05rem;
  color: var(--c, var(--text));
}
.lightbox p span { display: block; }
.lightbox p span::first-letter { text-transform: uppercase; }
.lb-close {
  position: absolute;
  top: 18px;
  right: 26px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.lb-close:hover { color: var(--accent); }

/* Capability cards */
/* Flex rather than grid so a short last row sits centred instead of leaving a hole */
.cap-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.cap {
  flex: 1 1 330px;
  max-width: calc((100% - 40px) / 3);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  padding: 30px 28px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.cap:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 107, 53, 0.45);
  background: rgba(255, 107, 53, 0.05);
}
/* Icon tiles (capability cards, report cards) */
.cap-icon, .report-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.28);
}
.cap-icon { margin-bottom: 18px; }
.cap:nth-child(even) .cap-icon,
.report-card:nth-child(even) .report-icon {
  color: var(--accent-2);
  background: rgba(76, 201, 240, 0.09);
  border-color: rgba(76, 201, 240, 0.28);
}
.cap-icon svg, .report-icon svg, .beta-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.report-icon svg.icon-fill { fill: currentColor; stroke: none; }
.cap h3 { font-size: 1.18rem; line-height: 1.3; margin-bottom: 12px; }
.cap p { color: var(--muted); font-size: 0.91rem; margin-bottom: 14px; }
.cap ul { list-style: none; }
.cap li {
  font-size: 0.85rem;
  color: var(--text);
  padding: 4px 0 4px 22px;
  position: relative;
}
.cap li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  color: var(--accent);
}
.cap code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.85em;
}
@media (max-width: 1077px) { .cap { max-width: calc((100% - 20px) / 2); } }
@media (max-width: 727px) { .cap { max-width: 100%; } }

/* Workspaces */
/* Marquee: without JS (or with reduced motion) each row is a plain
   swipeable strip; script.js adds .is-running, clones the tiles and animates */
.ws-marquee { display: flex; flex-direction: column; gap: 6px; }
.ws-row {
  overflow-x: auto;
  padding: 6px 0;          /* room for the hover lift */
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ws-row::-webkit-scrollbar { display: none; }
.ws-track { display: flex; width: max-content; }
.ws-marquee.is-running .ws-row { overflow: hidden; }
.ws-marquee.is-running .ws-track { animation: wsScroll 46s linear infinite; }
.ws-marquee.is-running .ws-row-rev .ws-track { animation-direction: reverse; }
.ws-row:hover .ws-track,
.ws-row:focus-within .ws-track { animation-play-state: paused; }
@keyframes wsScroll { to { transform: translateX(-50%); } }

.ws {
  --c: var(--accent-2);
  flex: none;
  width: 270px;
  margin-right: 14px;      /* margin, not gap, so the two halves are exactly 50% each */
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  border-radius: 12px;
  background:
    radial-gradient(130% 110% at 0% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 62%),
    linear-gradient(160deg, color-mix(in srgb, var(--c) 12%, #0b0f1a), #0a0d16);
  padding: 18px 20px;
  font-family: var(--font-card);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.25s;
  text-decoration: none;
  color: var(--text);
}
.ws-cta { text-align: center; margin-top: 28px; }
/* Colour bar down the left edge */
.ws::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c);
  opacity: 0.85;
}
.ws:hover,
.ws:focus-visible {
  border-color: color-mix(in srgb, var(--c) 65%, transparent);
  box-shadow: 0 10px 34px -10px color-mix(in srgb, var(--c) 70%, transparent);
  transform: translateY(-3px);
}
.ws-n {
  align-self: flex-start;
  margin-bottom: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--c);
  letter-spacing: 0.12em;
}
.ws small { font-weight: 400; color: color-mix(in srgb, var(--c) 18%, #b4bdcc); font-size: 0.8rem; }

/* Validation table */
.val-table {
  overflow-x: auto;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
}
.val-table table { width: 100%; border-collapse: collapse; min-width: 720px; }
.val-table th, .val-table td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.89rem;
  vertical-align: top;
}
.val-table th {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.val-table td { color: var(--muted); }
.val-table td strong { color: var(--text); }
.val-table tr:last-child td { border-bottom: none; }
.pass {
  color: #34d399;
  font-weight: 600;
  white-space: nowrap;
}
.val-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 22px;
}
.val-note code {
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.82em;
  color: var(--accent-2);
}

/* Stack chips */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.chip {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.2s;
}
.chip:hover { border-color: rgba(255, 107, 53, 0.4); }
.chip strong { font-size: 0.98rem; }
.chip small { color: var(--muted); font-size: 0.8rem; }

/* ── Beta notice ── */
.beta-section { padding-bottom: 0; }
.beta-notice {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid rgba(255, 107, 53, 0.35);
  border-radius: 18px;
  background:
    radial-gradient(700px 260px at 0% 0%, rgba(255, 107, 53, 0.1), transparent),
    var(--panel);
  padding: 34px 38px;
}
.beta-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.beta-icon { display: grid; place-items: center; color: var(--accent); }
.beta-icon svg { width: 26px; height: 26px; }
.beta-head h2 { font-size: 1.5rem; margin: 0; }
.beta-notice p { color: var(--muted); margin: 0 0 14px; line-height: 1.7; font-size: 0.94rem; }
.beta-notice p:last-child { margin-bottom: 0; }
.beta-notice a { color: var(--accent-2); }
.beta-thanks { color: var(--text) !important; font-weight: 600; }

/* ── Next-page redirect ── */
.next-page { padding-top: 40px; padding-bottom: 110px; }
.next-card {
  display: block;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(76, 201, 240, 0.12), transparent),
    var(--bg-2);
  padding: 56px 40px;
  transition: border-color 0.2s, transform 0.2s;
}
.next-card:hover { border-color: rgba(76, 201, 240, 0.5); transform: translateY(-4px); }
.next-card h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.2; margin: 18px 0 20px; }
.next-card p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; line-height: 1.7; }
.next-extra { text-align: center; margin-top: 18px; }

/* ── Download ── */
.dl { padding-bottom: 110px; }
.dl-card {
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 24px;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(255, 107, 53, 0.13), transparent),
    var(--bg-2);
  padding: 70px 40px;
  text-align: center;
}
.dl-card h2 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; margin: 22px 0 24px; }
.dl-sub { color: var(--muted); max-width: 560px; margin: 0 auto 36px; }
.dl-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.dl-meta {
  margin-top: 18px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.dl-meta strong { color: var(--text); font-weight: 600; }
.dl-meta a { color: #58a6ff; text-decoration: none; }
.dl-meta a:hover { text-decoration: underline; }
/* ── Download sign-in (auth.js) ── */
.auth-status { margin-top: 14px; font-size: 0.82rem; color: var(--muted); }
.auth-status strong { color: var(--text); font-weight: 600; }
.auth-signout {
  background: none; border: 0; padding: 0; font: inherit;
  color: #58a6ff; cursor: pointer;
}
.auth-signout:hover { text-decoration: underline; }
html.auth-open { overflow: hidden; }
.auth-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 16px;
}
.auth-modal[hidden] { display: none; }
.auth-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: auth-fade 0.2s ease-out;
}
.auth-card {
  position: relative; width: 100%; max-width: 440px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 24px;
  background:
    radial-gradient(600px 260px at 50% -10%, rgba(255, 107, 53, 0.16), transparent),
    var(--bg-2);
  padding: 44px 32px 30px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: auth-rise 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.auth-card h3 { font-size: 1.6rem; line-height: 1.2; margin: 16px 0 12px; }
.auth-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 26px; }
.auth-google { width: 100%; justify-content: center; border: 0; cursor: pointer; font-family: inherit; }
.auth-google svg { background: #fff; border-radius: 50%; padding: 2px; }
.auth-google:disabled { opacity: 0.6; cursor: progress; transform: none; }
.auth-err { margin-top: 14px; color: #ff8a80; font-size: 0.86rem; }
.auth-fine { margin-top: 22px; font-size: 0.76rem; color: var(--muted); line-height: 1.6; }
.auth-fine a { color: #58a6ff; text-decoration: none; }
.auth-fine a:hover { text-decoration: underline; }
.auth-x {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--panel-border); background: var(--panel);
  color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.auth-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
@keyframes auth-fade { from { opacity: 0; } }
@keyframes auth-rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .auth-backdrop, .auth-card { animation: none; } }
@media (max-width: 480px) { .auth-card { padding: 40px 20px 24px; } }

.dl-steps {
  max-width: 660px;
  margin: 56px auto 0;
  text-align: left;
}
.dl-note {
  margin-top: 22px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.dl-note code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.dl-steps h3 {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 26px;
  color: var(--text);
}
.dl-steps ol { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.dl-steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  border-radius: 14px;
  padding: 20px 22px;
}
.dl-steps li > div { flex: 1; min-width: 0; }
.step-n {
  flex: none;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0d14;
  font-weight: 700;
}
.dl-steps strong { display: block; margin-bottom: 8px; }
.dl-steps pre {
  background: #04060c;
  border: 1px solid var(--panel-border);
  border-radius: 9px;
  padding: 11px 15px;
  overflow-x: auto;
  font-size: 0.82rem;
  color: #9fe8c8;
}

/* ── Workspaces detail page ── */
.page-hero {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 170px 24px 40px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 14px 0 20px;
}
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 660px; margin: 0 auto; }

.jump-nav {
  position: sticky;
  top: 57px;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 12px 24px;
  backdrop-filter: blur(14px);
  background: rgba(6, 8, 15, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.jump-nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  padding: 5px 11px;
  border-radius: 100px;
  transition: color 0.2s, border-color 0.2s;
}
.jump-nav a:hover { color: var(--text); border-color: rgba(255, 107, 53, 0.5); }

.wsd-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 90px;
}
.wsd {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 44px;
  align-items: center;
  scroll-margin-top: 130px;
  padding-top: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.wsd:first-child { border-top: none; padding-top: 10px; }
.wsd-flip .wsd-text { order: 2; }
.wsd-flip .wsd-shot { order: 1; }
.wsd-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--accent-2);
}
.wsd h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 8px 0 6px; }
.wsd-tag {
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 14px;
}
.wsd-text > p:not(.wsd-tag) { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.wsd-feats { list-style: none; }
.wsd-feats li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 5px 0 5px 24px;
  position: relative;
}
.wsd-feats li::before {
  content: "▸";
  position: absolute;
  left: 4px;
  color: var(--accent);
}
.wsd-feats code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.85em;
}
.wsd-shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wsd-shot img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #04060c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s, border-color 0.25s;
}
.wsd-shot img:hover { transform: translateY(-4px); border-color: rgba(76, 201, 240, 0.5); }
.wsd-noimg {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: rgba(8, 11, 20, 0.85);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  padding: 26px 28px;
}
.wsd-noimg pre {
  font-size: 0.82rem;
  line-height: 1.9;
  color: #9fe8c8;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .wsd { grid-template-columns: 1fr; gap: 26px; }
  .wsd-flip .wsd-text { order: 1; }
  .wsd-flip .wsd-shot { order: 2; }
  .jump-nav { display: none; }
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 7, 13, 0.8);
  padding: 46px 24px 30px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner p { color: var(--muted); font-size: 0.84rem; margin-top: 10px; }
.footer-credit { font-size: 0.8rem; }
.footer-credit a { color: var(--accent-2); text-decoration: none; }
.footer-credit a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 22px; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-note {
  max-width: 1180px;
  margin: 0 auto;
  color: #5b6478;
  font-size: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span { animation: none; }
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding-top: 110px; }
  .hero-badge { font-size: 0.6rem; letter-spacing: 0.04em; text-wrap: balance; }
  .section { padding-top: 80px; }
  .dl-card { padding: 50px 22px; }
  /* Validation table: stack each row instead of scrolling sideways */
  .val-table table { min-width: 0; }
  .val-table thead { display: none; }
  .val-table tr { display: block; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
  .val-table tr:last-child { border-bottom: none; }
  .val-table td { display: block; padding: 2px 0; border-bottom: none; }
  .val-table td:not(:first-child):not(:last-child)::before {
    content: attr(data-label) " — ";
    color: var(--text);
  }
  .val-table td:last-child { padding-top: 6px; }
}

/* ── Developer's Talk page ──────────────────────────────────── */
.nav-links a.active { color: var(--text); }
.devtalk-head { padding-top: 130px; padding-bottom: 10px; }
.devtalk-section { max-width: 820px; margin: 0 auto; padding-top: 24px; }
.devtalk-h {
  font-family: var(--font-display, 'Poppins', sans-serif);
  font-size: 1.5rem; font-weight: 700; color: var(--text);
  margin: 0 0 18px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #21262d);
}
.dev-prose { color: #e8edf6; font-size: 0.92rem; line-height: 1.85; max-width: 820px;
             font-family: var(--font-mono, "JetBrains Mono", monospace);
             letter-spacing: 0; }
.dev-prose p { margin: 0 0 20px; }
.dev-prose p:last-child { margin-bottom: 0; }
.dev-prose p strong, .dev-prose strong { color: #ffffff; font-weight: 600; }
.dev-prose h4 { color: #fff; font-size: 1.15rem; margin: 30px 0 10px;
                font-family: var(--font-display, "Poppins", sans-serif); }
.dev-prose a { color: #58a6ff; }

/* Versioned release headings in the Updates changelog */
#updates .dev-prose + .dev-prose { margin-top: 6px; }
.rel-h {
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem !important; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text) !important;
  margin: 26px 0 12px !important;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
#updates .dev-prose:first-of-type .rel-h { margin-top: 4px !important; }
.rel-tag {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #7ee787;
  background: rgba(126, 231, 135, 0.12);
  border: 1px solid rgba(126, 231, 135, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
}

/* Frosted-glass card behind the Thoughts content */
#thoughts .dev-prose {
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 36px 40px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@media (max-width: 620px) {
  #thoughts .dev-prose { padding: 26px 22px; }
}

.dev-updates { display: flex; flex-direction: column; gap: 18px; }
.dev-entry {
  display: flex; gap: 20px;
  background: rgba(22, 27, 34, 0.55);
  border: 1px solid var(--border, #21262d);
  border-radius: 10px; padding: 18px 20px;
}
.dev-date {
  flex: 0 0 110px;
  font-size: 0.8rem; letter-spacing: 0.04em; color: #58a6ff; padding-top: 3px;
}
.dev-body { flex: 1; min-width: 0; }
.dev-body h4 { color: var(--text); font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }
.dev-body p { color: var(--muted); font-size: 0.96rem; line-height: 1.65; margin: 0 0 8px; }
.dev-body p:last-child { margin-bottom: 0; }
@media (max-width: 620px) {
  .dev-entry { flex-direction: column; gap: 6px; }
  .dev-date { flex-basis: auto; }
}

/* Dev Talk — roadmap list, report cards, empty state */
.dev-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.dev-list li {
  position: relative; padding: 14px 16px 14px 40px;
  background: rgba(22, 27, 34, 0.55);
  border: 1px solid var(--border, #21262d); border-radius: 10px;
  color: var(--muted); font-size: 0.97rem; line-height: 1.6;
}
.dev-list li::before {
  content: "▸"; position: absolute; left: 16px; top: 14px; color: var(--accent, #ff6b35);
}
.dev-list strong { color: var(--text); }

.report-methods {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin-top: 8px;
}
.report-card {
  display: block; text-decoration: none;
  background: rgba(22, 27, 34, 0.55);
  border: 1px solid var(--border, #21262d); border-radius: 12px;
  padding: 22px 22px 18px; transition: transform 0.15s, border-color 0.2s, box-shadow 0.25s;
}
.report-card:hover {
  transform: translateY(-3px); border-color: rgba(76, 201, 240, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.report-icon { margin-bottom: 14px; }
.report-card h4 { color: var(--text); font-size: 1.1rem; font-weight: 600; margin: 0 0 6px; }
.report-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin: 0 0 12px; }
.report-go { color: #58a6ff; font-size: 0.9rem; font-weight: 600; }

.dev-empty {
  color: var(--muted); font-style: italic;
  background: rgba(22, 27, 34, 0.45);
  border: 1px dashed var(--border, #21262d); border-radius: 10px;
  padding: 16px 18px;
}

/* ── Launch intro (first visit, intro.js) ─────────────────────── */
#intro { display: none; }
.intro-on #intro {
  display: block;
  position: relative;
  z-index: 2;
  height: 700vh;            /* scroll length: orbit + four phases */
  background: var(--bg);
}
.intro-locked, .intro-locked body { overflow: hidden; }
.nav { transition: opacity 0.4s, transform 0.4s; }
.intro-active .nav { opacity: 0; transform: translateY(-100%); pointer-events: none; }

.intro-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.intro-canvas { display: block; width: 100%; height: 100%; }

/* Phase copy — alternates left/right of the rocket */
.intro-phase {
  position: absolute;
  top: 50%;
  width: min(430px, 34vw);
  margin-top: -110px;
  opacity: 0;
  visibility: hidden;
  font-family: var(--font-card);
  pointer-events: none;
  will-change: opacity, transform;
}
.intro-phase[data-side="left"] { left: clamp(200px, 15vw, 280px); }  /* clear of the rail */
.intro-phase[data-side="right"] { right: 9vw; }
.intro-kicker {
  display: block;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.intro-phase h2 {
  margin: 14px 0 16px;
  font-size: clamp(2.2rem, 4.4vw, 3.7rem);
  line-height: 1.05;
  color: var(--text);
}
.intro-phase.is-final h2 {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intro-phase p { color: var(--muted); font-size: 1.02rem; line-height: 1.65; }
.intro-thrust { display: block; width: 210px; margin-top: 18px; overflow: visible; }
.intro-thrust path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.6));
}

/* Phase rail */
.intro-rail {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-card);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}
.intro-rail li { display: flex; align-items: center; gap: 10px; transition: color 0.3s; }
.intro-rail li::before {
  content: "";
  width: 14px; height: 1px;
  background: currentColor;
  transition: width 0.3s;
}
.intro-rail b { font-weight: 500; }
.intro-rail li.is-on { color: var(--text); }
.intro-rail li.is-on::before { width: 30px; background: var(--accent); }

/* Countdown */
.intro-count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(7rem, 22vw, 15rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 60px rgba(255, 107, 53, 0.55);
}
.intro-count.is-word {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.intro-count.pop { animation: introPop 0.9s ease-out both; }
@keyframes introPop {
  0% { opacity: 0; transform: scale(1.35); }
  25% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.94); }
}

/* Flight HUD */
.intro-hud {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(6, 8, 15, 0.55);
  backdrop-filter: blur(10px);
  font-family: var(--font-card);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.intro-hud b { color: var(--text); font-weight: 500; }
.intro-hud [data-k="t"] { color: var(--text); }
.intro-hud [data-k="stage"] { color: var(--accent); font-weight: 500; }
.intro-hud i { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.14); }

/* Top-right controls */
.intro-top {
  position: absolute;
  top: 22px;
  right: 24px;
  display: flex;
  gap: 10px;
  z-index: 3;
}
.intro-skip, .intro-sound {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(6, 8, 15, 0.5);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-family: var(--font-card);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.intro-skip { padding: 0 16px; }
.intro-sound { width: 38px; display: grid; place-items: center; }
.intro-skip:hover, .intro-sound:hover { border-color: var(--accent-2); color: var(--accent-2); }
.intro-sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.intro-sound .fill { fill: currentColor; stroke: none; }
.intro-sound .off, .intro-sound.is-muted .on { display: none; }
.intro-sound.is-muted .off { display: inline; }

.intro-hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-card);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
}
.intro-hint .scroll-hint { position: relative; left: auto; bottom: auto; transform: none; }
.intro-fade { position: absolute; inset: 0; background: var(--bg); opacity: 0; pointer-events: none; }

/* Loader shown while three.js and the scene load */
.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(60% 50% at 50% 45%, rgba(76, 201, 240, 0.07), transparent 70%),
    rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(3px);
  transition: opacity 0.8s ease, visibility 0.8s;
}
.intro-gate.is-gone { opacity: 0; visibility: hidden; }
.intro-gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
  font-family: var(--font-card);
}
.intro-brand { display: flex; align-items: center; gap: 10px; }
.intro-loader {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  width: 240px;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.4s;
}
.intro-loader b { color: var(--text); font-weight: 500; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.intro-load-bar { grid-column: 1 / -1; height: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.intro-load-bar span {
  display: block;
  height: 100%;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}
.intro-skip-gate {
  height: auto;
  padding: 4px 6px;
  border: none;
  background: none;
  backdrop-filter: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 900px) {
  .intro-rail { display: none; }
  /* scrim so the copy stays readable over the scene */
  .intro-stage::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 52%;
    background: linear-gradient(to top, rgba(6, 8, 15, 0.92) 30%, rgba(6, 8, 15, 0));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s;
  }
  .intro-stage.has-copy::after { opacity: 1; }
  .intro-phase, .intro-hud { z-index: 1; }
  .intro-phase {
    top: auto;
    bottom: 13vh;
    left: 22px !important;
    right: 22px !important;
    width: auto;
    margin-top: 0;
  }
  .intro-phase h2 { font-size: clamp(2rem, 9vw, 2.8rem); margin: 10px 0 10px; }
  .intro-phase p { font-size: 0.94rem; }
  .intro-hud { bottom: 18px; gap: 9px; padding: 8px 14px; font-size: 0.68rem; }
  .intro-top { top: 14px; right: 14px; }
}
