/* Fuentes servidas desde el sitio (OFL, subconjunto latino; licencias en assets/fonts/) */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../assets/fonts/space-grotesk.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/ibm-plex-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/ibm-plex-mono-500.woff2) format('woff2'); }

:root {
  --bg: #000;
  --ink: #eef1f5;
  --ink-2: #c3cad4;
  --muted: #7f8a99;
  --line: rgba(255, 255, 255, .12);
  --panel: rgba(5, 8, 13, .66);
  --accent: #ff6b2c;
  --accent-2: #ffb27a;
  --go: #38e08a;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 6vw, 96px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; }
strong { font-weight: 500; color: #fff; }

/* ---------- Secuencia de lanzamiento ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  background: #000;
  display: grid; place-items: center;
  font-family: var(--mono); color: var(--ink-2);
  transition: opacity .9s ease, visibility .9s;
}
#loader.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { width: min(560px, calc(100vw - 32px)); }
.loader-head {
  display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: .22em; color: var(--muted);
  margin-bottom: 22px;
}
.checklist { list-style: none; display: grid; gap: 8px; margin-bottom: 28px; font-size: 13px; letter-spacing: .06em; }
.checklist li { display: flex; gap: 10px; opacity: 0; transform: translateX(-6px); transition: .35s; }
.checklist li.on { opacity: 1; transform: none; }
.checklist .dots { flex: 1; border-bottom: 1px dotted rgba(255, 255, 255, .25); transform: translateY(-4px); }
.checklist .st { color: var(--muted); }
.checklist li.go .st { color: var(--go); }
.countdown {
  display: flex; align-items: flex-start; gap: .08em;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(96px, 22vw, 220px); line-height: .9; letter-spacing: -.05em;
  color: #fff; font-variant-numeric: tabular-nums;
}
.countdown .t { font-size: .32em; color: var(--accent); margin-top: .2em; letter-spacing: 0; }
.loader-bar { height: 2px; background: var(--line); margin-top: 18px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .28s linear; }
#skip {
  position: absolute; right: 20px; bottom: 20px;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink-2); font: 500 11px var(--mono); letter-spacing: .18em; text-transform: uppercase;
  padding: 10px 14px; cursor: pointer;
}
#skip:hover { border-color: var(--accent); color: #fff; }
.flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 60%, #fff 0%, #ffd2a8 25%, #ff6b2c 55%, transparent 80%);
}
#loader.ignite .flash { animation: flash .9s ease-out forwards; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- HUD superior ---------- */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px var(--gutter) 28px;
  font: 500 11px var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-2);
  /* Fondo casi opaco arriba para que el texto que pasa por debajo al hacer scroll no se mezcle con la barra */
  background: linear-gradient(rgba(0, 0, 0, .94) 0, rgba(0, 0, 0, .8) 55%, transparent);
  pointer-events: none;
}
.brand { color: #fff; }
.brand b { color: var(--accent); font-weight: 500; }
.hud-top .right { display: flex; gap: 22px; align-items: center; }
.tag { border: 1px solid var(--line); padding: 4px 8px; }

/* ---------- Portada ---------- */
#hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-content {
  position: absolute; left: var(--gutter); bottom: 16vh; max-width: 820px;
  opacity: calc(1 - var(--hp, 0) * 1.6);
  transform: translateY(calc(var(--hp, 0) * -60px));
}
.kicker {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font: 500 11px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
h1.title {
  /* max-content: el título mide lo que miden sus letras, aunque .hero-content tope en 820 px
     (overflow: hidden es para que las letras suban al aparecer, no para recortar a lo ancho) */
  display: flex; width: max-content; max-width: calc(100vw - 2 * var(--gutter)); overflow: hidden; padding-bottom: .04em;
  font-weight: 700; font-size: clamp(60px, 14vw, 232px); line-height: .82; letter-spacing: -.055em;
}
h1.title span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s cubic-bezier(.2, .8, .1, 1);
  transition-delay: calc(var(--i) * 55ms + .15s);
  background: linear-gradient(180deg, #fff 30%, #9aa6b5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.is-ready h1.title span { transform: none; }
.tagline { margin-top: 18px; font-size: clamp(22px, 2.6vw, 34px); font-weight: 500; letter-spacing: -.02em; }
.lede { margin-top: 12px; max-width: 520px; color: var(--ink-2); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.55; }
.fade-up { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; transition-delay: var(--d, 0s); }
.is-ready .fade-up { opacity: 1; transform: none; }
.cta {
  display: inline-flex; gap: 12px; align-items: center; margin-top: 28px;
  padding: 14px 20px; border: 1px solid var(--accent); border-radius: 2px;
  color: #fff; text-decoration: none;
  font: 500 12px var(--mono); letter-spacing: .18em; text-transform: uppercase;
  transition: background .25s;
}
.cta:hover { background: var(--accent); }

.chapters { position: absolute; right: var(--gutter); top: 96px; width: 300px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }
.chapters h3 { margin-bottom: 12px; font: 500 10px var(--mono); letter-spacing: .24em; color: var(--muted); text-transform: uppercase; }
.chapters li { list-style: none; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); }
.chapters li.live { color: #fff; }
.chapters li .s { font-size: 10px; }
.chapters li.live .s { color: var(--go); }
.chapters li.live .s::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 50%; background: var(--go); animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

.hero-hud {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 22px;
  display: flex; justify-content: space-between;
  font: 500 10px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue { display: flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 28px; background: linear-gradient(var(--accent), transparent); animation: cue 1.8s infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Capítulo Starship ---------- */
#starship { position: relative; height: 850vh; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#ship-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.captions { position: absolute; left: var(--gutter); top: 50%; width: min(440px, calc(100vw - 32px)); height: 0; }
.caption {
  position: absolute; left: 0; top: 0; width: 100%;
  opacity: 0; transform: translateY(-50%) translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
  pointer-events: none;
}
.caption.active { opacity: 1; transform: translateY(-50%); }
.caption.active a { pointer-events: auto; }
.panel {
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 3px;
  padding: 24px 26px;
}
.caption .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.caption h1, .caption h2 { margin-bottom: 12px; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.caption p { color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.fact { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font: 400 12.5px/1.5 var(--mono); color: var(--ink-2); }
.fact b { margin-right: 8px; color: var(--accent-2); font-weight: 500; letter-spacing: .14em; }
.caption--title { text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.caption--title h1, .caption--title h2 { font-size: clamp(40px, 5.5vw, 76px); line-height: .95; letter-spacing: -.045em; }
.caption--title p { margin-top: 6px; font-size: 18px; }

.telemetry { position: absolute; right: var(--gutter); top: 84px; width: 240px; padding: 16px 18px; font-family: var(--mono); font-size: 12px; border-left-color: var(--line); border-top: 2px solid var(--accent); }
.tm-head { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 10px; letter-spacing: .22em; color: var(--muted); }
.tm-row { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); letter-spacing: .08em; color: var(--muted); }
.tm-row b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.tm-status { margin-top: 10px; color: var(--accent-2); letter-spacing: .14em; font-size: 11px; }
.tm-note { margin-top: 8px; font-size: 9.5px; color: var(--muted); letter-spacing: .12em; }

.rail { position: absolute; right: var(--gutter); bottom: 40px; width: 240px; font: 500 10px var(--mono); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.rail-bar { position: relative; height: 2px; background: var(--line); }
.rail-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.rail-labels { display: flex; justify-content: space-between; margin-top: 8px; }
.rail-labels span { transition: color .3s; }
.rail-labels span.on { color: #fff; }

/* Puntos interactivos sobre el cohete y ficha de cada pieza */
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hs {
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 1.5px solid #fff; border-radius: 50%; background: rgba(255, 107, 44, .9);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .25), 0 0 18px rgba(255, 107, 44, .6);
  opacity: 0; pointer-events: none; cursor: pointer; transition: opacity .35s, background .2s;
}
.hs::before { content: ""; position: absolute; inset: 7px; background: #fff; -webkit-mask: url(../assets/icons/plus.svg) center / contain no-repeat; mask: url(../assets/icons/plus.svg) center / contain no-repeat; }
.hs::after { content: ""; position: absolute; inset: -6px; border: 1px solid rgba(255, 178, 122, .8); border-radius: 50%; animation: hs-ping 2s ease-out infinite; }
.hs.on { opacity: 1; pointer-events: auto; }
.hs:hover, .hs:focus-visible { background: var(--accent-2); outline: none; }
.hs.active { background: #fff; }
.hs.active::before { content: "−"; color: var(--accent); }
.hs.active::after { animation: none; opacity: 0; }
@keyframes hs-ping { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.hs-mini { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid #fff; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; vertical-align: -4px; }
.captions { transition: opacity .3s; }
.hs-on .captions { opacity: 0; }
.hs-card { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(440px, calc(100vw - 32px)); max-height: calc(100% - 150px); overflow: auto; }
.hs-card[hidden] { display: none; }
.hs-card .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.hs-card h2 { margin-bottom: 12px; padding-right: 28px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.hs-card p { color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.hs-x { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--ink-2); font-size: 15px; cursor: pointer; }
.hs-x:hover { border-color: var(--accent); color: #fff; }
.hs-src { margin-top: 12px; font: 400 11px var(--mono) !important; color: var(--muted) !important; }
@media (max-width: 760px) {
  .hs { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
  .hs::before { inset: 6px; }
}
@media (max-width: 1000px), (orientation: portrait) {
  .hs-card { left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; transform: none; max-height: 60%; padding: 16px 18px; }
  .hs-card h2 { font-size: 22px; margin-bottom: 8px; }
  .hs-card p { font-size: 14.5px; }
}

/* ---------- Cierre ---------- */
#outro { position: relative; padding: 20vh var(--gutter) 14vh; background: radial-gradient(ellipse at 50% 0%, #1c0e07 0%, #000 60%); }
#outro h2 { max-width: 13ch; font-size: clamp(40px, 7vw, 104px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
#outro .big { margin-top: 28px; max-width: 720px; color: var(--ink-2); font-size: clamp(18px, 1.8vw, 24px); line-height: 1.5; }
#outro .cta { margin-top: 40px; }
#outro .vision { margin: 8vh 0 0; max-width: 880px; }
#proximos { padding: 14vh var(--gutter) 14vh; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; margin-top: 20px; background: var(--line); border: 1px solid var(--line); }
.card { display: flex; flex-direction: column; gap: 10px; min-height: 200px; padding: 26px 22px 30px; background: #000; transition: background .3s; }
.card:hover { background: #0b0806; }
.card .n { font: 500 11px var(--mono); color: var(--accent); letter-spacing: .2em; }
.card h4 { font-size: 22px; letter-spacing: -.02em; font-weight: 500; }
.card p { flex: 1; color: var(--muted); font-size: 14px; line-height: 1.5; }
.card .soon { font: 500 10px var(--mono); letter-spacing: .2em; color: var(--muted); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Capítulo Marte ---------- */
#marte {
  --accent: #e2562b;
  --accent-2: #ffb48a;
  --panel: rgba(18, 8, 5, .72);
  position: relative;
  background: linear-gradient(#000 0%, #120604 22%, #0c0503 75%, #000 100%);
  padding-bottom: 10vh;
}
#marte h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#marte .panel p, .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
#marte .k, .vision .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }

.mars-intro { position: relative; min-height: 100vh; display: flex; align-items: flex-end; padding: var(--hb-safe) var(--gutter) 250px; overflow: hidden; }
#dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.mars-horizon {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle 1400px at 50% calc(100% + 1230px),
      #1c0804 0, #4a180a 1150px, #9c3b17 1370px, #e8763f 1396px, rgba(255, 170, 110, .9) 1399px,
      rgba(226, 86, 43, .4) 1404px, rgba(226, 86, 43, .12) 1460px, rgba(226, 86, 43, 0) 1600px),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(226, 86, 43, .22), transparent 70%);
}
.mars-intro-text { position: relative; z-index: 2; }
.mars-intro-text { position: relative; }
.mars-title { max-width: 11ch; font-size: clamp(44px, 8vw, 128px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
.mars-lede { margin-top: 24px; max-width: 620px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }

.sim { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 40px; align-items: center; padding: 8vh var(--gutter); }
.sim-stage { position: relative; width: 100%; max-width: 700px; aspect-ratio: 1; margin: 0 auto; }
#orbit-canvas { display: block; width: 100%; height: 100%; }
.sim-msg {
  position: absolute; left: 50%; bottom: 2%; width: min(92%, 440px);
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 3px;
  background: rgba(10, 5, 3, .85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 400 13px/1.5 var(--mono); color: var(--ink-2); text-align: center;
  transition: opacity .4s, transform .4s;
}
.sim-msg.show { opacity: 1; transform: translate(-50%, 0); }
.sim-msg.ok { border-color: var(--go); color: #fff; }
.sim-msg.bad { border-color: var(--accent); }
.sim-msg b { color: #fff; font-weight: 500; }

.legend { list-style: none; display: grid; gap: 6px; margin-top: 14px; font: 400 12px var(--mono); color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 10px; }
.sw { display: inline-block; width: 22px; height: 0; }
.sw-path { border-top: 2px dashed rgba(255, 180, 120, .8); }
.sw-ghost { width: 12px; height: 12px; border: 1.5px dashed var(--accent); border-radius: 50%; }

.readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 18px 0; background: var(--line); border: 1px solid var(--line); }
.readouts div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: #0d0604; }
.readouts span { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.readouts b { font: 500 17px var(--mono); color: #fff; font-variant-numeric: tabular-nums; }
.readouts b.near { color: var(--go); }

.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 2px;
  background: transparent; color: var(--ink);
  font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #f0693d; }
.speed { display: flex; align-items: center; gap: 6px; margin-top: 14px; font: 500 11px var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.speed span { margin-right: 6px; }
.speed button { padding: 6px 10px; border: 1px solid var(--line); border-radius: 2px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.speed button.on { border-color: var(--accent); color: #fff; }
.sim-note { margin-top: 14px; font: 400 11px/1.5 var(--mono) !important; color: var(--muted) !important; letter-spacing: .04em; }

.mars-block { padding: 6vh var(--gutter); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { padding: 26px 22px; background: #0a0403; }
.stat span { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); }
.stat b { display: block; margin-top: 10px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.04em; color: #fff; }
.stat p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.mars-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 4vh var(--gutter); }
.weight { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 14px 0 18px; }
.weight label, .weight div { display: flex; flex-direction: column; gap: 4px; }
.weight span { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.weight input {
  width: 140px; padding: 4px 0; background: none; border: 0; border-bottom: 2px solid var(--line);
  color: #fff; font: 700 44px var(--display); letter-spacing: -.04em;
  -moz-appearance: textfield;
}
.weight input::-webkit-outer-spin-button, .weight input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.weight input:focus { outline: none; border-bottom-color: var(--accent); }
.weight .arrow { font-size: 28px; color: var(--accent); }
.weight b { font: 700 44px var(--display); letter-spacing: -.04em; color: var(--accent-2); }

.eq { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 18px; font: 500 16px var(--mono); color: var(--muted); }
.eq .m { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 2px; background: #0d0604; color: #fff; }
.eq .m small { font-size: 9.5px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.eq .m.hi { border-color: var(--accent); box-shadow: 0 0 24px rgba(226, 86, 43, .25); }

.vision {
  margin: 4vh var(--gutter) 0; padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line); border-radius: 3px;
  background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(226, 86, 43, .16), transparent 60%), #0a0403;
}
.vision h3 { font-size: clamp(28px, 3.4vw, 48px) !important; }
.vision > p { max-width: 680px; }
.status-list { list-style: none; margin-top: 22px; max-width: 680px; }
.status-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; }
.st { flex: none; padding: 4px 9px; border: 1px solid currentColor; border-radius: 2px; font: 500 10px var(--mono); font-style: normal; letter-spacing: .16em; text-transform: uppercase; }
.st-test { color: var(--accent); }
.st-dev { color: #f2b544; }
.st-plan { color: #7fb2ff; }
.st-concept { color: var(--muted); }

/* ---------- Capítulo Starlink ---------- */
#starlink {
  --accent: #4cc9ff;
  --accent-2: #a8e6ff;
  --panel: rgba(4, 10, 20, .72);
  position: relative;
  background: radial-gradient(ellipse 90% 60% at 70% 30%, #071a33 0%, #02060d 55%, #000 100%);
  padding-bottom: 10vh;
}
#starlink h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#starlink .panel p, .race-text p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.sl-vision { margin-bottom: 8vh; background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(76, 201, 255, .14), transparent 60%), #030a12; }
#starlink .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
#starlink .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
#starlink .readouts div { background: #050d18; }
#starlink .btn.primary { color: #021018; }
#starlink .btn.primary:hover:not(:disabled) { background: #7ad8ff; }
.sl-stats .stat { background: #030a14; }

.sl-intro { padding: max(20vh, var(--hb-safe)) var(--gutter) 4vh; }
.sl-title { max-width: 13ch; font-size: clamp(44px, 7.5vw, 116px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
.sl-lede { margin-top: 24px; max-width: 640px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }

.globe-wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 40px; align-items: center; padding: 4vh var(--gutter) 8vh; }
.globe-stage { position: relative; width: 100%; max-width: 760px; aspect-ratio: 1; margin: 0 auto; cursor: grab; touch-action: pan-y; }
.globe-stage:active { cursor: grabbing; }
#globe-canvas { display: block; width: 100%; height: 100%; }
.globe-hint { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); font: 500 10px var(--mono); letter-spacing: .2em; color: var(--muted); text-transform: uppercase; pointer-events: none; }
.route-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.route-pick label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.route-pick span { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.route-pick select {
  appearance: none; -webkit-appearance: none;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px;
  background: #050d18 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237f8a99'/%3E%3C/svg%3E") no-repeat right 12px center;
  width: 100%; min-width: 0; text-overflow: ellipsis;
  color: #fff; font: 500 13px var(--display); cursor: pointer;
}
.route-pick select:focus { outline: none; border-color: var(--accent); }
.toggle { display: flex; align-items: center; gap: 10px; font: 500 12px var(--mono); color: var(--ink-2); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }

.race-block { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; padding: 6vh var(--gutter); }
#race-canvas { display: block; width: 100%; height: 280px; }
.race-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 14px; }
.race-alt { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; font: 500 11px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.race-alt b { color: #fff; font-weight: 500; }
.race-alt input { accent-color: var(--accent); width: 100%; }

@media (max-width: 980px) {
  .globe-wrap, .race-block { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Capítulo Neuralink ---------- */
#neuralink {
  --accent: #b38cff;
  --accent-2: #6ff3ff;
  --panel: rgba(12, 6, 24, .74);
  position: relative;
  background: linear-gradient(#000 0%, #0a0418 18%, #07030f 70%, #000 100%);
  padding-bottom: 10vh;
}
#neuralink h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#neuralink .panel p, .nl-text p, .bci-head p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.nl-text p + p { margin-top: 12px; }
#neuralink .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
#neuralink .readouts div { background: #0d0618; }
#neuralink .btn:hover { border-color: var(--accent); }
.nl-stats .stat { background: #08030f; }
.nl-stats .stat span { color: var(--accent-2); }
.nl-vision { background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(179, 140, 255, .16), transparent 60%), #08030f; }

.nl-intro { position: relative; min-height: 100vh; display: flex; align-items: flex-end; padding: var(--hb-safe) var(--gutter) 14vh; overflow: hidden; }
#neuro-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nl-intro::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 40%, rgba(7, 3, 15, .85) 85%); }
.nl-intro-text { position: relative; z-index: 2; }
.nl-title { max-width: 12ch; font-size: clamp(44px, 7.5vw, 116px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
.nl-lede { margin-top: 24px; max-width: 640px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }

.nl-block { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; align-items: center; padding: 10vh var(--gutter) 6vh; }
#spike-canvas { display: block; width: 100%; height: 260px; }
.scope-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; margin-top: 14px; }
.scope-rate { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.scope-rate span { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.scope-rate b { font: 500 22px var(--mono); color: var(--accent-2); font-variant-numeric: tabular-nums; }

.bci { padding: 8vh var(--gutter) 4vh; }
.bci-head { max-width: 760px; margin-bottom: 28px; }
.bci-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bci-cell { margin: 0; padding: 14px; }
.bci-cell figcaption { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.bci-cell figcaption span { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 10px; letter-spacing: 0; }
.bci-cell canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: 2px; background: #05020b; }
#nl-joy { touch-action: none; cursor: grab; }
#nl-joy:active { cursor: grabbing; }
.bci-controls { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, .8fr); gap: 8px 28px; align-items: center; margin-top: 16px; }
.bci-controls .sim-note { grid-column: 1 / -1; margin-top: 4px; }
.bci-readouts { margin: 0; }

@media (max-width: 980px) {
  .nl-block { grid-template-columns: 1fr; gap: 24px; }
  .bci-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bci-grid .bci-cell:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .bci-grid .bci-cell:nth-child(2) canvas { aspect-ratio: 2.2; }
  .bci-controls { grid-template-columns: 1fr; }
}

/* ---------- Capítulo Optimus (el único claro: blanco quirúrgico) ---------- */
.hud-light .hud-top { background: linear-gradient(rgba(236, 238, 241, .96) 0, rgba(236, 238, 241, .85) 55%, transparent); color: #3a4049; }
.hud-light .brand { color: #0d0f12; }
.hud-light .tag { border-color: rgba(13, 15, 18, .2); }
.hud-top { transition: background .4s, color .4s; }
#optimus {
  --ink: #0d0f12;
  --ink-2: #3a4049;
  --muted: #7a828d;
  --line: rgba(13, 15, 18, .12);
  --panel: #ffffff;
  --accent: #e5322d;
  --accent-2: #0d0f12;
  position: relative;
  color: var(--ink);
  background: linear-gradient(#e9ebee 0%, #f6f7f8 30%, #eef0f2 100%);
  padding-bottom: 10vh;
}
#optimus strong { color: var(--ink); }
#optimus h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#optimus .panel { border-color: var(--line); border-left: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 40px -24px rgba(0, 0, 0, .25); -webkit-backdrop-filter: none; backdrop-filter: none; }
#optimus .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.ts-text p, #optimus .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.ts-text p + p { margin-top: 12px; }
#optimus .race-alt b { color: var(--ink); }
.ts-stats { background: var(--line); border-color: var(--line); }
.ts-stats .stat { background: #fff; }
.ts-stats .stat b { color: var(--ink); }
.ts-stats .stat span { color: var(--accent); }
#optimus a.src, #optimus .src-mark { --c: var(--accent); }
.ts-vision { background: #fff; border-color: var(--line); }
.ts-vision .status-list li { border-top-color: var(--line); }

.ts-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px; min-height: 100vh; padding: max(12vh, var(--hb-safe)) var(--gutter) 6vh; }
.ts-title { max-width: 11ch; font-size: clamp(44px, 7.5vw, 116px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
.ts-lede { margin-top: 24px; max-width: 560px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }
.bot-stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; justify-self: center; }
#bot-canvas { display: block; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(#000 70%, transparent 96%); mask-image: linear-gradient(#000 70%, transparent 96%); }
.bot-note { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.ts-block { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; padding: 8vh var(--gutter); }
.ts-block--rev { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.ts-block--rev .ts-text { order: 2; }
#fsd-canvas { display: block; width: 100%; height: 480px; }
#ik-canvas { display: block; width: 100%; height: 400px; touch-action: none; cursor: crosshair; }
.fsd-controls, .ik-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .06em; cursor: pointer; transition: .2s; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fsd-count { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.fsd-count span { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fsd-count b { font: 500 20px var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.ik-angles { display: flex; flex-wrap: wrap; gap: 6px; font: 500 11px var(--mono); color: var(--ink-2); }
.ik-angles span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 2px; background: #f6f7f8; font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
  .ts-intro, .ts-block, .ts-block--rev { grid-template-columns: 1fr; }
  .ts-block--rev .ts-text { order: 0; }
  .bot-stage { max-width: 420px; }
}

/* ---------- Capítulo xAI · Grok (oscuridad total, terminal) ---------- */
#xai {
  --accent: #f2f2f2;
  --accent-2: #00ffa3;
  --panel: rgba(8, 8, 8, .86);
  position: relative;
  background: #000;
  padding-bottom: 10vh;
}
#xai::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}
#xai > * { position: relative; z-index: 1; }
#xai h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#xai .kicker { color: var(--accent-2); }
#xai .kicker::before { background: var(--accent-2); }
#xai .panel { border-left-color: var(--accent-2); }
#xai .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent-2); text-transform: uppercase; }
.xa-text p, #xai .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.xa-text p + p { margin-top: 12px; }
#xai .btn.primary { background: var(--accent-2); border-color: var(--accent-2); color: #001a10; }
#xai .btn.primary:hover:not(:disabled) { background: #5dffc4; }
#xai .chip { background: transparent; border-color: rgba(255, 255, 255, .15); color: var(--muted); }
#xai .chip.on { background: #f2f2f2; border-color: #f2f2f2; color: #000; }
.xa-stats .stat { background: #050505; }
.xa-stats .stat span { color: var(--accent-2); }
.xa-vision { background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(0, 255, 163, .08), transparent 60%), #050505; }

.xa-intro { position: relative; min-height: 100vh; display: flex; align-items: center; padding: max(14vh, var(--hb-safe)) var(--gutter) 14vh; overflow: hidden; }
#xai-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.xa-intro-text { position: relative; z-index: 2; width: 100%; max-width: 900px; }
.xa-title { position: relative; max-width: 14ch; font-size: clamp(40px, 6.8vw, 104px); line-height: .92; letter-spacing: -.05em; font-weight: 700; }
/* Glitch controlado: dos copias desplazadas que aparecen solo a ratos */
.xa-title::before, .xa-title::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.xa-title::before { color: #00ffa3; animation: glitch-a 6s infinite steps(1); }
.xa-title::after { color: #ff2e63; animation: glitch-b 6s infinite steps(1); }
@keyframes glitch-a { 0%, 91%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); } 92% { opacity: .8; transform: translate(-3px, 1px); clip-path: inset(10% 0 60% 0); } 94% { opacity: .8; transform: translate(4px, -1px); clip-path: inset(55% 0 20% 0); } 96% { opacity: 0; } }
@keyframes glitch-b { 0%, 92%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); } 93% { opacity: .7; transform: translate(3px, 0); clip-path: inset(30% 0 40% 0); } 95% { opacity: .7; transform: translate(-4px, 1px); clip-path: inset(70% 0 5% 0); } 97% { opacity: 0; } }

.term { margin-top: 36px; max-width: 720px; padding: 0; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 500 11px var(--mono); color: var(--muted); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a2a2a; }
.term-bar span { margin-left: 8px; }
#xai-term { min-height: 168px; margin: 0; padding: 16px 18px; font: 400 14px/1.65 var(--mono); color: #d8d8d8; white-space: pre-wrap; word-break: break-word; }
#xai-term .p { color: var(--accent-2); }
.caret { display: inline-block; width: .6em; height: 1.1em; margin-left: 1px; background: var(--accent-2); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.xa-block { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; padding: 8vh var(--gutter); }
.xa-block--wide { align-items: start; }
.tok-label { display: block; margin-bottom: 8px; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#tok-in { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 2px; background: #050505; color: #fff; font: 400 16px var(--mono); }
#tok-in:focus { outline: none; border-color: var(--accent-2); }
.tok-out { display: flex; flex-wrap: wrap; gap: 4px; min-height: 40px; margin-top: 16px; font: 400 15px var(--mono); }
.tok-out span { padding: 4px 6px; border-radius: 2px; color: #000; white-space: pre; }
.tok-ids { margin-top: 12px; font: 400 12px/1.6 var(--mono); color: var(--muted); word-break: break-word; }
.tok-count { display: flex; gap: 24px; margin-top: 12px; font: 500 12px var(--mono); color: var(--muted); }
.tok-count b { color: #fff; font-weight: 500; }

.lm-seeds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 500 11px var(--mono); color: var(--muted); }
.lm-text { min-height: 120px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); background: #050505; font: 400 17px/1.6 var(--mono); color: #e8e8e8; }
.lm-text .new { color: var(--accent-2); }
.lm-cands { display: grid; gap: 6px; margin-top: 14px; }
.lm-cand { display: grid; grid-template-columns: 140px 1fr 56px; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid transparent; border-radius: 2px; background: none; color: #e8e8e8; font: 400 14px var(--mono); text-align: left; cursor: pointer; }
.lm-cand:hover { border-color: var(--line); background: #0b0b0b; }
.lm-cand .bar { height: 8px; background: #1a1a1a; border-radius: 1px; overflow: hidden; }
.lm-cand .bar i { display: block; height: 100%; background: var(--accent-2); transition: width .25s; }
.lm-cand .pct { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.lm-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 16px; }
.lm-controls .race-alt { min-width: 180px; }
#xai .race-alt input { accent-color: var(--accent-2); }

@media (max-width: 980px) {
  .xa-block { grid-template-columns: 1fr; gap: 24px; }
  .lm-cand { grid-template-columns: 110px 1fr 48px; }
}

/* ---------- Capítulo The Boring Company (subterráneo, amarillo obra) ---------- */
#boring {
  --accent: #ffc72c;
  --accent-2: #ffdf80;
  --panel: rgba(22, 15, 9, .82);
  position: relative;
  background: linear-gradient(#000 0%, #140d07 12%, #1b120a 55%, #0d0805 100%);
  padding-bottom: 10vh;
}
#boring h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#boring .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.bc-text p, #boring .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.bc-text p + p { margin-top: 12px; }
#boring .readouts div { background: #160f09; }
#boring .btn.primary { color: #1a1200; }
#boring .btn.primary:hover:not(:disabled) { background: #ffd65c; }
#boring .race-alt input { accent-color: var(--accent); }
.bc-stats .stat { background: #120c07; }
.bc-vision { background: repeating-linear-gradient(-45deg, rgba(255, 199, 44, .05) 0 14px, transparent 14px 28px), #120c07; }

.bc-intro { padding: max(18vh, var(--hb-safe)) 0 4vh; }
.bc-intro-text { padding: 0 var(--gutter); }
.bc-title { max-width: 13ch; font-size: clamp(44px, 7.5vw, 116px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
.bc-pun { margin-top: 14px; font: 400 14px var(--mono); color: var(--accent); }
.bc-lede { margin-top: 18px; max-width: 640px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }
.bc-scene-wrap { margin-top: 6vh; border-top: 2px solid rgba(255, 199, 44, .35); border-bottom: 2px solid rgba(255, 199, 44, .35); }
#bc-scene { display: block; width: 100%; height: clamp(360px, 60vh, 620px); }

.bc-block { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; align-items: center; padding: 8vh var(--gutter); }
.bc-block--rev { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.bc-block--rev .bc-text { order: 2; }
#bc-cross { display: block; width: 100%; height: 320px; margin-bottom: 14px; }
.bc-section .readouts { margin-bottom: 0; }
#bc-race { display: block; width: 100%; height: 260px; }
.bc-race-note { font: 400 12px var(--mono); color: var(--muted); }

#fin { padding: 18vh var(--gutter) 16vh; background: radial-gradient(ellipse at 50% 0%, #1c0e07 0%, #000 60%); }
#fin h2 { max-width: 14ch; font-size: clamp(40px, 7vw, 104px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
#fin .big { margin-top: 28px; max-width: 760px; color: var(--ink-2); font-size: clamp(18px, 1.8vw, 24px); line-height: 1.5; }
#fin .cta { margin-top: 36px; }

@media (max-width: 980px) {
  .bc-block, .bc-block--rev { grid-template-columns: 1fr; gap: 24px; }
  .bc-block--rev .bc-text { order: 0; }
}

/* ---------- Capítulo Tesla (noche eléctrica: asfalto y azul) ---------- */
#tesla {
  --accent: #3ea6ff;
  --accent-2: #9fd4ff;
  --panel: rgba(8, 11, 16, .82);
  position: relative;
  background: linear-gradient(#000 0%, #05080d 20%, #070a10 70%, #000 100%);
  padding-bottom: 10vh;
}
#tesla h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#tesla .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.tl-text p, #tesla .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.tl-text p + p { margin-top: 12px; }
#tesla .chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .06em; cursor: pointer; transition: .2s; }
#tesla .chip.on { background: var(--accent); border-color: var(--accent); color: #031220; }
.tl-stats .stat { background: #05080d; }
.tl-stats .stat span { color: var(--accent); }
.tl-vision { background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(62, 166, 255, .14), transparent 60%), #05080d; }

.tl-intro { padding: max(20vh, var(--hb-safe)) 0 4vh; }
.tl-intro-text { padding: 0 var(--gutter); }
.tl-title { max-width: 12ch; font-size: clamp(44px, 7.5vw, 116px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
.tl-lede { margin-top: 22px; max-width: 640px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }
.tl-city-wrap { position: relative; margin-top: 6vh; border-top: 1px solid rgba(62, 166, 255, .25); border-bottom: 1px solid rgba(62, 166, 255, .25); }
#tl-city { display: block; width: 100%; height: clamp(360px, 62vh, 640px); }
.tl-city-note { position: absolute; left: var(--gutter); bottom: 14px; font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }

.tl-block { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; align-items: center; padding: 8vh var(--gutter); }
.tl-block--rev { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.tl-block--rev .tl-text { order: 2; }
#tl-energy { display: block; width: 100%; height: 320px; }
.energy-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; }
.energy-controls .sim-note { margin-top: 0; }
#tesla #fsd-canvas { display: block; width: 100%; height: 480px; }
#tesla .fsd-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
#tesla .chips { display: flex; flex-wrap: wrap; gap: 8px; }
#tesla .fsd-count { display: flex; flex-direction: column; gap: 2px; text-align: right; }
#tesla .fsd-count span { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#tesla .fsd-count b { font: 500 20px var(--mono); color: #fff; font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
  .tl-block, .tl-block--rev { grid-template-columns: 1fr; gap: 24px; }
  .tl-block--rev .tl-text { order: 0; }
}

/* ---------- Capítulo Tesla Energy (amanecer: cielo, verde y amarillo solar) ---------- */
#energia {
  --accent: #9be15d;
  --accent-2: #ffd84d;
  --panel: rgba(10, 16, 30, .82);
  position: relative;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(255, 170, 90, .16), transparent 70%),
    linear-gradient(#000 0%, #0a1226 14%, #101b36 45%, #0c1424 80%, #000 100%);
  padding-bottom: 10vh;
}
#energia h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#energia .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.en-text p, #energia .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.en-text p + p { margin-top: 12px; }
#energia .readouts div { background: #0b1222; }
#energia .btn.primary { color: #0c1a04; }
#energia .btn.primary:hover:not(:disabled) { background: #b4ef7c; }
#energia .race-alt input, .en-slider input { accent-color: var(--accent-2); }
#energia .chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .06em; cursor: pointer; transition: .2s; }
#energia .chip.on { background: var(--accent-2); border-color: var(--accent-2); color: #1a1400; }
.en-stats .stat { background: #0b1222; }
.en-stats .stat span { color: var(--accent-2); }
.en-vision { background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(255, 216, 77, .14), transparent 60%), radial-gradient(ellipse 60% 90% at 0% 100%, rgba(155, 225, 93, .1), transparent 60%), #0b1222; }

.en-intro { padding: max(20vh, var(--hb-safe)) var(--gutter) 2vh; }
.en-title { max-width: 12ch; font-size: clamp(44px, 7.5vw, 116px); line-height: .9; letter-spacing: -.05em; font-weight: 700; background: linear-gradient(100deg, #fff 0%, #ffe9a8 55%, #ffd84d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.en-lede { margin-top: 22px; max-width: 640px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }

.en-house-wrap { padding: 4vh var(--gutter); }
.en-house { border-left-color: var(--accent-2); }
.en-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.en-head h3 { margin-bottom: 0 !important; }
.en-clock { text-align: right; }
.en-clock span { display: block; font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.en-clock b { font: 700 clamp(32px, 4vw, 52px) var(--display); letter-spacing: -.04em; color: var(--accent-2); font-variant-numeric: tabular-nums; }
#en-scene { display: block; width: 100%; height: clamp(320px, 52vh, 540px); border-radius: 2px; }
.en-controls { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.en-controls .btn { flex: none; min-width: 200px; }
.en-slider { flex: 1; display: flex; }
.en-slider input { width: 100%; }
.en-options { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 14px; }
.en-readouts { grid-template-columns: repeat(3, 1fr); }
.en-legend { display: flex; flex-wrap: wrap; gap: 18px; font: 500 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.en-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }

.en-block { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; padding: 8vh var(--gutter); }
.en-block--city { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; }
#en-city { display: block; width: 100%; height: 300px; margin-bottom: 14px; }

@media (max-width: 980px) {
  .en-block, .en-block--city { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .en-controls { flex-direction: column; align-items: stretch; }
  .en-readouts { grid-template-columns: 1fr 1fr; }
}

/* ---------- Capítulo X (tinta y magenta: el grafo social) ---------- */
#x {
  --accent: #ff4f8b;
  --accent-2: #ffb3cf;
  --panel: rgba(12, 10, 18, .84);
  position: relative;
  background:
    radial-gradient(ellipse 70% 40% at 80% 8%, rgba(255, 79, 139, .13), transparent 70%),
    linear-gradient(#000 0%, #0b0a12 16%, #0d0b15 60%, #08070c 88%, #000 100%);
  padding-bottom: 10vh;
}
#x h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#x .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.x-text p, .x-lab-head p, #x .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.x-text p + p { margin-top: 12px; }
#x .readouts div { background: #100d18; }
#x .chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .06em; cursor: pointer; transition: .2s; }
#x .chip:hover { border-color: var(--accent); color: var(--ink); }
#x .chip.on { background: var(--accent); border-color: var(--accent); color: #1a0410; }
.x-stats .stat { background: #0d0b14; }
.x-stats .stat span { color: var(--accent-2); }
.x-vision { background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(255, 79, 139, .15), transparent 60%), radial-gradient(ellipse 60% 90% at 0% 100%, rgba(127, 212, 255, .08), transparent 60%), #0d0b14; }

.x-intro { position: relative; min-height: 88vh; display: flex; align-items: flex-end; padding: max(20vh, var(--hb-safe)) var(--gutter) 8vh; overflow: hidden; }
#x-bg { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 25%, #000 70%, transparent); }
.x-intro-text { position: relative; }
.x-title { max-width: 12ch; font-size: clamp(44px, 7.5vw, 116px); line-height: .9; letter-spacing: -.05em; font-weight: 700; background: linear-gradient(100deg, #fff 0%, #ffd3e3 50%, #ff4f8b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.x-lede { margin-top: 22px; max-width: 640px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }

.x-funnel-wrap { padding: 4vh var(--gutter); }
#x-funnel { display: block; width: 100%; height: clamp(220px, 34vh, 340px); margin: 6px 0 14px; }
.x-stages { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.x-stages li { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: #100d18; transition: background .2s; cursor: default; }
.x-stages li.on { background: rgba(255, 79, 139, .12); }
.x-stages b { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.x-stages span { color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.x-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font: 500 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.x-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }

.x-lab-wrap { padding: 8vh var(--gutter) 4vh; }
.x-lab-head { max-width: 760px; margin-bottom: 22px; }
.x-lab { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.x-controls { display: grid; gap: 22px; }
.x-group .chips { margin-bottom: 4px; }
.x-weights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 14px; }
.x-w { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: end; font-size: 13px; color: var(--ink-2); line-height: 1.25; }
.x-w b { font: 500 13px var(--mono); color: #fff; font-variant-numeric: tabular-nums; }
.x-w.neg b { color: #ff8f8f; }
.x-w input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.x-w.neg input { accent-color: #ff6b6b; }
.x-toggles { display: grid; gap: 10px; }
.x-toggle { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.x-toggle input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.x-toggle b { display: block; font-weight: 500; font-size: 14.5px; }
.x-toggle small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }

.x-readouts { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.x-feed { list-style: none; display: grid; gap: 8px; }
.x-post { border: 1px solid var(--line); border-radius: 6px; background: #0f0c16; transition: border-color .2s; }
.x-post:hover, .x-post.open { border-color: rgba(255, 79, 139, .55); }
.x-post-btn { display: grid; grid-template-columns: 22px 38px 1fr; gap: 10px; width: 100%; padding: 12px 14px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.x-rank { font: 500 12px var(--mono); color: var(--muted); padding-top: 10px; text-align: right; }
.x-av { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: hsl(var(--h) 55% 32%); color: #fff; font-weight: 700; }
.x-body { display: grid; gap: 5px; min-width: 0; }
.x-who { font-size: 14px; color: var(--muted); }
.x-who b { color: #fff; font-weight: 500; }
.x-badge { margin-left: 6px; padding: 2px 7px; border-radius: 999px; font: 500 10px var(--mono); font-style: normal; letter-spacing: .06em; white-space: nowrap; }
.x-badge.in { color: #7fd4ff; border: 1px solid rgba(127, 212, 255, .45); }
.x-badge.out { color: #ff4f8b; border: 1px solid rgba(255, 79, 139, .5); }
.x-txt { color: var(--ink); font-size: 15px; line-height: 1.45; }
.x-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.x-topic { font: 400 11px var(--mono); color: var(--muted); }
.x-flag { font: 500 10px var(--mono); letter-spacing: .06em; color: var(--accent-2); }
.x-flag:empty { display: none; }
.x-score { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 140px; }
.x-score i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #ff4f8b, #ffb3cf); transition: width .4s; }
.x-score i.neg { background: #ff6b6b; }
.x-score b { margin-left: auto; font: 500 12px var(--mono); color: #fff; font-variant-numeric: tabular-nums; }
.x-break { padding: 0 14px 14px 84px; }
.x-break table { width: 100%; border-collapse: collapse; font: 400 12px var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.x-break th { text-align: left; font-weight: 500; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 4px 6px 6px 0; }
.x-break td { padding: 3px 6px 3px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.x-break td:not(:first-child), .x-break th:not(:first-child) { text-align: right; white-space: nowrap; }
.x-break tr.neg td:last-child { color: #ff8f8f; }
.x-break tr.zero { opacity: .45; }
.x-break tfoot td { color: #fff; border-top: 1px solid var(--line); }
.x-break tr.note td { color: var(--accent-2); text-align: left; }
.x-slot { display: grid; gap: 3px; padding: 10px 14px 10px 84px; border: 1px dashed rgba(255, 255, 255, .16); border-radius: 6px; font-size: 13.5px; color: var(--muted); }
.x-slot b { color: var(--ink-2); font-weight: 500; }
.x-slot-k { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #ffcf5a; }
.x-slot.wtf .x-slot-k { color: #7fd4ff; }
.x-dropped { margin-top: 14px; font: 400 12.5px var(--mono); color: var(--muted); }
.x-dropped summary { cursor: pointer; letter-spacing: .06em; }
.x-dropped ul { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.x-dropped li { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; }
.x-dropped li b { color: var(--ink-2); font-weight: 500; text-decoration: line-through; }

.x-block { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; padding: 8vh var(--gutter); }

@media (max-width: 980px) {
  .x-lab, .x-block { grid-template-columns: 1fr; gap: 24px; }
  .x-stages { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .x-weights { grid-template-columns: 1fr; }
  .x-readouts { grid-template-columns: 1fr 1fr; }
  .x-readouts div:last-child { grid-column: 1 / -1; }
  .x-break { padding-left: 14px; }
  .x-slot { padding-left: 14px; }
  .x-post-btn { grid-template-columns: 18px 32px 1fr; gap: 8px; padding: 10px; }
  .x-av { width: 32px; height: 32px; }
}

/* ---------- Prólogo: los orígenes (archivo sepia y azul de enlace de los 90) ---------- */
#origenes {
  --accent: #e9c58a;
  --accent-2: #8ab4f8;
  --panel: rgba(22, 17, 11, .84);
  position: relative;
  background:
    radial-gradient(ellipse 80% 40% at 15% 6%, rgba(233, 197, 138, .12), transparent 70%),
    linear-gradient(#000 0%, #120e09 16%, #15110b 55%, #0e0b07 88%, #000 100%);
  padding-bottom: 10vh;
}
#origenes h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
#origenes .k { margin-bottom: 10px; font: 500 11px var(--mono); letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.og-text p, #origenes .vision p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.og-text p + p { margin-top: 12px; }
#origenes .readouts div { background: #1a140d; }
#origenes .btn.primary { color: #1c1406; }
#origenes .btn.primary:hover:not(:disabled) { background: #f3d6a4; }
#origenes .race-alt input, .og-slider input { accent-color: var(--accent); }
#origenes .chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .06em; cursor: pointer; transition: .2s; }
#origenes .chip:hover { border-color: var(--accent); color: var(--ink); }
#origenes .chip.on { background: var(--accent); border-color: var(--accent); color: #1c1406; }
.og-stats .stat { background: #15100a; }
.og-stats .stat span { color: var(--accent); }
.og-vision { background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(233, 197, 138, .14), transparent 60%), radial-gradient(ellipse 60% 90% at 0% 100%, rgba(138, 180, 248, .08), transparent 60%), #15100a; }

.og-intro { padding: max(22vh, var(--hb-safe)) var(--gutter) 4vh; }
.og-title { max-width: 13ch; font-size: clamp(44px, 7.5vw, 116px); line-height: .9; letter-spacing: -.05em; font-weight: 700; background: linear-gradient(100deg, #fff 0%, #f6e4c0 50%, #e9c58a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.og-lede { margin-top: 22px; max-width: 660px; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; }

.og-money-wrap { padding: 4vh var(--gutter); }
.og-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 10px; }
.og-head h3 { margin-bottom: 0 !important; }
.og-year { text-align: right; }
.og-year span { display: block; font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.og-year b { font: 700 clamp(32px, 4vw, 52px) var(--display); letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
#og-flow { display: block; width: 100%; height: clamp(320px, 50vh, 480px); }
.og-controls { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.og-controls .btn { flex: none; min-width: 220px; }
.og-slider { flex: 1; display: flex; }
.og-slider input { width: 100%; }
.og-card { display: grid; gap: 6px; min-height: 108px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 3px; background: #1a140d; }
.og-card b { font-size: 19px; letter-spacing: -.02em; }
.og-card em { font: 500 12px var(--mono); font-style: normal; color: var(--muted); }
.og-card em.og-get { color: var(--accent); }
.og-card em.og-put { color: var(--accent-2); }
.og-card p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }

.og-block { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; align-items: center; padding: 8vh var(--gutter); }
.og-block--pay { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
#og-map { display: block; width: 100%; height: clamp(280px, 44vh, 420px); border-radius: 2px; cursor: pointer; margin-bottom: 14px; }
.og-map-tools { margin-top: 10px; }
.og-dirs { display: grid; gap: 6px; margin-top: 14px; padding-left: 22px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.og-dirs b { color: #fff; font-weight: 500; }

.og-accounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 14px; }
.og-acc { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: #1a140d; min-width: 0; }
.og-acc span { font: 400 11px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.og-acc b { font: 500 17px var(--mono); color: #fff; font-variant-numeric: tabular-nums; }
.og-acc.closed b { color: var(--muted); font-size: 13px; }
.og-acc small { font: 400 11px var(--mono); color: var(--accent); }
.og-acc .btn { margin-top: 4px; padding: 6px 8px; font-size: 10px; border-color: var(--accent); }
.og-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: end; }
.og-form label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.og-form label b { color: #fff; font-weight: 500; }
.og-form select { padding: 9px 8px; border: 1px solid var(--line); border-radius: 2px; background: #0e0b07; color: #fff; font: 400 13px var(--mono); min-width: 0; }
.og-form input { accent-color: var(--accent); }
.og-ledger-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.og-ledger-head b { color: #fff; font-weight: 500; letter-spacing: .04em; }
.og-ledger { list-style: none; display: grid; gap: 4px; max-height: 220px; overflow: auto; scrollbar-color: #4a3d2a transparent; scrollbar-width: thin; font: 400 12.5px/1.45 var(--mono); color: var(--ink-2); }
.og-ledger:empty::before { content: "Todavía no hay movimientos. Manda un pago."; color: var(--muted); }
.og-ledger li { display: flex; gap: 10px; padding: 6px 10px; border-left: 2px solid var(--line); background: rgba(255, 255, 255, .02); }
.og-ledger b { color: #fff; font-weight: 500; }
.og-ledger .og-n { color: var(--muted); flex: none; }
.og-ledger .debit { border-left-color: var(--accent-2); }
.og-ledger .credit { border-left-color: var(--accent); }
.og-ledger .pending { border-left-color: #f2b544; }
.og-ledger .bonus { border-left-color: #7bdc8b; }
.og-ledger .fail { border-left-color: #ff6b5a; color: #ff9b8f; }

#og-viral { display: block; width: 100%; height: 280px; margin-bottom: 14px; }

@media (max-width: 980px) {
  .og-block, .og-block--pay { grid-template-columns: 1fr; gap: 24px; }
  .og-block--pay .og-text { order: -1; }
}
@media (max-width: 640px) {
  .og-controls { flex-direction: column; align-items: stretch; }
  .og-accounts { grid-template-columns: 1fr 1fr; }
  .og-form { grid-template-columns: 1fr; }
}

/* ---------- Estructura: portada (hub) + páginas de capítulo ---------- */
main { position: relative; display: block; }
.hud-top a { pointer-events: auto; color: inherit; text-decoration: none; }
.hud-link { border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.hud-link:hover { color: #fff; border-bottom-color: var(--accent); }
.hud-light .hud-link:hover { color: #0d0f12; }
.fps-meter { position: fixed; left: 8px; bottom: 8px; z-index: 200; padding: 4px 8px; background: rgba(0, 0, 0, .75); color: #7dffb2; font: 500 11px var(--mono); border-radius: 2px; pointer-events: none; }
.lang-switch { display: inline-flex; gap: 6px; align-items: center; }
.lang-switch i { font-style: normal; opacity: .35; }
.lang-switch a { padding: 2px 0; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.lang-switch a:hover { color: #fff; border-bottom-color: var(--accent); }
.lang-switch [aria-current] { color: #fff; }
.hud-light .lang-switch a:hover, .hud-light .lang-switch [aria-current] { color: #0d0f12; }
body[data-chapter="optimus"] { background: #eef0f2; }
html.deep-lock { overflow: hidden; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-ctas .cta { margin-top: 0; }
.cta--ghost { border-color: rgba(255, 255, 255, .25); }
.cta--ghost:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

.trailer {
  position: absolute; right: var(--gutter); top: 96px; width: 300px; z-index: 3;
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px;
  border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: 3px;
  background: rgba(5, 8, 13, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink); text-decoration: none; transition: border-color .25s, transform .25s;
}
.trailer:hover { border-color: var(--accent); transform: translateY(-2px); }
.trailer .tr-k { font: 500 10px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.trailer b { font-size: 22px; letter-spacing: -.02em; }
.trailer span { color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.trailer .tr-go { margin-top: 6px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #fff; }

#mapa { padding: 16vh var(--gutter) 14vh; background: radial-gradient(ellipse 80% 50% at 50% 0%, #0c1220 0%, #000 70%); }
.map-head { max-width: 760px; margin-bottom: 8vh; }
.map-head h2 { font-size: clamp(36px, 5.5vw, 80px); line-height: .95; letter-spacing: -.045em; font-weight: 700; }
.map-head p { margin-top: 20px; color: var(--ink-2); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }
.map-count { display: inline-block; margin-top: 18px; font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.acts { display: grid; gap: 4vh; }
.act { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.act-head span { font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.act-head h3 { margin-top: 8px; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.act-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mc {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 190px; padding: 20px;
  border: 1px solid var(--line); border-radius: 3px; background: #06080c; color: var(--ink); text-decoration: none;
  transition: border-color .25s, transform .25s, background .25s;
}
.mc.live { border-top: 2px solid var(--c, var(--accent)); }
.mc.live:hover { transform: translateY(-3px); border-color: var(--c, var(--accent)); background: #0a0d13; }
.mc.finale { background: radial-gradient(ellipse 120% 90% at 100% 0%, rgba(226, 86, 43, .18), transparent 60%), #06080c; }
.mc.soon { opacity: .55; border-style: dashed; }
.mc-n { font: 500 10px var(--mono); letter-spacing: .2em; color: var(--c, var(--muted)); text-transform: uppercase; }
.mc b { font-size: 22px; letter-spacing: -.02em; }
.mc-tag { font: 500 11px var(--mono); color: var(--muted); letter-spacing: .06em; }
.mc-hook { flex: 1; margin-top: 4px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.mc-st { font: 500 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.mc.live .mc-st { color: #fff; }

/* Gancho del capítulo, arriba de todo */
/* Espacio que ocupa el gancho arriba de cada capítulo: las intros nunca empiezan más arriba */
:root { --hb-safe: 150px; }
.hookbar { position: absolute; top: 58px; left: var(--gutter); right: var(--gutter); z-index: 40; pointer-events: none; max-width: 640px; }
.hb-act { font: 500 10px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hb-q { margin-top: 6px; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.35; color: var(--ink); text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.hud-light .hb-q { color: #0d0f12; text-shadow: none; }
.chapter-page[data-chapter="starship"] .hookbar { max-width: 46%; }

/* Botón y panel "Profundizar" */
.deep-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px;
  border: 1px solid var(--c, var(--accent)); border-radius: 999px;
  background: rgba(5, 6, 9, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); transition: transform .2s, background .2s;
}
.deep-btn:hover { transform: translateY(-2px); background: rgba(20, 22, 28, .9); }
.deep-btn .ico { color: var(--c, var(--accent)); width: 16px; height: 16px; vertical-align: -3px; }
.deep { position: fixed; inset: 0; z-index: 90; }
.deep-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .3s; }
.deep-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); overflow-y: auto;
  padding: 28px 30px 40px; background: #07090d; border-left: 2px solid var(--c, var(--accent));
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.deep.open .deep-backdrop { opacity: 1; }
.deep.open .deep-panel { transform: none; }
.deep-panel header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.deep-k { font: 500 10px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--c, var(--accent)); }
.deep-panel h2 { margin-top: 8px; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.deep-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: none; color: #fff; font-size: 16px; cursor: pointer; }
.deep-x:hover { border-color: #fff; }
.deep-tabs { display: flex; gap: 4px; margin: 22px 0 18px; border-bottom: 1px solid var(--line); }
.deep-tabs button { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 500 12px var(--mono); letter-spacing: .08em; cursor: pointer; }
.deep-tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--c, var(--accent)); }
.deep-body p { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.deep-body p + p { margin-top: 14px; }
.timeline { list-style: none; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.timeline li span { font: 500 12px var(--mono); color: var(--c, var(--accent)); }
.timeline li p { margin: 0; font-size: 15px; }
.deep-src { margin-top: 14px; padding-left: 18px; color: var(--ink-2); line-height: 1.9; }
.deep-src a { color: #fff; }
.deep-more { list-style: none; margin-top: 16px; display: grid; gap: 10px; }
.deep-more a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); text-decoration: none; transition: border-color .2s, background .2s; }
.deep-more a:hover, .deep-more a:focus-visible { border-color: var(--c, var(--accent)); background: rgba(255, 255, 255, .03); }
.deep-more b { font-weight: 500; font-size: 15.5px; }
.deep-more span:not(.dm-type) { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.dm-type { font: 500 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--c, var(--accent)); }
.deep-reviewed { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font: 400 11.5px/1.5 var(--mono) !important; color: var(--muted) !important; }
/* Enlace a la fuente de un dato */

/* Navegación entre capítulos */
.chapnav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; padding: 8vh var(--gutter); background: #030405; border-top: 1px solid rgba(255, 255, 255, .08); }
.cn-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 3px; color: var(--ink); text-decoration: none; transition: border-color .25s; }
.cn-card:hover { border-color: var(--c); }
.cn-next { text-align: right; }
.cn-dir { font: 500 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--c); }
.cn-act { font: 500 10px var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.cn-card b { font-size: 22px; letter-spacing: -.02em; }
.cn-hook { color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.cn-map { align-self: center; padding: 12px 16px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; color: var(--ink-2); font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.cn-map:hover { color: #fff; border-color: #fff; }
footer { background: #000; }

@media (max-width: 980px) {
  .trailer { position: relative; top: auto; right: auto; width: auto; margin: 0 var(--gutter); }
  #hero .trailer { display: none; }
  .act { grid-template-columns: 1fr; gap: 14px; }
  .chapnav { grid-template-columns: 1fr; }
  .cn-next { text-align: left; }
  .cn-map { justify-self: start; }
  .chapter-page[data-chapter="starship"] .hookbar { max-width: none; }
}
@media (max-width: 760px) {
  .deep-btn { right: 12px; bottom: 12px; padding: 10px 14px; }
  .hud-link { display: none; }
}
/* Celulares chicos (320–380 px): la barra entra entera, también con “No oficial” */
@media (max-width: 380px) {
  .hud-top { letter-spacing: .1em; }
  body .hud-top .right { gap: 10px; }
  .tag { padding: 3px 6px; }
}
@media (max-width: 360px) {
  h1.title { font-size: 16vw; }
}
/* Con el recuadro “Watch Starship lift off” arriba a la derecha (pantallas de más de 980 px), el título
   no llega a él: su ancho es ~5,3 veces el tamaño de letra, y al recuadro (300 px) le dejamos 32 px de aire */
@media (min-width: 981px) {
  h1.title { font-size: clamp(60px, min(14vw, (100vw - 2 * var(--gutter) - 332px) / 5.3), 232px); }
}

footer { display: grid; gap: 14px; padding: 36px var(--gutter) 48px; border-top: 1px solid var(--line); font: 400 12px/1.7 var(--mono); color: var(--muted); }
footer a { color: var(--ink-2); }
button.link { padding: 0; background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

.webgl-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; font: 400 13px var(--mono); color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .chapters { display: none; }
  .sim, .mars-row { grid-template-columns: 1fr; }
  .sim { gap: 24px; }
}
@media (max-width: 760px) {
  .hud-top .utc, .hero-hud .coords { display: none; }
  .hud-top .right { gap: 14px; }
  .hero-content { bottom: 14vh; right: var(--gutter); }
}
/* Pantallas angostas o verticales: los textos de Starship van abajo para no tapar el cohete */
@media (max-width: 1000px), (orientation: portrait) {
  /* bottom: deja libre el botón “Profundizar”, que flota abajo a la derecha */
  .captions { left: 16px; right: 16px; top: auto; bottom: 72px; width: auto; }
  .caption { top: auto; bottom: 0; transform: translateY(18px); }
  .caption.active { transform: none; }
  .panel { padding: 16px 18px; }
  .caption h1, .caption h2 { font-size: 22px; margin-bottom: 8px; }
  .caption p { font-size: 14.5px; }
  .caption--title h1, .caption--title h2 { font-size: 38px; }
  .fact { margin-top: 10px; padding-top: 10px; font-size: 11.5px; }

  /* Debajo del gancho: starship.js mide dónde termina y lo guarda en --tm-top */
  .telemetry { left: 16px; right: 16px; top: var(--tm-top, 52px); width: auto; padding: 10px 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; font-size: 10.5px; }
  .tm-head, .tm-note { display: none; }
  .tm-row { flex-direction: column; padding: 0; border-top: 0; }
  .tm-status { grid-column: 1 / -1; margin-top: 6px; font-size: 10px; }
  .rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Íconos (Lucide, licencia ISC; ver assets/icons/LICENSE-lucide.txt) ----------
   Se pintan con el color del texto a través de una máscara: <i class="ico ico-play" aria-hidden="true"></i> */
.ico { display: inline-block; flex: none; width: 1.15em; height: 1.15em; vertical-align: -.2em; background: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.ico-arrow-up-right { -webkit-mask-image: url(../assets/icons/arrow-up-right.svg); mask-image: url(../assets/icons/arrow-up-right.svg); }
.ico-play { -webkit-mask-image: url(../assets/icons/play.svg); mask-image: url(../assets/icons/play.svg); }
.ico-pause { -webkit-mask-image: url(../assets/icons/pause.svg); mask-image: url(../assets/icons/pause.svg); }
.ico-rotate-ccw { -webkit-mask-image: url(../assets/icons/rotate-ccw.svg); mask-image: url(../assets/icons/rotate-ccw.svg); }
.ico-rocket { -webkit-mask-image: url(../assets/icons/rocket.svg); mask-image: url(../assets/icons/rocket.svg); }
.ico-skip-forward { -webkit-mask-image: url(../assets/icons/skip-forward.svg); mask-image: url(../assets/icons/skip-forward.svg); }
.ico-send { -webkit-mask-image: url(../assets/icons/send.svg); mask-image: url(../assets/icons/send.svg); }
.ico-plus { -webkit-mask-image: url(../assets/icons/plus.svg); mask-image: url(../assets/icons/plus.svg); }
.ico-x { -webkit-mask-image: url(../assets/icons/x.svg); mask-image: url(../assets/icons/x.svg); }
.ico-arrow-left { -webkit-mask-image: url(../assets/icons/arrow-left.svg); mask-image: url(../assets/icons/arrow-left.svg); }
.ico-arrow-right { -webkit-mask-image: url(../assets/icons/arrow-right.svg); mask-image: url(../assets/icons/arrow-right.svg); }
.ico-arrow-down { -webkit-mask-image: url(../assets/icons/arrow-down.svg); mask-image: url(../assets/icons/arrow-down.svg); }
.ico-arrow-up { -webkit-mask-image: url(../assets/icons/arrow-up.svg); mask-image: url(../assets/icons/arrow-up.svg); }
.btn .ico, .cta .ico, #skip .ico, .tr-go .ico, .cn-dir .ico, .mc-st .ico { width: 1.25em; height: 1.25em; }
.btn .ico:first-child, .cn-dir .ico:first-child { margin-right: .5em; }
.cta .ico:last-child, #skip .ico:last-child, .tr-go .ico:last-child, .cn-dir .ico:last-child, .mc-st .ico:last-child { margin-left: .4em; }

/* Enlace a la fuente de un dato: un círculo chico con una flecha, como una nota al pie */
a.src, .src-mark { position: relative; top: -.15em; display: inline-block; width: 18px; height: 18px; margin-left: 5px; border-radius: 50%;
  background: color-mix(in srgb, var(--c, var(--accent-2)) 26%, transparent); color: var(--c, var(--accent-2));
  font-size: 0; line-height: 0; vertical-align: middle; text-decoration: none; transition: background .2s, color .2s; }
a.src::before, .src-mark::before { content: ""; position: absolute; inset: 3.5px; background: currentColor;
  -webkit-mask: url(../assets/icons/arrow-up-right.svg) center / contain no-repeat; mask: url(../assets/icons/arrow-up-right.svg) center / contain no-repeat; }
a.src:hover, a.src:focus-visible { background: var(--c, var(--accent-2)); color: #0a0b0d; outline: none; }
.hud-light a.src:hover, .hud-light a.src:focus-visible { color: #fff; }

/* ---------- Accesibilidad: foco visible con teclado y áreas táctiles mínimas ---------- */
:focus-visible { outline: 2px solid var(--c, var(--accent-2)); outline-offset: 3px; }
@media (pointer: coarse) {
  /* Agranda la zona que se puede tocar sin mover nada de lugar */
  .brand, .lang-switch a, a.src { position: relative; }
  .brand::after, .lang-switch a::after, a.src::after { content: ""; position: absolute; inset: -12px -8px; }
  input[type="range"] { min-height: 28px; }
}

/* ---------- Página 404 (404.html, la misma para los dos idiomas) ---------- */
.notfound {
  min-height: 100vh; min-height: 100svh;
  /* Unas estrellas sueltas y el resplandor de Marte abajo, sin canvas */
  background:
    radial-gradient(1px 1px at 12% 22%, #fff8, transparent), radial-gradient(1px 1px at 78% 14%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 64% 38%, #fff7, transparent), radial-gradient(1px 1px at 30% 64%, #fff5, transparent),
    radial-gradient(1px 1px at 88% 58%, #fff6, transparent), radial-gradient(1.5px 1.5px at 46% 12%, #fff5, transparent),
    radial-gradient(120% 60% at 50% 120%, rgba(255, 107, 44, .28), transparent 60%),
    #000;
}
.nf { position: relative; display: grid; align-content: center; min-height: 100vh; min-height: 100svh; padding: 120px var(--gutter) 64px; overflow: hidden; }
.nf-code {
  position: absolute; right: var(--gutter); bottom: 4vh; z-index: 0;
  font: 700 clamp(120px, 34vw, 420px)/.8 var(--display); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .1);
  pointer-events: none; user-select: none;
}
.nf-text { position: relative; z-index: 1; max-width: 640px; }
.nf-title { margin-top: 18px; font-size: clamp(44px, 8vw, 112px); line-height: .9; letter-spacing: -.05em; font-weight: 700; }
.nf .lede { margin-top: 20px; }
