/* Curva de Nivel — hoja de estilos
   Paleta: mar profundo, cota cero (amarillo de mapa), papel salvia, tinta, musgo. */
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%; src: url(/assets/fonts/archivo-latin-wdth-normal.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/assets/fonts/newsreader-latin-opsz-normal.woff2) format('woff2'); }
:root {
  --abyss: #0a2334;
  --deep: #13374e;
  --shelf: #1f4d66;
  --zero: #f2c14e;
  --paper: #e4eae1;
  --paper-2: #d6dfd3;
  --ink: #10212c;
  --ink-2: #3b4d57;
  --moss: #41604a;
  --line: rgba(16, 33, 44, .16);

  --display: 'Archivo', system-ui, sans-serif;
  --text: 'Newsreader', Georgia, serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.75rem, 7vw, 5.75rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--text);
  font-optical-sizing: auto;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--zero); }
:focus-visible { outline: 3px solid var(--zero); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-stretch: 72%; font-weight: 800; line-height: 1; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--zero); color: var(--ink); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; min-height: 46px; padding: .7rem 1.2rem;
  font: 700 var(--step--1)/1 var(--display); font-stretch: 100%; letter-spacing: .01em;
  text-decoration: none; border-radius: 999px; border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--zero); color: var(--ink); }
.btn-primary:hover { background: #ffd56b; }
.btn-ghost { border-color: rgba(240, 236, 214, .5); color: #f0ecd6; }
.btn-ghost:hover { border-color: var(--zero); color: var(--zero); }
.btn-quiet { border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-sub { background: var(--ink); color: var(--paper); min-height: 40px; padding: .55rem 1rem; }
.btn-sub:hover { background: var(--deep); }

/* ---------- cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem var(--gutter); background: rgba(228, 234, 225, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 800 1.25rem/1 var(--display); font-stretch: 68%; letter-spacing: .005em; }
.logo-mark { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.logo-mark .zero { stroke: var(--zero); stroke-width: 3; }
.site-header nav { display: flex; gap: 1.4rem; margin-left: auto; font: 600 var(--step--1)/1 var(--display); }
.site-header nav a { text-decoration: none; padding: .4rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current] { border-color: var(--zero); }
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; gap: .5rem 1rem; }
  .site-header nav { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .btn-sub { margin-left: auto; }
}

/* ---------- héroe: el mapa vivo ---------- */
.hero { position: relative; min-height: min(88vh, 820px); display: grid; align-items: end; overflow: hidden; background: var(--abyss); color: #f0ecd6; cursor: crosshair; }
.hero-map, .vhead-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 26, 40, .78) 0%, rgba(7, 26, 40, .35) 48%, transparent 75%); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(3rem, 9vh, 6rem); max-width: 60rem; }
.hero h1 { font-size: var(--step-4); font-stretch: 64%; font-weight: 900; line-height: .92; letter-spacing: -.015em; max-width: 12ch; }
.hero-sub { margin-top: 1.5rem; max-width: 36rem; font-size: var(--step-1); line-height: 1.45; color: #d9dcc8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.readout {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  font: 700 .95rem/1 var(--display); font-variant-numeric: tabular-nums; font-stretch: 85%;
  padding: .35rem .55rem; border-radius: 4px; background: rgba(240, 236, 214, .95); color: var(--ink);
}
.readout[data-below='true'] { background: var(--zero); }
@media (hover: none) { .readout { display: none; } .hero { cursor: auto; } }

/* ---------- último vídeo ---------- */
.latest { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
.latest h2 { font-size: var(--step-3); margin: .6rem 0 1rem; }
.latest h2 a { text-decoration: none; }
.latest h2 a:hover { text-decoration: underline; text-decoration-color: var(--zero); text-decoration-thickness: 3px; }
.kicker { font: 600 var(--step--1)/1.3 var(--display); color: var(--moss); }
.lede { font-size: var(--step-1); line-height: 1.5; max-width: 38rem; }
.textlink { display: inline-block; margin-top: 1.25rem; font: 700 var(--step--1)/1 var(--display); text-decoration-thickness: 2px; text-decoration-color: var(--zero); }
@media (max-width: 860px) { .latest { grid-template-columns: 1fr; } }

/* ---------- reproductor ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: var(--abyss); border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.player iframe, .player-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-poster { padding: 0; cursor: pointer; background: none; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 76px; height: 76px; border-radius: 50%; background: var(--zero); display: grid; place-items: center; transition: scale .15s; }
.play svg { width: 34px; fill: var(--ink); margin-left: 4px; }
.player-poster:hover .play, .player-poster:focus-visible .play { scale: 1.08; }

/* ---------- cabeceras de sección ---------- */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem 3rem; align-items: end; margin-bottom: 2rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--ink-2); max-width: 34rem; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- serie como perfil de elevación ---------- */
.series { padding-bottom: clamp(3rem, 8vw, 6rem); }
.profile { position: relative; list-style: none; margin: 0; padding: 0; height: 240px; }
.profile-line { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 120px; overflow: visible; }
.profile-line .area { fill: rgba(65, 96, 74, .16); }
.profile-line .line { fill: none; stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.profile-line .sea { stroke: var(--zero); stroke-width: 3; vector-effect: non-scaling-stroke; }
.station { position: absolute; left: var(--x); top: 0; height: 100%; width: calc(100% / var(--n)); translate: -50% 0; }
.station a { display: block; height: 100%; text-decoration: none; }
.station .ep {
  position: absolute; left: 50%; top: calc(var(--y) * 1px); translate: -50% -50%;
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--ink); font: 800 1rem/1 var(--display); font-variant-numeric: tabular-nums;
}
.station .st { position: absolute; top: 138px; left: 0; right: 0; font: 600 .95rem/1.25 var(--display); font-stretch: 85%; text-align: center; padding-inline: .4rem; }
.station a:hover .ep { background: var(--zero); }
.station a:hover .st { text-decoration: underline; text-decoration-color: var(--zero); text-decoration-thickness: 2px; }
.station.is-current .ep { background: var(--ink); color: var(--zero); }
@media (max-width: 860px) {
  .profile { height: auto; display: grid; border-left: 2.5px solid var(--ink); margin-left: 1.3rem; }
  .profile-line { display: none; }
  .station { position: relative; left: auto; top: auto; height: auto; width: auto; translate: none; }
  .station a { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; align-items: center; padding: .6rem 0; margin-left: -1.4rem; }
  .station .ep, .station .st { position: static; translate: none; margin: 0; }
  .station .st { text-align: left; font-size: 1.05rem; }
}

/* ---------- shorts ---------- */
.shorts { padding-block: clamp(3rem, 7vw, 5rem); background: var(--paper-2); }
.shorts-row { list-style: none; margin: 0; padding: 0 var(--gutter) 1rem; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 17vw, 200px); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); }
@media (min-width: 1340px) { .shorts-row { padding-inline: calc((100vw - var(--max)) / 2); scroll-padding-inline: calc((100vw - var(--max)) / 2); } }
.scard { scroll-snap-align: start; }
.scard a { display: block; text-decoration: none; }
.scard-thumb { aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--abyss); }
.scard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale .3s; }
.scard a:hover img { scale: 1.04; }
.scard-title { display: block; margin-top: .6rem; font: 650 .95rem/1.25 var(--display); font-stretch: 85%; }
.scard-views { display: block; margin-top: .25rem; font-size: .85rem; color: var(--ink-2); }

/* ---------- lugares ---------- */
.places-band { padding-block: clamp(3rem, 8vw, 6rem); }
.place-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-top: 1px solid var(--line); }
.place-grid a { display: grid; gap: .3rem; padding: 1.1rem 0 1.2rem; border-bottom: 1px solid var(--line); text-decoration: none; margin-right: 1.5rem; }
.pname { font: 800 var(--step-2)/1 var(--display); font-stretch: 70%; }
.pcoord { font: 500 .85rem/1.2 var(--display); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.pcount { font-size: .95rem; color: var(--moss); }
.place-grid a:hover .pname, .place-list a:hover .pname { text-decoration: underline; text-decoration-color: var(--zero); text-decoration-thickness: 3px; }

/* ---------- método ---------- */
.method { padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem); margin-bottom: clamp(3rem, 8vw, 6rem); background: var(--abyss); color: #e6e8da; border-radius: 14px; }
.method h2 { font-size: var(--step-3); color: #f0ecd6; }
.method-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 1.75rem 0 2.25rem; }
.method-cols strong { display: block; font: 800 var(--step-1)/1.1 var(--display); font-stretch: 78%; color: var(--zero); margin-bottom: .35rem; }
@media (max-width: 760px) { .method-cols { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ---------- cabecera de vídeo / lugar ---------- */
.vhead { position: relative; overflow: hidden; background: var(--abyss); color: #f0ecd6; padding-block: clamp(3rem, 9vw, 6rem) clamp(2rem, 5vw, 3rem); }
.vhead::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 26, 40, .85), rgba(7, 26, 40, .35)); }
.vhead-inner { position: relative; z-index: 1; }
.vhead h1 { font-size: clamp(2.25rem, 5.5vw, 4.25rem); font-stretch: 66%; font-weight: 900; line-height: .95; max-width: 20ch; margin: .75rem 0 1.25rem; }
.crumbs { font: 600 var(--step--1)/1.3 var(--display); color: #c9cfbd; }
.crumbs a { color: #f0ecd6; }
.vmeta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font: 600 var(--step--1)/1.3 var(--display); color: #c9cfbd; }
.vmeta a { color: var(--zero); }
.place-fact { margin-top: 1.25rem; max-width: 40rem; font-size: var(--step-1); color: #e6e8da; }

.vbody { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.vmain .prose { margin-top: 1.75rem; }
.facts { margin-top: 2rem; display: grid; gap: 1rem; }
.fact { padding: 1rem 1.2rem; border-left: 4px solid var(--zero); background: var(--paper-2); border-radius: 0 8px 8px 0; }
.fact-place { font: 800 1.05rem/1.2 var(--display); margin-bottom: .3rem; }
.fact-place span { font-weight: 500; color: var(--ink-2); margin-left: .5rem; font-variant-numeric: tabular-nums; }
.vcta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.chapters { position: sticky; top: 5rem; }
.chapters h2 { font-size: var(--step-2); margin-bottom: .75rem; }
.chapters ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ink); }
.chapters a { display: grid; grid-template-columns: 3.2rem 1fr; gap: .5rem; padding: .45rem 0 .45rem .9rem; text-decoration: none; position: relative; line-height: 1.3; }
.chapters a::before { content: ''; position: absolute; left: -6px; top: .85rem; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.chapters a:hover::before { background: var(--zero); }
.chapters a:hover span { text-decoration: underline; text-decoration-color: var(--zero); }
.chapters time { font: 700 .9rem/1.45 var(--display); font-variant-numeric: tabular-nums; color: var(--moss); }
@media (max-width: 960px) { .vbody { grid-template-columns: 1fr; } .chapters { position: static; } }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.pager a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font: 700 1.05rem/1.25 var(--display); font-stretch: 85%; }
.pager a span { display: block; font: 500 var(--step--1)/1.3 var(--text); color: var(--ink-2); margin-bottom: .3rem; }
.pager a:hover { border-color: var(--ink); }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; } }

/* ---------- archivo ---------- */
.page-head { padding-block: clamp(2.5rem, 7vw, 5rem) 2rem; }
.page-head h1 { font-size: var(--step-4); font-stretch: 64%; font-weight: 900; }
.page-head p { margin-top: 1rem; font-size: var(--step-1); color: var(--ink-2); max-width: 40rem; }
.block { padding-block: clamp(2rem, 5vw, 3.5rem); }
.archive .vgrid { padding-bottom: clamp(3rem, 6vw, 4rem); }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2.5rem 1.75rem; }
.vcard-link { text-decoration: none; display: block; }
.vcard-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--abyss); }
.vcard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale .3s; }
.vcard-link:hover img { scale: 1.03; }
.dur { position: absolute; right: .5rem; bottom: .5rem; padding: .2rem .45rem; border-radius: 4px; background: rgba(10, 35, 52, .88); color: #f0ecd6; font: 700 .8rem/1 var(--display); font-variant-numeric: tabular-nums; }
.vcard-title { margin-top: .9rem; font-size: 1.45rem; font-stretch: 74%; line-height: 1.05; }
.vcard-link:hover .vcard-title { text-decoration: underline; text-decoration-color: var(--zero); text-decoration-thickness: 3px; }
.vcard-meta { margin-top: .5rem; display: flex; gap: .9rem; font: 500 .9rem/1.3 var(--display); color: var(--ink-2); }
.vcard-meta a { color: var(--moss); font-weight: 700; }
.place-list { list-style: none; margin: 0 0 clamp(3rem, 8vw, 6rem); padding: 0; border-top: 2px solid var(--ink); }
.place-list a { display: grid; grid-template-columns: minmax(0, 1fr) 11rem minmax(0, 1.4fr); gap: .5rem 2rem; align-items: baseline; padding: 1.4rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.place-list .pname { font-size: var(--step-3); }
.pfact { color: var(--ink-2); }
@media (max-width: 760px) { .place-list a { grid-template-columns: 1fr; } }

/* ---------- texto largo ---------- */
.prose { max-width: 40rem; }
.prose h2 { font-size: var(--step-2); margin: 2.25rem 0 .6rem; }
.prose p + p { margin-top: 1rem; }
.about-prose { padding-bottom: clamp(3rem, 8vw, 6rem); }
.about-prose .lede { font-size: var(--step-2); line-height: 1.35; }

/* ---------- pie ---------- */
.site-footer { background: var(--abyss); color: #c9cfbd; padding-block: 3rem; }
.footer-inner { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; }
.footer-brand { display: flex; gap: .9rem; align-items: flex-start; color: #f0ecd6; }
.footer-brand strong { font: 800 1.25rem/1 var(--display); font-stretch: 68%; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, max-content); gap: .5rem 2rem; justify-content: end; font: 600 var(--step--1)/1.5 var(--display); }
.site-footer nav a { color: #f0ecd6; }
.footer-note { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid rgba(240, 236, 214, .15); font-size: .9rem; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } .site-footer nav { justify-content: start; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
