/* ==========================================================================
   Carlos Águila Cervera — sitio personal
   Concepto: "Bitácora de altura". Papel cálido, curvas de nivel, tipografía
   editorial de gran escala, fotografías con cinta, marcador sobre lo que importa.
   Vanilla CSS. Sin build, sin frameworks.
   ========================================================================== */

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Papel y tinta */
  --paper:      oklch(0.968 0.013 84);
  --paper-2:    oklch(0.941 0.017 82);
  --paper-3:    oklch(0.912 0.020 80);
  --ink:        oklch(0.255 0.016 62);
  --ink-2:      oklch(0.445 0.014 64);
  --ink-3:      oklch(0.515 0.013 66);
  --rule:       oklch(0.862 0.016 78);

  /* Acentos: misma claridad, distinto matiz */
  --cumbre:     oklch(0.505 0.121 34);    /* terracota — cumbre */
  --ruta:       oklch(0.495 0.085 168);   /* pino — ruta */
  --cielo:      oklch(0.505 0.104 248);   /* pizarra — cielo */
  --marcador:   oklch(0.905 0.145 96 / 0.62);  /* ocre translúcido */

  --cumbre-soft: color-mix(in oklab, var(--cumbre) 9%, var(--paper));
  --ruta-soft:   color-mix(in oklab, var(--ruta) 9%, var(--paper));

  /* Noche (sección oscura) */
  --noche:      oklch(0.238 0.020 62);
  --noche-2:    oklch(0.300 0.022 62);
  --noche-ink:  oklch(0.930 0.016 84);

  /* Tipografía */
  --display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body:    "Newsreader", Georgia, "Times New Roman", serif;
  --mono:    "Courier Prime", "Courier New", ui-monospace, monospace;
  --rune:    "Cinzel", "Trajan Pro", "Palatino Linotype", Palatino, Georgia, serif;

  /* Escala fluida */
  --t-hero:  clamp(3.1rem, 1.1rem + 9vw, 9.5rem);
  --t-h2:    clamp(2.1rem, 1.1rem + 4vw, 4.4rem);
  --t-h3:    clamp(1.15rem, 0.95rem + 0.8vw, 1.6rem);
  --t-lead:  clamp(1.16rem, 1.02rem + 0.6vw, 1.5rem);
  --t-body:  clamp(1.04rem, 0.98rem + 0.3vw, 1.19rem);
  --t-small: clamp(0.86rem, 0.82rem + 0.2vw, 0.95rem);
  --t-micro: 0.735rem;

  /* Ritmo */
  --wrap:    76rem;
  --gutter:  clamp(1.25rem, 4vw, 3.5rem);
  --sec-y:   clamp(3.5rem, 6.6vw, 7rem);

  /* Movimiento */
  --ease:    cubic-bezier(0.22, 0.68, 0.28, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Sitio de tema claro únicamente */
  color-scheme: light;
}


/* ── 2. Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--paper);
  /* Grano de papel: dos capas de puntos muy suaves */
  background-image:
    radial-gradient(circle at 12% 18%, color-mix(in oklab, var(--cumbre) 5%, transparent) 0, transparent 42%),
    radial-gradient(circle at 88% 72%, color-mix(in oklab, var(--cielo) 5%, transparent) 0, transparent 46%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.72;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
svg  { display: block; }

a { color: var(--cumbre); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: color-mix(in oklab, var(--cumbre) 78%, var(--ink)); }

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

::selection { background: var(--marcador); color: var(--ink); }

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

.skip-link {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -140%);
  z-index: 200; background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.2rem; border-radius: 0 0 6px 6px;
  font-family: var(--display); font-size: 0.9rem; text-decoration: none;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); color: var(--paper); }

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

/* ── 3. Barra de progreso ──────────────────────────────────────────────── */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120;
  background: transparent; pointer-events: none;
}
.progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cumbre), var(--marcador) 60%, var(--ruta));
  transition: width 0.08s linear;
}

/* ── 4. Navegación ─────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--rule); }

.nav__inner {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  display: flex; align-items: center; gap: 1rem;
  min-height: 4.25rem;
}

.nav__brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 44px;
  margin-right: auto; color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; letter-spacing: -0.015em;
  font-size: 1.02rem;
}
.nav__mark { width: 26px; height: 26px; color: var(--cumbre); flex: none; }
.nav__role { color: var(--ink-3); font-weight: 400; }
@media (max-width: 900px) { .nav__role { display: none; } }

.nav__links { display: flex; align-items: center; gap: 0.15rem; }
.nav__links a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 0.72rem; border-radius: 999px;
  font-family: var(--display); font-size: 0.905rem; font-weight: 600;
  color: var(--ink-2); text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--ink); background: var(--paper-2); }
.nav__links a.is-current { color: var(--cumbre); background: var(--cumbre-soft); }

.nav__cta {
  background: var(--ink) !important; color: var(--paper) !important;
  margin-left: 0.4rem; padding-inline: 1.1rem !important;
}
.nav__cta:hover { background: var(--cumbre) !important; color: var(--paper) !important; }

.nav__burger {
  display: none; width: 44px; height: 44px; flex: none;
  background: none; border: 0; cursor: pointer; padding: 10px;
  flex-direction: column; justify-content: space-between;
}
.nav__burger span {
  display: block; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__burger { display: flex; }
  .nav__links {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.1rem;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.38s var(--ease-out);
  }
  .nav__links.is-open { clip-path: inset(0 0 0 0); }
  .nav__links a { border-radius: 8px; font-size: 1.05rem; min-height: 48px; }
  .nav__cta { margin: 0.5rem 0 0; justify-content: center; }
}

/* ── 5. Tipografía compartida ──────────────────────────────────────────── */
.h2 {
  font-family: var(--display);
  font-size: var(--t-h2);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.032em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.h2.center { text-align: center; }

/* Titular que además es una cita: cuerpo menor y comilla de apertura */
.h2--quote {
  position: relative;
  font-size: clamp(1.5rem, 0.95rem + 2.1vw, 2.5rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.024em;
  max-width: 26ch;
  padding-top: 0.72em;
}
/* Atribución de la cita-titular: mismo recurso que el cite de .pull */
/* Sin inline-flex: aquí el contenido mezcla texto y <cite>, y el gap del
   flex separaría cada nodo, metiendo un espacio antes de la coma. */
.quote-cite {
  margin: -0.4rem 0 1.7rem;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--cumbre);
}
.quote-cite::before {
  content: ""; display: inline-block;
  width: 1.8rem; height: 1px; margin-right: 0.7rem;
  vertical-align: middle;
  background: var(--cumbre);
}
.quote-cite cite { font-style: italic; text-transform: none; letter-spacing: 0.06em; }

.h2--quote::before {
  content: "“";
  position: absolute; top: -0.14em; left: -0.04em;
  font-family: var(--body);
  font-size: 3.2em; line-height: 1;
  color: var(--cumbre); opacity: 0.35;
  pointer-events: none;
}

.kicker {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.kicker.center { text-align: center; margin-bottom: 0.9rem; }

.num {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 500;              /* peso ligero: el contorno necesita contraformas abiertas */
  line-height: 1;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--rule);
  margin: 0 0 0.35rem;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.19em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 1.4rem;
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cumbre); flex: none;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--cumbre) 60%, transparent);
  animation: ping 2.8s var(--ease) infinite;
}
@keyframes ping {
  0%, 70%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--cumbre) 55%, transparent); }
  35%           { box-shadow: 0 0 0 7px color-mix(in oklab, var(--cumbre) 0%, transparent); }
}

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.15em; }
.prose .lead { font-size: var(--t-lead); line-height: 1.55; color: var(--ink); }
.prose.center { margin-inline: auto; text-align: center; }
.prose.small { font-size: var(--t-small); color: var(--ink-2); }

/* Marcador de resaltado — se pinta al revelarse */
.mark {
  background: none; color: inherit;
  padding: 0 0.14em; margin: 0 -0.14em;
  background-image: linear-gradient(var(--marcador), var(--marcador));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 0% 0.72em;
  transition: background-size 0.72s var(--ease-out) 0.18s;
}
.reveal.is-in .mark, .is-in .mark { background-size: 100% 0.72em; }

/* ── 6. Botones ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.35rem;
  border: 1.5px solid var(--ink); border-radius: 999px;
  font-family: var(--display); font-size: 0.955rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform 0.22s var(--ease), background-color 0.22s var(--ease),
              color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--cumbre); border-color: var(--cumbre); color: var(--paper); box-shadow: 0 8px 22px -12px var(--cumbre); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--lg { min-height: 56px; padding-inline: 1.9rem; font-size: 1.05rem; }

/* ── 7. Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 7vw, 6.5rem);
  overflow: hidden;
}

.contours {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--rule); opacity: 0.85; pointer-events: none; z-index: 0;
}
.contours .ln {
  stroke-width: 1.1;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: draw 2.6s var(--ease-out) forwards;
}
.contours .ln:nth-child(2) { animation-delay: 0.10s; }
.contours .ln:nth-child(3) { animation-delay: 0.20s; }
.contours .ln:nth-child(4) { animation-delay: 0.30s; }
.contours .ln:nth-child(5) { animation-delay: 0.40s; }
.contours .ln:nth-child(6) { animation-delay: 0.50s; }
.contours .ridge { stroke: var(--cumbre); stroke-width: 1.9; opacity: 0.5; animation-delay: 0.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Velo de papel bajo el texto: sin él, una curva de nivel puede cruzar
   "Cervera" (texto contorneado) y leerse como tachado. */
.hero__text { position: relative; }
.hero__text::before {
  content: ""; position: absolute; z-index: -1;
  inset: -2.5rem -2rem -1.5rem -2rem;
  background: radial-gradient(ellipse 74% 62% at 34% 42%,
              var(--paper) 45%, color-mix(in oklab, var(--paper) 55%, transparent) 70%, transparent 88%);
}

.hero__grid {
  position: relative; z-index: 1;
  display: grid;
  /* La foto pedía más aire: antes 1.35fr/1fr la dejaba en ~370px a 1000px de ancho */
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 560px) {
  /* La píldora de cargos debe caber sin desbordar en pantallas estrechas */
  .rotator { letter-spacing: 0.055em; padding: 0.45rem 0.75rem 0.45rem 1.4rem; }
  .hero__roles { min-height: 3.4em; align-items: flex-start; }
}

.hero__name {
  font-family: var(--display);
  font-size: var(--t-hero);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.05em;
  margin: 0 0 1.5rem;
  display: flex; flex-direction: column;
}
.hero__first {
  font-weight: 400;
  font-size: 0.44em;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  margin-bottom: 0.18em;
  margin-left: 0.06em;
}
.hero__last { display: block; }
/* Relleno sólido en peso ligero, no contorno: el text-stroke sobre un
   grotesco de peso 800 rellena los blancos internos y se lee como tachado. */
.hero__last-2 {
  display: block;
  font-size: 0.62em;
  font-weight: 400;
  letter-spacing: -0.035em;
  color: var(--cumbre);
  margin-top: 0.04em;
  margin-left: 0.02em;
}

/* Rotador de cargos */
.hero__roles {
  margin: 0 0 1.5rem;
  min-height: 2.1em;
  display: flex; align-items: center;
}
.rotator {
  position: relative;
  display: inline-block;
  max-width: 100%;
  font-family: var(--mono);
  font-size: clamp(0.82rem, 0.72rem + 0.5vw, 1rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ruta);
  padding: 0.45rem 0.9rem 0.45rem 1.55rem;
  border: 1px solid color-mix(in oklab, var(--ruta) 34%, transparent);
  border-radius: 999px;
  background: var(--ruta-soft);
  overflow: hidden;
}
.rotator::before {
  content: ""; position: absolute; left: 0.72rem; top: 50%;
  width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--ruta);
}
.rotator__word {
  display: inline-block;
  animation: slot 0.5s var(--ease-out);
}
@keyframes slot {
  from { opacity: 0; transform: translateY(0.85em); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__lede {
  font-size: var(--t-lead);
  line-height: 1.58;
  max-width: 40ch;
  margin: 0 0 2rem;
  color: var(--ink);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }

.hero__chips {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.06em; color: var(--ink-3);
}
.hero__chips a { color: var(--ink-2); text-decoration: none; border-bottom: 1px dotted var(--ink-3); }
.hero__chips a:hover { color: var(--cumbre); border-bottom-color: var(--cumbre); }

/* Foto con cinta */
.hero__photo, .taberna__photo {
  position: relative; margin: 0;
  transform: rotate(-1.6deg);
  transition: transform 0.5s var(--ease-out);
}
.hero__photo:hover, .taberna__photo:hover { transform: rotate(0deg) scale(1.012); }

.hero__photo img, .taberna__photo img {
  width: 100%;
  /* Montura pareja: sin pie de foto, una franja inferior ancha se lee como hueco */
  border: 11px solid var(--paper);
  border-bottom-width: 15px;
  border-radius: 3px;
  box-shadow: 0 26px 50px -28px oklch(0.2 0.02 60 / 0.55), 0 2px 6px oklch(0.2 0.02 60 / 0.12);
  object-fit: cover;
}
.hero__photo img   { aspect-ratio: 10 / 7; }
.taberna__photo img { aspect-ratio: 4 / 3; }


.tape {
  position: absolute; z-index: 2;
  width: 108px; height: 30px;
  background: var(--marcador);
  box-shadow: 0 1px 3px oklch(0.2 0.02 60 / 0.16);
}
.tape--a { top: -14px; left: -18px; transform: rotate(-28deg); }
.tape--b { bottom: -12px; right: -20px; transform: rotate(-22deg); }



/* ── 9. Estructura de sección ──────────────────────────────────────────── */
.section { padding: var(--sec-y) 0; position: relative; }
.section--tint { background: var(--paper-2); }
.section--contact { background: var(--paper-2); border-top: 1px solid var(--rule); }

.band {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.band__side { position: sticky; top: 6.5rem; }
@media (max-width: 820px) {
  .band { grid-template-columns: 1fr; gap: 1.5rem; }
  .band__side { position: static; display: flex; align-items: baseline; gap: 0.9rem; }
  .num { font-size: 2rem; margin: 0; }
}

/* Divisor: cresta de montaña */
.ridge {
  border: 0; height: clamp(38px, 5vw, 62px); margin: 0;
  background: var(--rule);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 52 L90 34 L165 44 L280 12 L360 38 L470 22 L560 46 L680 8 L770 40 L880 26 L980 44 L1080 20 L1200 42' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 52 L90 34 L165 44 L280 12 L360 38 L470 22 L560 46 L680 8 L770 40 L880 26 L980 44 L1080 20 L1200 42' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.ridge--flip { transform: scaleX(-1); }

/* ── 10. Etiquetas y tarjetas ──────────────────────────────────────────── */
.tags {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  align-content: flex-start;
}

/* La prosa se detiene en 62ch; las etiquetas aprovechan el ancho que sobra */
@media (min-width: 940px) {
  .perfil__cols {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.8rem);
    align-items: start;
  }
  .perfil__cols .tags { margin-top: 0.4rem; }
}
.tags li {
  font-family: var(--mono); font-size: 0.735rem;
  letter-spacing: 0.06em;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink-2); background: var(--paper);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.tags li:hover { border-color: var(--ruta); color: var(--ruta); transform: translateY(-2px); }

.twocol {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1rem, 2.4vw, 1.8rem); margin-top: 2.2rem;
}
.card {
  padding: clamp(1.3rem, 2.4vw, 1.9rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--rule);
}
.section--tint .card { background: var(--paper); }
.card h3 {
  font-family: var(--display); font-size: var(--t-h3); font-weight: 700;
  letter-spacing: -0.02em; margin: 0 0 0.7rem; line-height: 1.15;
}
.card p { margin: 0; font-size: 1rem; color: var(--ink-2); }

.list { margin: 0; padding: 0; list-style: none; }
.list li {
  position: relative; padding-left: 1.15rem; margin-bottom: 0.62rem;
  font-size: 0.985rem; color: var(--ink-2); line-height: 1.6;
}
.list li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--ruta);
}
.list li:last-child { margin-bottom: 0; }
.list b { color: var(--ink); }

/* Epígrafe: abre la sección antes del título. Panel con tinte de marcador,
   filete ocre y comilla decorativa — destaca sin subir el cuerpo de letra. */
.epigraph {
  position: relative;
  font-family: var(--body); font-style: italic; font-weight: 300;
  font-size: clamp(1.02rem, 0.94rem + 0.4vw, 1.2rem);
  line-height: 1.6; color: var(--ink);
  margin: 0 0 2rem;
  padding: 1.15rem 1.4rem 1.15rem 2.9rem;
  max-width: 48ch;
  background: color-mix(in oklab, var(--marcador) 26%, transparent);
  border-left: 3px solid color-mix(in oklab, var(--marcador) 85%, var(--ink));
  border-radius: 0 4px 4px 0;
}
.epigraph::before {
  content: "“";
  position: absolute; left: 0.6rem; top: 0.16em;
  font-family: var(--body); font-style: normal;
  font-size: 2.9em; line-height: 1;
  color: var(--ink); opacity: 0.24;
}

/* Cita destacada: panel con tinte terracota, filete grueso y comilla
   sobredimensionada detrás del texto. Destaca por tratamiento, no por tamaño. */
.pull {
  position: relative;
  margin: 2.4rem 0;
  padding: clamp(1.3rem, 2.6vw, 1.9rem) clamp(1.2rem, 2.4vw, 1.8rem)
           clamp(1.1rem, 2.2vw, 1.5rem) clamp(2.6rem, 4vw, 3.4rem);
  background: var(--cumbre-soft);
  border-left: 4px solid var(--cumbre);
  border-radius: 0 5px 5px 0;
}
.pull::before {
  content: "“";
  position: absolute; left: 0.5rem; top: 0.02em;
  font-family: var(--body); font-style: normal;
  font-size: 5.2em; line-height: 1;
  color: var(--cumbre); opacity: 0.2;
  pointer-events: none;
}
.pull p {
  position: relative;
  font-family: var(--display);
  font-size: clamp(1.3rem, 0.9rem + 1.7vw, 2rem);
  font-weight: 700; line-height: 1.2; letter-spacing: -0.026em;
  margin: 0 0 0.85rem; text-wrap: balance;
}
.pull cite {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: var(--t-micro); font-style: normal;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--cumbre);
}
.pull cite::before {
  content: ""; width: 1.6rem; height: 1px;
  background: var(--cumbre); flex: none;
}

/* ── 11. Animación: al frente / en medio / detrás ──────────────────────── */
.stance {
  margin: 2.4rem 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  overflow: hidden;
}
.stance__stage {
  padding: clamp(0.8rem, 2.5vw, 1.6rem) clamp(0.5rem, 2vw, 1.4rem) 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in oklab, var(--rule) 45%, transparent) 23px 24px);
}
.stance__svg { width: 100%; height: auto; }

.stance__path { stroke: var(--rule); stroke-width: 1.5; stroke-dasharray: 5 6; }
.stance__team circle { fill: none; stroke: var(--ink-3); stroke-width: 1.8; }

.stance__leader { transform: translateX(120px); transition: transform 0.85s var(--ease-out); }
.stance__halo {
  fill: color-mix(in oklab, var(--cumbre) 16%, transparent);
  animation: halo 2.6s var(--ease) infinite;
  transform-origin: 0 96px;
}
@keyframes halo {
  0%, 100% { transform: scale(0.8); opacity: 0.85; }
  50%      { transform: scale(1.12); opacity: 0.35; }
}
.stance__dot { fill: var(--cumbre); }
.stance__arrow {
  stroke: var(--paper); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.stance__leader.show-arrow .stance__arrow { opacity: 1; }

.stance__list {
  list-style: none; margin: 0; padding: clamp(1rem, 2.5vw, 1.5rem);
  display: grid; gap: 0;
}
.stance__item {
  display: none;
  animation: fadeUp 0.5s var(--ease-out);
}
.stance__item.is-on { display: block; }
.stance__item h3 {
  font-family: var(--display); font-size: var(--t-h3); font-weight: 800;
  letter-spacing: -0.02em; margin: 0 0 0.35rem; color: var(--cumbre);
}
.stance__item p { margin: 0; color: var(--ink-2); max-width: 58ch; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stance__controls {
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid var(--rule);
}
.stance__btn {
  flex: 1 1 8rem; min-height: 48px;
  background: var(--paper-2); border: 0; border-right: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3); cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.stance__btn:last-child { border-right: 0; }
.stance__btn:hover { color: var(--ink); background: var(--paper-3); }
.stance__btn.is-on { background: var(--cumbre); color: var(--paper); }

/* ── 12. Trayectoria: la ascensión ─────────────────────────────────────── */
.climb { list-style: none; margin: 2.5rem 0 0; padding: 0; position: relative; }
.climb::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--cumbre), var(--ruta), var(--cielo));
  opacity: 0.28;
}
.climb__item {
  position: relative;
  padding: 0 0 clamp(2rem, 3.5vw, 2.8rem) clamp(2rem, 4vw, 2.75rem);
}
.climb__item:last-child { padding-bottom: 0; }

.climb__marker {
  position: absolute; left: 0; top: 0.5rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid var(--cumbre);
  transition: transform 0.45s var(--ease-out) 0.15s, background-color 0.45s var(--ease);
  transform: scale(0.55);
}
.climb__item.is-in .climb__marker { transform: scale(1); }
.climb__item:first-child .climb__marker { background: var(--cumbre); }

.climb__when {
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 0.3rem;
}
.climb__what {
  font-family: var(--display); font-size: var(--t-h3); font-weight: 700;
  letter-spacing: -0.022em; line-height: 1.2; margin: 0 0 0.22rem;
  text-wrap: balance;
}
.climb__where {
  font-size: 0.94rem; color: var(--ruta); margin: 0 0 0.7rem;
  font-style: italic;
}
.climb__desc { margin: 0; color: var(--ink-2); max-width: 62ch; font-size: 1rem; }

.climb__bullets {
  margin: 0; padding: 0; list-style: none; max-width: 64ch;
}
/* Las entradas con muchas viñetas son las que alargan la trayectoria */
@media (min-width: 900px) {
  .climb__bullets {
    max-width: none;
    columns: 2; column-gap: clamp(1.5rem, 3vw, 2.6rem);
  }
  .climb__bullets li { break-inside: avoid; }
}
.climb__bullets li {
  position: relative; padding-left: 1.05rem; margin-bottom: 0.42rem;
  font-size: 0.975rem; color: var(--ink-2); line-height: 1.62;
}
.climb__bullets li::before {
  content: "—"; position: absolute; left: 0; top: 0; color: var(--rule);
}
.climb__bullets b { color: var(--ink); }

/* ── 13. Foto ancha ────────────────────────────────────────────────────── */
.fullbleed { padding: 0; }
.fullbleed figure { margin: 0; position: relative; }
.fullbleed img {
  width: 100%; height: clamp(16rem, 42vw, 30rem); object-fit: cover;
  /* Anclado arriba: el sujeto está en el tercio superior y a cualquier
     ancho un porcentaje mayor le corta la cabeza. Se recorta el público. */
  object-position: center top;
  filter: saturate(0.94);
}
.fullbleed figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) clamp(1.1rem, 2.5vw, 1.7rem);
  background: linear-gradient(transparent, oklch(0.14 0.02 60 / 0.55) 45%, oklch(0.12 0.02 60 / 0.92));
  color: oklch(0.97 0.01 84);
  text-shadow: 0 1px 3px oklch(0.12 0.02 60 / 0.8);
  font-family: var(--mono); font-size: var(--t-small);
  letter-spacing: 0.03em; text-align: center;
}
.fullbleed figcaption b { font-weight: 700; }
/* La cita va en cursiva y a mayor cuerpo; la atribución queda en mono */
.fullbleed figcaption q {
  display: block; margin-bottom: 0.85rem;
  font-family: var(--body); font-style: italic; font-size: 1.5em;
  line-height: 1.25; letter-spacing: 0;
}
/* Filetes cortos que enmarcan la atribución */
.fullbleed figcaption b {
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.fullbleed figcaption b::before {
  content: ""; width: 1.8rem; height: 1px;
  background: color-mix(in oklab, var(--marcador) 90%, transparent);
  flex: none;
}

/* ── 14. Sección oscura: IA ────────────────────────────────────────────── */
/* La franja noche mantiene su fondo oscuro en ambos temas, así que necesita
   su propio acento: la terracota del modo claro no contrasta contra ella. */
.section--dark, .quote {
  --cumbre: oklch(0.715 0.132 40);
}

.section--dark {
  background: var(--noche);
  color: var(--noche-ink);
}
.section--dark .num { -webkit-text-stroke-color: var(--noche-2); }
.section--dark .kicker,
.section--dark .climb__when { color: color-mix(in oklab, var(--noche-ink) 55%, transparent); }
.section--dark .prose p { color: color-mix(in oklab, var(--noche-ink) 82%, transparent); }

/* Sobre fondo oscuro el marcador se vuelve subrayado: el bloque de ocre
   dejaría el texto claro sin contraste suficiente. */
.section--dark .mark {
  color: var(--noche-ink);
  background-image: linear-gradient(var(--cumbre), var(--cumbre));
  background-position: 0 100%;
  background-size: 0% 2px;
  padding: 0; margin: 0;
}
.section--dark .reveal.is-in .mark,
.section--dark .is-in .mark { background-size: 100% 2px; }

/* El logo va en su versión en negativo —crema sobre transparente, con la
   barra roja aclarada— para vivir directamente sobre el fondo noche. Con
   placa clara se leía como un parche pegado encima. */
.raise__mark { margin: 0 0 clamp(1.4rem, 3vw, 2.1rem); }
.raise__mark img {
  width: min(19rem, 66vw);
  height: auto;
}
/* Filete que lo ancla al bloque de texto en lugar de dejarlo flotando */
.raise__mark::after {
  content: ""; display: block;
  margin-top: clamp(1rem, 2.2vw, 1.5rem);
  height: 1px; width: min(30rem, 100%);
  background: linear-gradient(90deg, var(--cumbre), color-mix(in oklab, var(--noche-ink) 22%, transparent) 55%, transparent);
}

/* ── Charter ── */
.charter {
  margin: 2.6rem 0 2.4rem;
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border: 1px solid var(--noche-2);
  border-left: 3px solid var(--cumbre);
  border-radius: 4px;
  background: color-mix(in oklab, var(--noche-2) 42%, transparent);
}
.charter__meta {
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cumbre); margin: 0 0 0.9rem;
}
.charter__lede {
  font-size: var(--t-lead); line-height: 1.5;
  margin: 0 0 1.6rem; max-width: 52ch;
  color: var(--noche-ink);
}
.charter__lede b { font-family: var(--display); font-weight: 700; }

.charter__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.1rem, 2.4vw, 2rem); margin: 0 0 1.8rem;
}
.charter__grid > div { min-width: 0; }
.charter__grid dt {
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: color-mix(in oklab, var(--noche-ink) 55%, transparent);
  margin-bottom: 0.45rem;
}
.charter__grid dd {
  margin: 0; font-size: 0.985rem; line-height: 1.62;
  color: color-mix(in oklab, var(--noche-ink) 82%, transparent);
}

.charter__sub {
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.19em; text-transform: uppercase;
  color: color-mix(in oklab, var(--noche-ink) 58%, transparent);
  margin: 0 0 0.8rem;
}

.charter__aims {
  margin: 0; padding: 0; list-style: none; counter-reset: aim;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  column-gap: clamp(1.2rem, 2.6vw, 2.2rem);
}
.charter__aims li {
  counter-increment: aim;
  position: relative; padding-left: 2rem; margin-bottom: 0.55rem;
  font-size: 0.985rem; line-height: 1.6;
  color: color-mix(in oklab, var(--noche-ink) 82%, transparent);
}
.charter__aims li::before {
  content: "(" counter(aim) ")";
  position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-size: 0.8rem; color: var(--cumbre);
}
.charter__aims li:last-child { margin-bottom: 0; }

/* ── Noticias ── */
.news { margin-top: clamp(2.4rem, 4vw, 3.4rem); }

.news__list {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--noche-2);
}
.news__list li { border-bottom: 1px solid var(--noche-2); }
.news__list li[hidden] { display: none; }

.news__list a {
  display: flex; align-items: baseline; gap: 1rem;
  min-height: 52px; padding: 0.9rem 0.2rem;
  text-decoration: none; color: var(--noche-ink);
  transition: padding 0.28s var(--ease), color 0.2s var(--ease);
}
.news__list a:hover { padding-inline: 0.5rem 0; color: var(--cumbre); }

.news__t {
  font-family: var(--display); font-size: 1.02rem; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.3;
}
/* El filete punteado une título y fecha sin depender del ancho */
.news__d {
  margin-left: auto; flex: none;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in oklab, var(--noche-ink) 55%, transparent);
}

.news__more {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; margin-top: 1.2rem; padding: 0 1.2rem;
  background: transparent; color: var(--noche-ink);
  border: 1px solid var(--noche-2); border-radius: 999px;
  font-family: var(--display); font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.news__more svg { width: 16px; height: 16px; }
.news__more:hover { background: var(--noche-2); border-color: var(--cumbre); }
.news__more[hidden] { display: none; }

@media (max-width: 520px) {
  .news__list a { flex-direction: column; gap: 0.25rem; min-height: 0; }
  .news__d { margin-left: 0; }
}

/* ── Líneas estratégicas ── */
.lines {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0;
  border-top: 1px solid var(--noche-2);
}
.lines li {
  padding: 1.4rem clamp(0, 2vw, 1.6rem) 1.4rem 0;
  border-bottom: 1px solid var(--noche-2);
}
.lines__n {
  display: block; margin-bottom: 0.5rem;
  font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.1em; color: var(--cumbre);
}
.lines h3 {
  font-family: var(--display); font-size: 1.08rem; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.25;
  margin: 0 0 0.45rem; color: var(--noche-ink);
  text-wrap: balance;
}
.lines p {
  margin: 0; font-size: 0.955rem; line-height: 1.62;
  color: color-mix(in oklab, var(--noche-ink) 70%, transparent);
}

.typed {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.6rem);
  letter-spacing: 0.06em;
  color: var(--cumbre);
  margin: 0 0 0.5rem;
  display: inline-block;
  position: relative;
}
.typed::after {
  content: "";
  display: inline-block;
  width: 0.56em; height: 1.05em;
  background: var(--cumbre);
  margin-left: 0.16em;
  vertical-align: -0.15em;
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }



.ia__points {
  list-style: none; margin: 2.4rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.4rem;
  border-top: 1px solid var(--noche-2); padding-top: 1.8rem;
}
.ia__points b {
  display: block; font-family: var(--display); font-size: 1.08rem; font-weight: 700;
  letter-spacing: -0.015em; margin-bottom: 0.35rem; color: var(--noche-ink);
}
.ia__points span {
  display: block; font-size: 0.955rem; line-height: 1.6;
  color: color-mix(in oklab, var(--noche-ink) 68%, transparent);
}

/* ── 15. Formación ─────────────────────────────────────────────────────── */
.degrees {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  column-gap: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule);
}
.degrees li {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--rule);
}
.degrees b {
  font-family: var(--display); font-size: 1.1rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.25;
}
.degrees span { font-size: 0.92rem; color: var(--ink-3); }
.degrees i {
  font-style: normal; margin-top: 0.25rem;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ruta);
}

/* ── 16. Publicaciones ─────────────────────────────────────────────────── */

/* Series abiertas: cada tarjeta crece agregando <li> a su .serie__list */
.series {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1rem, 2.4vw, 1.8rem);
  margin: 2.2rem 0 3.4rem;
}

.serie {
  --serie: var(--cumbre);
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--serie);
  border-radius: 4px;
  padding: clamp(1.3rem, 2.4vw, 1.8rem);
}
.serie--ia { --serie: var(--cielo); }

.serie__tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  align-self: flex-start;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--serie); margin: 0 0 0.6rem;
}
.serie__tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--serie); flex: none;
}

.serie__title {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.65rem);
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.12;
  margin: 0 0 0.55rem; text-wrap: balance;
}
.serie__desc {
  margin: 0 0 1.3rem; font-size: 0.98rem; line-height: 1.6;
  color: var(--ink-2); max-width: 44ch;
}

.serie__list {
  list-style: none; margin: auto 0 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.serie__list li + li { border-top: 1px solid var(--rule); }

.serie__list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 0.9rem;
  min-height: 56px; padding: 0.85rem 0.2rem;
  text-decoration: none; color: var(--ink);
  transition: padding 0.28s var(--ease), color 0.2s var(--ease);
}
.serie__list a:hover { padding-inline: 0.55rem 0; color: var(--serie); }

.serie__n {
  font-family: var(--mono); font-size: 0.76rem;
  letter-spacing: 0.06em; color: var(--serie);
  padding-top: 0.1em; align-self: start;
}
.serie__body { min-width: 0; }
.serie__t {
  display: block;
  font-family: var(--display); font-size: 1.02rem; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.3;
}
.serie__m {
  display: block; margin-top: 0.15rem;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.05em; color: var(--ink-3);
}
.serie__go {
  width: 20px; height: 20px; flex: none; color: var(--serie);
  opacity: 0.45;
  transition: opacity 0.25s var(--ease), transform 0.28s var(--ease-out);
}
.serie__list a:hover .serie__go { opacity: 1; transform: translate(2px, -2px); }

.pubs__h {
  font-family: var(--mono); font-size: var(--t-micro);
  font-weight: 400; letter-spacing: 0.19em; text-transform: uppercase;
  color: var(--ink-3); margin: 0;
}

.pubs {
  list-style: none; margin: 1.2rem 0 1.6rem; padding: 0; counter-reset: p;
  /* Fichas independientes: dos columnas no rompen ninguna secuencia de lectura */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  column-gap: clamp(1.5rem, 3vw, 2.8rem);
  border-top: 1px solid var(--rule);
}
.pubs li {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule);
}
.pubs__year {
  font-family: var(--mono); font-size: 0.8rem; color: var(--cumbre);
  letter-spacing: 0.06em; padding-top: 0.22em;
}
.pubs b {
  display: block; font-family: var(--display); font-size: 1.06rem; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.32; margin-bottom: 0.2rem;
}
.pubs span { display: block; font-size: 0.92rem; color: var(--ink-3); font-style: italic; }
.pubs a {
  display: inline-block; margin-top: 0.4rem;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.11em; text-transform: uppercase; text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--cumbre) 40%, transparent);
  padding-bottom: 1px;
}
.pubs a:hover { border-bottom-color: var(--cumbre); }
@media (max-width: 560px) {
  .pubs li { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ── 17. Cumbres ───────────────────────────────────────────────────────── */
.cumbres__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.cumbres__col { display: flex; flex-direction: column; justify-content: space-between; }
.cumbres__col .peaks { margin: 1.6rem 0 0; }
@media (max-width: 780px) {
  .cumbres__intro { grid-template-columns: 1fr; }
  .cumbres__photo { max-width: 20rem; }
}

.cumbres__photo {
  position: relative; margin: 0;
  transform: rotate(2deg);
  transition: transform 0.5s var(--ease-out);
}
.cumbres__photo:hover { transform: rotate(0deg) scale(1.015); }
.cumbres__photo img {
  width: 100%;
  border: 11px solid var(--paper);
  border-bottom-width: 15px;
  border-radius: 3px;
  box-shadow: 0 26px 50px -28px oklch(0.2 0.02 60 / 0.55), 0 2px 6px oklch(0.2 0.02 60 / 0.12);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.peaks { margin: 2.2rem 0 2rem; }
.peaks__svg { width: 100%; height: auto; overflow: visible; }
.peaks__fill { fill: var(--ruta-soft); opacity: 0; transition: opacity 0.9s var(--ease) 0.5s; }
.peaks__line {
  fill: none; stroke: var(--ruta); stroke-width: 2.2;
  stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
}
.reveal.is-in .peaks__line, .peaks.is-in .peaks__line { animation: draw 1.8s var(--ease-out) forwards; }
.reveal.is-in .peaks__fill, .peaks.is-in .peaks__fill { opacity: 1; }

/* El <g> exterior posiciona; el interior anima — así el transform CSS
   no pisa el atributo transform del SVG. */
.peaks__flag { opacity: 0; }
.reveal.is-in .peaks__flag, .peaks.is-in .peaks__flag {
  animation: flagIn 0.55s var(--ease-out) forwards;
  animation-delay: calc(1.35s + var(--d, 0s));
}
@keyframes flagIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.peaks__flag line { stroke: var(--cumbre); stroke-width: 2; stroke-linecap: round; }
.peaks__flag path { fill: var(--cumbre); }
.peaks__flag circle { fill: var(--cumbre); }
/* En unidades del viewBox (900 de ancho): el perfil vive en una columna
   angosta, así que el texto necesita ir grande para leerse en pantalla. */
.peaks__flag text {
  font-family: var(--mono); font-size: 21px;
  letter-spacing: 0.05em; text-transform: uppercase;
  fill: var(--ink-2);
}
/* La altitud va en segunda línea: etiquetas más angostas, sin encimarse */
.peaks__flag .peaks__alt { font-size: 18px; fill: var(--ink-3); letter-spacing: 0.09em; }

.feats {
  list-style: none; margin: 0 0 2.6rem; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  column-gap: clamp(1rem, 2.5vw, 2rem); row-gap: 0;
  border-top: 1px solid var(--rule);
}
.feats li {
  padding: 1rem 0; border-bottom: 1px solid var(--rule);
}
.feats b {
  display: block; font-family: var(--display); font-size: 1.02rem; font-weight: 700;
  letter-spacing: -0.015em; margin-bottom: 0.15rem;
}
.feats span { display: block; font-size: 0.9rem; color: var(--ink-3); line-height: 1.55; }
/* Cumbres: cinco logros que en escritorio caben en una sola fila */
.feats--fila { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); }

.taberna {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.6rem, 4vw, 3rem); align-items: center;
  padding-top: 0.5rem;
}
@media (max-width: 780px) { .taberna { grid-template-columns: 1fr; } }
.taberna__photo { transform: rotate(1.4deg); }

.taberna__kicker {
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 0.7rem !important;
}

/* Capitales romanas: el registro tipográfico de Tolkien */
.taberna__title {
  font-family: var(--rune);
  font-size: clamp(1.6rem, 1rem + 2.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.18;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.9rem;
}
/* Filete doble con rombo central, a modo de sello */
.taberna__title::after {
  content: ""; display: block; margin-top: 0.75rem;
  height: 7px; width: min(16rem, 100%);
  background:
    linear-gradient(var(--cumbre), var(--cumbre)) 0 0   / 100% 1px no-repeat,
    linear-gradient(var(--cumbre), var(--cumbre)) 0 6px / 100% 1px no-repeat,
    radial-gradient(circle at 50% 3.5px, var(--cumbre) 3px, transparent 3.5px) no-repeat;
  opacity: 0.75;
}

.taberna__verse {
  font-family: var(--body); font-style: italic; font-weight: 300;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
  line-height: 1.5; color: var(--cumbre);
  margin: 0 0 1.1rem !important;
}

.taberna__text p { margin: 0 0 1.3rem; color: var(--ink-2); max-width: 46ch; }

/* ── 18. Cita Gandalf ──────────────────────────────────────────────────── */
.quote {
  padding: clamp(4rem, 9vw, 8rem) 0;
  background: var(--noche); color: var(--noche-ink);
  text-align: center;
  position: relative; overflow: hidden;
}
.quote::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, color-mix(in oklab, var(--cumbre) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.quote blockquote { margin: 0; position: relative; }
.quote p {
  font-family: var(--body); font-style: italic; font-weight: 300;
  font-size: clamp(1.5rem, 0.9rem + 2.8vw, 3rem);
  line-height: 1.22; letter-spacing: -0.02em;
  margin: 0 auto 1.2rem; max-width: 22ch;
  text-wrap: balance;
}
.quote cite {
  font-family: var(--mono); font-style: normal; font-size: var(--t-micro);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: color-mix(in oklab, var(--noche-ink) 55%, transparent);
}

/* ── 19. Contacto ──────────────────────────────────────────────────────── */
.contact {
  list-style: none; margin: 2.6rem auto 2.8rem; padding: 0;
  max-width: 52rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.contact li {
  padding: 1.05rem 1.2rem 1.05rem 0; border-bottom: 1px solid var(--rule);
}
.contact__k {
  display: block; font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 0.28rem;
}
.contact a, .contact__v {
  font-family: var(--display); font-size: 1.02rem; font-weight: 600;
  text-decoration: none; color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
  overflow-wrap: anywhere;
}
.contact a:hover { color: var(--cumbre); border-bottom-color: var(--cumbre); }
.contact__v { color: var(--ink-2); }
.center { text-align: center; }

/* ── 20. Pie ───────────────────────────────────────────────────────────── */
.foot {
  padding: 2.6rem 0; border-top: 1px solid var(--rule);
  background: var(--paper);
}
.foot__inner {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  align-items: baseline; justify-content: space-between;
}
.foot p { margin: 0; font-size: 0.92rem; color: var(--ink-2); line-height: 1.6; }
.foot b { font-family: var(--display); font-weight: 700; color: var(--ink); }
.foot__meta { font-family: var(--mono); font-size: var(--t-micro); color: var(--ink-3); letter-spacing: 0.05em; }

/* ── 21. Volver arriba ─────────────────────────────────────────────────── */
.totop {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 26px -12px oklch(0.2 0.02 60 / 0.7);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s, background-color 0.25s var(--ease);
}
.totop svg { width: 20px; height: 20px; }
.totop.is-on { opacity: 1; visibility: visible; transform: translateY(0); }
.totop:hover { background: var(--cumbre); color: var(--paper); }

/* ── 22. Revelado al hacer scroll ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ── 23. Movimiento reducido ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1; transform: none; }
  .contours .ln { stroke-dashoffset: 0; }
  .peaks__line { stroke-dashoffset: 0; }
  .peaks__fill { opacity: 1; }
  .peaks__flag { opacity: 1; }
  .mark { background-size: 100% 0.72em; }
  .section--dark .mark { background-size: 100% 2px; }
  .stance__leader { transition: none; }
  .climb__marker { transform: scale(1); }
  .hero__photo, .taberna__photo, .cumbres__photo { transform: none; }
  .typed::after { opacity: 1; }
}

/* ── 24. Impresión ─────────────────────────────────────────────────────── */
@media print {
  .nav, .progress, .totop, .stance__controls, .contours { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 1.2rem 0; break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; }
  .climb__item { break-inside: avoid; }
}
