/* ------------------------------------------------------------
   Tipografías: Pangram Pangram (licencia de prueba, uso personal)
   ------------------------------------------------------------ */
@font-face {
  font-family: "PP Editorial New";
  src: url("/fonts/PPEditorialNew-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Editorial New";
  src: url("/fonts/PPEditorialNew-Italic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("/fonts/PPNeueMontreal-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("/fonts/PPNeueMontreal-Semibold.otf") format("opentype");
  font-weight: 500 600; font-style: normal; font-display: swap;
}

/* ------------------------------------------------------------
   Tokens
   Papel blanco, tinta negra, grafito para lo secundario,
   niebla para los lugares vacíos y una birome roja de corrección
   que se usa en un solo lugar: el manifiesto.
   ------------------------------------------------------------ */
:root {
  color-scheme: light;

  --serif: "PP Editorial New", Georgia, serif;
  --sans: "PP Neue Montreal", system-ui, sans-serif;

  --paper: #ffffff;
  --ink: #000000;
  --graphite: #5c5c5c;
  --fog: #f2f2f2;
  --pen: #e10600;

  /* Escala tipográfica */
  --t-small: 0.875rem;
  --t-body: 1.0625rem;
  --t-lead: 1.25rem;
  --t-h3: clamp(1.375rem, 2vw, 1.625rem);
  --t-h2: clamp(2.5rem, 5.6vw, 4.75rem);
  --t-hero: clamp(3rem, 7.6vw, 7.5rem);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --section: clamp(112px, 15vw, 200px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  display: flex;
  justify-content: center;
  padding: 18px var(--gutter);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, padding .3s ease;
}
/* Al bajar: vidrio esmerilado, con borde y sombra suaves para separarse del fondo */
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  border-bottom-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.01em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.btn:hover { background: #262626; }

/* ============================================================
   INICIO
   ============================================================ */

/* Hero a todo el ancho: bloque celeste que se funde con el cielo de la foto */
.hero-panel {
  position: relative;
  /* Arriba más profundo, abajo los tonos exactos del cielo donde empieza la foto */
  background:
    linear-gradient(90deg, rgba(0, 40, 120, 0.04), rgba(0, 40, 120, 0) 50%, rgba(255, 255, 255, 0.07)),
    linear-gradient(to bottom, #3487da 0%, #3f95e3 45%, #4a9fea 100%);
}
/* Grano sobre todo el hero: une el bloque y la foto */
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: 0.32;
}
.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(48px, 6.5vw, 96px) var(--gutter) 0;
}
.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-hero);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin: 0 auto;
  text-wrap: balance;
}
.hero-copy p {
  margin: 24px auto 0;
  max-width: 44ch;
  font-size: var(--t-lead);
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.74);
}
.hero-actions { margin-top: 32px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { border-color: var(--paper); }

/* La cabra, a todo el ancho. Se recorta el cielo vacío de arriba (220 de 941 px) */
.goat {
  position: relative;
  aspect-ratio: 1672 / 721;
  overflow: hidden;
  margin-top: clamp(-56px, -3vw, -16px);
}
.goat-canvas {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  aspect-ratio: 1672 / 941;
  transform: translateX(-50%);
  container-type: inline-size;
}
.goat img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Fundido largo para que no se note el empalme con el bloque */
  -webkit-mask-image: linear-gradient(to bottom, transparent 23%, rgba(0, 0, 0, .55) 32%, #000 42%);
  mask-image: linear-gradient(to bottom, transparent 23%, rgba(0, 0, 0, .55) 32%, #000 42%);
}
.goat-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gl {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
/* Textos centrados sobre su punto, a cada lado de la cabra */
.goat-note {
  position: absolute;
  top: 46.5%;
  margin: 0;
  font-family: var(--serif);
  font-size: 3.2cqi;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transform-origin: center bottom;
}
.goat-note-left { left: 22%; transform: translateX(-50%) rotate(-7deg) translateY(10px); }
.goat-note-right { left: 78%; transform: translateX(-50%) rotate(6deg) translateY(10px); }

/* GOAT subrayado con la birome roja del manifiesto */
.goat-word { position: relative; display: inline-block; }
.goat-word::after {
  content: "";
  position: absolute;
  left: -6%;
  width: 112%;
  bottom: -0.16em;
  height: 0.24em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C 40 10, 80 3, 120 7 S 180 9, 198 4' fill='none' stroke='%23e10600' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  transform-origin: left center;
  transform: scaleX(0);
}

/* Orden: texto izquierdo, rulo hacia la cabra, punta, subrayado,
   y después la onda desde la cabra hacia el texto derecho */
.goat.is-in .gl { stroke-dashoffset: 0; }
.goat.is-in .gl-left { transition: stroke-dashoffset 1.1s cubic-bezier(.55, .1, .3, 1) .35s; }
.goat.is-in .gl-arrow { transition: stroke-dashoffset .25s ease-out 1.45s; }
.goat.is-in .goat-word::after { transform: scaleX(1); transition: transform .55s cubic-bezier(.6, .05, .3, 1) 1.15s; }
.goat.is-in .gl-right { transition: stroke-dashoffset 1s cubic-bezier(.55, .1, .3, 1) 1.85s; }
.goat.is-in .goat-note { opacity: 1; transition: opacity .6s ease, transform .6s ease; }
.goat.is-in .goat-note-left { transform: translateX(-50%) rotate(-7deg); }
.goat.is-in .goat-note-right { transform: translateX(-50%) rotate(6deg); transition-delay: 2.6s; }
@media (prefers-reduced-motion: reduce) {
  .gl { stroke-dashoffset: 0; }
  .goat-note { opacity: 1; }
  .goat-word::after { transform: scaleX(1); }
  .goat-note-left { transform: translateX(-50%) rotate(-7deg); }
  .goat-note-right { transform: translateX(-50%) rotate(6deg); }
  .goat.is-in .gl, .goat.is-in .goat-note, .goat.is-in .goat-word::after { transition: none; }
}

/* Manifiesto con correcciones en birome roja */
.manifesto {
  max-width: var(--max);
  margin: var(--section) auto 0;
  padding: 0 var(--gutter);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.manifesto-lines p {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.6vw, 4.1rem);
  line-height: 1.16;
  letter-spacing: -0.018em;
  max-width: 25ch;
}
.manifesto-lines p + p { margin-top: 0.55em; }
.manifesto-lines .manifesto-end { margin-top: 1.1em; }

.manifesto s {
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
/* Trazo de birome dibujado a mano */
.manifesto s::after {
  content: "";
  position: absolute;
  left: -4%;
  width: 108%;
  top: 46%;
  height: 0.22em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 40 3, 80 9, 120 5 S 180 4, 198 6' fill='none' stroke='%23e10600' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  transform-origin: left center;
  transform: scaleX(1);
}
.manifesto ins {
  text-decoration: none;
  color: var(--pen);
}
/* El punto final aparece junto con la corrección, en negro */
.manifesto ins .dot { color: var(--ink); }

/* La corrección se dibuja una sola vez, al llegar a la sección */
.js .manifesto s::after { transform: scaleX(0); transition: transform .6s cubic-bezier(.6,.05,.3,1); }
.js .manifesto ins { opacity: 0; transition: opacity .5s ease; }
.js .manifesto.is-in s::after { transform: scaleX(1); }
.js .manifesto.is-in ins { opacity: 1; }
.js .manifesto.is-in p:nth-child(1) s::after { transition-delay: .15s; }
.js .manifesto.is-in p:nth-child(1) ins { transition-delay: .6s; }
.js .manifesto.is-in p:nth-child(2) s::after { transition-delay: .9s; }
.js .manifesto.is-in p:nth-child(2) ins { transition-delay: 1.35s; }
.js .manifesto.is-in p:nth-child(3) s::after { transition-delay: 1.65s; }
.js .manifesto.is-in p:nth-child(3) ins { transition-delay: 2.1s; }
@media (prefers-reduced-motion: reduce) {
  .js .manifesto s::after { transform: scaleX(1); transition: none; }
  .js .manifesto ins { opacity: 1; transition: none; }
}

.manifesto-foot {
  margin-top: 20px;
  max-width: 52ch;
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--graphite);
}

/* A los que hoy admirás */
.admired {
  max-width: var(--max);
  margin: var(--section) auto 0;
  padding: 0 var(--gutter);
}
.admired h2, .rank h2, .closing h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.admired h2 { max-width: 15ch; }
/* Cinta de historias a todo el ancho de la pantalla */
html { overflow-x: clip; }
.marquee {
  margin-top: clamp(48px, 6vw, 80px);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  /* Entrada: aparece suave al llegar a la sección */
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity .8s ease, transform .8s ease;
}
.marquee.is-in { opacity: 1; transform: none; }
.marquee.is-dragging { cursor: grabbing; }
.people {
  display: flex;
  gap: clamp(20px, 2.4vw, 32px);
  width: max-content;
  list-style: none;
  will-change: transform;
}
.person { position: relative; flex: none; width: clamp(270px, 22vw, 300px); }
@media (prefers-reduced-motion: reduce) {
  .marquee { opacity: 1; transform: none; transition: none; }
}
.person img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-position: 50% 100%;
  object-fit: cover;
  border-radius: 6px;
  -webkit-user-drag: none;
  pointer-events: none;
  /* Revelado cálido tipo analógico + sombra suave: recortes pegados como un collage */
  filter: saturate(.62) sepia(.18) contrast(1.06) brightness(1.02) drop-shadow(0 6px 10px rgba(60, 0, 0, .35));
}
/* Fondo rojo de birome detrás de cada recorte */
.person::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  background: var(--pen);
  z-index: -1;
}
/* Mismo grano que el hero y el cierre, solo sobre la foto */
.person::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: 0.4;
  z-index: 1;
}
.person-name { margin-top: 18px; font-weight: 500; }
/* Titular y subtexto de cada historia ocupan siempre 2 renglones */
.person-fact {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person-after {
  margin-top: 10px;
  color: var(--graphite);
  font-size: 0.975rem;
  line-height: 1.5;
  min-height: 3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Ranking */
.rank {
  max-width: var(--max);
  margin: var(--section) auto 0;
  padding: 0 var(--gutter);
}
.rank-head { text-align: center; }
.rank h2 { white-space: nowrap; }
.rank-intro { margin: 20px auto 0; max-width: 46ch; font-size: var(--t-lead); line-height: 1.5; color: var(--graphite); }

.board { margin-top: clamp(40px, 5vw, 64px); display: grid; gap: 16px; }
.leader {
  display: grid;
  grid-template-columns: clamp(56px, 8vw, 112px) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  padding: clamp(24px, 3vw, 36px) clamp(20px, 3vw, 40px);
  border: 1px solid #dedede;
  border-radius: 14px;
  transition: border-color .2s;
}
a.leader:hover { border-color: #a8a8a8; }
.leader-pos {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 9vw, 8rem);
  line-height: 0.8;
  letter-spacing: -0.02em;
  text-align: center;
}
/* Puestos libres: mismo formato, contorno punteado */
.leader.free {
  border: 1px dashed #c4c4c4;
  grid-template-columns: clamp(56px, 8vw, 112px) minmax(0, 1fr) clamp(56px, 8vw, 112px);
}
.free-text { text-align: center; }
.free-text .leader-bio { margin-left: auto; margin-right: auto; }
.btn-ghost { background: var(--paper); color: var(--ink); cursor: default; }
.btn-ghost:hover { background: var(--paper); }
.btn small { font-size: 0.75rem; font-weight: 500; padding: 4px 9px; border-radius: 999px; background: var(--fog); color: var(--graphite); }
.avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 1.8rem;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.avatar.xl { width: clamp(76px, 9vw, 120px); height: clamp(76px, 9vw, 120px); font-size: clamp(2rem, 4vw, 3.2rem); }
.leader-name { font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.018em; }
.leader-bio { margin-top: 10px; color: var(--graphite); max-width: 46ch; }
.leader-side { text-align: right; display: grid; justify-items: end; gap: 16px; }
.leader-count { font-size: 0.95rem; color: var(--graphite); }
.leader-count b { display: block; font-family: var(--serif); font-weight: 400; font-size: 3rem; line-height: 1; color: var(--ink); }


/* Cierre */
/* Cierre: la misma cabra, ahora al atardecer, a todo el ancho */
.closing {
  position: relative;
  margin-top: var(--section);
  text-align: center;
  /* Continúa el lavanda del borde de arriba de la foto */
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.012), rgba(255, 255, 255, 0.03) 50%, rgba(0, 0, 0, 0.012)),
    linear-gradient(to bottom, #9585cc 0%, #ad98d5 55%, #c9aad3 100%);
}
/* Mismo grano que el hero */
.closing::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: 0.32;
}
.closing-copy {
  position: relative;
  z-index: 1;
  padding: clamp(64px, 8vw, 120px) var(--gutter) 0;
}
.closing h2 { max-width: 14ch; margin: 0 auto; }
.closing p { margin: 24px auto 0; max-width: 42ch; font-size: var(--t-lead); color: rgba(0, 0, 0, 0.74); }
.closing .hero-actions { margin-top: 32px; }
.closing .btn-ghost { border-color: var(--paper); }
/* Se recorta el cielo vacío de arriba (370 de 941 px) */
.dusk {
  position: relative;
  margin-top: clamp(-96px, -5vw, -28px);
  aspect-ratio: 1672 / 571;
  overflow: hidden;
}
.dusk-canvas {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  aspect-ratio: 1672 / 941;
  transform: translateX(-50%);
  container-type: inline-size;
}
.dusk img {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 39%, rgba(0, 0, 0, .6) 47%, #000 55%);
  mask-image: linear-gradient(to bottom, transparent 39%, rgba(0, 0, 0, .6) 47%, #000 55%);
}
/* Degradado negro sutil abajo: disimula el pasto (queda debajo de la anotación) */
.dusk-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 66%, rgba(0, 0, 0, .16) 81%, rgba(0, 0, 0, .5) 100%);
}
.dusk-note { left: 78%; top: 42%; transform: translateX(-50%) rotate(-6deg) translateY(10px); }
.d-mob { display: none; }
/* Que no herede el estilo de los párrafos del cierre */
.closing .dusk-note { margin: 0; max-width: none; font-size: 2.7cqi; line-height: 1.02; color: var(--ink); }

/* Orden: texto, línea larga con rulo, punta y subrayado en "próximo" */
.dusk.is-in .gl { stroke-dashoffset: 0; }
.dusk.is-in .gl-dusk { transition: stroke-dashoffset 1.3s cubic-bezier(.55, .1, .3, 1) .45s; }
.dusk.is-in .gl-dusk-arrow { transition: stroke-dashoffset .25s ease-out 1.75s; }
.dusk.is-in .goat-note { opacity: 1; transform: translateX(-50%) rotate(-6deg); transition: opacity .6s ease, transform .6s ease; }
.dusk.is-in .goat-word::after { transform: scaleX(1); transition: transform .55s cubic-bezier(.6, .05, .3, 1) 1.1s; }
@media (prefers-reduced-motion: reduce) {
  .dusk-note { transform: translateX(-50%) rotate(-6deg); }
  .dusk.is-in .gl, .dusk.is-in .goat-note, .dusk.is-in .goat-word::after { transition: none; }
}
.foot.foot-tight { margin-top: 0; }

/* Footer */
.foot {
  max-width: var(--max);
  margin: var(--section) auto 0;
  padding: 32px var(--gutter) 40px;
  text-align: center;
}
.foot-brand { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.foot { display: flex; flex-direction: column; align-items: center; gap: 12px; }
/* Crédito chiquito con la foto, lleva al perfil de X */
.credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--graphite);
}
.credit img {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.04);
}
.credit-handle { color: var(--ink); }
.credit:hover .credit-handle { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   PERFIL (compacto: cabecera corta + lista desplegable)
   ============================================================ */
.p-hero, .p-list {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.p-hero { padding-top: clamp(40px, 6vw, 80px); }

/* La foto mide lo mismo que la altura de la mayúscula y se apoya en la línea base del nombre */
.p-id {
  display: flex;
  align-items: baseline;
  gap: 0.18em;
  font-size: clamp(3rem, 7.5vw, 6rem);
}
.p-id .avatar.xl { width: 0.8em; height: 0.8em; font-size: inherit; }
.p-id h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1em;
  line-height: 1;
  letter-spacing: -0.02em;
}
.p-badge {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 500;
}
.p-lead {
  margin-top: 20px;
  max-width: 40ch;
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--graphite);
}

.p-list { margin-top: clamp(48px, 7vw, 88px); }
.p-list h2 { font-weight: 500; font-size: var(--t-body); margin-bottom: 12px; }

/* Cada fracaso es una fila que se despliega */
.fail summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}
.fail summary::-webkit-details-marker { display: none; }
.fail .y { color: var(--graphite); font-size: 0.95rem; }
.fail .n {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.fail .c { color: var(--graphite); font-size: 0.95rem; text-align: right; }
.fail .ic {
  width: 36px; height: 36px;
  border: 1px solid #dedede;
  border-radius: 50%;
  position: relative;
  transition: border-color .2s, background .2s;
}
.fail .ic::before, .fail .ic::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.fail .ic::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .25s ease; }
.fail summary:hover .ic { border-color: #a8a8a8; }
.fail[open] .ic { background: var(--ink); border-color: var(--ink); }
.fail[open] .ic::before, .fail[open] .ic::after { background: var(--paper); }
.fail[open] .ic::after { transform: translate(-50%, -50%) rotate(0deg); }
.fail summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }

/* Apertura suave donde el navegador lo permite */
:root { interpolate-size: allow-keywords; }
.fail::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size .35s ease, content-visibility .35s allow-discrete;
}
.fail[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) {
  .fail::details-content { transition: none; }
}

.fail-body { padding: 4px 56px 40px 84px; }
.fail-line { font-size: var(--t-lead); line-height: 1.45; max-width: 46ch; }
.facts { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 36px; }
.facts div { display: grid; gap: 2px; }
.facts dt { font-size: var(--t-small); color: var(--graphite); }
.facts dd { font-weight: 500; }
.story {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.story h3 { font-weight: 500; font-size: var(--t-body); }
.story p { margin-top: 6px; font-size: 0.975rem; line-height: 1.6; color: #2b2b2b; }

.p-back { margin-top: clamp(40px, 6vw, 72px); text-align: center; }
.p-back .btn { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .story { grid-template-columns: 1fr; gap: 20px; }
  .fail-body { padding-right: 0; }
  .leader { grid-template-columns: auto auto minmax(0, 1fr); }
  .leader-side { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: center; text-align: left; justify-items: start; }
}

@media (max-width: 640px) {
  /* En celular la foto del cierre se recorta centrada, con la cabra y el sol */
  .dusk { aspect-ratio: 4 / 3; }
  .dusk-canvas { width: 145%; left: -14.3%; transform: none; }
  .closing .dusk-note { font-size: 3.7cqi; left: 31%; top: 41%; }
  .d-desk { display: none; }
  .d-mob { display: inline; }
  .goat { aspect-ratio: 1.74; margin-top: 0; }
  .goat-canvas { width: 133.33%; }
  .goat-note { font-size: 3.7cqi; }
  .fail summary {
    grid-template-columns: minmax(0, 1fr) 36px;
    grid-template-areas: "y ic" "n ic" "c ic";
    row-gap: 2px;
  }
  .fail .y { grid-area: y; }
  .fail .n { grid-area: n; }
  .fail .c { grid-area: c; text-align: left; }
  .fail .ic { grid-area: ic; }
  .fail-body { padding: 8px 0 32px; }
  body { font-size: 1rem; }
  .person { width: clamp(270px, 78vw, 300px); }
  .leader { grid-template-columns: auto minmax(0, 1fr); }
  .leader.free { grid-template-columns: auto minmax(0, 1fr) 24px; }
  .leader .avatar { display: none; }

}
