:root {
  --bg: #070605;
  --surface: #0f0d0b;
  --text: #f8f4f0;
  --muted: #9e968e;
  --orange: #ff5a1f;
  --orange-2: #ff7e47;
  --copper: #d97736;
  --line: rgba(255, 255, 255, 0.085);
  --line-hot: rgba(255, 122, 69, 0.48);
  --green: #4ade80;
  --red: #fb7185;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 72% 52% at 78% 12%, rgba(190, 66, 16, 0.28), transparent 60%),
    radial-gradient(ellipse 46% 32% at 15% 5%, rgba(255, 118, 42, 0.08), transparent 52%),
    var(--bg);
}

h1, h2, h3, .load-word, .brand span, .stat-card b, .deck-readout b {
  font-family: "Inter Tight", Inter, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

/* Preloader */
#loader {
  position: fixed; inset: 0; z-index: 60;
  background: radial-gradient(circle at 65% 40%, rgba(185, 62, 16, 0.34), #070605 56%);
  display: grid; place-items: center;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.load-stage { text-align: center; }
.load-rings { width: 152px; height: 152px; }
.load-rings circle {
  fill: none; stroke: rgba(255, 184, 130, 0.8); stroke-width: 1.3;
  stroke-dasharray: 64 380; transform-origin: 100px 100px;
  animation: spin 2.2s linear infinite;
}
.load-rings circle:nth-child(2) { stroke: var(--orange); animation-duration: 3s; animation-direction: reverse; }
.load-rings circle:nth-child(3) { stroke: #fff; stroke-dasharray: 18 180; animation-duration: 1.4s; }
.load-word { margin-top: 8px; font-size: clamp(40px, 7vw, 62px); font-weight: 700; letter-spacing: -0.045em; }
.load-meta {
  margin-top: 10px; display: flex; justify-content: center; gap: 12px;
  color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase;
  font-size: 11px; font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.load-meta b { color: var(--orange-2); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 30; transition: opacity 0.35s ease, transform 0.35s ease; }
.topbar {
  background: rgba(16, 13, 11, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 9px 16px;
  text-align: center;
  font-size: 12.5px;
  color: #d7cfc7;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.topbar p {
  margin: 0; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
}
.topbar strong { color: #fff; font-weight: 500; }
.sep { opacity: 0.35; }
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 90, 31, 0.16); border: 1px solid rgba(255, 90, 31, 0.45);
  color: #ffd3bc; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
}
.dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 10px var(--orange);
  animation: pulse 1.5s ease-in-out infinite;
}
.top-link {
  margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff; font-size: 11px; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.top-link:hover { background: rgba(255, 90, 31, 0.2); border-color: var(--orange); }

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 13px 4vw;
  background: rgba(7, 6, 5, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.03em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; background: #140d0a; }
.ticker-pill {
  font-style: normal; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  background: rgba(255, 90, 31, 0.14); color: var(--orange-2);
  border: 1px solid rgba(255, 90, 31, 0.3);
}
.nav nav { display: flex; gap: 24px; }
.nav nav a { color: #c5bdb5; font-size: 14.5px; transition: color 0.2s ease; }
.nav nav a:hover { color: #fff; }
.nav-end { display: flex; align-items: center; gap: 12px; }
.sol-chip {
  padding: 7px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: #ddd4cc;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--orange) 0%, #ff7034 100%);
  color: #fff; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 10px 28px rgba(255, 90, 31, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 16px 36px rgba(255, 90, 31, 0.4); }
.btn.btn-sm { min-height: 38px; padding: 0 15px; font-size: 13.5px; }
.btn.btn-lg { min-height: 50px; padding: 0 24px; font-size: 15px; }
.btn.is-live {
  background: linear-gradient(135deg, #17271c 0%, #113521 100%);
  border: 1px solid rgba(74, 222, 128, 0.55);
  box-shadow: 0 10px 28px rgba(74, 222, 128, 0.18);
  color: #dcfce7;
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none; color: #f4eee9; font-weight: 500;
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--line-hot); }
.btn kbd {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px;
  padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.1); color: #d5cdc5;
}
.textlink {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent;
  color: #d4cbc3; font-size: 14px; font-weight: 500; cursor: pointer; padding: 8px 4px;
  transition: color 0.2s ease;
}
.textlink svg { width: 15px; height: 15px; color: var(--orange-2); }
.textlink:hover { color: #fff; }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 102px);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6vh 5vw 26px;
  overflow: hidden;
}
.stage { position: absolute; inset: 0; z-index: 0; }
.stage canvas {
  width: 100%; height: 100%; display: block;
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 62% 85% at 14% 46%, rgba(7, 6, 5, 0.92) 0%, rgba(7, 6, 5, 0.58) 48%, transparent 78%),
    linear-gradient(180deg, rgba(7, 6, 5, 0.25) 0%, transparent 22%, transparent 72%, rgba(7, 6, 5, 0.92) 100%);
  transition: opacity 0.4s ease;
}
body.clip-mode .stage::after { opacity: 0.12; }

.hero-inner { position: relative; z-index: 2; margin: auto 0; padding-top: 2vh; max-width: 580px; }
.eyebrow {
  margin: 0 0 18px; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(18, 13, 10, 0.65); border: 1px solid rgba(255, 160, 110, 0.22);
  backdrop-filter: blur(10px);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; color: #e8ddd4;
  letter-spacing: 0.06em; text-transform: uppercase;
}
h1 {
  margin: 0; font-weight: 600;
  font-size: clamp(50px, 6.4vw, 88px); line-height: 0.96; letter-spacing: -0.048em;
}
h1 em {
  font-style: normal;
  background: linear-gradient(110deg, #fff 10%, #ffb585 52%, var(--orange) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 20px 0 0; font-size: 20px; color: #f0e8e0; font-weight: 500; letter-spacing: -0.015em; }
.sublead { margin: 10px 0 0; max-width: 500px; color: #b5aca4; font-size: 15.5px; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.ca {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted);
}

/* Floating FM Control Deck */
.deck-wrap { position: relative; z-index: 3; margin-top: 34px; }
.deck {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-radius: 20px;
  background: rgba(14, 11, 9, 0.72);
  border: 1px solid rgba(255, 168, 118, 0.2);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.deck-group { display: flex; flex-direction: column; gap: 6px; }
.deck-group label {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.deck-group label em { font-style: normal; color: var(--orange-2); margin-left: 6px; }
.seg {
  display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07);
}
.seg-btn {
  border: 0; background: transparent; color: #bdb5ad;
  padding: 7px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease;
}
.seg-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.seg-btn.on {
  background: linear-gradient(135deg, var(--orange) 0%, #ff7338 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(255, 90, 31, 0.32);
}
.vol-group { min-width: 118px; }
.vol-group input[type="range"] {
  width: 118px; accent-color: var(--orange); cursor: pointer;
}
.deck-readout {
  display: grid; grid-template-columns: repeat(4, minmax(64px, auto)); gap: 10px;
  padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.deck-readout b { display: block; font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deck-readout span {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* Clip Mode (10s X Launch Recording) */
.clip-watermark {
  position: fixed; left: 32px; bottom: 28px; z-index: 45;
  display: none; flex-direction: column; gap: 6px; pointer-events: none;
}
.clip-watermark strong { font-family: "Inter Tight", sans-serif; font-size: 32px; letter-spacing: -0.04em; }
.clip-watermark em { font-style: normal; color: var(--orange-2); margin-left: 6px; }
.clip-watermark #clipSlot { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: #d5cbc2; letter-spacing: 0.12em; }
.clip-exit {
  position: fixed; top: 20px; right: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(12, 10, 9, 0.78); border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; font-size: 12.5px; backdrop-filter: blur(12px);
}
.clip-exit svg { width: 14px; height: 14px; }
body.clip-mode { overflow: hidden; }
body.clip-mode .site-head,
body.clip-mode .hero-inner,
body.clip-mode .deck-wrap,
body.clip-mode .marquee,
body.clip-mode .section,
body.clip-mode .site-foot { opacity: 0; pointer-events: none; visibility: hidden; }
body.clip-mode .hero { position: fixed; inset: 0; min-height: 100vh; padding: 0; z-index: 40; }
body.clip-mode .clip-watermark { display: flex; }

/* Marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.018);
}
.marquee-track { display: flex; gap: 44px; width: max-content; padding: 14px 0; animation: ticker 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: #a79e96;
}

/* Sections */
.section { padding: 84px 5vw; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.kicker {
  margin: 0 0 10px; color: var(--orange-2);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
}
h2 { margin: 0; font-size: clamp(34px, 4.4vw, 56px); line-height: 0.98; letter-spacing: -0.045em; }
.sec-note { margin: 0; max-width: 400px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* Telemetry Grid */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card, .panel, .mover-card, .how-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.stat-card { padding: 20px 22px; }
.stat-card:hover, .how-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-hot);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}
.stat-top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.stat-top svg { width: 15px; height: 15px; color: var(--orange-2); }
.stat-card b {
  display: block; margin-top: 12px; font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
}
.stat-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.bar {
  height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08);
  margin-top: 10px; overflow: hidden;
}
.bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--orange), #ffbe86);
  border-radius: 999px; transition: width 0.6s ease;
}

/* Oscilloscope + Slot Tape */
.scope-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; }
.panel { overflow: hidden; display: flex; flex-direction: column; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.12em; color: #e2d9d0;
}
.panel-head span { display: inline-flex; align-items: center; gap: 8px; }
.panel-head em { font-style: normal; color: var(--muted); font-size: 11px; }
.scope-panel canvas { width: 100%; height: 270px; display: block; background: rgba(0, 0, 0, 0.28); }
.scope-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; color: var(--muted);
}
.scope-foot strong { color: #fff; font-weight: 500; }

.tape-list {
  padding: 10px 14px; max-height: 318px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.tape-row {
  display: grid; grid-template-columns: 1.25fr 0.7fr 0.85fr 0.55fr; gap: 8px; align-items: center;
  padding: 9px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px;
  animation: flashIn 0.45s ease;
}
.tape-row b { color: #fff; font-weight: 500; }
.tape-row .note-tag {
  text-align: center; padding: 2px 6px; border-radius: 6px;
  background: rgba(255, 90, 31, 0.16); color: #ffc8a4; font-size: 11px;
}
.tape-row .dim { color: var(--muted); text-align: right; }
.tape-empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 13px; }

/* Movers Deck */
.movers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mover-card {
  position: relative; padding: 18px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 12px;
}
.mover-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-hot);
  box-shadow: 0 20px 44px rgba(255, 90, 31, 0.14);
}
.mover-card.plucked {
  border-color: #fff;
  box-shadow: 0 0 0 1px var(--orange), 0 0 36px rgba(255, 90, 31, 0.45);
}
.mover-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mover-sym { font-family: "Inter Tight", sans-serif; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.mover-name { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chg {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
}
.chg.up { background: rgba(74, 222, 128, 0.14); color: var(--green); }
.chg.dn { background: rgba(251, 113, 133, 0.14); color: var(--red); }
.mover-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px;
}
.mover-stats span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.mover-stats strong { color: #f2eae2; font-weight: 500; }
.mover-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; color: var(--orange-2);
}
.mover-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.mover-foot a:hover { color: #fff; }
.mover-skeleton { grid-column: 1 / -1; padding: 36px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }

/* How it works */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how-card { padding: 24px; }
.how-card .step {
  display: inline-block; margin-bottom: 16px;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: var(--orange-2);
  letter-spacing: 0.14em;
}
.how-card h3 { margin: 0 0 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.how-card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14.5px; }

/* Footer */
.site-foot {
  padding: 72px 5vw 88px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}

#telemetry, #scope, #movers, #how { scroll-margin-top: 112px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.7); } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-6px); border-color: rgba(255, 122, 69, 0.6); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1080px) {
  .movers-grid { grid-template-columns: repeat(2, 1fr); }
  .scope-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav nav, .sol-chip { display: none; }
  .hero { min-height: auto; padding: 28px 18px 22px; }
  .hero-inner { padding-top: 10px; }
  h1 { font-size: 46px; }
  .deck { padding: 12px; gap: 12px; }
  .deck-readout { width: 100%; border-left: 0; border-top: 1px solid rgba(255,255,255,0.08); padding: 10px 0 0; grid-template-columns: repeat(4, 1fr); }
  .stat-grid, .movers-grid, .how-grid { grid-template-columns: 1fr; }
  .section { padding: 54px 18px; }
  .site-foot { padding: 52px 18px; }
}
