/* ==========================================================================
   URGULL — Sistema de diseño
   Concepto: "carta náutica impresa". Papel cálido, tinta profunda, hierro
   oxidado de cañón y verde-mar. Bloques inmersivos en tinta que alternan con
   secciones de lectura en papel, como un cuaderno de campo bien editado.
   ========================================================================== */

/* -------------------------------------------------- 1. Reset y tokens --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul[class], ol[class] { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

:root {
  /* Color */
  --ink:        #12171a;
  --ink-soft:   #1c2429;
  --ink-3:      #2a343a;
  --paper:      #f3ede2;
  --paper-2:    #e8e0d1;
  --paper-3:    #dcd2be;
  --oxide:      #973f1a;
  --oxide-lt:   #d0703f;
  --brass:      #c19039;
  --sea:        #2c6d76;
  --sea-lt:     #4f97a0;
  --moss:       #6d7d51;
  --plum:       #5a5b8c;

  --txt:        #12171a;
  --txt-2:      #4a5257;
  --txt-3:      #555e63;
  --on-ink:     #ece5d8;
  --on-ink-2:   #b0babe;
  --on-ink-3:   #8f9a9f;

  --line:       rgba(18, 23, 26, .15);
  --line-2:     rgba(18, 23, 26, .32);
  --line-ink:   rgba(236, 229, 216, .16);
  --line-ink-2: rgba(236, 229, 216, .34);

  /* Tipografía */
  --f-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --f-text:    'Newsreader', Georgia, 'Times New Roman', serif;
  --f-ui:      'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Métrica */
  --pad:   clamp(1.25rem, 5vw, 4.5rem);
  --maxw:  1400px;
  --readw: 68ch;
  --r:     2px;

  --e-out: cubic-bezier(.22, 1, .36, 1);
  --e-io:  cubic-bezier(.65, 0, .35, 1);
}

/* -------------------------------------------------- 2. Base ------------- */
html { scroll-behavior: smooth; }
/* Los destinos de ancla no pueden quedar bajo la barra fija */
[id] { scroll-margin-top: clamp(5rem, 9vh, 7rem); }
.hito[id] { scroll-margin-top: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--paper);
  color: var(--txt);
  font-family: var(--f-text);
  font-size: clamp(1rem, .96rem + .22vw, 1.1875rem);
  line-height: 1.62;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grano de impresión sobre todo el documento */
body::after {
  content: '';
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  opacity: .28;
  mix-blend-mode: multiply;
}
.ink-zone body::after { mix-blend-mode: screen; }

::selection { background: var(--oxide); color: #fff; }

:focus-visible {
  outline: 2px solid var(--oxide);
  outline-offset: 3px;
  border-radius: var(--r);
}

/* -------------------------------------------------- 3. Tipos ------------ */
.d1, .d2, .d3, .d4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: .94;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.d1 { font-size: clamp(3rem, 11.5vw, 12rem); }
.d2 { font-size: clamp(2.35rem, 6.6vw, 5.75rem); }
.d3 { font-size: clamp(1.85rem, 3.9vw, 3.35rem); line-height: 1.02; }
.d4 { font-size: clamp(1.3rem, 2.1vw, 1.9rem); line-height: 1.12; letter-spacing: -.02em; }

.lead {
  font-size: clamp(1.15rem, 1.02rem + .68vw, 1.6rem);
  line-height: 1.46;
  color: var(--txt-2);
  max-width: 46ch;
  text-wrap: pretty;
}
.ink-zone .lead { color: var(--on-ink-2); }

.eyebrow {
  font-family: var(--f-ui);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--oxide);
  display: flex; align-items: center; gap: .7em;
}
.eyebrow::before {
  content: ''; width: 2.2em; height: 1px;
  background: currentColor; opacity: .55; flex: none;
}
.ink-zone .eyebrow { color: var(--brass); }

.mono { font-family: var(--f-mono); font-size: .78em; letter-spacing: -.01em; }
.num  { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.prose p + p { margin-top: 1.05em; }
.prose { max-width: var(--readw); }
.prose em { font-style: italic; }
.prose strong { font-weight: 600; }

.drop::first-letter {
  font-family: var(--f-display); font-weight: 700;
  float: left; font-size: 3.9em; line-height: .78;
  padding: .06em .1em 0 0; color: var(--oxide);
}

/* -------------------------------------------------- 4. Layout ----------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.wrap-nar { width: 100%; max-width: 980px; margin-inline: auto; padding-inline: var(--pad); }
.sec { padding-block: clamp(4rem, 9vw, 9rem); position: relative; }
.sec-tight { padding-block: clamp(2.5rem, 5vw, 5rem); }

.ink-zone {
  background: var(--ink);
  color: var(--on-ink);
  --txt: var(--on-ink);
  --txt-2: var(--on-ink-2);
  --txt-3: var(--on-ink-3);
  --line: var(--line-ink);
  --line-2: var(--line-ink-2);
}

.grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); align-items: start; } }
.split-r { }
@media (min-width: 900px) { .split-r { grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr); } }

.sticky-side { position: sticky; top: 7rem; }

/* Cabecera de sección numerada, tipo cuaderno de campo */
.sechead { display: grid; gap: 1.15rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.sechead .d2, .sechead .d3 { max-width: 22ch; }
.sechead-row {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1.5rem;
}

/* Reglas y filetes */
.rule { height: 1px; background: var(--line); border: 0; }
.rule-2 { height: 1px; background: var(--line-2); border: 0; }

/* -------------------------------------------------- 5. Navegación ------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--ink); color: var(--on-ink);
  padding: .8rem 1.2rem; font-family: var(--f-ui); font-size: .85rem;
}
.skip:focus { left: 1rem; top: 1rem; }

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem var(--pad);
  font-family: var(--f-ui);
  transition: background .45s var(--e-out), color .45s var(--e-out),
              border-color .45s var(--e-out), backdrop-filter .45s;
  border-bottom: 1px solid transparent;
  color: var(--ink);
}
.nav.is-solid {
  background: rgba(243, 237, 226, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--line);
  color: var(--ink);
}
.nav.is-dark { color: var(--on-ink); }
.nav.is-solid.is-dark {
  background: rgba(18, 23, 26, .82);
  border-bottom-color: rgba(236, 229, 216, .14);
  color: var(--on-ink);
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.brand svg { width: 26px; height: 26px; }
.brand b {
  font-family: var(--f-display); font-weight: 700;
  font-size: 1.18rem; letter-spacing: -.03em; line-height: 1;
}
.brand span {
  font-size: .58rem; letter-spacing: .2em; text-transform: uppercase;
  opacity: .62; display: block; margin-top: .15rem;
}

.nav-links { display: none; gap: .15rem; align-items: center; }
@media (min-width: 1020px) { .nav-links { display: flex; } }
.nav-links a {
  text-decoration: none; font-size: .8rem; font-weight: 500;
  letter-spacing: .04em; padding: .55rem .8rem; border-radius: var(--r);
  position: relative; opacity: .78; transition: opacity .25s;
}
.nav-links a:hover { opacity: 1; }
.nav-links a::after {
  content: ''; position: absolute; left: .8rem; right: .8rem; bottom: .32rem;
  height: 1px; background: currentColor; transform: scaleX(0);
  transform-origin: left; transition: transform .4s var(--e-out);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { opacity: 1; color: var(--oxide); }
.is-dark .nav-links a[aria-current="page"] { color: var(--brass); }

.nav-right { display: flex; align-items: center; gap: .6rem; }

.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px;
  background: none; border: 1px solid currentColor; border-radius: 50%;
  cursor: pointer; opacity: .8;
}
@media (min-width: 1020px) { .burger { display: none; } }
.burger i { display: block; height: 1.5px; background: currentColor; transition: transform .35s var(--e-out), opacity .2s; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 899;
  background: var(--ink); color: var(--on-ink);
  display: grid; align-content: center; gap: .2rem;
  padding: 6rem var(--pad) 3rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--e-out);
  overflow-y: auto;
}
.drawer.is-open { clip-path: inset(0 0 0 0); }
.drawer a {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.6rem); letter-spacing: -.03em;
  text-decoration: none; line-height: 1.08; padding: .12em 0;
  display: flex; align-items: baseline; gap: .7rem;
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s var(--e-out), transform .5s var(--e-out), color .25s;
}
.drawer.is-open a { opacity: 1; transform: none; }
.drawer a:hover { color: var(--brass); }
.drawer a em {
  font-family: var(--f-mono); font-style: normal;
  font-size: .7rem; opacity: .45; letter-spacing: .1em;
}
.drawer-foot {
  margin-top: 2.5rem; font-family: var(--f-ui); font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-3);
}

/* -------------------------------------------------- 6. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--f-ui); font-size: .8rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  padding: .95rem 1.5rem; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--line-2); background: none; color: inherit;
  transition: background .3s var(--e-out), color .3s var(--e-out),
              border-color .3s, transform .3s var(--e-out);
  position: relative; overflow: hidden;
}
.btn:hover { transform: translateY(-2px); }
.btn-fill { background: var(--oxide); border-color: var(--oxide); color: #fff; }
.btn-fill:hover { background: var(--ink); border-color: var(--ink); }
.ink-zone .btn-fill:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ink-zone .btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn svg { width: 15px; height: 15px; flex: none; transition: transform .35s var(--e-out); }
.btn:hover svg { transform: translateX(4px); }

.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--f-ui); font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .38rem .72rem; border: 1px solid var(--line-2); border-radius: 100px;
  background: none; color: inherit; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.chip:hover { border-color: currentColor; }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.ink-zone .chip[aria-pressed="true"], .ink-zone .chip.is-on {
  background: var(--paper); color: var(--ink); border-color: var(--paper);
}

/* -------------------------------------------------- 7. Cota (altímetro) - */
.altimeter {
  position: fixed; right: max(1rem, calc(var(--pad) * .42)); top: 50%;
  transform: translateY(-50%); z-index: 880;
  display: none; align-items: center; gap: .55rem;
  pointer-events: none; font-family: var(--f-mono); font-size: .62rem;
  letter-spacing: .06em; mix-blend-mode: difference; color: #d9d2c6;
}
@media (min-width: 1180px) { .altimeter { display: flex; } }
.altimeter-rail {
  width: 1px; height: 34vh; background: currentColor; opacity: .3;
  position: relative;
}
.altimeter-rail i {
  position: absolute; left: -4px; width: 9px; height: 1px;
  background: currentColor; opacity: .55;
}
.altimeter-cursor {
  position: absolute; left: -13px; width: 27px; height: 1px;
  background: currentColor; transition: top .12s linear;
}
.altimeter-cursor::after {
  content: ''; position: absolute; right: -3px; top: -2.5px;
  width: 6px; height: 6px; background: currentColor; border-radius: 50%;
}
.altimeter-val { writing-mode: vertical-rl; text-orientation: mixed; opacity: .85; }

/* -------------------------------------------------- 8. Revelado --------- */
.rv { opacity: 0; transform: translateY(26px); }
.rv.in { opacity: 1; transform: none; transition: opacity .85s var(--e-out), transform .85s var(--e-out); }
.rv-d1.in { transition-delay: .08s; } .rv-d2.in { transition-delay: .16s; }
.rv-d3.in { transition-delay: .24s; } .rv-d4.in { transition-delay: .32s; }
.rv-l { clip-path: inset(0 100% 0 0); }
.rv-l.in { clip-path: inset(0 0 0 0); transition: clip-path 1.1s var(--e-out); }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv.in { opacity: 1; transform: none; transition: none; }
  .rv-l, .rv-l.in { clip-path: none; transition: none; }
}

/* -------------------------------------------------- 9. Hero ------------- */
.hero {
  position: relative; min-height: 100svh; display: grid;
  align-content: end; overflow: hidden; isolation: isolate;
  background: #0a0f12; color: var(--on-ink);
  padding: 8rem var(--pad) clamp(2rem, 5vh, 4rem);
}
.hero-media { position: absolute; inset: 0; z-index: -3; }
.hero-media video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(8,12,14,.94) 0%, rgba(8,12,14,.55) 34%, rgba(8,12,14,.12) 62%, rgba(8,12,14,.5) 100%);
}
#fogCanvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; opacity: .5; }

.hero-inner { position: relative; z-index: 2; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.hero h1 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.045em; line-height: .82; }
.hero-title {
  font-size: clamp(4.2rem, 20vw, 19rem);
  display: block; text-transform: uppercase;
}
.hero-title span { display: inline-block; }
.hero-sub {
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem;
  align-items: flex-end; justify-content: space-between;
  border-top: 1px solid var(--line-ink); padding-top: 1.4rem;
}
.hero-claim { font-size: clamp(1.05rem, 1.4vw, 1.4rem); max-width: 40ch; color: var(--on-ink-2); line-height: 1.45; }
.hero-meta {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em;
  color: var(--on-ink-3); display: grid; gap: .3rem; text-align: right;
}
.scrollcue {
  position: absolute; left: var(--pad); bottom: 1.2rem; z-index: 3;
  font-family: var(--f-ui); font-size: .64rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--on-ink-3);
  display: flex; align-items: center; gap: .6rem;
}
.scrollcue i {
  display: block; width: 1px; height: 34px; background: currentColor;
  transform-origin: top; animation: cue 2.4s var(--e-io) infinite;
}
@keyframes cue { 0%,100% { transform: scaleY(.25); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scrollcue i { animation: none; } }

/* -------------------------------------------------- 10. Cifras ---------- */
.stats { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--paper); padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1rem, 2vw, 1.8rem); }
.ink-zone .stat { background: var(--ink); }
.stat b {
  display: block; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: .9; letter-spacing: -.04em;
}
.stat b sup { font-size: .34em; vertical-align: super; letter-spacing: 0; color: var(--oxide); }
.stat p {
  margin-top: .6rem; font-family: var(--f-ui); font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--txt-3);
}
.stat small { display: block; margin-top: .5rem; font-size: .84rem; color: var(--txt-2); line-height: 1.4; font-family: var(--f-text); letter-spacing: 0; text-transform: none; }

/* -------------------------------------------------- 11. Tarjetas hito --- */
.hcard {
  color: var(--ink);
  --txt: #12171a; --txt-2: #4a5257; --txt-3: #555e63;
  --line: rgba(18, 23, 26, .15); --line-2: rgba(18, 23, 26, .32);
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  text-decoration: none; overflow: hidden;
  transition: transform .5s var(--e-out), box-shadow .5s var(--e-out), border-color .4s;
}
.hcard:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(18,23,26,.45); border-color: var(--line-2); }
.hcard-fig { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.hcard-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--e-out), filter .5s; }
.hcard:hover .hcard-fig img { transform: scale(1.045); }
.hcard-n {
  position: absolute; top: .75rem; left: .85rem; z-index: 2;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em;
  color: var(--paper); background: rgba(18,23,26,.78);
  padding: .25rem .5rem; border-radius: 100px;
}
.hcard-alt {
  position: absolute; bottom: .7rem; right: .85rem; z-index: 2;
  font-family: var(--f-mono); font-size: .66rem;
  background: rgba(18,23,26,.72); color: var(--on-ink);
  padding: .25rem .55rem; border-radius: 100px; letter-spacing: .04em;
}
.hcard-body { padding: 1.35rem 1.35rem 1.6rem; display: grid; gap: .55rem; flex: 1; align-content: start; }
.hcard-kind {
  font-family: var(--f-ui); font-size: .64rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--oxide);
}
.hcard h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.42rem; letter-spacing: -.025em; line-height: 1.06; }
.hcard p { font-size: .95rem; color: #4a5257; line-height: 1.5; }
.hcard-go {
  color: #555e63;
  margin-top: auto; padding-top: .9rem; display: flex; align-items: center; gap: .5rem;
  font-family: var(--f-ui); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--txt-3);
}
.hcard:hover .hcard-go { color: var(--oxide); }

/* -------------------------------------------------- 12. Mapa ------------ */
.mapwrap {
  position: relative; background: var(--ink); color: var(--on-ink);
  --txt: #ece5d8; --txt-2: #b0babe; --txt-3: #8f9a9f;
  --line: rgba(236,229,216,.16); --line-2: rgba(236,229,216,.34);
}
.mapwrap .eyebrow { color: var(--brass); }
.maplayout { display: grid; gap: 0; }
@media (min-width: 1060px) { .maplayout { grid-template-columns: minmax(0, 1fr) 380px; } }

.mapstage { position: relative; overflow: hidden; }
.mapstage svg { width: 100%; height: auto; display: block; touch-action: pan-y; }

.map-contour { fill: none; stroke: rgba(236,229,216,.15); stroke-width: 1; }
.map-contour.c-hi { stroke: rgba(236,229,216,.26); }
.map-coast { fill: #171e22; stroke: rgba(236,229,216,.42); stroke-width: 1.4; }
.map-sea { fill: #0b1114; }
.map-city { fill: #10161a; stroke: rgba(236,229,216,.18); stroke-width: 1; }
.map-hatch { fill: url(#hatch); }
.map-route {
  fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  opacity: .34; transition: opacity .4s, stroke-width .4s;
  stroke-dasharray: 1 0;
}
.map-route.is-active { opacity: 1; stroke-width: 3.4; }
.map-route.is-dim { opacity: .1; }
.map-route-ghost { fill: none; stroke: transparent; stroke-width: 22; cursor: pointer; }

.map-poi { cursor: pointer; }
.map-poi circle.dot {
  fill: var(--paper); stroke: var(--ink); stroke-width: 1.5;
  transition: r .35s var(--e-out), fill .3s;
}
.map-poi circle.halo {
  fill: none; stroke: var(--paper); stroke-width: 1; opacity: 0;
  transition: opacity .35s, r .5s var(--e-out);
}
.map-poi:hover circle.halo, .map-poi.is-active circle.halo { opacity: .6; }
.map-poi:hover circle.dot, .map-poi.is-active circle.dot { fill: var(--oxide-lt); }
.map-poi text {
  font-family: var(--f-ui); font-size: 11.5px; fill: var(--on-ink);
  paint-order: stroke; stroke: rgba(11,17,20,.85); stroke-width: 3px;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.map-poi:hover text, .map-poi.is-active text, .mapstage.show-labels .map-poi text { opacity: 1; }
.map-poi.is-hidden { opacity: .14; pointer-events: none; }

.map-walker { opacity: 0; transition: opacity .3s; }
.map-walker.on { opacity: 1; }

.map-label {
  font-family: var(--f-ui); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; fill: rgba(236,229,216,.34);
}
.map-label-sea { font-family: var(--f-display); font-style: italic; font-size: 22px; letter-spacing: .14em; fill: rgba(236,229,216,.17); }

.mappanel {
  border-left: 1px solid var(--line-ink); display: flex; flex-direction: column;
  max-height: 100%; background: #0f1518;
}
.mappanel-head { padding: 1.4rem var(--pad) 1rem; border-bottom: 1px solid var(--line-ink); }
@media (min-width: 1060px) { .mappanel-head { padding-inline: 1.6rem; } }
.mappanel-body { padding: 1.4rem var(--pad) 2rem; overflow-y: auto; flex: 1; }
@media (min-width: 1060px) { .mappanel-body { padding-inline: 1.6rem; max-height: 62vh; } }

.routelist { display: grid; gap: .5rem; }
.routebtn {
  display: grid; grid-template-columns: 26px 1fr auto; gap: .8rem; align-items: center;
  width: 100%; text-align: left; background: none; cursor: pointer;
  border: 1px solid var(--line-ink); padding: .8rem .9rem; border-radius: var(--r);
  color: var(--on-ink); transition: border-color .3s, background .3s;
}
.routebtn:hover { border-color: var(--line-ink-2); background: rgba(236,229,216,.04); }
.routebtn.is-on { border-color: currentColor; background: rgba(236,229,216,.07); }
.routebtn .key { color: #fff;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-mono); font-size: .7rem; font-weight: 700;
}
.routebtn .nm { font-family: var(--f-ui); font-size: .86rem; font-weight: 500; line-height: 1.25; }
.routebtn .nm em { display: block; font-style: normal; font-size: .68rem; color: #a6b0b5; margin-top: .15rem; letter-spacing: .04em; }
.routebtn .mt { font-family: var(--f-mono); font-size: .68rem; color: var(--on-ink-2); text-align: right; }

.profile { margin-top: 1.4rem; }
.profile svg { width: 100%; height: 118px; display: block; cursor: crosshair; touch-action: none; }
.profile-fill { fill: rgba(236,229,216,.09); }
.profile-line { fill: none; stroke: var(--on-ink); stroke-width: 1.6; }
.profile-grid { stroke: rgba(236,229,216,.13); stroke-width: 1; }
.profile-cursor { stroke: var(--oxide-lt); stroke-width: 1.2; }
.profile-tick { font-family: var(--f-mono); font-size: 8.5px; fill: rgba(236,229,216,.5); }

.poidetail { display: grid; gap: .7rem; }
.poidetail h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.55rem; letter-spacing: -.03em; line-height: 1.05; }
.poidetail p { font-size: .93rem; color: var(--on-ink-2); line-height: 1.55; }
.poidetail .kv { display: flex; gap: 1.2rem; flex-wrap: wrap; font-family: var(--f-mono); font-size: .68rem; color: var(--on-ink-3); }

/* -------------------------------------------------- 13. Panorámica ------ */
.panorama {
  position: relative; background: #0d1316; color: var(--on-ink);
  border: 1px solid var(--line-ink); overflow: hidden;
  cursor: grab; touch-action: pan-y;
}
.panorama.dragging { cursor: grabbing; }
.panorama svg { display: block; width: 100%; height: auto; }
.pano-hint {
  position: absolute; left: 50%; bottom: .9rem; transform: translateX(-50%);
  font-family: var(--f-ui); font-size: .64rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--on-ink-3);
  background: rgba(11,17,20,.7); padding: .35rem .9rem; border-radius: 100px;
  pointer-events: none; transition: opacity .5s;
}
.panorama.touched .pano-hint { opacity: 0; }
.pano-bearing {
  position: absolute; top: .9rem; left: .9rem;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em;
  background: rgba(11,17,20,.72); padding: .35rem .7rem; border-radius: 100px;
}
.pano-readout {
  background: #0d1316; color: var(--on-ink);
  border: 1px solid var(--line-ink); border-top: 0;
  display: grid; gap: .35rem; padding: 1.1rem 1.3rem;
  border-top: 1px solid var(--line-ink); min-height: 6.5rem; align-content: start;
}
.pano-readout h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.025em; }
.pano-readout p { font-size: .92rem; color: #b0babe; line-height: 1.5; }
.pano-readout .kv { font-family: var(--f-mono); font-size: .66rem; color: #8f9a9f; letter-spacing: .06em; }

/* -------------------------------------------------- 14. Cronología ------ */
.timeline { position: relative; display: grid; gap: 0; }
.tl-item {
  position: relative; display: grid; gap: 1rem;
  padding: clamp(2rem, 4vw, 3.2rem) 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) {
  .tl-item { grid-template-columns: 170px 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
}
.tl-year {
  font-family: var(--f-mono); font-size: .95rem; letter-spacing: .02em;
  color: var(--oxide); position: relative;
}
@media (min-width: 860px) { .tl-year { position: sticky; top: 7.5rem; } }
.tl-year em {
  display: block; font-style: normal; font-family: var(--f-ui);
  font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--txt-3); margin-top: .45rem;
}
.tl-body { max-width: 62ch; display: grid; gap: .85rem; }
.tl-body h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 2.5vw, 2.1rem); letter-spacing: -.03em; line-height: 1.05; }
.tl-body p { color: var(--txt-2); }
.tl-item.destacado { background: var(--ink); color: var(--on-ink); }
.tl-item.destacado { padding-inline: clamp(1.2rem, 3vw, 2.6rem); border-top-color: var(--ink); }
.tl-item.destacado .tl-body p { color: var(--on-ink-2); }
.tl-item.destacado .tl-year { color: var(--brass); }
.tl-item.destacado .tl-year em { color: var(--on-ink-3); }

/* Silueta que se construye */
.tl-figure { position: relative; }
.tl-svg { width: 100%; height: auto; }
.tl-layer { opacity: .12; transition: opacity .9s var(--e-out), transform .9s var(--e-out); transform: translateY(6px); }
.tl-layer.on { opacity: 1; transform: none; }
.tl-cap {
  font-family: var(--f-mono); font-size: .66rem; color: var(--txt-3);
  letter-spacing: .06em; margin-top: .8rem; line-height: 1.5;
}

/* -------------------------------------------------- 15. Planificador ---- */
.planner { display: grid; gap: clamp(1.6rem, 3vw, 2.6rem); }
@media (min-width: 940px) { .planner { grid-template-columns: 330px 1fr; align-items: start; } }
.plan-form { display: grid; gap: 1.6rem; }
.plan-group { display: grid; gap: .7rem; }
.plan-group > span {
  font-family: var(--f-ui); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--txt-3);
}
.plan-opts { display: flex; flex-wrap: wrap; gap: .45rem; }
.plan-out { border: 1px solid var(--line); background: var(--paper-2); padding: clamp(1.2rem, 3vw, 2rem); min-height: 22rem; }
.plan-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.3rem; }
.plan-head h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.03em; line-height: 1.05; }
.plan-total { font-family: var(--f-mono); font-size: .78rem; color: var(--oxide); }
.plan-steps { display: grid; gap: 0; counter-reset: st; }
.plan-step {
  display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 1rem;
  padding: .95rem 0; border-bottom: 1px dashed var(--line); align-items: baseline;
}
.plan-step:last-child { border-bottom: 0; }
.plan-step .t { font-family: var(--f-mono); font-size: .78rem; color: var(--txt-3); }
.plan-step .n { font-family: var(--f-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.plan-step .n em { display: block; font-style: normal; font-family: var(--f-text); font-size: .9rem; font-weight: 400; color: var(--txt-2); letter-spacing: 0; margin-top: .18rem; line-height: 1.45; }
.plan-step .a { font-family: var(--f-mono); font-size: .7rem; color: var(--txt-3); white-space: nowrap; }
.plan-note { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--txt-2); }

/* -------------------------------------------------- 16. Estado horario -- */
.openstate {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--f-ui); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--line-2); border-radius: 100px; padding: .42rem .85rem;
}
.openstate i { width: 7px; height: 7px; border-radius: 50%; background: var(--txt-3); flex: none; }
.openstate.abierto i { background: #5f9c62; box-shadow: 0 0 0 0 rgba(95,156,98,.7); animation: pulse 2.6s infinite; }
.openstate.cerrado i { background: var(--oxide); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(95,156,98,0); } 100% { box-shadow: 0 0 0 0 rgba(95,156,98,0); } }
@media (prefers-reduced-motion: reduce) { .openstate.abierto i { animation: none; } }

/* -------------------------------------------------- 17. Acordeón -------- */
.acc { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-btn {
  width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 1.3rem 0; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.05rem, 1.9vw, 1.4rem); letter-spacing: -.02em; line-height: 1.2;
  transition: color .25s;
}
.acc-btn:hover { color: var(--oxide); }
.acc-btn i {
  flex: none; width: 18px; height: 18px; position: relative; align-self: center;
}
.acc-btn i::before, .acc-btn i::after {
  content: ''; position: absolute; background: currentColor; inset: 0; margin: auto;
}
.acc-btn i::before { width: 100%; height: 1.5px; }
.acc-btn i::after { width: 1.5px; height: 100%; transition: transform .4s var(--e-out); }
.acc-btn[aria-expanded="true"] i::after { transform: scaleY(0); }
.acc-panel { overflow: hidden; height: 0; transition: height .5s var(--e-out); }
.acc-panel > div { padding-bottom: 1.5rem; max-width: 62ch; color: var(--txt-2); }

/* -------------------------------------------------- 18. Tabla datos ----- */
.dtable { width: 100%; border-collapse: collapse; font-size: .93rem; }
.dtable th, .dtable td { text-align: left; padding: .85rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable th {
  font-family: var(--f-ui); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--txt-3); font-weight: 500;
}
.dtable td:first-child { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.02rem; }
.dtable tr:hover td { background: rgba(18,23,26,.035); }
.tablescroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* -------------------------------------------------- 19. Citas / avisos -- */
.pull {
  font-family: var(--f-display); font-weight: 400; font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem); line-height: 1.16; letter-spacing: -.025em;
  max-width: 22ch; text-wrap: balance;
}
.pull cite { display: block; margin-top: 1.2rem; font-family: var(--f-ui); font-style: normal; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--txt-3); }

.notice {
  border: 1px solid var(--oxide); border-left-width: 3px;
  padding: 1.1rem 1.3rem; background: rgba(177,81,42,.06);
  display: grid; gap: .4rem;
}
.notice b { font-family: var(--f-ui); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--oxide); }
.notice p { font-size: .95rem; color: var(--txt-2); }
.ink-zone .notice { background: rgba(208,112,63,.1); border-color: var(--oxide-lt); }
.ink-zone .notice b { color: var(--oxide-lt); }

/* -------------------------------------------------- 20. Vídeo ----------- */
.videoblock { position: relative; background: #0a0f12; }
.videoblock video { width: 100%; height: auto; display: block; }
.vplay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10,15,18,.35); border: 0; cursor: pointer; color: var(--on-ink);
  transition: opacity .4s, background .4s;
}
.vplay.hide { opacity: 0; pointer-events: none; }
.vplay span {
  display: grid; place-items: center; width: clamp(70px, 9vw, 108px); aspect-ratio: 1;
  border: 1px solid rgba(236,229,216,.6); border-radius: 50%;
  font-family: var(--f-ui); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .35s, transform .35s var(--e-out);
}
.vplay:hover span { background: rgba(236,229,216,.16); transform: scale(1.06); }
.vcaption {
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  padding-top: .9rem; font-family: var(--f-mono); font-size: .68rem;
  color: var(--txt-3); letter-spacing: .04em;
}

/* -------------------------------------------------- 21. Ficha hito ------ */
.hito-hero { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: end; }
@media (min-width: 900px) { .hito-hero { grid-template-columns: 1.1fr .9fr; } }
.hito-fig { border: 1px solid var(--line); background: var(--paper-2); }
.hito-fig img { width: 100%; height: auto; }
.hito-meta { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1.6rem; }
@media (min-width: 560px) { .hito-meta { grid-template-columns: repeat(3, 1fr); } }
.hito-meta div { background: var(--paper); padding: .95rem 1.1rem; }
.hito-meta dt { font-family: var(--f-ui); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--txt-3); }
.hito-meta dd { font-family: var(--f-mono); font-size: .88rem; margin-top: .3rem; }

/* -------------------------------------------------- 22. Pie ------------- */
.foot { background: var(--ink); color: var(--on-ink); padding-block: clamp(3rem, 7vw, 6rem) 2rem; }
.foot-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h4 { font-family: var(--f-ui); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--on-ink-3); margin-bottom: 1.1rem; }
.foot ul { display: grid; gap: .55rem; }
.foot a { text-decoration: none; font-size: .95rem; color: var(--on-ink-2); transition: color .25s; }
.foot a:hover { color: var(--on-ink); }
.foot-mark { font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, 12vw, 9rem); letter-spacing: -.05em; line-height: .85; text-transform: uppercase; opacity: .13; margin-top: 3rem; user-select: none; }
.foot-legal { display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; border-top: 1px solid var(--line-ink); margin-top: 2rem; padding-top: 1.5rem; font-family: var(--f-mono); font-size: .66rem; color: var(--on-ink-3); }

/* -------------------------------------------------- 23. Utilidades ------ */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.mt-s { margin-top: 1rem; } .mt-m { margin-top: 2rem; } .mt-l { margin-top: clamp(2.5rem, 5vw, 4rem); }
.tc { text-align: center; } .tr { text-align: right; }
.maxw-s { max-width: 46ch; } .maxw-m { max-width: 62ch; }
.flexrow { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.contour-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='none' stroke='%2312171a' stroke-opacity='.055'%3E%3Cpath d='M-20 340c80-30 120-90 200-100s140 40 240 10'/%3E%3Cpath d='M-20 300c80-30 120-90 200-100s140 40 240 10'/%3E%3Cpath d='M-20 260c80-30 120-90 200-100s140 40 240 10'/%3E%3Cpath d='M-20 220c80-30 120-90 200-100s140 40 240 10'/%3E%3Cpath d='M-20 180c80-30 120-90 200-100s140 40 240 10'/%3E%3C/g%3E%3C/svg%3E");
}
.bleed-top { margin-top: -1px; }


/* -------------------------------------------------- 24. Listados ------- */
.ruta-hitos { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ruta-hitos li { border-bottom: 1px solid var(--line); }
.ruta-hitos a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .78rem 0; text-decoration: none; transition: color .25s, padding .3s var(--e-out);
}
.ruta-hitos a:hover { color: var(--oxide); padding-inline: .4rem; }
.ruta-hitos b { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.05rem; }
.ruta-hitos span { color: var(--txt-3); }

.itin-list { display: grid; gap: .3rem; counter-reset: it; padding-left: 0; }
.itin-list li {
  counter-increment: it; display: flex; gap: .6rem; font-size: .92rem;
  color: var(--txt-2); align-items: baseline;
}
.itin-list li::before {
  content: counter(it, decimal-leading-zero);
  font-family: var(--f-mono); font-size: .68rem; color: var(--oxide); flex: none;
}
.itin-list a { text-decoration: none; border-bottom: 1px solid var(--line); }
.itin-list a:hover { border-bottom-color: currentColor; }

.fuentes { display: grid; gap: 1.15rem; }
.fuentes li { padding-bottom: 1.15rem; border-bottom: 1px solid var(--line); }
.fuentes b { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; font-size: 1.08rem; }
.fuentes .mono { color: var(--txt-3); }

.foot-h { font-family: var(--f-ui); font-size: .66rem; font-weight: 500; letter-spacing: .2em;
  text-transform: uppercase; color: #9aa5aa; margin-bottom: 1.1rem; }

@media (min-width: 900px) { .hito-hero .order-2 { order: 2; } }

/* Zona de pulsación de los hitos del mapa */
.map-poi circle.hit { fill: transparent; stroke: none; }

.dotcolor { width: .72em; height: .72em; border-radius: 50%; display: inline-block; flex: none; }

/* -------------------------------------------------- 25. Índice de hitos -- */
.hitonav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 870;
  display: grid; justify-items: center; gap: .5rem; max-width: min(94vw, 620px);
}
.hitonav-toggle {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-ui); font-size: .74rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .7rem 1.15rem; border-radius: 100px; cursor: pointer;
  background: rgba(18,23,26,.9); color: var(--paper); border: 1px solid rgba(236,229,216,.24);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 14px 36px -18px rgba(0,0,0,.7);
}
.hitonav-toggle .mono { color: #f0cd8a; font-size: .74rem; }
.hitonav-toggle i { width: 9px; height: 9px; border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor; transform: rotate(-135deg); margin-left: .2rem;
  transition: transform .35s var(--e-out); }
.hitonav-toggle[aria-expanded="true"] i { transform: rotate(45deg); }
.hitonav-list {
  order: -1; list-style: none; margin: 0; padding: .6rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .1rem;
  background: rgba(18,23,26,.96); border: 1px solid rgba(236,229,216,.2);
  border-radius: 14px; max-height: 56vh; overflow-y: auto;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.75);
}
.hitonav-list a {
  display: flex; gap: .55rem; align-items: baseline; text-decoration: none;
  color: #cdd4d6; font-family: var(--f-ui); font-size: .78rem; padding: .45rem .6rem;
  border-radius: 8px; transition: background .2s, color .2s;
}
.hitonav-list a .mono { color: #b8c1c5; font-size: .66rem; }
.hitonav-list a:hover, .hitonav-list a.is-here { background: rgba(236,229,216,.12); color: #fff; }
.hitonav-list a.is-here .mono { color: var(--brass); }
/* `display:grid` gana al atributo hidden: hay que devolvérselo explícitamente */
.hitonav-list[hidden] { display: none; }
@media (max-width: 640px) { .hitonav-list { grid-template-columns: 1fr 1fr; } }
