/* ============================================================================
 * sustentacion.css — Edición de Lujo Cinematográfica "Ingeniería Andina" v5.0
 * 15 Escenas 100 % Manipulables · Coreografía de Entrada · Tarjeta 3D ·
 * Láser Canvas 60 FPS con Estela · Spotlight · Grafito Oscuro y Sala Clara.
 * ============================================================================ */

:root {
  --bg: #080D1A;
  --bg-elev: #0E1629;
  --surface: rgba(16, 24, 42, 0.88);
  --surface-solid: #111A2E;
  --surface-2: #18233C;
  --border: rgba(216, 180, 84, 0.34);
  --border-muted: rgba(148, 163, 184, 0.16);
  --text: #F6F3EB;
  --text-2: #CBD5E1;
  --muted: #94A3B8;
  --gold: #D8B454;
  --gold-bright: #F3D77D;
  --gold-glow: rgba(216, 180, 84, 0.16);
  --emerald: #10B981;
  --emerald-soft: rgba(16, 185, 129, 0.15);
  --cyan: #38BDF8;
  --cyan-soft: rgba(56, 189, 248, 0.14);
  --crimson: #F43F5E;
  --crimson-soft: rgba(244, 63, 94, 0.15);
  --amber: #F59E0B;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.62);
  --contour-stroke: rgba(216, 180, 84, 0.06);
}

body[data-theme="light"] {
  --bg: #F5F2EA;
  --bg-elev: #ECE8DD;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #FFFFFF;
  --surface-2: #F0EDE4;
  --border: rgba(154, 114, 20, 0.34);
  --border-muted: rgba(15, 23, 42, 0.12);
  --text: #0F172A;
  --text-2: #334155;
  --muted: #64748B;
  --gold: #9A7214;
  --gold-bright: #B6871B;
  --gold-glow: rgba(154, 114, 20, 0.11);
  --emerald: #047857;
  --emerald-soft: rgba(4, 120, 87, 0.11);
  --cyan: #0369A1;
  --cyan-soft: rgba(3, 105, 161, 0.11);
  --crimson: #BE123C;
  --crimson-soft: rgba(190, 18, 60, 0.11);
  --amber: #B45309;
  --amber-soft: rgba(180, 83, 9, 0.12);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
  --contour-stroke: rgba(154, 114, 20, 0.09);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.32s ease, color 0.32s ease;
}

.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Fondo atmosférico con partículas y curvas topográficas animadas */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 68% 54% at 12% 0%, rgba(216, 180, 84, 0.11), transparent 65%),
    radial-gradient(ellipse 58% 52% at 90% 96%, rgba(56, 189, 248, 0.09), transparent 62%),
    var(--bg);
}
.topo-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.95; }
.topo-svg path { fill: none; stroke: var(--contour-stroke); stroke-width: 1.3; stroke-dasharray: 12 8; animation: topoDrift 36s linear infinite; }
@keyframes topoDrift { to { stroke-dashoffset: -400; } }

.progress-track { position: fixed; top: 0; left: 0; right: 0; height: 3.5px; background: rgba(148, 163, 184, 0.12); z-index: 60; }
.progress-fill { height: 100%; width: 6.66%; background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--emerald)); box-shadow: 0 0 14px var(--gold); transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1); }

/* Barra superior ejecutiva */
.hud-top { position: fixed; top: 12px; left: 26px; right: 26px; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 14px; z-index: 40; }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup img { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4)); }
.brand-meta { display: flex; flex-direction: column; line-height: 1.15; }
.brand-meta strong { font-size: 11px; font-weight: 800; letter-spacing: 0.10em; color: var(--gold); text-transform: uppercase; }
.brand-meta span { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted); }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.live-pill.pulse { transform: scale(1.07); box-shadow: 0 0 24px rgba(16, 185, 129, 0.55); border-color: var(--emerald); }
.live-pill.offline { border-color: var(--border); }
.live-dot { width: 7.5px; height: 7.5px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald); animation: pulseLive 2.2s infinite; }
.live-pill.offline .live-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: none; }
@keyframes pulseLive { 0%, 100% { opacity: 1; } 50% { opacity: 0.42; } }

.hud-actions { display: flex; align-items: center; gap: 7px; }
.hud-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 33px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border-muted); background: var(--surface);
  color: var(--text-2); font-family: inherit; font-size: 11.5px; font-weight: 700;
  cursor: pointer; backdrop-filter: blur(10px); transition: all 0.2s ease;
}
.hud-btn:hover { border-color: var(--gold); color: var(--gold); }
.hud-btn.connected { border-color: rgba(16, 185, 129, 0.5); color: var(--emerald); }
.hud-btn.qa-btn { border-color: var(--border); color: var(--gold); }
.hud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.hud-btn.connected .hud-dot { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }

/* Escenario y coreografía de entrada */
.stage { position: relative; width: 100vw; height: 100vh; z-index: 10; perspective: 1400px; }
.slide {
  position: absolute;
  inset: 66px 48px 60px 48px;
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.986);
  transition: opacity 0.44s cubic-bezier(0.16, 1, 0.3, 1), transform 0.44s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.44s;
  pointer-events: none;
}
.slide.active { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.slide.active > *:nth-child(1) { animation: staggerIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.slide.active > *:nth-child(2) { animation: staggerIn 0.52s 0.06s cubic-bezier(0.16, 1, 0.3, 1) both; }
.slide.active > *:nth-child(3) { animation: staggerIn 0.58s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes staggerIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* Spotlight Ejecutivo por Zona */
.slide.has-spotlight [data-spot] {
  opacity: 0.22;
  filter: saturate(0.4);
  transform: scale(0.985);
  transition: all 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.slide.has-spotlight [data-spot].spot-active {
  opacity: 1;
  filter: none;
  transform: scale(1.016);
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px var(--gold), 0 20px 52px rgba(216, 180, 84, 0.28) !important;
  z-index: 5;
}
[data-spot] { transition: all 0.3s ease; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px;
}
.eyebrow::before { content: ''; width: 22px; height: 1.5px; background: var(--gold); }
.slide-h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 700; font-size: clamp(31px, 3.7vw, 50px); line-height: 1.04; letter-spacing: -0.02em; }
.slide-h1 em { font-style: italic; color: var(--gold); font-weight: 600; }
.slide-head { margin-bottom: 14px; }
.slide-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }

/* Paneles con brillo sutil */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: 17px;
  padding: 18px 20px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.panel-gold { border-color: var(--border); background: linear-gradient(155deg, var(--surface-solid), var(--surface-2)); }

.monument { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(42px, 4.6vw, 68px); font-weight: 700; line-height: 0.96; letter-spacing: -0.03em; color: var(--gold); }
.monument.emerald { color: var(--emerald); }
.monument.crimson { color: var(--crimson); }
.monument.cyan { color: var(--cyan); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font-family: 'JetBrains Mono', monospace; font-size: 10px;
  font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; flex: 0 0 auto;
}
.tag-gold { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--border); }
.tag-emerald { background: var(--emerald-soft); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.32); }
.tag-cyan { background: var(--cyan-soft); color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.32); }
.tag-crimson { background: var(--crimson-soft); color: var(--crimson); border: 1px solid rgba(244, 63, 94, 0.34); }
.tag-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.35); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--gold);
  background: var(--gold); color: #090C11; font-family: inherit; font-size: 12px;
  font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform 0.14s ease, filter 0.18s ease, box-shadow 0.2s ease;
}
body[data-theme="light"] .btn { color: #FFFFFF; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(216, 180, 84, 0.26); }
.btn-ghost { background: var(--surface-solid); color: var(--text); border-color: var(--border-muted); }
body[data-theme="light"] .btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost.active { border-color: var(--gold); background: var(--gold-glow); color: var(--gold); }
.btn-emerald { background: var(--emerald); border-color: var(--emerald); color: #051611; }
body[data-theme="light"] .btn-emerald { color: #FFFFFF; }
.btn-crimson { background: var(--crimson); border-color: var(--crimson); color: #FFFFFF; }

.g-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.g-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.g-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.g-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.g-60-40 { display: grid; grid-template-columns: 1.42fr 1fr; gap: 18px; align-items: stretch; }
.g-45-55 { display: grid; grid-template-columns: 0.92fr 1.18fr; gap: 18px; align-items: stretch; }

/* Escena 01: Portada 3D con Giro de Ficha y Anillos Orbitales */
.hero-grid { display: grid; grid-template-columns: 1.4fr 0.88fr; gap: 32px; align-items: center; }
.hero-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.03; font-weight: 700; margin-bottom: 14px; }
.hero-title em { color: var(--gold); font-style: italic; font-weight: 600; }
.hero-meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 22px; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border-muted); }
.hero-meta-item small { display: block; font-family: 'JetBrains Mono', monospace; font-size: 9.8px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.hero-meta-item strong { font-size: 13.8px; font-weight: 700; color: var(--text); }

.flip-scene { perspective: 1200px; height: 345px; cursor: pointer; }
.flip-card-3d {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d;
  transition: transform 0.78s cubic-bezier(0.22, 1, 0.36, 1);
}
.flip-card-3d.flipped { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 26px 22px; gap: 12px;
}
.flip-back { transform: rotateY(180deg); align-items: stretch; text-align: left; justify-content: space-between; }

.crest-halo {
  width: 172px; height: 172px; border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 180, 84, 0.24), transparent 72%);
  border: 1.5px dashed var(--border); display: grid; place-items: center;
  position: relative;
  animation: floatCrest 5s ease-in-out infinite;
}
@keyframes floatCrest { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.crest-halo img { width: 136px; height: 136px; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45)); }

/* Tarjetas interactivas manipulables (Escenas 02, 04, 06, 07, 11, 15) */
.manip-card {
  background: var(--surface);
  border: 1.5px solid var(--border-muted);
  border-radius: 16px;
  padding: 16px 16px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  transition: all 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.manip-card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.manip-card.active {
  border-color: var(--gold);
  background: linear-gradient(160deg, var(--gold-glow), var(--surface-solid));
  box-shadow: 0 0 0 2px var(--gold-glow), 0 16px 38px rgba(0, 0, 0, 0.45);
  transform: translateY(-4px);
}
.manip-card h3 { font-size: 15px; font-weight: 800; line-height: 1.25; }
.manip-card p { font-size: 12.4px; color: var(--text-2); line-height: 1.46; }

/* Escena 03: Cortina Deslizable + Duelo de Relojes */
.curtain-wrap {
  position: relative; height: 224px; border-radius: 18px; border: 1.5px solid var(--border);
  overflow: hidden; user-select: none; box-shadow: var(--shadow); margin-bottom: 13px; background: #0E1628;
}
.curtain-layer { position: absolute; inset: 0; padding: 20px 28px; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 22px; }
.curtain-after { background: linear-gradient(135deg, #0B2523 0%, #0E1A2E 65%, #122139 100%); color: #F5F2EA; }
.curtain-before {
  background: linear-gradient(135deg, #2A121B 0%, #1B1320 65%, #14121F 100%); color: #F5F2EA;
  clip-path: inset(0 calc(100% - var(--curtain-pos, 50%)) 0 0); transition: clip-path 0.08s linear;
}
.curtain-wrap.animating .curtain-before { transition: clip-path 0.85s cubic-bezier(0.22, 1, 0.36, 1); }
.curtain-handle {
  position: absolute; top: 0; bottom: 0; left: var(--curtain-pos, 50%); width: 3px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold)); box-shadow: 0 0 18px rgba(216, 180, 84, 0.9);
  cursor: ew-resize; z-index: 8; transition: left 0.08s linear;
}
.curtain-wrap.animating .curtain-handle { transition: left 0.85s cubic-bezier(0.22, 1, 0.36, 1); }
.curtain-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%; background: #D8B454; color: #090C11;
  display: grid; place-items: center; font-weight: 800; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
}
.mock-sheet {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px; padding: 13px 15px; font-size: 12px; line-height: 1.55;
}

/* SVG Stage Box & Nodos Clicables */
.svg-stage-box { background: #0E1628; border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; }
.svg-stage-box svg { width: 100%; height: auto; display: block; }
.flow-dash { stroke-dasharray: 7 7; animation: dashFlow 1.6s linear infinite; }
@keyframes dashFlow { to { stroke-dashoffset: -28; } }
.svg-click-node { cursor: pointer; transition: filter 0.2s ease; }
.svg-click-node:hover { filter: brightness(1.18); }
.svg-click-node.active rect { stroke: #F3D77D !important; stroke-width: 2.8 !important; }

/* Escena 09: Demostrador PK/FK + Constelación 10 Tablas */
.pkfk-grid { display: grid; grid-template-columns: 1fr 94px 1fr; align-items: center; gap: 10px; margin-bottom: 12px; }
.db-table-card { background: #131E33; border: 1.5px solid rgba(56, 189, 248, 0.45); border-radius: 14px; padding: 12px 15px; color: #F5F2EA; }
.db-table-card.fk { border-color: rgba(16, 185, 129, 0.48); }
.db-row-line { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px dashed rgba(148, 163, 184, 0.16); font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }
.db-row-line:last-child { border-bottom: 0; }
.pkfk-alert { padding: 9px 13px; border-radius: 11px; font-size: 12.2px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); color: #CBD5E1; transition: all 0.25s ease; }
.pkfk-alert.ok { background: rgba(16, 185, 129, 0.16); border-color: #10B981; color: #6EE7B7; }
.pkfk-alert.blocked { background: rgba(244, 63, 94, 0.18); border-color: #F43F5E; color: #FDA4AF; }

.tbl-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tbl-pill {
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border-muted);
  background: var(--surface-2); color: var(--text-2); font-family: 'JetBrains Mono', monospace;
  font-size: 10.8px; font-weight: 700; cursor: pointer; transition: all 0.18s ease;
}
.tbl-pill.active { border-color: var(--gold); background: var(--gold-glow); color: var(--gold); }

/* Terminal Git Animada */
.git-term {
  background: #05080F; border: 1px solid rgba(216, 180, 84, 0.38); border-radius: 14px;
  padding: 14px 18px; font-family: 'JetBrains Mono', monospace; font-size: 12.2px;
  line-height: 1.72; color: #E2E8F0; min-height: 145px;
}

/* Escena 12: Dos Escudos */
.race-phones { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 10px; }
.phone-box { background: var(--surface-2); border: 1.5px solid var(--border-muted); border-radius: 14px; padding: 13px 13px; text-align: center; transition: all 0.3s ease; }
.phone-box.win { border-color: var(--emerald); background: var(--emerald-soft); }
.phone-box.wait { border-color: var(--amber); background: var(--amber-soft); }
.phone-box strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.phone-box span { font-size: 11.8px; color: var(--text-2); }

/* Escena 13: Demo Real */
.qr-showcase { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.qr-frame { background: #FFFFFF; padding: 13px; border-radius: 16px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.real-app-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.app-link-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 10px 8px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); text-decoration: none;
  font-size: 12px; font-weight: 800; transition: all 0.2s ease;
}
.app-link-tile small { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: var(--gold); font-weight: 600; }
.app-link-tile:hover { border-color: var(--gold); background: var(--gold-glow); transform: translateY(-2px); }
.scanner-input {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--emerald);
  background: rgba(16, 185, 129, 0.08); color: var(--text); font-family: 'JetBrains Mono', monospace;
  font-size: 13px; outline: none;
}

/* Barras y Resultados */
.metric-bar-row { margin-bottom: 10px; }
.metric-bar-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.metric-bar-bg { height: 8px; border-radius: 99px; background: rgba(148, 163, 184, 0.18); overflow: hidden; }
.metric-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width 0.6s ease; }
.metric-bar-fill.emerald { background: linear-gradient(90deg, #059669, #34D399); }
.metric-bar-fill.cyan { background: linear-gradient(90deg, #0284C7, #38BDF8); }

/* Escena 15: Conclusiones */
.conclusion-list { display: flex; flex-direction: column; gap: 8px; }
.conclusion-row {
  display: flex; align-items: center; gap: 13px; padding: 11px 15px; border-radius: 13px;
  background: var(--surface); border: 1.5px solid var(--border-muted); font-size: 13.2px;
  line-height: 1.4; cursor: pointer; transition: all 0.22s ease;
}
.conclusion-row.active, .conclusion-row:hover {
  border-color: var(--gold); background: linear-gradient(90deg, var(--gold-glow), var(--surface));
  transform: translateX(4px);
}

/* Barra inferior (15 puntos) */
.hud-bottom { position: fixed; bottom: 12px; left: 26px; right: 26px; height: 38px; display: flex; align-items: center; justify-content: space-between; z-index: 40; }
.chapter-tag { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.nav-dots { display: flex; align-items: center; gap: 5px; }
.nav-dot { width: 15px; height: 4px; border-radius: 99px; background: rgba(148, 163, 184, 0.28); border: 0; cursor: pointer; transition: all 0.22s ease; }
.nav-dot.active { width: 32px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.nav-controls { display: flex; align-items: center; gap: 8px; }
.counter-txt { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); margin-right: 4px; }
.counter-txt b { color: var(--gold); }
.nav-arrow { width: 33px; height: 33px; border-radius: 50%; border: 1px solid var(--border-muted); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.nav-arrow:hover { border-color: var(--gold); color: var(--gold); }

/* Bóveda Oculta Q */
.qa-drawer { position: fixed; inset: 0; background: rgba(5, 9, 18, 0.88); backdrop-filter: blur(14px); z-index: 95; display: none; align-items: center; justify-content: center; padding: 26px; }
.qa-drawer.open { display: flex; }
.qa-card { width: min(990px, 100%); max-height: 86vh; overflow-y: auto; background: #10192B; color: #F5F2EA; border: 1px solid var(--gold); border-radius: 22px; padding: 24px 26px; box-shadow: 0 32px 80px rgba(0, 0, 0, 0.72); }
.qa-tabs { display: flex; flex-wrap: wrap; gap: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; padding: 5px; margin-bottom: 14px; }
.qa-tab { border: 0; background: transparent; color: #CBD5E1; font-family: inherit; font-size: 11.5px; font-weight: 700; padding: 7px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.qa-tab.active { background: #D8B454; color: #090C11; }
.qa-pane { display: none; }
.qa-pane.active { display: block; }
.qa-code { background: #070B13; border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 14px; padding: 16px 18px; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.65; color: #E2E8F0; white-space: pre-wrap; }

/* Modales */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 9, 18, 0.86); backdrop-filter: blur(12px); z-index: 90; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop.open { display: flex; }
.modal-card { width: min(500px, 100%); background: var(--surface-solid); border: 1px solid var(--border); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); text-align: center; }
.modal-card h2 { font-family: 'Cormorant Garamond', serif; font-size: 32px; margin-bottom: 6px; }
.modal-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 16px; }
.pin-input { width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 18px; letter-spacing: 0.2em; text-align: center; outline: none; margin-bottom: 12px; }

/* Canvas Láser 60 FPS con Estela Óptica */
#laser-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 125;
}

.blackout-veil { position: fixed; inset: 0; background: #020305; z-index: 110; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.25); font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.blackout-veil.active { opacity: 1; pointer-events: auto; }

@media (max-width: 1120px) {
  .slide { inset: 62px 20px 54px 20px; overflow-y: auto; justify-content: flex-start; padding: 8px 0; }
  .hero-grid, .g-2, .g-3, .g-4, .g-5, .g-60-40, .g-45-55, .pkfk-grid, .curtain-layer, .race-phones { grid-template-columns: 1fr; }
  .live-pill { display: none; }
}
