/* ============================================================
   JAIMEVALERO.ES — DOCUMENTO Nº 001
   Identidad: plano técnico / documento de ingeniería
   Tema claro  = "original en papel"
   Tema oscuro = "copia en plano" (azul prusiano)
   Acento único: rojo de revisión (interacción, estado, nodos vivos)
   ============================================================ */

:root {
  --paper: #f4f5f1;
  --paper-2: #ecede7;
  --ink: #131c24;
  --muted: #5d6873;
  --line: rgba(19, 28, 36, .30);
  --line-2: rgba(19, 28, 36, .14);
  --grid: rgba(19, 28, 36, .07);
  --red: #bf3a15;
  --red-suave: #a93212;
  --on-red: #fffdf9;
  --f-sans: 'Archivo', system-ui, 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'Overpass Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --f-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --cab-h: 64px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #0f2436;
  --paper-2: #0b1d2c;
  --ink: #e8f1f7;
  --muted: #8fa7b6;
  --line: rgba(232, 241, 247, .34);
  --line-2: rgba(232, 241, 247, .15);
  --grid: rgba(232, 241, 247, .075);
  --red: #ff6b3d;
  --red-suave: #ff7b50;
  --on-red: #0f2436;
  color-scheme: dark;
}

/* Sin JS: si el sistema prefiere oscuro, se aplica oscuro */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) {
    --paper: #0f2436;
    --paper-2: #0b1d2c;
    --ink: #e8f1f7;
    --muted: #8fa7b6;
    --line: rgba(232, 241, 247, .34);
    --line-2: rgba(232, 241, 247, .15);
    --grid: rgba(232, 241, 247, .075);
    --red: #ff6b3d;
    --red-suave: #ff7b50;
    --on-red: #0f2436;
    color-scheme: dark;
  }
}

/* ============ BASE ============ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}

h1, h2, h3, p, dl, dd, figure, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--red); color: var(--on-red); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

section { scroll-margin-top: calc(var(--cab-h) + 12px); }

/* ============ UTILIDADES ============ */

.shell {
  width: min(1180px, 100% - clamp(36px, 6vw, 56px));
  margin-inline: auto;
}

.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.display {
  font-family: var(--f-sans);
  font-stretch: 125%;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: .97;
  text-wrap: balance;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--red);
  flex: none;
}

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  max-width: 46ch;
  color: var(--ink);
}

.col-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 44ch;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  letter-spacing: .01em;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--on-red);
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--on-red);
}

.lnk {
  font-weight: 600;
  font-size: 15px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
}

.lnk:hover {
  color: var(--red-suave);
  border-color: var(--red);
}

.grid-bg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 9px 9px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ============ SKIP + PROGRESO ============ */

.skip {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform .2s ease;
}

.skip:focus { transform: none; }

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
}

.progress i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--red);
}

/* ============ CABECERA ============ */

.cab {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--cab-h);
  z-index: 80;
  background: var(--paper);
  border-bottom: 1px solid var(--line-2);
  transition: background-color .35s ease;
}

.cab .shell {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-stretch: 125%;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark {
  width: 9px;
  height: 9px;
  background: var(--red);
  flex: none;
}

.cab-nav {
  margin-left: auto;
  display: flex;
  gap: 30px;
}

.cab-nav a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  transition: color .2s ease;
}

.cab-nav a::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--red);
  opacity: 0;
  transition: opacity .2s ease;
}

.cab-nav a:hover { color: var(--ink); }
.cab-nav a.active { color: var(--ink); }
.cab-nav a.active::before { opacity: 1; }

.cab-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cab-nav + .cab-tools { margin-left: 0; }

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  transition: border-color .2s ease, color .2s ease;
}

.icon-btn:hover { border-color: var(--ink); }

html[data-theme="light"] .ico-sol { display: none; }
html[data-theme="dark"] .ico-luna { display: none; }
html:not([data-theme="light"]):not([data-theme="dark"]) .ico-sol { display: none; }

.menu-btn {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  padding: 10px 16px;
  transition: border-color .2s ease;
}

.menu-btn:hover { border-color: var(--ink); }

/* ============ ÍNDICE (overlay) ============ */

.indice {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper);
  padding: calc(var(--cab-h) + clamp(24px, 6vh, 64px)) clamp(24px, 7vw, 72px) 32px;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility 0s linear .3s;
  overflow-y: auto;
}

.indice.open {
  visibility: visible;
  opacity: 1;
  transition: opacity .3s ease;
}

.indice-cerrar {
  position: absolute;
  top: 10px;
  right: clamp(16px, 4vw, 32px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: var(--paper);
  transition: border-color .2s ease;
}

.indice-cerrar:hover { border-color: var(--ink); }

.indice ol {
  margin-top: 8px;
}

.indice li {
  border-top: 1px solid var(--line-2);
}

.indice li:last-child {
  border-bottom: 1px solid var(--line-2);
}

.indice a {
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 3vw, 28px);
  padding: clamp(13px, 2.4vh, 21px) 0;
  font-stretch: 118%;
  font-weight: 650;
  font-size: clamp(21px, 4.3vh, 31px);
  letter-spacing: -.02em;
  line-height: 1;
  min-width: 0;
  transition: color .2s ease, transform .3s cubic-bezier(.2, .7, .2, 1), opacity .3s ease;
}

.indice a .mono {
  font-size: 11px;
  color: var(--red);
  letter-spacing: .14em;
}

.indice a:hover { color: var(--red-suave); transform: translateX(10px); }

.js .indice li {
  opacity: 0;
  transform: translateY(14px);
}

.js .indice.open li {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease calc(.06s + var(--i) * .05s), transform .45s cubic-bezier(.2, .7, .2, 1) calc(.06s + var(--i) * .05s);
}

.indice-pie {
  margin-top: auto;
  padding-top: 28px;
  color: var(--muted);
}

/* ============ RAIL (línea del documento, escritorio) ============ */

.rail {
  display: none;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 56px;
  z-index: 60;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line-2);
}

.rail-line {
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 50%;
  width: 1px;
  background: var(--line-2);
}

.rail-line i {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: var(--p, 0%);
  background: var(--red);
}

.rail-node {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  margin: 7px 0;
  display: grid;
  place-items: center;
  background: var(--paper);
}

.rail-node::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid var(--muted);
  background: var(--paper);
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}

.rail-node:hover::before,
.rail-node.active::before {
  border-color: var(--red);
  background: var(--red);
  transform: scale(1.25);
}

.rail-node .mono,
.rail-node em {
  position: absolute;
  left: 34px;
  font-style: normal;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.rail-node .mono { font-size: 10px; color: var(--red); }
.rail-node em { left: 58px; font-size: 11px; font-weight: 500; letter-spacing: .04em; color: var(--ink); }

.rail-node:hover .mono,
.rail-node:hover em,
.rail-node:focus-visible .mono,
.rail-node:focus-visible em {
  opacity: 1;
  transform: none;
}

/* la etiqueta fija del nodo activo solo cuando hay margen de sobra */
@media (min-width: 1360px) {
  .rail-node.active .mono,
  .rail-node.active em {
    opacity: 1;
    transform: none;
  }
}

/* ============ HOJAS (secciones) ============ */

.hoja { position: relative; }

/* ---- HOJA 01 · IDENTIDAD ---- */

.hoja-hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--cab-h) + clamp(20px, 5vh, 52px));
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 14px;
}

.hero-titulo {
  font-size: clamp(42px, 8vw, 100px);
  margin-top: clamp(26px, 5vh, 52px);
}

.hl {
  display: block;
  overflow: hidden;
  padding-bottom: .16em;
  margin-bottom: -.1em;
}

.hl > span {
  display: inline-block;
  will-change: transform;
}

.hero-cuerpo {
  flex: 1;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: clamp(40px, 5vw, 88px);
  align-items: center;
  padding-bottom: clamp(36px, 6vh, 72px);
}

.hero-copy .lead { margin-bottom: 38px; }

.hero-cta {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.hero-fig {
  position: relative;
  width: 100%;
  max-width: 470px;
  justify-self: center;
  padding: clamp(14px, 2vw, 26px);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 52%, transparent 96%);
  mask-image: radial-gradient(ellipse at center, #000 52%, transparent 96%);
}

/* pantallas anchas pero bajas: compactar el hero para que el diagrama respire */
@media (min-width: 901px) and (max-height: 830px) {
  .hero-titulo { font-size: clamp(38px, 6.4vw, 80px); }
  .hero-fig { max-width: 380px; }
  .hero-cuerpo { padding-bottom: 30px; }
}

.crop {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 0 solid var(--muted);
  opacity: .8;
}

.crop.c1 { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.crop.c2 { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.crop.c3 { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.crop.c4 { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.schem {
  width: 100%;
  height: auto;
  color: var(--ink);
  font-family: var(--f-mono);
}

.schem .draw {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-opacity: .75;
  stroke-linecap: square;
}

.schem .ruta-roja,
.schem .nodo-rojo {
  stroke: var(--red);
  stroke-opacity: 1;
}

.schem .pt {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-opacity: .75;
  stroke-width: 1.2;
}

.schem .pt-rojo { stroke: var(--red); }
.schem .centro-rojo { fill: var(--red); }

.schem .lbl {
  fill: var(--muted);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.schem .lbl-sub { font-size: 8.5px; opacity: .8; letter-spacing: .12em; }
.schem .lbl-cota { font-size: 9px; opacity: .85; letter-spacing: .16em; }

.schem .flujo {
  fill: var(--red);
  opacity: 0;
}

.hero-fig figcaption {
  margin-top: 10px;
  color: var(--ink);
  opacity: .68;
  font-size: 10.5px;
}

/* ---- estados de arranque del esquema (solo con JS) ---- */

.js .schem .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.booted .schem .draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .95s cubic-bezier(.45, 0, .2, 1) var(--d, 0s);
}

.js .schem .pt { opacity: 0; }
.booted .schem .pt {
  opacity: 1;
  transition: opacity .4s ease 1.55s;
}

.js .schem .lbl { opacity: 0; }
.booted .schem .lbl {
  opacity: 1;
  transition: opacity .55s ease 1.7s;
}

.js .schem .flujo { opacity: 0; }
.booted .schem .flujo {
  opacity: .95;
  transition: opacity .5s ease 2.3s;
}

.schem .schem-inner { will-change: transform; }

/* ---- HOJA 02 · POSICIONAMIENTO ---- */

.hoja-statement {
  padding-block: clamp(110px, 20vh, 220px);
}

.hoja-statement .kicker { margin-bottom: clamp(36px, 6vh, 64px); }

.statement {
  font-size: clamp(33px, 4.7vw, 66px);
  line-height: 1.12;
  letter-spacing: -.015em;
  max-width: 24ch;
}

.statement .w { transition: opacity .3s ease; }
.js .statement .w { opacity: .15; }
.js .statement .w.on { opacity: 1; }

/* ---- estructura común de hojas con columna fija ---- */

.cols {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) 1.18fr;
  gap: clamp(48px, 7vw, 120px);
  align-items: start;
  padding-block: clamp(96px, 14vh, 170px);
}

.col-fija { position: sticky; top: calc(var(--cab-h) + 36px); }

.col-fija h2 {
  font-size: clamp(37px, 4.4vw, 62px);
  margin-top: 26px;
}

/* ---- HOJA 03 · SISTEMA (índice desplegable) ---- */

.fila { border-top: 1px solid var(--line-2); }
.fila:last-child { border-bottom: 1px solid var(--line-2); }

.fila-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 25px 0;
  text-align: left;
}

.fila-num {
  color: var(--muted);
  transition: color .25s ease;
}

.fila-titulo {
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(20px, 2.1vw, 26px);
  letter-spacing: -.015em;
  line-height: 1.15;
  background-image: linear-gradient(var(--red), var(--red));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size .35s cubic-bezier(.2, .7, .2, 1);
}

.fila-btn:hover .fila-titulo,
.fila.open .fila-titulo { background-size: 100% 1px; }

.fila-btn:hover .fila-num,
.fila.open .fila-num { color: var(--red-suave); }

.fila-tag {
  color: var(--muted);
  font-size: 10px;
  justify-self: end;
  padding-top: 6px;
}

.fila-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s cubic-bezier(.2, .7, .2, 1);
}

.fila.open .fila-panel { grid-template-rows: 1fr; }

.fila-inner { overflow: hidden; }

.fila-inner p {
  padding: 2px 0 28px 60px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

/* ---- HOJA 04 · MÉTODO ---- */

.hoja-metodo {
  background: var(--paper-2);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  padding-block: clamp(96px, 14vh, 170px);
  transition: background-color .35s ease;
}

.hoja-metodo h2 {
  font-size: clamp(37px, 4.4vw, 62px);
  margin-top: 26px;
}

.metodo {
  --pl: clamp(44px, 6vw, 76px);
  position: relative;
  margin-top: clamp(44px, 7vh, 72px);
  padding-left: var(--pl);
}

.metodo::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line);
  opacity: .55;
}

.metodo::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 1px;
  height: calc((100% - 20px) * var(--p, 0));
  background: var(--red);
}

.paso {
  position: relative;
  padding: clamp(26px, 3.6vh, 38px) 0;
}

.paso + .paso { border-top: 1px solid var(--line-2); }

.paso::before {
  content: "";
  position: absolute;
  left: calc(6px - var(--pl));
  top: clamp(34px, 4.6vh, 48px);
  width: 9px;
  height: 9px;
  border: 1px solid var(--muted);
  background: var(--paper-2);
  transition: background-color .3s ease, border-color .3s ease;
}

.paso.on::before {
  background: var(--red);
  border-color: var(--red);
}

.paso-cod {
  color: var(--muted);
  transition: color .3s ease;
}

.paso.on .paso-cod { color: var(--red-suave); }

.paso h3 {
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(21px, 2.2vw, 27px);
  letter-spacing: -.015em;
  margin: 10px 0 10px;
}

.paso p {
  color: var(--muted);
  max-width: 56ch;
  font-size: 16px;
  line-height: 1.7;
}

/* ---- HOJA 05 · REGISTRO ---- */

.reg {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 30px 0;
}

.reg + .reg { border-top: 1px solid var(--line-2); }

.reg-num {
  color: var(--muted);
  padding-top: 6px;
}

.reg h3 {
  font-stretch: 112%;
  font-weight: 600;
  font-size: clamp(19px, 2vw, 24px);
  letter-spacing: -.015em;
  margin-bottom: 8px;
}

.reg p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 58ch;
}

/* ---- HOJA 06 · PERSONA ---- */

.hoja-persona { padding-block: clamp(110px, 18vh, 210px); }

.persona-shell { max-width: 840px; }

.serif-line {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(29px, 4vw, 52px);
  line-height: 1.2;
  letter-spacing: 0;
  margin: 30px 0 34px;
  text-wrap: balance;
}

.persona-txt {
  font-size: 18px;
  line-height: 1.7;
  max-width: 60ch;
}

.ficha {
  margin-top: clamp(40px, 7vh, 64px);
  border-top: 1px solid var(--line);
}

.ficha > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-2);
}

.ficha dt {
  color: var(--muted);
  font-size: 10px;
  padding-top: 3px;
}

.ficha dd { font-size: 15.5px; }
.ficha dd .lnk { font-size: 15.5px; }

/* ---- HOJA 07 · CONTACTO ---- */

.hoja-contacto {
  padding-block: clamp(110px, 20vh, 230px);
}

.contacto-titulo {
  font-size: clamp(40px, 6.4vw, 92px);
  max-width: 15ch;
  margin-top: 30px;
}

.hoja-contacto .col-lead { margin-top: 30px; }

.contacto-cta { margin-top: clamp(34px, 5vh, 52px); }

/* ============ PIE ============ */

.pie {
  border-top: 1px solid var(--line-2);
  padding: 24px 0 34px;
}

.pie-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
}

.pie a { transition: color .2s ease; }
.pie a:hover { color: var(--ink); }

/* ============ ANIMACIONES DE ENTRADA (con JS) ============ */

.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.2, .7, .2, 1);
}

.js .rv.in {
  opacity: 1;
  transform: none;
}

/* título del hero: líneas que suben al arrancar */

.js .hl > span {
  transform: translateY(110%);
  transition: transform .8s cubic-bezier(.2, .75, .2, 1);
}

.js .hl:nth-child(2) > span { transition-delay: .09s; }
.js .hl:nth-child(3) > span { transition-delay: .18s; }

.booted .hl > span { transform: none; }

.js .hero-meta,
.js .hero-copy > *,
.js .hero-cta {
  opacity: 0;
  transition: opacity .7s ease;
}

.booted .hero-meta { opacity: 1; transition-delay: .55s; }
.booted .hero-copy > * { opacity: 1; transition-delay: .45s; }
.booted .hero-cta { opacity: 1; transition-delay: .75s; }

.js .hero-fig { opacity: 0; transition: opacity .9s ease .3s; }
.booted .hero-fig { opacity: 1; }

/* ============ RESPONSIVE ============ */

@media (min-width: 1100px) {
  body { padding-left: 56px; }
  .cab { padding-left: 56px; }
  .rail { display: flex; }
  .progress { display: none; }
  .menu-btn { display: none; }
}

@media (max-width: 1099px) {
  .cab-nav { display: none; }
}

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; gap: 44px; }
  .col-fija { position: static; }
  .hero-cuerpo { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .hero-fig { max-width: 620px; }
  .hoja-hero { min-height: 0; padding-bottom: clamp(40px, 8vh, 80px); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .cab { height: 58px; }
  :root { --cab-h: 58px; }
  section { scroll-margin-top: 70px; }
  .icon-btn { width: 42px; height: 42px; }
  .menu-btn { padding: 13px 16px; }
  .hero-meta { font-size: 9px; }
  .hero-cta { gap: 20px; }
  .fila-btn { grid-template-columns: 34px 1fr; padding: 22px 0; }
  .fila-tag { display: none; }
  .fila-inner p { padding-left: 50px; }
  .reg { grid-template-columns: 44px 1fr; gap: 14px; }
  .metodo { --pl: 34px; }
  .metodo::before, .metodo::after { left: 6px; }
  .paso::before { left: calc(2px - var(--pl)); }
  .ficha > div { grid-template-columns: 1fr; gap: 3px; padding: 12px 0; }
  .btn { width: 100%; }
  .hero-cta .lnk { width: auto; }
  .hoja-persona { padding-bottom: 64px; }
  .hoja-contacto { padding-top: 88px; }
  .pie-inner { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ============ MOVIMIENTO REDUCIDO ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .js .rv,
  .js .hl > span,
  .js .hero-meta,
  .js .hero-copy > *,
  .js .hero-cta,
  .js .hero-fig,
  .js .statement .w,
  .js .indice li {
    opacity: 1 !important;
    transform: none !important;
  }

  .js .schem .draw { stroke-dashoffset: 0 !important; }
  .js .schem .pt,
  .js .schem .lbl { opacity: 1 !important; }
  .schem .flujo { display: none !important; }
  .metodo::after { height: calc((100% - 20px) * 1); }
  .paso::before { background: var(--red); border-color: var(--red); }
  .paso .paso-cod { color: var(--red-suave); }
}
