/* VECTA · sitio, versión 2 (formato de producto sobre Noche).
   Composición: fondo Noche continuo, titulares pesados con una palabra en Esmeralda claro, rótulos en
   Mono, ventanas de instrumento (barra superior + cuerpo) para todo lo que es demostración, tarjetas
   para los módulos, ruta numerada, método en columnas y cierre con formulario.
   Colores: solo los tokens del paquete (versión para fondo oscuro del manual). */

/* ---------- Fuentes (IBM Plex, SIL OFL; archivos en assets/fonts) ---------- */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-latin-600-normal.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-latin-400-normal.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-latin-500-normal.woff2") format("woff2"); }

/* ---------- Usos de los tokens (fondo oscuro) ---------- */
:root {
  --bg: var(--noche);
  --surface: var(--grafito);                 /* ventanas, tarjetas y la banda de contacto */
  --fg: var(--claro);                        /* 16,9:1 sobre Noche */
  --muted: var(--zinc-claro);                /* 7,3:1 sobre Noche, 6,9:1 sobre Grafito */
  --acc: var(--esmeralda-claro);             /* 9,4:1 sobre Noche */
  --rule: rgba(154, 163, 173, 0.2);          /* Zinc claro al 20 %: filetes */
  --field: var(--zinc);                      /* borde de campos: 3,6:1 sobre Noche */
  --acc-wash: rgba(31, 209, 143, 0.18);      /* la diferencia (la ranura) */
  --sans: var(--font-sans);
  --mono: var(--font-mono);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px;
  --r-sm: 2px; --r-md: 4px; --r-lg: 8px;
  --header-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/24px var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
p { text-wrap: pretty; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
strong { font-weight: 600; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: var(--r-sm); }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 100; background: var(--acc); color: var(--noche);
  padding: var(--s3) var(--s4); border-radius: var(--r-md); text-decoration: none; font-weight: 500; }
.skip:focus { top: var(--s4); }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }

/* ---------- Texto ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: var(--s3); font: 500 12px/16px var(--mono);
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 16px; border-top: 2px solid var(--acc); }
.label { font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.note { font-size: 14px; line-height: 20px; color: var(--muted); }
.section-lead { font-size: 20px; line-height: 28px; color: var(--muted); max-width: 60ch; }
h1 em, h2 em { font-style: normal; color: var(--acc); }

/* ---------- Botones y enlaces ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s8); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px;
  padding: var(--s3) var(--s6); border-radius: var(--r-md); border: 1px solid transparent; font-weight: 500;
  font-size: 16px; line-height: 24px; text-decoration: none; cursor: pointer; transition: filter .15s, background-color .15s, border-color .15s; }
.btn-primary { background: var(--acc); color: var(--noche); }                 /* 9,4:1 */
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { border-color: rgba(154, 163, 173, 0.45); color: var(--fg); background: transparent; }
.btn-outline:hover { border-color: var(--fg); }
.btn-sm { min-height: 40px; padding: var(--s2) var(--s4); font-size: 15px; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { background: transparent; border: 1px dashed currentColor; color: inherit; cursor: not-allowed; filter: none; }
.btn-ghost { border: 1px solid var(--rule); background: none; border-radius: var(--r-md); padding: 4px 12px; min-height: 32px;
  font: 500 12px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; color: var(--fg); }
.btn-ghost:hover { border-color: var(--muted); }
.link-arrow { font: 500 13px/20px var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--fg); }
.link-arrow:hover { color: var(--acc); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(16, 18, 21, 0.94); border-bottom: 1px solid var(--rule);
  padding-top: env(safe-area-inset-top, 0px); backdrop-filter: blur(8px); }
.header-in { display: flex; align-items: center; gap: var(--s6); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; margin-right: auto; padding-block: 14px; padding-right: 14px; }
.brand svg { overflow: visible; display: block; width: auto; }
.brand .ink { fill: var(--claro); }
.brand .acc { fill: var(--esmeralda-claro); }
.brand-full svg { height: 28.7px; }    /* H = 28 px, mínimo del manual con descriptor */
.brand-compact svg { height: 20.5px; } /* H = 20 px */
.brand-compact { display: none; }
.nav { display: flex; align-items: center; gap: var(--s4); }
.nav ul { list-style: none; padding: 0; display: flex; gap: var(--s1); }
.nav ul a { display: block; padding: var(--s2) var(--s3); text-decoration: none; font-weight: 500; color: var(--muted); border-radius: var(--r-md); }
.nav ul a:hover { color: var(--fg); }
.nav-toggle { display: none; align-items: center; gap: var(--s2); min-height: 44px; padding: var(--s2) var(--s3); background: none;
  border: 1px solid var(--rule); border-radius: var(--r-md); font-weight: 500; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; } .nav-toggle-bars::after { top: 5px; }
@media (max-width: 1100px) {
  :root { --header-h: 60px; }
  .brand-full { display: none; }
  .brand-compact { display: block; }
  .brand { padding-block: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--rule);
    display: none; flex-direction: column; align-items: stretch; padding: var(--s2) clamp(16px, 4vw, 40px) var(--s6); }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav ul a { padding: var(--s3) 0; font-size: 18px; color: var(--fg); }
}

/* ---------- Estado ---------- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-on { background: var(--acc); }
.dot-dev { border: 2px solid var(--fg); }
.dot-later { border: 2px dashed var(--muted); }
.status { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.status-item { display: inline-flex; align-items: center; gap: var(--s2); }

/* ---------- Portada ---------- */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; gap: var(--s6); }
.hero h1 { font-size: clamp(40px, 5.2vw, 56px); line-height: 1.04; letter-spacing: -0.025em; max-width: 15ch; }
.lead { font-size: 20px; line-height: 30px; color: var(--muted); max-width: 58ch; }
.hero .status { margin-top: calc(-1 * var(--s2)); }

/* ---------- Ventanas (demostraciones) ---------- */
.window { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.window-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); }
.window-title { display: inline-flex; align-items: center; gap: var(--s2); font: 500 12px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: auto; }
.window-meta { display: flex; gap: var(--s4); font-size: 12px; color: var(--muted); }
.window-meta b { color: var(--fg); font-weight: 500; }
.window-foot { padding: var(--s3) var(--s4); border-top: 1px solid var(--rule); font-size: 13px; line-height: 20px; color: var(--muted); }
.sim-icon { width: 10px; height: 10px; border: 1.5px dashed currentColor; border-radius: 2px; display: inline-block; flex-shrink: 0; }

.replay { margin-top: var(--s10); }
.window-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.replay-sch { padding: var(--s6); border-right: 1px solid var(--rule); background: var(--noche); display: grid; align-items: center; }
.replay-chart { padding: var(--s6); display: grid; gap: var(--s3); align-content: center; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font: 400 12px/16px var(--mono); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: var(--s2); }
.legend .lg-title { color: var(--fg); margin-right: auto; }
.legend i { display: inline-block; width: 18px; }
.lg-exp { border-top: 2px dashed var(--zinc-claro); }
.lg-real { border-top: 2px solid var(--esmeralda-claro); }
.lg-gap { height: 10px; background: var(--acc-wash); }
.schematic, .chart { width: 100%; height: auto; display: block; }
.schematic .pipe { fill: none; stroke: var(--zinc); stroke-width: 2; }
.schematic .shell, .schematic .equip { fill: none; stroke: var(--zinc-claro); stroke-width: 1.5; }
.schematic .water { fill: none; stroke: var(--zinc); stroke-width: 1; stroke-dasharray: 4 4; }
.schematic .tube { fill: none; stroke: var(--zinc); stroke-width: 1; }
.schematic .sch-label { font: 500 12px var(--mono); letter-spacing: .04em; fill: var(--zinc-claro); }
.schematic .isa circle { fill: var(--noche); stroke: var(--niebla); stroke-width: 1.2; }
.schematic .isa path { fill: none; stroke: var(--niebla); stroke-width: 1; }
.schematic .isa .lead { stroke: var(--zinc-claro); }
.schematic .isa text { font: 500 12px var(--mono); fill: var(--claro); text-anchor: middle; }
.schematic .val { font: 400 16px var(--mono); fill: var(--claro); }
.schematic .u { fill: var(--zinc-claro); font-size: 13px; }
.schematic .delta { font: 500 13px var(--mono); fill: var(--esmeralda-claro); }
.chart .grid { stroke: var(--zinc); stroke-opacity: .45; stroke-width: 1; }
.chart .tick { font: 400 12px var(--mono); fill: var(--zinc-claro); }
.chart .note { font: 500 12px var(--mono); fill: var(--claro); }
.chart .exp { fill: none; stroke: var(--zinc-claro); stroke-width: 1.6; stroke-dasharray: 5 4; }
.chart .real { fill: none; stroke: var(--esmeralda-claro); stroke-width: 2; stroke-linejoin: round; }
.chart .gap { fill: var(--acc-wash); }
.chart .mark { stroke: var(--zinc-claro); stroke-dasharray: 2 3; }
.chart .head { fill: var(--esmeralda-claro); }

.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.phases button { display: grid; gap: var(--s1); justify-items: start; text-align: left; padding: var(--s3) var(--s4); background: none;
  border: 0; border-right: 1px solid var(--rule); border-top: 2px solid transparent; margin-top: -1px; color: var(--muted); cursor: pointer; font-weight: 500; }
.phases button:last-child { border-right: 0; }
.phases button .mono { font-size: 12px; color: var(--muted); }
.phases button:hover { color: var(--fg); }
.phases button[aria-pressed="true"] { color: var(--fg); border-top-color: var(--acc); }
.phases button[aria-pressed="true"] .mono { color: var(--acc); }
.phase-detail { display: grid; gap: var(--s4); padding: var(--s6) var(--s4) var(--s6); border-top: 1px solid var(--rule); }
.phase-name { font-size: 22px; line-height: 28px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3); }
.phase-name .mono { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
.phase-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s10); }
.phase-cols div { display: grid; gap: var(--s2); align-content: start; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(64px, 8vw, 104px); }
.section-head { display: grid; gap: var(--s4); max-width: 780px; margin-bottom: clamp(32px, 4vw, 56px); align-content: start; }
.section h2 { font-size: clamp(32px, 3.8vw, 40px); line-height: 1.08; letter-spacing: -0.02em; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split .section-head { margin-bottom: 0; }

/* ---------- Comparación ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: var(--r-md); }
.seg button { border: 0; background: none; border-radius: var(--r-sm); padding: 6px var(--s3); min-height: 36px; font-weight: 500; font-size: 14px; cursor: pointer; color: var(--muted); }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--claro); color: var(--noche); }
.demo-body { padding: clamp(16px, 3vw, 32px); display: grid; gap: var(--s8); }
.demo-context { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: start; gap: var(--s4) var(--s6); }
.demo-context div { display: grid; gap: var(--s1); align-content: start; }
.demo-context dt { font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.demo-context dd { font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; }
.cmp th, .cmp td { text-align: left; padding: var(--s3); border-bottom: 1px solid var(--rule); vertical-align: middle; }
.cmp thead th { font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 0; }
.cmp th:first-child, .cmp td:first-child { padding-left: 0; }
.cmp .n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp td.n .u { color: var(--muted); font-size: 14px; }
.cmp .var-name { display: block; font-weight: 500; }
.cmp .var-tag { display: block; font: 400 12px/16px var(--mono); color: var(--muted); }
.cmp .obs-dev { font-weight: 500; color: var(--acc); }
.cmp .na { font-family: var(--sans); font-weight: 500; }
.gauge { position: relative; width: 132px; height: 22px; }
.gauge::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--zinc); }
.gauge .g-band { position: absolute; top: 5px; height: 12px; background: var(--acc-wash); }
.gauge .g-ref { position: absolute; left: 50%; top: 2px; width: 2px; height: 18px; margin-left: -1px; background: var(--claro); }
.gauge .g-obs { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 2px var(--surface); }
.gauge.g-na::before { border-top-style: dashed; }
.st { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 500; white-space: nowrap; }
.st i { display: inline-block; flex-shrink: 0; }
.st-ok i { width: 10px; height: 6px; border-left: 2px solid var(--acc); border-bottom: 2px solid var(--acc); transform: rotate(-45deg) translateY(-2px); }
.st-dev i { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--claro); }
.st-na i { width: 11px; height: 11px; border: 1.5px dashed var(--muted); border-radius: 50%; }
.reading { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s6); }
.reading-item { display: grid; gap: var(--s2); align-content: start; padding-top: var(--s4); border-top: 1px solid var(--rule); }
.reading-item p:last-child { font-size: 15px; line-height: 23px; }
.impact { display: grid; gap: var(--s3); padding-top: var(--s6); border-top: 1px solid var(--rule); }
.impact h3 { font-size: 20px; line-height: 28px; }
.impact strong.mono { font-weight: 500; }
.calc { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); grid-auto-flow: column; grid-template-rows: auto auto; gap: var(--s2) var(--s4); align-items: end; }
.calc label { font-weight: 500; font-size: 14px; line-height: 20px; }
.calc .unit { font: 400 12px var(--mono); color: var(--muted); }
.calc input, .field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: var(--s2) var(--s3); border: 1px solid var(--field);
  border-radius: var(--r-md); background: var(--noche); color: var(--fg); }
.calc input { font-family: var(--mono); }
::placeholder { color: var(--muted); opacity: 1; }
.calc-out { grid-column: 1 / -1; grid-row: 3; font-variant-numeric: tabular-nums; }
.calc-out strong { font-weight: 500; font-family: var(--mono); color: var(--acc); }

/* ---------- Método ---------- */
.method { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-block: 1px solid var(--rule); }
.method li { display: grid; gap: var(--s3); align-content: start; padding: var(--s6) var(--s4) var(--s8); border-left: 1px solid var(--rule); }
.method li:first-child { border-left: 0; padding-left: 0; }
.method .step-n { font-size: 12px; color: var(--muted); }
.method h3 { font-size: 20px; line-height: 28px; font-weight: 500; }
.method li:nth-child(4) h3 { color: var(--acc); }
.method p { font-size: 14px; line-height: 21px; color: var(--muted); }
.method-note { margin-top: var(--s6); max-width: 70ch; }

/* ---------- Módulos ---------- */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s6); display: grid; gap: var(--s3); align-content: start; grid-template-rows: auto auto 1fr auto; }
.card-icon { width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: var(--s2); }
.card-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--claro); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 18px; line-height: 26px; }
.card p { font-size: 15px; line-height: 23px; color: var(--muted); }
.state { display: inline-flex; align-items: center; gap: var(--s2); font: 500 12px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-top: var(--s2); }
.state::before { content: ""; width: 10px; height: 10px; flex-shrink: 0; border-radius: var(--r-sm); }
.state-proto { color: var(--acc); }
.state-proto::before { background: var(--acc); }
.state-plan { color: var(--muted); }
.state-plan::before { border: 1.5px dashed var(--muted); }
.later { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s6); align-items: baseline; margin-top: var(--s8); padding-top: var(--s6); border-top: 1px solid var(--rule); color: var(--muted); }
.later strong { color: var(--fg); }

/* ---------- Simulador ---------- */
.sim-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.sim-copy { display: grid; gap: var(--s6); }
.slash-list { list-style: none; padding: 0; display: grid; }
.slash-list li { position: relative; padding: var(--s4) 0 var(--s4) var(--s8); border-top: 1px solid var(--rule); color: var(--muted); }
.slash-list li:last-child { border-bottom: 1px solid var(--rule); }
.slash-list li::before { content: ""; position: absolute; left: 0; top: 27px; width: 12px; border-top: 2px solid var(--acc); }
.slash-list strong { color: var(--fg); }
.shots { display: grid; gap: var(--s4); }
.shot img { width: 100%; }
.shot figcaption { padding: var(--s3) var(--s4); border-top: 1px solid var(--rule); font-size: 13px; line-height: 20px; color: var(--muted); }
.shot-side { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); grid-template-rows: auto 1fr; }
.shot-side .window-bar { grid-column: 1 / -1; }
.shot-side figcaption { border-top: 0; border-left: 1px solid var(--rule); align-self: stretch; display: flex; align-items: end; padding: var(--s6); font-size: 15px; line-height: 23px; }

/* ---------- Ruta de desarrollo ---------- */
.route-head { padding: var(--s6); border-bottom: 1px solid var(--rule); font-size: clamp(20px, 2.4vw, 28px); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.route-head span { color: var(--acc); }
.stages { list-style: none; padding: var(--s8) var(--s6) var(--s6); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s8); position: relative; }
.stages::before { content: ""; position: absolute; left: calc(var(--s6) + 18px); right: calc(33.33% - 8px); top: calc(var(--s8) + 18px); border-top: 1px solid var(--rule); }
.stage { display: grid; gap: var(--s3); align-content: start; position: relative; }
.stage-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--surface); margin-bottom: var(--s3); }
.stage-now .stage-n { border: 1.5px solid var(--acc); color: var(--acc); }
.stage-dev .stage-n { border: 1.5px solid var(--fg); }
.stage-later .stage-n { border: 1.5px dashed var(--muted); color: var(--muted); }
.stage-state { display: inline-flex; align-items: center; gap: var(--s2); font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.stage h3 { font-size: 20px; line-height: 28px; }
.stage p { font-size: 15px; line-height: 23px; color: var(--muted); }
.stage p .label { display: block; margin-bottom: var(--s1); }

/* ---------- Señales y formas de trabajo ---------- */
.signals li { color: var(--fg); font-size: 18px; line-height: 27px; }
.invite { margin-block: var(--s8) var(--s4); font-size: 20px; line-height: 28px; font-weight: 600; }
.kinds-wrap { margin-top: clamp(56px, 8vw, 96px); display: grid; gap: var(--s4); }
.kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--s6); }
.kinds div { padding-top: var(--s4); border-top: 1px solid var(--rule); display: grid; gap: var(--s2); align-content: start; }
.kinds dt { font-size: 18px; line-height: 26px; font-weight: 600; }
.kinds dd { font-size: 15px; line-height: 23px; color: var(--muted); }

/* ---------- Preguntas ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.faq-wrap .section-head { margin-bottom: 0; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s6) var(--s10) var(--s6) 0; font-size: 18px; line-height: 26px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 14px; border-top: 2px solid var(--muted); }
.faq summary::after { transform: rotate(90deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(0); }
.faq summary:hover::before, .faq summary:hover::after { border-color: var(--fg); }
.faq details p { padding-bottom: var(--s6); max-width: 62ch; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- Contacto ---------- */
.section-contact { background: var(--surface); border-top: 1px solid var(--rule); }
.section-contact .split > div:first-child { display: grid; gap: var(--s6); align-content: start; }
.form { display: grid; gap: var(--s4); }
.form-flag { font-size: 14px; line-height: 20px; padding: var(--s3) var(--s4); border: 1px dashed var(--muted); border-radius: var(--r-md); color: var(--muted); }
.field { display: grid; gap: var(--s2); }
.field label { font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.optional { text-transform: none; letter-spacing: 0; }
.field textarea { resize: vertical; min-height: 112px; }
.field [aria-invalid="true"] { border: 2px solid var(--claro); }
.field .err { font-size: 14px; line-height: 20px; font-weight: 500; display: flex; gap: var(--s2); align-items: baseline; }
.field .err::before { content: ""; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--claro); flex-shrink: 0; }
.hint { font-size: 13px; line-height: 20px; color: var(--muted); }
.form-actions { margin-top: var(--s2); }
.form-status { padding: var(--s4); border: 1px solid var(--claro); border-radius: var(--r-md); display: grid; gap: var(--s3); }
.form-status h3 { font-size: 18px; line-height: 24px; }
.form-status p { color: var(--muted); }
.copy-area { width: 100%; font: 400 14px/20px var(--mono); padding: var(--s3); border: 1px solid var(--field); border-radius: var(--r-md); background: var(--noche); color: var(--fg); }
.alt-contact { display: grid; gap: var(--s3); margin-top: var(--s6); }
.alt-sep { display: flex; align-items: center; gap: var(--s4); font: 400 12px var(--mono); color: var(--muted); }
.alt-sep::before, .alt-sep::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }

/* ---------- Pie ---------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: var(--s16) calc(var(--s10) + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--s8); align-items: start; }
.footer-brand { display: grid; gap: var(--s4); }
.footer-brand img { width: 287px; padding: 14px 0; box-sizing: content-box; }
.footer-brand p { color: var(--muted); }
.footer-col { display: grid; gap: var(--s3); align-content: start; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--s2); }
.footer-col a { text-decoration: none; color: var(--fg); }
.footer-col a:hover { color: var(--acc); }
.footer-note { grid-column: 1 / -1; font-size: 13px; line-height: 20px; color: var(--muted); padding-top: var(--s6); border-top: 1px solid var(--rule); }

/* ---------- Adaptación ---------- */
@media (max-width: 1100px) {
  .method { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .method li:nth-child(4) { border-left: 0; padding-left: 0; }
  .method li:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .reading { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
}
@media (max-width: 960px) {
  .window-body { grid-template-columns: minmax(0, 1fr); }
  .replay-sch { border-right: 0; border-bottom: 1px solid var(--rule); }
  .split, .sim-grid, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stages { grid-template-columns: minmax(0, 1fr); }
  .stages::before { left: calc(var(--s6) + 18px); right: auto; top: calc(var(--s8) + 18px); bottom: var(--s6); border-top: 0; border-left: 1px solid var(--rule); }
  .stage { padding-left: 56px; }
  .stage-n { position: absolute; left: 0; top: 0; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .lead, .section-lead { font-size: 18px; line-height: 27px; }
  .replay-sch { display: none; }
  .replay-chart { padding: var(--s4); }
  .chart .tick, .chart .note { font-size: 20px; }
  .window-meta { order: 3; width: 100%; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phases button:nth-child(2) { border-right: 0; }
  .phases button:nth-child(n+3) { border-top-width: 2px; box-shadow: inset 0 1px 0 var(--rule); }
  .phase-cols, .reading { grid-template-columns: minmax(0, 1fr); }
  .method { grid-template-columns: minmax(0, 1fr); }
  .method li { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .method li:first-child { border-top: 0; }
  .cards, .kinds { grid-template-columns: minmax(0, 1fr); }
  .later { grid-template-columns: minmax(0, 1fr); }
  .seg { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .calc { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-template-rows: none; }
  .calc-out { grid-row: auto; }
  .shot-side { grid-template-columns: minmax(0, 1fr); }
  .shot-side figcaption { border-left: 0; border-top: 1px solid var(--rule); padding: var(--s3) var(--s4); font-size: 13px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cmp, .cmp tbody, .cmp tr, .cmp td, .cmp th { display: block; }
  .cmp tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2) var(--s3); padding-block: var(--s4); border-bottom: 1px solid var(--rule); }
  .cmp td, .cmp th { border: 0; padding: 0; }
  .cmp .c-var { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
  .cmp .n { text-align: left; white-space: normal; }
  .cmp td.n { font-size: 14px; }
  .cmp td.n .u { font-size: 12px; }
  .cmp td[data-label]::before { content: attr(data-label); display: block; font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .cmp .c-gauge { display: none; }
  .cmp .c-st { grid-column: 1 / -1; }
}
