/* ==========================================================================
   hitos.css — /hitos: la línea del legado (1949 → 2023).
   Un eje rojo vertical avanza con el scroll; cada hito lleva su año gigante. La página empieza en tema
   oscuro y pasa a claro al terminar la etapa de su vida (2012): mismo efecto del Home y de /biografia
   (JV.themeRamp). Todos los colores salen de --bg / --fg / --fg-2 / --calido, salvo el hero, siempre oscuro.
   ========================================================================== */

.js:not(.rm) .hfoto__frame { clip-path: inset(100% 0 0 0); }

/* ══ HERO (siempre oscuro) ═════════════════════════════════════════════════ */
.hhero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--negro);
  --fg: var(--blanco); --fg-2: var(--gris); --calido: var(--brass);
  color: var(--blanco);
}
.hhero__pattern { position: absolute; inset: 0; z-index: -1; opacity: .06; --pat-size: 420px; }

.hhero__top {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px;
  padding: calc(var(--header-h) + 24px) var(--pad-r) clamp(28px, 6vh, 64px) var(--pad-l);
}
.hhero__intro { display: grid; gap: 14px; max-width: 36ch; }
.hhero__lead { font-size: clamp(1.15rem, .9rem + 1vw, 1.65rem); font-weight: 600; line-height: 1.24; letter-spacing: -.01em; text-wrap: balance; }
.hhero__count { display: grid; justify-items: end; gap: 6px; line-height: .8; }
.hhero__count b { font-size: clamp(4.5rem, 1rem + 10vw, 11rem); font-weight: 800; }
.hhero__count span { font-family: var(--font-body); font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: .2em; color: var(--brass); }

/* Regla de años: cada marca es un hito en su posición exacta */
.hrule { position: relative; height: 72px; margin: 0 var(--pad-r) clamp(20px, 4vh, 44px) var(--pad-l); }
.hrule__line { position: absolute; left: 0; right: 0; top: 28px; height: 1px; background: var(--linea-fuerte); transform-origin: 0 50%; }
.hrule__tick { position: absolute; left: var(--x); top: 20px; width: 2px; height: 17px; margin-left: -1px; background: var(--rojo); transform-origin: 50% 100%; }
.hrule__tick.is-legado { background: var(--brass); }
.hrule__dec { position: absolute; left: var(--x); top: 28px; }
.hrule__dec i { position: absolute; left: 0; top: 0; width: 1px; height: 10px; background: var(--linea-fuerte); }
.hrule__dec b { position: absolute; left: 0; top: 16px; transform: translateX(-50%); font: 700 12px/1 var(--font-body); letter-spacing: .1em; color: var(--gris); }
@media (max-width: 560px) { .hrule__dec:nth-of-type(even) b { display: none; } }   /* menos etiquetas en pantallas estrechas */

.hhero__title { position: relative; margin: 0; padding-top: 18px; }
.hhero__title::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad-marca); transform-origin: 0 50%; transform: scaleX(var(--rule, 1)); }
.js:not(.rm) .hhero__title { --rule: 0; }
.hhero__title [data-fit] { font-size: 22vw; line-height: .86; padding-bottom: .02em; color: var(--blanco); }

/* Año en curso: cuelga del eje rojo, arriba y al centro (en el header, donde no hay nada más) */
.hticker {
  position: fixed; z-index: calc(var(--z-header) + 1); top: 0; left: 50%; transform: translateX(-50%);
  display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 10px;
  background: var(--bg); border: 1px solid var(--linea-fuerte); border-top: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
}
.hticker.is-on { opacity: 1; visibility: visible; transition: opacity var(--t-med) var(--ease-out); }
.hticker__lab { font: 700 11px/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--calido); }
.hticker__year { font-size: 2rem; line-height: 1; font-weight: 800; color: var(--fg); font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .hticker__lab { display: none; } }

/* ══ LÍNEA ═════════════════════════════════════════════════════════════════ */
.hline { position: relative; padding: clamp(24px, 4vh, 56px) 0 clamp(24px, 4vh, 56px); }
.hline__axis { position: absolute; z-index: 0; top: 0; bottom: 0; left: calc(var(--pad-l) + 5px); width: 2px; background: var(--linea); overflow: hidden; }
.hline__axis i { display: block; width: 100%; height: 100%; background: var(--rojo); transform: scaleY(0); transform-origin: 50% 0; }

.hito {
  --hpad-l: calc(var(--pad-l) + 36px);
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 6px;
  padding: clamp(26px, 4vw, 56px) var(--pad-r) clamp(26px, 4vw, 56px) var(--hpad-l);
}
.hito__dot {
  position: absolute; left: calc(var(--pad-l) + 5px); top: calc(clamp(26px, 4vw, 56px) + 1.05rem); z-index: 2;
  width: 13px; height: 13px; margin-left: -5.5px; background: var(--bg); border: 2px solid var(--linea-fuerte);
  transition: background-color var(--t-med) var(--ease-out), border-color var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.hito.is-passed .hito__dot { background: var(--rojo); border-color: var(--rojo); }
.hito.is-current .hito__dot { transform: scale(1.35); }

.hito__year { display: flex; align-items: baseline; gap: 12px; }
.hito__antes { align-self: flex-start; padding-top: .4em; }
.hito__num { font-size: clamp(4.5rem, 1rem + 16vw, 9rem); font-weight: 800; line-height: .82; color: var(--fg); font-variant-numeric: tabular-nums; }
.hito__tag { margin: 0 0 8px; }
.hito__title { font-size: clamp(1.7rem, 1rem + 2.4vw, 3.2rem); line-height: .96; margin-bottom: 14px; max-width: 16ch; }
.hito__text { max-width: 58ch; color: var(--fg-2); font-size: clamp(1.02rem, .96rem + .28vw, 1.16rem); line-height: 1.66; }

/* Fotos: marco de bordes duros; se abre como telón */
.hfoto { margin: clamp(18px, 2.4vw, 30px) 0 0; max-width: 560px; }
.hfoto__frame { position: relative; overflow: hidden; border: 1px solid var(--linea-fuerte); background: var(--negro-2); }

/* «Lima 1989»: la multitud, a sangre, tapando el eje */
.hlima { position: relative; grid-column: 1 / -1; height: clamp(280px, 46svh, 460px); margin: clamp(26px, 3vw, 44px) calc(var(--pad-r) * -1) 0 calc(var(--hpad-l) * -1); overflow: hidden; border-block: 1px solid var(--linea); background: var(--bg); }
.hlima__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hlima__slab { position: absolute; z-index: 2; left: var(--pad-l); bottom: clamp(14px, 3vw, 34px); display: grid; gap: 8px; padding: clamp(16px, 2vw, 26px); background: var(--bg); border: 1px solid var(--linea-fuerte); }
.hlima__num { font-size: clamp(2.2rem, 1rem + 4.2vw, 4.8rem); font-variant-numeric: tabular-nums; }

/* ── Escritorio: el eje al centro, los hitos alternan de lado ─────────────── */
@media (min-width: 1000px) {
  .hline__axis { left: 50%; margin-left: -1px; }
  .hito { --hpad-l: var(--pad-l); grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0; row-gap: 0; padding: clamp(30px, 4.6vw, 70px) var(--pad-r) clamp(30px, 4.6vw, 70px) var(--pad-l); }
  .hito__dot { left: 50%; margin-left: -6.5px; top: calc(clamp(30px, 4.6vw, 70px) + clamp(1.4rem, 3.2vw, 3rem)); }

  .hito__year, .hito__body { padding-inline: clamp(36px, 4.4vw, 84px); align-self: start; }
  .hito__num { font-size: clamp(6rem, 1rem + 12vw, 15rem); }
  .hito__title { font-size: clamp(1.9rem, 1rem + 2vw, 3.4rem); }

  .hito--a .hito__year { grid-column: 1; justify-content: flex-end; padding-left: 0; }
  .hito--a .hito__body { grid-column: 2; padding-right: 0; }
  .hito--b .hito__year { grid-column: 2; grid-row: 1; justify-content: flex-start; padding-right: 0; }
  .hito--b .hito__body { grid-column: 1; grid-row: 1; padding-left: 0; justify-self: end; }
  .hito--b .hito__title, .hito--b .hito__text, .hito--b .hito__tag { text-align: right; margin-left: auto; }
  .hito--b .hfoto { margin-left: auto; }
  .hito--b .hito__antes { order: 2; }

  .hlima { margin: clamp(30px, 4vw, 56px) calc(var(--pad-r) * -1) 0 calc(var(--pad-l) * -1); }
}

/* ── Frases del Maestro (a sangre; tapan el eje) ──────────────────────────── */
.hcita { position: relative; z-index: 1; margin: 0; padding: clamp(40px, 7vw, 100px) var(--pad-r) clamp(40px, 7vw, 100px) var(--pad-l); background: var(--bg); border-block: 1px solid var(--linea); overflow: hidden; }
.hcita__mark { position: absolute; left: var(--pad-l); top: .04em; z-index: 0; font-size: clamp(9rem, 24vw, 22rem); line-height: .8; color: var(--rojo); opacity: .16; pointer-events: none; user-select: none; }
.hcita__text { position: relative; max-width: 24ch; margin-left: clamp(0px, 8vw, 160px); font-size: clamp(1.8rem, 1rem + 3.6vw, 4.6rem); font-weight: 300; font-style: italic; line-height: 1.05; letter-spacing: -.03em; text-wrap: balance; }
.hcita__cap { position: relative; margin: 18px 0 0 clamp(0px, 8vw, 160px); }

/* ── Divisoria «El legado continúa» ───────────────────────────────────────── */
.hlegado { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; gap: clamp(14px, 2vw, 26px); padding: clamp(56px, 10vw, 130px) var(--pad-r) clamp(48px, 8vw, 100px) var(--pad-l); background: var(--bg); border-block: 1px solid var(--linea); }
.hlegado__title { font-size: clamp(2.8rem, 1rem + 9vw, 10rem); max-width: 12ch; }
.hlegado__quote { display: grid; gap: 14px; justify-items: center; margin: clamp(10px, 2vw, 24px) 0 0; }
.hlegado__quote blockquote { max-width: 30ch; font-size: clamp(1.3rem, 1rem + 1.6vw, 2.4rem); font-weight: 300; font-style: italic; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }

/* ══ CIERRE ═════════════════════════════════════════════════════════════════ */
.hfin { display: grid; justify-items: center; text-align: center; gap: clamp(18px, 2.6vw, 34px); padding: clamp(64px, 11vh, 130px) var(--pad-r) clamp(48px, 8vh, 96px) var(--pad-l); border-top: 1px solid var(--linea); }
.hfin__sign { width: min(86vw, 560px); padding: clamp(12px, 2.4vw, 36px); color: var(--rojo); }
.firma--hfin { width: 100%; height: auto; }
.hfin__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
