/* =========================================================
   Giro del Lago 2027
   Sistema: Archivo variable (un solo tipo, del condensado al expandido),
   lima de marca como color comprometido, neutros teñidos hacia el verde.
   ========================================================= */

:root {
  /* Color (OKLCH). Neutros con un toque del tono de marca. */
  --tinta: oklch(0.185 0.016 160);
  --tinta-2: oklch(0.235 0.017 160);
  --tinta-3: oklch(0.32 0.017 160);
  --gris: oklch(0.47 0.013 160);        /* texto secundario sobre claro */
  --gris-claro: oklch(0.74 0.012 160);  /* texto secundario sobre tinta */
  --linea: oklch(0.885 0.008 160);
  --niebla: oklch(0.955 0.006 160);
  --nieve: oklch(0.985 0.004 160);
  --lima: oklch(0.811 0.216 140);       /* #69e14c, el verde de la marca */
  --lima-osc: oklch(0.47 0.15 143);     /* lima legible como texto sobre claro */
  --hito: oklch(0.74 0.16 32);          /* rojo de los hitos de la ruta: cortes y límites */

  --f: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --pad: clamp(1rem, 4.5vw, 3.5rem);
  --max: 82rem;
  --sec: clamp(4.5rem, 10vw, 9rem);
  --sale: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 14px;
  --k: var(--gris);
  --foco: var(--lima-osc);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.75rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--f);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 420;
  color: var(--tinta);
  background: var(--nieve);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--lima); color: var(--tinta); }

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.recursos { position: absolute; }

.saltar {
  position: fixed; top: .5rem; left: .5rem; z-index: 100;
  padding: .7rem 1rem; border-radius: 8px;
  background: var(--lima); color: var(--tinta); font-weight: 700;
  transform: translateY(-200%);
}
.saltar:focus { transform: none; }

.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }

/* ---------- Tipografía ---------- */

.titulo {
  font-stretch: 120%;
  font-weight: 780;
  font-size: clamp(1.85rem, 1.05rem + 3.3vw, 3.9rem);
  line-height: 1.03;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.titulo--xl {
  font-stretch: 125%;
  font-weight: 870;
  font-size: clamp(1.25rem, 6.5vw, 6rem);
  line-height: .93;
  letter-spacing: -0.028em;
  text-transform: uppercase;
}
.titulo--s { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem); }

.kicker {
  font-size: .8rem;
  font-weight: 680;
  font-stretch: 112%;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--k);
  margin-bottom: 1rem;
}

.bajada {
  font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem);
  line-height: 1.5;
  max-width: 40rem;
  margin-top: 1.25rem;
}

.nota {
  font-size: .84rem;
  line-height: 1.45;
  color: var(--gris);
  margin-top: 1.25rem;
  max-width: 34rem;
}

.enlace {
  display: inline-block;
  padding-block: .5rem;
  font-weight: 680;
  font-stretch: 106%;
  text-decoration: underline;
  text-decoration-color: var(--lima);
  text-decoration-thickness: 3px;
  text-underline-offset: .28em;
  transition: text-decoration-color .2s, text-underline-offset .25s var(--sale);
}
.enlace:hover { text-underline-offset: .42em; text-decoration-color: currentColor; }

.tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 720;
  font-stretch: 108%;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1;
  padding: .36em .6em .32em;
  border-radius: 5px;
  border: 1px solid currentColor;
  vertical-align: middle;
  white-space: nowrap;
}
.tag--pas { color: var(--lima); }
.tag--corte { color: var(--hito); }
.tag--nueva {
  border-color: transparent;
  background: var(--lima);
  color: var(--tinta);
  margin-left: .5em;
  translate: 0 -.2em;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 3rem;
  padding: .65em 1.4em;
  border: 0; border-radius: 999px;
  font-weight: 740;
  font-stretch: 114%;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: -0.006em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .25s var(--sale);
}
.btn:active { transform: scale(.97); }
.btn .flecha { transition: transform .3s var(--sale); }
.btn:hover .flecha { transform: translateX(.3em); }
.btn--lima { background: var(--lima); color: var(--tinta); }
.btn--lima:hover { background: var(--nieve); }
.btn--tinta { background: var(--tinta); color: var(--nieve); }
.btn--tinta:hover { background: var(--tinta-3); }
.btn--xl { min-height: 3.6rem; font-size: clamp(1rem, .9rem + .5vw, 1.25rem); padding-inline: 1.7em; }

/* ---------- Secciones ---------- */

.sec { padding-block: var(--sec); }
.sec--tinta { background: var(--tinta); color: var(--nieve); --k: var(--lima); --foco: var(--lima); }
.sec--tinta .nota { color: var(--gris-claro); }
.sec--lima { background: var(--lima); color: var(--tinta); --k: var(--tinta); --foco: var(--tinta); }
.sec--lima .nota { color: var(--tinta); opacity: .78; }
.sec__cab { margin-bottom: clamp(2rem, 5vw, 4rem); }
.sec__cab--fila { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; }

/* ---------- Encabezado ---------- */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--nieve);
  --foco: var(--lima);
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.top__in {
  display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.75rem);
  padding: .55rem var(--pad);
}
.top__logo { flex: none; margin-right: auto; }
.top__logo svg { height: 3.25rem; width: auto; fill: currentColor; transition: height .35s var(--sale); }

.top__nav {
  position: absolute; inset: 100% 0 auto 0;
  display: none; flex-direction: column;
  padding: .5rem var(--pad) 1.25rem;
  background: var(--tinta); color: var(--nieve);
}
.top__nav a {
  padding: .85rem 0;
  font-weight: 700; font-stretch: 116%; font-size: 1.25rem; letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--tinta-3);
}
.top.is-abierto .top__nav { display: flex; }
.top.is-abierto { background: var(--tinta); color: var(--nieve); }

.top__cta { display: none; min-height: 2.6rem; font-size: .95rem; }

.top__menu {
  flex: none; display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; padding: 0;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
}
.top__menu-icono, .top__menu-icono::before {
  display: block; width: 1.4rem; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .3s var(--sale), translate .3s var(--sale);
}
.top__menu-icono { translate: 0 -4px; }
.top__menu-icono::before { content: ""; translate: 0 8px; }
.top.is-abierto .top__menu-icono { translate: 0 0; transform: rotate(45deg); }
.top.is-abierto .top__menu-icono::before { translate: 0 0; transform: rotate(-90deg); }

/* Vuelta: el contorno de la ruta se completa a medida que avanzas por la página */
.vuelta {
  flex: none; display: inline-flex; align-items: center; gap: .5rem;
  min-height: 2.75rem;
  text-decoration: none;
  font-size: .8rem; font-weight: 600; font-stretch: 100%;
  font-variant-numeric: tabular-nums;
}
.vuelta svg { width: 1.9rem; height: 2.05rem; overflow: visible; }
.vuelta__base, .vuelta__avance { fill: none; stroke-linejoin: round; }
.vuelta__base { stroke: currentColor; stroke-opacity: .32; stroke-width: 20; }
.vuelta__avance {
  stroke: var(--lima); stroke-width: 30; stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--vuelta, 0));
}
.vuelta__km { display: none; min-width: 3.4rem; }
.vuelta__km b { font-weight: 800; font-stretch: 118%; }

.top.is-solido {
  background: var(--nieve); color: var(--tinta);
  box-shadow: 0 1px 0 var(--linea);
  --foco: var(--lima-osc);
}
.top.is-solido .top__logo svg { height: 2.6rem; }
.top.is-solido .vuelta__avance { stroke: var(--lima-osc); }
.top.is-solido.is-abierto { background: var(--tinta); color: var(--nieve); box-shadow: none; }
.top.is-solido.is-abierto .vuelta__avance { stroke: var(--lima); }

@media (min-width: 26rem) { .vuelta__km { display: inline; } }
@media (min-width: 48rem) { .top__cta { display: inline-flex; } }
@media (min-width: 68rem) {
  .top__logo { margin-right: 0; }
  .top__menu { display: none; }
  .top__nav {
    position: static; display: flex; flex-direction: row; gap: clamp(1rem, 2vw, 2rem);
    margin-inline: auto; padding: 0; background: none; color: inherit;
  }
  .top__nav a {
    padding: .5rem 0; border: 0;
    font-size: .95rem; font-weight: 640; font-stretch: 106%; letter-spacing: 0;
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 2px;
    transition: background-size .35s var(--sale);
  }
  .top__nav a:hover, .top__nav a[aria-current] { background-size: 100% 2px; }
}

/* ---------- Inicio ---------- */

.hero {
  display: grid; grid-template-rows: 1fr auto;
  min-height: max(100svh, 36rem);
  background: var(--tinta); color: var(--nieve);
  --foco: var(--lima);
}
.hero__vista { position: relative; display: grid; align-items: end; isolation: isolate; overflow: hidden; }
.hero__img { position: absolute; inset: 0; z-index: -2; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.hero__vista::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, oklch(0.185 0.016 160 / .6), oklch(0.185 0.016 160 / 0) 9rem),
    linear-gradient(to top, oklch(0.185 0.016 160 / .9), oklch(0.185 0.016 160 / .5) 38%, oklch(0.185 0.016 160 / 0) 66%);
}
.hero__txt { padding-block: 7rem clamp(1.4rem, 3.5vw, 2.75rem); }
.hero__kicker {
  font-size: clamp(.78rem, .7rem + .3vw, .95rem);
  font-weight: 680; font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero__kicker span { color: var(--lima); margin-inline: .35em; }
.hero__titulo {
  font-stretch: 125%; font-weight: 880;
  font-size: clamp(1.5rem, 8.2vw, 7.5rem);
  line-height: .9; letter-spacing: -0.03em;
  text-transform: uppercase;
}
.hero__titulo .ln { display: block; }
.hero__bajada {
  max-width: 35rem; margin-top: clamp(1rem, 2vw, 1.6rem);
  font-size: clamp(1rem, .92rem + .45vw, 1.25rem); line-height: 1.5;
}

/* Placa: la franja lima con fecha, lugar e inscripción */
.placa { background: var(--lima); color: var(--tinta); --foco: var(--tinta); }
.placa__in {
  display: grid; gap: .9rem 2.5rem; align-items: center;
  padding-block: 1.1rem 1.2rem;
}
.placa__fecha {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .1em .35em;
  font-stretch: 125%; font-weight: 880;
  font-size: clamp(1.5rem, 8.4vw, 3.2rem);
  line-height: .95; letter-spacing: -0.03em; text-transform: uppercase;
  white-space: nowrap;
}
.placa__dia { font-stretch: 62%; font-weight: 380; letter-spacing: 0; }
.placa__faltan {
  flex-basis: 100%;
  font-size: .82rem; font-weight: 600; font-stretch: 106%;
  letter-spacing: .02em; text-transform: none; line-height: 1.3;
  margin-top: .45rem;
}
.placa__datos { display: flex; flex-wrap: wrap; gap: .7rem 2.25rem; }
.placa__datos dt {
  font-size: .7rem; font-weight: 680; font-stretch: 110%;
  letter-spacing: .09em; text-transform: uppercase; opacity: .78;
}
.placa__datos > div { flex: none; }
.placa__datos dd { font-weight: 720; font-stretch: 110%; font-size: 1.02rem; line-height: 1.3; white-space: nowrap; }
.placa__cta { width: 100%; }

@media (min-width: 40rem) {
  .placa__in { grid-template-columns: 1fr auto; }
  .placa__fecha { grid-column: 1 / -1; }
  .placa__cta { width: auto; }
}
@media (min-width: 66rem) {
  .placa__in { grid-template-columns: auto 1fr auto; padding-block: 1.25rem 1.35rem; }
  .placa__fecha { grid-column: auto; }
  .placa__datos { padding-left: clamp(.5rem, 2.5vw, 3rem); gap: .5rem clamp(1.5rem, 3vw, 3.5rem); }
}

/* ---------- La carrera ---------- */

.carrera { --borde: max(var(--pad), calc((100vw - var(--max)) / 2)); overflow-x: clip; }
.carrera__titulo { max-width: 66rem; }
.carrera__grid { display: grid; gap: clamp(1.75rem, 5vw, 5rem); margin-top: clamp(2rem, 5vw, 4.5rem); }
.carrera__foto { margin-inline: calc(-1 * var(--pad)); }
.carrera__foto img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.carrera__foto figcaption { font-size: .84rem; color: var(--gris); padding: .7rem var(--pad) 0; }
.carrera__txt { display: grid; gap: 1.25rem; align-content: end; max-width: 34rem; }
.carrera__txt .grande { font-size: clamp(1.15rem, 1rem + .75vw, 1.45rem); line-height: 1.42; }
.carrera__txt strong { font-weight: 720; }

@media (min-width: 60rem) {
  .carrera__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
  .carrera__foto { margin-inline: calc(-1 * var(--borde)) 0; }
  .carrera__foto img { border-radius: 0 var(--r) var(--r) 0; }
  .carrera__foto figcaption { padding-left: var(--borde); }
  .carrera__txt { padding-bottom: 2.2rem; }
}

/* ---------- Distancias ---------- */

.banda { position: relative; color: var(--nieve); --k: var(--nieve); }
.banda img { width: 100%; height: clamp(17rem, 41.5vw, 42rem); object-fit: cover; object-position: 50% 62%; }
.banda__txt { position: absolute; inset: 0 0 auto 0; padding-top: clamp(1.5rem, 4.5vw, 4rem); }
.banda .kicker { margin-bottom: .75rem; }

.rutas { margin-top: clamp(1rem, 3vw, 2.5rem); }
.ruta { padding-block: clamp(1.75rem, 3.6vw, 3rem); border-bottom: 1px solid var(--linea); }
.ruta__cab { display: grid; gap: .9rem 2.5rem; align-items: end; }
.ruta__num {
  font-stretch: 125%; font-weight: 900;
  font-size: clamp(4rem, 2rem + 8.4vw, 8.75rem);
  line-height: .78; letter-spacing: -0.045em;
  white-space: nowrap;
}
.ruta__num span { font-stretch: 62%; font-weight: 300; letter-spacing: 0; color: var(--gris); margin-left: .05em; }
.ruta__nombre h3 {
  font-stretch: 118%; font-weight: 780;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem);
  line-height: 1.15; letter-spacing: -0.018em;
  margin-bottom: .35rem;
}
.ruta__nombre p { color: var(--gris); max-width: 33rem; line-height: 1.5; }
.ruta__datos { display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.ruta__datos dt {
  font-size: .7rem; font-weight: 680; font-stretch: 110%;
  letter-spacing: .09em; text-transform: uppercase; color: var(--gris);
}
.ruta__datos dd {
  font-weight: 740; font-stretch: 114%; font-size: 1.15rem; line-height: 1.3;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* La vía: una franja de asfalto cuyo largo es proporcional a la distancia */
.ruta__via { margin-top: clamp(1.25rem, 2.5vw, 2rem); height: 1.2rem; }
.ruta__via span {
  position: relative; display: block; height: 100%;
  width: calc(var(--prop) * 100%); min-width: 3.5rem;
  background: var(--tinta); border-radius: 3px;
  transform-origin: left center;
}
.ruta__via span::before {
  content: ""; position: absolute; inset: 50% .7rem auto .7rem; height: 2px; translate: 0 -50%;
  background: repeating-linear-gradient(90deg, var(--lima) 0 14px, transparent 14px 28px);
}
.ruta__via span::after {
  content: ""; position: absolute; right: 0; top: -.35rem; bottom: -.35rem; width: 4px;
  background: var(--tinta); border-radius: 2px;
}
.ruta:hover .ruta__via span::before { animation: rodar .6s linear infinite; }
@keyframes rodar { to { background-position: 28px 0; } }

.distancias__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; padding-block: clamp(2rem, 4vw, 3rem) var(--sec); }

@media (min-width: 54rem) {
  .ruta__cab { grid-template-columns: minmax(15rem, 22rem) minmax(0, 1fr) auto; }
  .ruta__datos { flex-wrap: nowrap; }
}

/* ---------- Recorrido ---------- */

.hoja { display: grid; gap: 1.25rem clamp(2rem, 4vw, 4rem); align-items: start; grid-template-areas: "tabs" "mapa" "panel"; }
.hoja > .tabs { grid-area: tabs; justify-self: start; margin: 0; }
.hoja__mapa { grid-area: mapa; min-width: 0; }
.hoja__panel { grid-area: panel; min-width: 0; }
.hoja__mapa .nota { margin-top: .75rem; }

.mapa { width: 100%; height: auto; overflow: visible; font-family: var(--f); }
.mapa__trama { stroke: oklch(0.37 0.018 160); stroke-width: 1.3; }
.mapa__lago { fill: url(#trama); }
.mapa__costa { fill: none; stroke: var(--gris-claro); stroke-opacity: .45; stroke-width: 1; stroke-linejoin: round; }
.mapa__nombre {
  fill: var(--gris-claro); font-size: 11px; font-weight: 600; font-stretch: 118%;
  letter-spacing: .22em; text-transform: uppercase;
  paint-order: stroke; stroke: var(--tinta); stroke-width: 7px; stroke-linejoin: round;
}
.mapa__base, .mapa__r163, .mapa__r80 { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.mapa__base { stroke: var(--tinta-3); stroke-width: 3; }
.mapa__r163, .mapa__r80 { stroke: var(--lima); stroke-width: 3.8; }
.mapa__r163 { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--sale) .15s, opacity .4s; }
.js .mapa:not(.is-in) .mapa__r163 { stroke-dashoffset: 1; }
.mapa:not([data-dist="163"]) .mapa__r163 { opacity: 0; transition: opacity .3s; }
.mapa__r80 {
  stroke-dasharray: 0 1; stroke-dashoffset: -1; opacity: 0;
  transition: stroke-dasharray 1.4s var(--sale), stroke-dashoffset 1.4s var(--sale), opacity .3s;
}
.mapa[data-dist="80"] .mapa__r80 { stroke-dasharray: calc(1 - var(--f80)) 1; stroke-dashoffset: calc(-1 * var(--f80)); opacity: 1; }

.pt text {
  fill: var(--nieve); font-size: 12.5px; font-weight: 620; font-stretch: 106%;
  paint-order: stroke; stroke: var(--tinta); stroke-width: 5px; stroke-linejoin: round;
  transition: opacity .3s, fill .3s;
}
.pt__punto { fill: var(--tinta); stroke: var(--nieve); stroke-width: 2; transition: fill .3s, stroke .3s, opacity .3s; }
.pt--meta .pt__punto { fill: var(--lima); stroke: var(--tinta); stroke-width: 2.4; }
.pt--meta .pt__aro { fill: none; stroke: var(--lima); stroke-width: 1.6; }
.pt--meta text { font-weight: 780; font-stretch: 116%; font-size: 13.5px; }
.pt--meta .pt__sub { font-weight: 560; font-stretch: 104%; font-size: 11px; fill: var(--gris-claro); }
.pt, .mk { transition: opacity .3s; }
.mk { stroke: var(--tinta); stroke-width: 1.6; }
.mk--pas { fill: var(--lima); }
.mk--corte { fill: var(--hito); }
.mapa:not([data-dist="163"]) .pt:not(.pt--meta) { opacity: .3; }
.mapa:not([data-dist="163"]) .mk[data-en="163"], .mapa:not([data-dist="80"]) .mk[data-en="80"] { opacity: 0; }

.cursor { pointer-events: none; }
.cursor__aro { fill: var(--tinta); stroke: var(--nieve); stroke-width: 2; }
.cursor__punto { fill: var(--nieve); }
.cursor text {
  fill: var(--nieve); font-size: 12.5px; font-weight: 760; font-stretch: 112%;
  paint-order: stroke; stroke: var(--tinta); stroke-width: 6px; stroke-linejoin: round;
}

/* Perfil de altimetría: una sola serie, grilla recesiva, lectura con cursor */
.perfil { margin-top: 1.25rem; }
.perfil__lectura { display: flex; flex-wrap: wrap; gap: .2rem .75rem; font-size: .9rem; color: var(--gris-claro); font-variant-numeric: tabular-nums; min-height: 1.5em; }
.perfil__lectura b { color: var(--nieve); font-weight: 720; font-stretch: 112%; }
.perfil__zona { margin-top: .4rem; cursor: crosshair; touch-action: pan-y; border-radius: 6px; }
.perfil__svg { width: 100%; height: auto; overflow: visible; font-family: var(--f); }
.perfil__grilla { stroke: var(--tinta-3); stroke-width: 1; }
.perfil__eje { fill: var(--gris-claro); font-size: 10.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.perfil__area { fill: var(--lima); fill-opacity: .14; }
.perfil__linea { fill: none; stroke: var(--lima); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.perfil__marca { stroke: var(--tinta); stroke-width: 2; }
.perfil__marca--pas { fill: var(--lima); }
.perfil__marca--corte { fill: var(--hito); }
.perfil__cursor line { stroke: var(--nieve); stroke-width: 1; stroke-opacity: .7; }
.perfil__cursor circle { fill: var(--nieve); stroke: var(--tinta); stroke-width: 2; }
.mapa[data-dist="40"] ~ .perfil { display: none; }
.cue__ap { font-stretch: 100%; font-weight: 400; color: var(--gris-claro); margin-right: .1em; }
.cue tbody tr { cursor: pointer; }

.tabs { grid-area: tabs; justify-self: start; margin: 0; }
.hoja__mapa { grid-area: mapa; min-width: 0; }
.hoja__panel { grid-area: panel; min-width: 0; }
.hoja__mapa .nota { margin-top: .75rem; }

.mapa { width: 100%; height: auto; overflow: visible; font-family: var(--f); }
.mapa__trama { stroke: oklch(0.37 0.018 160); stroke-width: 1.3; }
.mapa__lago { fill: url(#trama); }
.mapa__costa { fill: none; stroke: var(--gris-claro); stroke-opacity: .45; stroke-width: 1; stroke-linejoin: round; }
.mapa__nombre {
  fill: var(--gris-claro); font-size: 11px; font-weight: 600; font-stretch: 118%;
  letter-spacing: .22em; text-transform: uppercase;
  paint-order: stroke; stroke: var(--tinta); stroke-width: 7px; stroke-linejoin: round;
}
.mapa__base, .mapa__r163, .mapa__r80 { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.mapa__base { stroke: var(--tinta-3); stroke-width: 3; }
.mapa__r163, .mapa__r80 { stroke: var(--lima); stroke-width: 3.8; }
.mapa__r163 { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--sale) .15s, opacity .4s; }
.js .mapa:not(.is-in) .mapa__r163 { stroke-dashoffset: 1; }
.mapa:not([data-dist="163"]) .mapa__r163 { opacity: 0; transition: opacity .3s; }
.mapa__r80 {
  stroke-dasharray: 0 1; stroke-dashoffset: -1; opacity: 0;
  transition: stroke-dasharray 1.4s var(--sale), stroke-dashoffset 1.4s var(--sale), opacity .3s;
}
.mapa[data-dist="80"] .mapa__r80 { stroke-dasharray: calc(1 - var(--f80)) 1; stroke-dashoffset: calc(-1 * var(--f80)); opacity: 1; }

.pt text {
  fill: var(--nieve); font-size: 12.5px; font-weight: 620; font-stretch: 106%;
  paint-order: stroke; stroke: var(--tinta); stroke-width: 5px; stroke-linejoin: round;
  transition: opacity .3s, fill .3s;
}
.pt__punto { fill: var(--tinta); stroke: var(--nieve); stroke-width: 2; transition: fill .3s, stroke .3s, opacity .3s; }
.pt--menor text { opacity: 0; }
.pt--menor .pt__punto { stroke: var(--gris-claro); stroke-width: 1.6; }
.pt--meta .pt__punto { fill: var(--lima); stroke: var(--tinta); stroke-width: 2.4; }
.pt--meta .pt__aro { fill: none; stroke: var(--lima); stroke-width: 1.6; }
.pt--meta text { font-weight: 780; font-stretch: 116%; font-size: 13.5px; }
.pt--meta .pt__sub { font-weight: 560; font-stretch: 104%; font-size: 11px; fill: var(--gris-claro); }
.pt--retorno { opacity: 0; transition: opacity .3s; }
.pt { transition: opacity .3s; }
.mapa[data-dist="80"] .pt:not([data-en~="80"]),
.mapa[data-dist="40"] .pt:not([data-en~="40"]) { opacity: .28; }
.mapa[data-dist="80"] .pt--retorno { opacity: 1; }
.mapa[data-dist="80"] .pt--retorno text { opacity: 1; }
.pt.is-activo .pt__punto { fill: var(--lima); stroke: var(--lima); }
.pt.is-activo text { opacity: 1; fill: var(--lima); }
.pt--meta.is-activo .pt__punto { stroke: var(--tinta); }

.tabs {
  display: inline-flex; gap: .25rem; padding: .3rem;
  border-radius: 999px; background: var(--tinta-2);
}
.tabs button {
  min-height: 2.75rem; padding: .4em 1.25em;
  border: 0; border-radius: 999px; background: transparent; color: var(--nieve);
  font-weight: 760; font-stretch: 118%; font-size: 1rem; letter-spacing: -0.01em;
  cursor: pointer; transition: background-color .25s, color .25s;
}
.tabs button:hover { background: var(--tinta-3); }
.tabs button[aria-selected="true"] { background: var(--lima); color: var(--tinta); }

.cue { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cue thead th {
  text-align: left; padding: 0 .75rem .6rem 0;
  font-size: .7rem; font-weight: 680; font-stretch: 110%; letter-spacing: .09em; text-transform: uppercase;
  color: var(--gris-claro); border-bottom: 1px solid var(--tinta-3);
}
.cue td, .cue tbody th {
  text-align: left; vertical-align: top;
  padding: .9rem .75rem .9rem 0;
  border-bottom: 1px solid var(--tinta-3);
  line-height: 1.45;
}
.cue tbody tr { transition: background-color .2s; cursor: default; }
.cue tbody tr:hover, .cue tbody tr.is-activo { background: var(--tinta-2); }
.cue td:first-child {
  width: 4.4rem; padding-left: .6rem;
  font-stretch: 125%; font-weight: 860; font-size: 1.3rem; letter-spacing: -0.03em; line-height: 1.2;
}
.cue tbody th { width: 34%; font-weight: 720; font-stretch: 110%; }
.cue td:last-child { color: var(--gris-claro); font-size: .95rem; padding-right: .6rem; }
.cue .tag { margin: 0 .25rem .4rem 0; }
.cue thead th:first-child { padding-left: .6rem; }

.proximo { padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--r); background: var(--tinta-2); }
.proximo__t { font-weight: 780; font-stretch: 118%; font-size: 1.3rem; letter-spacing: -0.015em; color: var(--lima); margin-bottom: .6rem; }

.descargas { display: flex; flex-wrap: wrap; gap: .25rem 2rem; margin-top: 1rem; }

@media (max-width: 40rem) {
  .pt text { font-size: 18px; }
  .pt--meta text { font-size: 19px; }
  .cursor text { font-size: 18px; }
  .perfil__eje { font-size: 15px; }
  .pt--meta .pt__sub { font-size: 16px; }
  .mapa__nombre { font-size: 14px; }
  .cue td:first-child { width: 3.5rem; padding-left: .35rem; font-size: 1.15rem; }
  .cue thead th:first-child { padding-left: .35rem; }
  .cue tbody th { width: 31%; }
}
@media (min-width: 62rem) {
  .hoja { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); grid-template-areas: "mapa tabs" "mapa panel"; grid-template-rows: auto 1fr; }
  .hoja__mapa { position: sticky; top: 5rem; }
  .mapa { max-height: calc(100svh - 21rem); min-height: 15rem; }
}

/* ---------- Programa ---------- */

.programa__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.horario { margin-top: clamp(1.75rem, 3.5vw, 3rem); border-bottom: 1px solid var(--linea); }
.horario li {
  display: grid; grid-template-columns: minmax(6.6rem, auto) 1fr; gap: 1.25rem; align-items: baseline;
  padding-block: 1.05rem; border-top: 1px solid var(--linea);
}
.horario time {
  font-stretch: 125%; font-weight: 860;
  font-size: clamp(1.65rem, 1.2rem + 1.7vw, 2.6rem);
  line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
}
.horario h3 { font-size: 1.12rem; font-weight: 720; font-stretch: 110%; line-height: 1.3; letter-spacing: -0.008em; }
.horario p { color: var(--gris); font-size: .95rem; }

.controlada { background: var(--tinta); color: var(--nieve); border-radius: var(--r); overflow: hidden; }
.controlada img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.controlada figcaption { padding: clamp(1.25rem, 3vw, 2.25rem); }
.controlada h3 { font-stretch: 118%; font-weight: 780; font-size: clamp(1.25rem, 1.05rem + .9vw, 1.7rem); line-height: 1.15; letter-spacing: -0.018em; margin-bottom: .7rem; }
.controlada p { color: var(--gris-claro); max-width: 36rem; }

@media (min-width: 60rem) { .programa__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); } }

/* ---------- Inscripciones ---------- */

.insc { display: grid; gap: clamp(1.75rem, 3vw, 3rem); align-items: start; }
.insc__principal { min-width: 0; }
.insc__hoja {
  position: relative;
  /* blanco puro a propósito: el módulo de Efluj trae fondo blanco y así no se nota la costura */
  background: white;
  border-radius: 20px;
  padding: clamp(.25rem, 1vw, .75rem);
  box-shadow: 0 30px 60px -34px oklch(0.3 0.12 145 / .7), 0 2px 0 oklch(0.185 0.016 160 / .1);
  overflow: hidden;
  --efluj-h: 1290px;
}
.insc__frame { display: block; width: 100%; height: var(--efluj-h); border: 0; position: relative; }
.insc__estado {
  position: absolute; inset: 0 0 auto 0; padding: 3rem 1rem; text-align: center;
  color: var(--gris); font-weight: 600;
}
.insc__hoja.is-lista .insc__estado { display: none; }
.insc__alt { margin-top: 1rem; font-size: .95rem; }
.insc__alt a { font-weight: 700; text-underline-offset: .2em; }

.insc__lado h3 {
  font-size: .78rem; font-weight: 700; font-stretch: 112%; letter-spacing: .09em; text-transform: uppercase;
  margin-bottom: .5rem;
}
.insc__lado ul { margin-bottom: 1.75rem; border-top: 1.5px solid var(--tinta); }
.insc__lado li { padding: .6rem 0; border-bottom: 1px solid oklch(0.185 0.016 160 / .25); font-weight: 560; line-height: 1.35; }
.insc__ayuda { font-weight: 560; line-height: 1.45; }
.insc__ayuda a { font-weight: 760; text-underline-offset: .2em; }

@media (min-width: 40rem) { .insc__hoja { --efluj-h: 1030px; } }
@media (min-width: 66rem) {
  .insc { grid-template-columns: minmax(0, 1fr) 18rem; }
  .insc__lado { position: sticky; top: 6rem; }
  .insc__hoja { --efluj-h: 930px; }
}

/* ---------- Info práctica ---------- */

.info__grid { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.servicios { margin-top: 2rem; border-top: 1.5px solid var(--tinta); }
.servicios a, .partners a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .9rem 0; border-bottom: 1px solid var(--linea);
  text-decoration: none; transition: padding .3s var(--sale), background-color .2s;
}
.servicios b, .partners b { font-weight: 720; font-stretch: 110%; }
.servicios a > span, .partners a > span { color: var(--gris); font-size: .92rem; white-space: nowrap; }
.servicios a:hover, .partners a:hover { background: var(--niebla); padding-inline: .6rem; }

.acordeon details { border-top: 1px solid var(--linea); }
.acordeon details:last-child { border-bottom: 1px solid var(--linea); }
.acordeon details:first-child { border-top: 1.5px solid var(--tinta); }
.acordeon summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding: 1.15rem 0; cursor: pointer; list-style: none;
  font-stretch: 116%; font-weight: 740;
  font-size: clamp(1.08rem, 1rem + .55vw, 1.4rem);
  line-height: 1.25; letter-spacing: -0.014em;
}
.acordeon summary::-webkit-details-marker { display: none; }
.acordeon summary::after {
  content: ""; flex: none; width: 1.05rem; height: 1.05rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .4s var(--sale);
}
.acordeon details[open] summary::after { transform: rotate(135deg); }
.acordeon summary:hover { color: var(--lima-osc); }
.acordeon__c { display: grid; gap: .9rem; padding-bottom: 1.75rem; max-width: 62ch; }
.acordeon__c a { font-weight: 700; text-underline-offset: .2em; }

.pares { display: grid; gap: .1rem; }
.pares div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--linea); }
.pares dt { font-size: .74rem; font-weight: 700; font-stretch: 110%; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); padding-top: .25em; }

.lista { display: grid; gap: .1rem; }
.lista li { padding: .5rem 0 .5rem 1.5rem; border-top: 1px solid var(--linea); position: relative; }
.lista li::before {
  content: ""; position: absolute; left: .1rem; top: 1.02em; width: .7rem; height: 2px; background: var(--lima-osc);
}
.lista--cols { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); column-gap: 2rem; }

@media (min-width: 60rem) {
  .info__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .info__cab { position: sticky; top: 6rem; }
}

/* ---------- Galería ---------- */

.mosaico { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.5rem, 1vw, .9rem); }
.mosaico figure { overflow: hidden; border-radius: 10px; background: var(--tinta-2); }
.mosaico img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--sale); }
.mosaico figure:hover img { transform: scale(1.035); }
.m-a, .m-d, .m-v { grid-column: 1 / -1; }
.m-a img, .m-d img { aspect-ratio: 3 / 2; }
.m-b img, .m-c img { aspect-ratio: 4 / 5; }
.m-b img { object-position: 46% 50%; }
.m-c img { object-position: 52% 50%; }

.m-v {
  display: grid; align-content: end; gap: .25rem;
  min-height: 11rem; padding: clamp(1.1rem, 2.4vw, 1.75rem);
  border-radius: 10px; background: var(--lima); color: var(--tinta);
  text-decoration: none; position: relative; overflow: hidden;
  --foco: var(--nieve);
  transition: background-color .25s;
}
.m-v:hover { background: var(--nieve); }
.m-v__play {
  position: absolute; top: clamp(1.1rem, 2.4vw, 1.75rem); left: clamp(1.1rem, 2.4vw, 1.75rem);
  width: 3.1rem; height: 3.1rem; border-radius: 50%; background: var(--tinta);
  transition: transform .4s var(--sale);
}
.m-v__play::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; translate: 2px 0;
  border-block: .5rem solid transparent; border-left: .8rem solid var(--lima);
}
.m-v:hover .m-v__play { transform: scale(1.08); }
.m-v__t { font-stretch: 120%; font-weight: 800; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); line-height: 1.05; letter-spacing: -0.022em; }
.m-v__s { font-weight: 600; font-size: .95rem; }

@media (min-width: 52rem) {
  .mosaico { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(8.5rem, 14.5vw, 13.5rem); }
  .mosaico img { aspect-ratio: auto; }
  .m-a { grid-column: 1 / span 7; grid-row: span 2; }
  .m-b { grid-column: 8 / span 5; grid-row: span 3; }
  .m-c { grid-column: 1 / span 3; grid-row: span 2; }
  .m-v { grid-column: 4 / span 4; grid-row: span 2; min-height: 0; }
  .m-d { grid-column: 8 / span 5; grid-row: span 1; }
  .m-d img { object-position: 30% 55%; }
}

/* ---------- Alojamiento y apoyo ---------- */

.apoyo__grid { display: grid; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
.partners { margin-top: 1.75rem; border-top: 1.5px solid var(--tinta); }
.logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.5rem, 2vw, 1.5rem); margin-top: .5rem; }
.logos img { width: 100%; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }

@media (min-width: 60rem) { .apoyo__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

/* ---------- Cierre ---------- */

.cierre {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: end;
  min-height: clamp(27rem, 58vw, 46rem);
  color: var(--nieve); background: var(--tinta);
  --foco: var(--lima);
}
.cierre picture { position: absolute; inset: 0; z-index: -2; }
.cierre img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.cierre::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, oklch(0.185 0.016 160 / .88), oklch(0.185 0.016 160 / .35) 45%, oklch(0.185 0.016 160 / 0) 70%);
}
.cierre__txt {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem;
  padding-block: clamp(2rem, 5vw, 4rem);
}

/* ---------- Pie ---------- */

.pie { background: var(--tinta); color: var(--nieve); padding-block: clamp(3rem, 6vw, 5rem) 6.5rem; --foco: var(--lima); }
.pie__grid { display: grid; gap: 2.5rem 1.5rem; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.pie__marca, .pie__grid > :last-child { grid-column: 1 / -1; }
.pie__marca svg { width: 9.5rem; height: auto; fill: var(--lima); margin-bottom: 1rem; }
.pie__marca p { color: var(--gris-claro); line-height: 1.5; }
.pie h2 {
  font-size: .74rem; font-weight: 700; font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gris-claro); margin-bottom: .9rem;
}
.pie li { margin-bottom: .1rem; }
.pie li a, .pie__grid p a {
  display: inline-block; padding: .45rem 0; font-weight: 640; font-stretch: 106%; overflow-wrap: anywhere;
  text-decoration: none;
  background: linear-gradient(var(--lima), var(--lima)) no-repeat 0 92% / 0 2px;
  transition: background-size .35s var(--sale);
}
.pie li a:hover, .pie__grid p a:hover { background-size: 100% 2px; }
.pie__grid p { color: var(--gris-claro); max-width: 16rem; }
.pie__grid p a { color: var(--nieve); }
.pie__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--tinta-3);
  font-size: .88rem; color: var(--gris-claro);
}
.pie__base a { color: var(--nieve); text-underline-offset: .2em; }
.pie__powered { flex-basis: 100%; white-space: nowrap; text-align: center; }
@media (min-width: 48rem) { .pie__powered { text-align: right; } }
.pie__powered a { font-weight: 720; font-stretch: 112%; }

@media (min-width: 48rem) { .pie { padding-bottom: clamp(3rem, 6vw, 5rem); } }
@media (min-width: 60rem) {
  .pie__grid { grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2.4fr)); }
  .pie__marca, .pie__grid > :last-child { grid-column: auto; }
}

/* ---------- Barra fija (móvil) ---------- */

.fija {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem var(--pad) calc(.6rem + env(safe-area-inset-bottom));
  background: var(--tinta); color: var(--nieve);
  box-shadow: 0 -1px 0 var(--tinta-3);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .5s var(--sale), visibility 0s .5s;
  --foco: var(--nieve);
}
.fija.is-on { transform: none; visibility: visible; transition: transform .5s var(--sale), visibility 0s; }
.fija p { display: grid; line-height: 1.25; }
.fija b { font-stretch: 120%; font-weight: 820; letter-spacing: -0.015em; text-transform: uppercase; }
.fija p span { font-size: .8rem; color: var(--gris-claro); }
.fija .btn { min-height: 2.75rem; }
@media (min-width: 48rem) { .fija { display: none; } }

/* ---------- Movimiento ---------- */

@keyframes sube { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes asienta { from { transform: scale(1.07); } to { transform: none; } }

.hero__img img { animation: asienta 2.8s var(--sale) both; }
.hero__kicker, .hero__titulo .ln, .hero__bajada, .placa { animation: sube 1.1s var(--sale) both; }
.hero__kicker { animation-delay: .1s; }
.hero__titulo .ln:nth-of-type(2) { animation-delay: .2s; }
.hero__titulo .ln:nth-of-type(3) { animation-delay: .29s; }
.hero__bajada { animation-delay: .42s; }
.placa { animation-delay: .55s; }

.js .rev {
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s var(--sale) var(--d, 0s), transform 1s var(--sale) var(--d, 0s);
}
.js .rev.is-in { opacity: 1; transform: none; }

.js .ruta .ruta__via span { transform: scaleX(0); transition: transform 1.5s var(--sale) calc(var(--d, 0s) + .25s); }
.js .ruta.is-in .ruta__via span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .rev, .js .ruta .ruta__via span { opacity: 1; transform: none; }
  .js .mapa:not(.is-in) .mapa__r163 { stroke-dashoffset: 0; }
}

/* ---------- Impresión ---------- */

@media print {
  .top, .fija, .insc__hoja, .cierre, .galeria { display: none; }
  .sec--tinta, .sec--lima { background: none; color: black; }
}
