/* ==========================================================================
   Jorge Puflea · Sin fronteras — tokens.css
   Sistema GOLD (navy profundo + oro). Fuente única de variables, base y
   componentes compartidos. Las secciones NO redefinen colores: cambian de
   tema con data-tema="sepia|fuego|claro" en su <section>.

   Fuentes (pegar en <head>, antes de este archivo):
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..600&family=Inter:wght@400..600&display=swap" rel="stylesheet">

   Contraste WCAG (calculado, relación de luminancia):
   - crema #F4EBDD sobre navy #0B1530 ........ 15.3 : 1  (AAA)
   - niebla #B7BED2 sobre navy #0B1530 ........ 9.7 : 1  (AAA)  texto secundario
   - niebla-2 #93A0BF sobre navy-2 #111D3D .... 6.3 : 1  (AA)   metadatos
   - oro #C9A24A sobre navy #0B1530 ........... 7.5 : 1  (AAA)
   - oro #C9A24A sobre navy-2 #111D3D ......... 6.9 : 1  (AA)
   - oro claro #E6C77A sobre navy ............. 11.0 : 1 (AAA)
   - tinta #0A0F1F sobre crema #F4EBDD ........ 16.1 : 1 (AAA)
   - pizarra #4A5068 sobre crema .............. 6.7 : 1  (AA)
   - oro-texto #7A5C17 sobre crema ............ 5.3 : 1  (AA)   ← el oro #C9A24A NO va como texto sobre crema
   - sepia: #2B2418 / #5E4220 / #7A4E16 sobre #EADBC0 = 11.3 / 6.8 / 5.3 : 1
   - fuego: crema / #C9B8A6 / ámbar #F2A23A sobre brasa #1A0E0A = 16.0 / 9.8 / 9.0 : 1
   - navy #0B1530 sobre botón oro #C9A24A ..... 7.5 : 1
   Regla: --acento-texto es el ÚNICO acento válido para texto < 24px.
   ========================================================================== */

:root {
  /* ---------- Paleta GOLD ---------- */
  --navy: #0B1530;
  --navy-2: #111D3D;
  --navy-3: #1A2850;          /* superficies elevadas, bordes */
  --tinta: #0A0F1F;           /* negro azulado, hero/cierre */
  --oro: #C9A24A;
  --oro-claro: #E6C77A;
  --oro-texto: #7A5C17;       /* oro oscurecido para texto sobre crema */
  --oro-brillo: #F6E3A8;      /* destellos, trazo SVG en su punta */
  --crema: #F4EBDD;
  --crema-2: #EADFCB;         /* tarjetas sobre crema */
  --niebla: #B7BED2;          /* texto secundario sobre navy */
  --niebla-2: #93A0BF;        /* metadatos sobre navy-2 */
  --pizarra: #4A5068;         /* texto secundario sobre crema */

  /* Sepia (1920) */
  --sepia-papel: #EADBC0;
  --sepia-papel-2: #DFCBA6;
  --sepia-tinta: #2B2418;
  --sepia-cafe: #5E4220;
  --sepia-acento: #7A4E16;

  /* Fuego (coach) */
  --brasa: #1A0E0A;
  --brasa-2: #2A160E;
  --brasa-3: #3A1E12;
  --ambar: #F2A23A;
  --llama: #FF7A3D;
  --ceniza: #C9B8A6;

  /* ---------- Rol semántico (tema por defecto = navy) ---------- */
  --bg: var(--navy);
  --bg-alt: var(--navy-2);
  --superficie: var(--navy-2);
  --superficie-2: var(--navy-3);
  --texto: var(--crema);
  --texto-suave: var(--niebla);
  --texto-meta: var(--niebla-2);
  --acento: var(--oro);
  --acento-2: var(--oro-claro);
  --acento-texto: var(--oro);
  --linea: rgba(201, 162, 74, 0.22);
  --linea-fuerte: rgba(201, 162, 74, 0.55);
  --velo: rgba(10, 15, 31, 0.72);       /* sobre imágenes de fondo */
  --sobre-acento: var(--navy);          /* texto encima de relleno oro */
  --foco: var(--oro-claro);

  /* ---------- Tipografía ---------- */
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala fluida (min @360px → max @1440px) */
  --t-xs:   clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);  /* 12 → 13  fuentes, leyendas */
  --t-sm:   clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);  /* 14 → 15  meta, chips */
  --t-base: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);      /* 16 → 18  cuerpo */
  --t-lg:   clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);  /* 18 → 22  bajada */
  --t-xl:   clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);    /* 22 → 30  subtítulo */
  --t-2xl:  clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);      /* 28 → 44  titular sección */
  --t-3xl:  clamp(2.25rem, 1.6rem + 3vw, 4.25rem);        /* 36 → 68  titular grande */
  --t-4xl:  clamp(2.75rem, 1.7rem + 4.8vw, 6.5rem);       /* 44 → 104 hero / contador */
  --t-5xl:  clamp(3.5rem, 1.8rem + 8vw, 10rem);           /* 56 → 160 año gigante (1920, 2013) */

  --lh-tight: 1.02;
  --lh-titular: 1.08;
  --lh-sub: 1.25;
  --lh-texto: 1.6;
  --track-eyebrow: 0.18em;
  --track-display: -0.02em;
  --medida: 62ch;             /* ancho máximo de párrafo */

  /* ---------- Espaciado (base 4px, fluido en lo grande) ---------- */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 0.75rem;
  --e-4: 1rem;
  --e-5: 1.5rem;
  --e-6: 2rem;
  --e-7: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  --e-8: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --e-9: clamp(5rem, 3rem + 8vw, 10rem);   /* padding vertical de sección */
  --gutter: 16px;                          /* móvil; sube en breakpoints */
  --ancho-max: 1280px;
  --ancho-texto: 720px;

  /* ---------- Radios ---------- */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* ---------- Sombras ---------- */
  --sombra-1: 0 1px 2px rgba(5, 8, 18, 0.4), 0 2px 8px rgba(5, 8, 18, 0.25);
  --sombra-2: 0 10px 30px -8px rgba(5, 8, 18, 0.6), 0 2px 6px rgba(5, 8, 18, 0.3);
  --sombra-3: 0 30px 80px -20px rgba(5, 8, 18, 0.75);
  --sombra-oro: 0 0 0 1px rgba(201, 162, 74, 0.35), 0 12px 40px -12px rgba(201, 162, 74, 0.35);
  --sombra-papel: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 18px 40px -18px rgba(43, 36, 24, 0.45);

  /* ---------- Movimiento ---------- */
  --ease-salida: cubic-bezier(0.16, 1, 0.3, 1);      /* expo.out — reveals */
  --ease-entrada: cubic-bezier(0.7, 0, 0.84, 0);     /* expo.in — salidas */
  --ease-suave: cubic-bezier(0.65, 0, 0.35, 1);      /* inOut — transiciones de tema */
  --ease-resorte: cubic-bezier(0.34, 1.56, 0.64, 1); /* micro, hover de prueba */
  --d-micro: 160ms;
  --d-corta: 320ms;
  --d-media: 640ms;
  --d-larga: 1100ms;
  --d-cine: 1800ms;
  /* Equivalentes GSAP: "expo.out", "expo.in", "power2.inOut", "back.out(1.6)" */

  /* ---------- Capas ---------- */
  --z-fondo: -1;
  --z-base: 1;
  --z-pin: 10;
  --z-nav: 50;
  --z-visor: 100;

  color-scheme: dark;
}

@media (min-width: 640px)  { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }
@media (min-width: 1440px) { :root { --gutter: 64px; } }

/* ---------- Temas por sección ---------- */
[data-tema="navy-2"] {
  --bg: var(--navy-2);
  --bg-alt: var(--navy);
  --superficie: var(--navy-3);
  --texto-meta: var(--niebla-2);
}

[data-tema="claro"] {
  --bg: var(--crema);
  --bg-alt: var(--crema-2);
  --superficie: #FBF6EE;
  --superficie-2: var(--crema-2);
  --texto: var(--tinta);
  --texto-suave: var(--pizarra);
  --texto-meta: var(--pizarra);
  --acento: var(--oro);
  --acento-2: var(--oro-texto);
  --acento-texto: var(--oro-texto);
  --linea: rgba(10, 15, 31, 0.12);
  --linea-fuerte: rgba(122, 92, 23, 0.5);
  --velo: rgba(244, 235, 221, 0.8);
  --sobre-acento: var(--tinta);
  --foco: var(--navy);
  color-scheme: light;
}

[data-tema="sepia"] {
  --bg: var(--sepia-papel);
  --bg-alt: var(--sepia-papel-2);
  --superficie: #F1E5CF;
  --superficie-2: var(--sepia-papel-2);
  --texto: var(--sepia-tinta);
  --texto-suave: var(--sepia-cafe);
  --texto-meta: var(--sepia-cafe);
  --acento: #A87A2E;
  --acento-2: var(--sepia-acento);
  --acento-texto: var(--sepia-acento);
  --linea: rgba(43, 36, 24, 0.16);
  --linea-fuerte: rgba(122, 78, 22, 0.55);
  --velo: rgba(234, 219, 192, 0.78);
  --sobre-acento: var(--sepia-papel);
  --foco: var(--sepia-tinta);
  color-scheme: light;
}

[data-tema="fuego"] {
  --bg: var(--brasa);
  --bg-alt: var(--brasa-2);
  --superficie: var(--brasa-2);
  --superficie-2: var(--brasa-3);
  --texto: var(--crema);
  --texto-suave: var(--ceniza);
  --texto-meta: var(--ceniza);
  --acento: var(--ambar);
  --acento-2: var(--llama);
  --acento-texto: var(--ambar);
  --linea: rgba(242, 162, 58, 0.22);
  --linea-fuerte: rgba(242, 162, 58, 0.6);
  --velo: rgba(26, 14, 10, 0.72);
  --sobre-acento: var(--tinta);
  --foco: var(--ambar);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--tinta);
  overflow-x: clip;               /* nunca scroll horizontal */
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);        /* fondo explícito */
  color: var(--crema);
  font-family: var(--f-texto);
  font-size: var(--t-base);
  line-height: var(--lh-texto);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
img { font-style: italic; background-repeat: no-repeat; background-size: cover; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--acento); }

::selection { background: var(--oro); color: var(--navy); }
[data-tema="fuego"] ::selection { background: var(--ambar); color: var(--brasa); }
[data-tema="sepia"] ::selection { background: var(--sepia-acento); color: var(--sepia-papel); }

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

/* Toda <section> con tema aplica sus tokens */
[data-tema], .seccion {
  background-color: var(--bg);
  color: var(--texto);
}

/* Lenis (sustituye lenis.css) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ==========================================================================
   Utilidades de layout
   ========================================================================== */
.contenedor {
  width: 100%;
  max-width: calc(var(--ancho-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.contenedor--texto { max-width: calc(var(--ancho-texto) + var(--gutter) * 2); }

.seccion {
  position: relative;
  padding-block: var(--e-9);
  isolation: isolate;
}
.seccion--pantalla { min-height: 100svh; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.salto {
  position: absolute; left: var(--gutter); top: -100px;
  z-index: var(--z-visor);
  padding: var(--e-2) var(--e-4);
  background: var(--oro); color: var(--navy);
  border-radius: var(--r-sm); font-weight: 600;
}
.salto:focus-visible { top: var(--e-4); }

/* Imagen a sangre con velo para legibilidad */
.fondo-imagen {
  position: absolute; inset: 0; z-index: var(--z-fondo);
  overflow: hidden;
}
.fondo-imagen > img { width: 100%; height: 100%; object-fit: cover; }
.fondo-imagen::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 22%, transparent 60%, var(--bg) 100%),
    linear-gradient(90deg, var(--velo) 0%, transparent 70%);
}

/* Grano de película (añadir .grano a la sección; puramente decorativo) */
.grano { position: relative; overflow: clip; }
.grano::before {
  content: ""; position: absolute; inset: -50%;
  pointer-events: none; z-index: var(--z-pin);
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-tema="sepia"].grano::before { opacity: 0.14; mix-blend-mode: multiply; }

/* Retrato recortado sobre fondo negro (jorge-guia / jorge-traje):
   el negro se funde con navy/brasa; el borde inferior se desvanece. */
.retrato-fundido {
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}

/* ==========================================================================
   Componentes
   ========================================================================== */

/* .eyebrow — rótulo superior de sección. Línea dorada + versalitas.
   <p class="eyebrow">El salto · 2013</p>
   Modificador: .eyebrow--sin-linea */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--e-3);
  font-family: var(--f-texto);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--acento-texto);
  margin-bottom: var(--e-4);
}
.eyebrow::before {
  content: ""; width: 2.25rem; height: 1px;
  background: currentColor; opacity: 0.8;
  transform-origin: left center;
}
.eyebrow--sin-linea::before { display: none; }

/* .titular — display serif. Para reveal por líneas, envolver cada línea:
   <h2 class="titular"><span class="linea"><span>Quitarle fronteras</span></span>…</h2>
   JS anima `.linea > span` de yPercent:110 → 0 (stagger 0.08, expo.out).
   Tamaños: --md (sección, por defecto), --lg, --xl (hero), --anio (año gigante).
   <em> dentro = itálica dorada (acento). */
.titular {
  font-family: var(--f-display);
  font-size: var(--t-2xl);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  line-height: var(--lh-titular);
  letter-spacing: var(--track-display);
  color: var(--texto);
  text-wrap: balance;
  margin-bottom: var(--e-5);
}
.titular--lg { font-size: var(--t-3xl); }
.titular--xl { font-size: var(--t-4xl); line-height: var(--lh-tight); font-weight: 350; }
.titular--anio {
  font-size: var(--t-5xl); line-height: 0.9; font-weight: 300;
  font-variant-numeric: lining-nums;
  color: var(--acento-texto);
}
.titular em {
  font-style: italic; font-weight: 300;
  color: var(--acento-texto);
}
.titular .linea { display: block; overflow: hidden; padding-bottom: 0.06em; }
.titular .linea > span { display: inline-block; will-change: transform; }

/* .bajada — párrafo de entrada (lead). Máx. 62ch.
   <p class="bajada">…</p>  Modificador .bajada--cita (itálica serif) */
.bajada {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--texto-suave);
  max-width: var(--medida);
  text-wrap: pretty;
}
.bajada + .bajada { margin-top: var(--e-4); }
.bajada strong { color: var(--texto); font-weight: 600; }
.bajada--cita {
  font-family: var(--f-display);
  font-style: italic;
  font-size: var(--t-xl);
  line-height: var(--lh-sub);
  color: var(--texto);
}

/* .fuente — pie de fuente con ícono de documento. Obligatorio bajo cada dato.
   <p class="fuente">Forbes México, mar–abr 2015, p. 177 (Brand Voice)</p>
   Como enlace: <a class="fuente" href="…" target="_blank" rel="noopener">…</a> */
.fuente {
  display: inline-flex; align-items: flex-start; gap: 0.5em;
  font-size: var(--t-xs);
  line-height: 1.45;
  color: var(--texto-meta);
  letter-spacing: 0.01em;
  margin-top: var(--e-3);
  text-decoration: none;
}
.fuente::before {
  content: ""; flex: none;
  width: 1em; height: 1.2em; margin-top: 0.08em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 1.8h9.5L17 6.3v15.9H3z'/%3E%3Cpath d='M12.5 1.8v4.5H17M6.5 11h7M6.5 14.5h7M6.5 18h4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 1.8h9.5L17 6.3v15.9H3z'/%3E%3Cpath d='M12.5 1.8v4.5H17M6.5 11h7M6.5 14.5h7M6.5 18h4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.fuente:hover { color: var(--acento-texto); text-decoration: underline; }

/* .prueba — tarjeta de evidencia que abre el .visor. SIEMPRE <button>.
   <button class="prueba" type="button" data-visor-src="web/prensa/acervo-p14.webp"
           data-visor-leyenda="Forbes México, mar–abr 2015, p. 177 (Brand Voice)"
           aria-haspopup="dialog">
     <span class="prueba__marco"><img src="…" alt="Página de Forbes México con la nota StartBlueUp" loading="lazy"></span>
     <span class="prueba__meta">
       <span class="prueba__medio">Forbes México</span>
       <span class="prueba__fecha">mar–abr 2015</span>
     </span>
     <span class="prueba__ver">Ver documento</span>
   </button>
   Modificadores: .prueba--papel (marco blanco con sombra de papel, para recortes y diplomas),
   .prueba--horizontal (thumb izq + meta der en ≥640px). */
.prueba {
  position: relative;
  display: flex; flex-direction: column; gap: var(--e-3);
  width: 100%;
  padding: var(--e-3);
  text-align: left;
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  box-shadow: var(--sombra-1);
  color: var(--texto);
  transition:
    transform var(--d-corta) var(--ease-salida),
    box-shadow var(--d-corta) var(--ease-salida),
    border-color var(--d-corta) var(--ease-salida);
}
.prueba__marco {
  display: block; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
}
.prueba__marco img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform var(--d-media) var(--ease-salida);
}
.prueba__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--e-1) var(--e-3); }
.prueba__medio { font-family: var(--f-display); font-size: var(--t-lg); line-height: 1.2; }
.prueba__fecha { font-size: var(--t-sm); color: var(--texto-meta); font-variant-numeric: tabular-nums; }
.prueba__ver {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-size: var(--t-xs); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--acento-texto);
}
.prueba__ver::after {
  content: ""; width: 0.9em; height: 0.9em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M9.5 2.5h4v4M13.5 2.5 8 8M6.5 3.5H2.5v10h10v-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M9.5 2.5h4v4M13.5 2.5 8 8M6.5 3.5H2.5v10h10v-4'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--d-corta) var(--ease-resorte);
}
@media (hover: hover) {
  .prueba:hover {
    transform: translateY(-4px);
    border-color: var(--linea-fuerte);
    box-shadow: var(--sombra-oro);
  }
  .prueba:hover .prueba__marco img { transform: scale(1.04); }
  .prueba:hover .prueba__ver::after { transform: translate(2px, -2px); }
}
.prueba:active { transform: translateY(-1px) scale(0.99); }
.prueba--papel .prueba__marco {
  background: #FBF7EF;
  padding: var(--e-2);
  box-shadow: var(--sombra-papel);
}
.prueba--papel .prueba__marco img { object-fit: contain; }
@media (min-width: 640px) {
  .prueba--horizontal { flex-direction: row; align-items: stretch; }
  .prueba--horizontal .prueba__marco { width: 38%; flex: none; }
  .prueba--horizontal > :not(.prueba__marco) { align-self: center; }
}

/* .chip — etiqueta compacta (país, año, rol).
   <span class="chip">México</span>  Modificadores: .chip--solido, .chip--pendiente */
.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.3em 0.85em;
  font-size: var(--t-sm); font-weight: 500;
  line-height: 1.3;
  color: var(--texto);
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.chip--solido { background: var(--acento); color: var(--sobre-acento); border-color: transparent; }
.chip--pendiente { border-style: dashed; color: var(--texto-meta); }
.chips { display: flex; flex-wrap: wrap; gap: var(--e-2); }

/* .linea-tiempo + .hito — línea de tiempo vertical (móvil) / con riel animable.
   <ol class="linea-tiempo" role="list">
     <li class="hito">
       <span class="hito__anio">2018</span>
       <div class="hito__cuerpo">
         <p class="hito__texto">Softlanding a Chile: 11 startups…</p>
         <p class="fuente">Expansión, 21-sep-2018</p>
       </div>
     </li>
   </ol>
   .linea-tiempo__progreso (opcional, primer hijo): riel dorado que JS escala en Y con scrub.
   .hito.is-activo: punto encendido (JS lo agrega al cruzar el centro). */
.linea-tiempo {
  position: relative;
  display: grid; gap: var(--e-6);
  padding-left: var(--e-6);
  list-style: none; margin: 0;
}
.linea-tiempo::before,
.linea-tiempo__progreso {
  content: ""; position: absolute;
  left: 5px; top: 0.6em; bottom: 0.6em; width: 1px;
  background: var(--linea);
}
.linea-tiempo__progreso {
  background: linear-gradient(180deg, var(--acento-2), var(--acento));
  transform-origin: top center;
  transform: scaleY(0);
}
.hito { position: relative; display: grid; gap: var(--e-1); }
.hito::before {
  content: ""; position: absolute;
  left: calc(var(--e-6) * -1); top: 0.55em;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--linea-fuerte);
  transition: background var(--d-corta), box-shadow var(--d-corta), border-color var(--d-corta);
}
.hito.is-activo::before {
  background: var(--acento);
  border-color: var(--acento);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--acento) 22%, transparent);
}
.hito__anio {
  font-family: var(--f-display);
  font-size: var(--t-xl);
  line-height: 1.1;
  color: var(--acento-texto);
  font-variant-numeric: lining-nums tabular-nums;
}
.hito__texto { color: var(--texto); max-width: var(--medida); }
@media (min-width: 900px) {
  .hito { grid-template-columns: 9rem 1fr; gap: var(--e-5); align-items: baseline; }
}

/* .contador — cifra grande animable. JS lee data-hasta y anima el texto de .contador__num.
   <div class="contador">
     <span class="contador__num" data-desde="0" data-hasta="300">300</span><span class="contador__sufijo">+</span>
     <p class="contador__etiqueta">emprendedores acompañados en IPADE</p>
   </div>
   El HTML lleva el valor FINAL (sin JS / reduced-motion se ve correcto).
   .contador__prefijo para "$", "USD". Modificador .contador--compacto. */
.contador {
  display: flex; flex-wrap: wrap; align-items: baseline;
  column-gap: 0.08em;
  font-family: var(--f-display);
  color: var(--texto);
}
.contador__num,
.contador__prefijo,
.contador__sufijo {
  font-size: var(--t-4xl);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums tabular-nums;
}
.contador__prefijo, .contador__sufijo { color: var(--acento-texto); font-size: calc(var(--t-4xl) * 0.6); }
.contador__etiqueta {
  flex-basis: 100%;
  margin-top: var(--e-2);
  font-family: var(--f-texto);
  font-size: var(--t-sm);
  line-height: 1.45;
  color: var(--texto-suave);
  max-width: 26ch;
}
.contador--compacto .contador__num { font-size: var(--t-3xl); }
.contadores {
  display: grid; gap: var(--e-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}

/* .visor — lightbox de documentos sobre <dialog> (foco atrapado y Esc nativos).
   <dialog class="visor" aria-labelledby="visor-titulo">
     <div class="visor__barra">
       <p class="visor__titulo" id="visor-titulo">Forbes México · 2015</p>
       <button class="visor__cerrar" type="button" aria-label="Cerrar documento">×</button>
     </div>
     <figure class="visor__figura">
       <img class="visor__img" src="" alt="">
       <figcaption class="visor__leyenda">…</figcaption>
     </figure>
     <button class="visor__nav visor__nav--prev" aria-label="Documento anterior">‹</button>
     <button class="visor__nav visor__nav--next" aria-label="Documento siguiente">›</button>
   </dialog>
   JS: dialog.showModal(); al cerrar devolver foco al .prueba que lo abrió; lenis.stop()/start().
   La imagen hace zoom con click/doble tap (.visor__img.is-zoom). */
.visor {
  width: 100%; height: 100%;
  max-width: 100vw; max-height: 100dvh;
  margin: 0; padding: 0;
  border: 0;
  background: transparent;
  color: var(--crema);
  overflow: hidden;
}
.visor[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);   /* el diálogo nunca más ancho que la pantalla */
  animation: visor-entra var(--d-corta) var(--ease-salida);
}
.visor::backdrop {
  background: rgba(6, 9, 20, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.visor__barra {
  display: flex; align-items: center; justify-content: space-between; gap: var(--e-4);
  padding: var(--e-3) var(--gutter);
  border-bottom: 1px solid rgba(201, 162, 74, 0.2);
}
.visor__titulo { font-family: var(--f-display); font-size: var(--t-lg); min-width: 0; overflow-wrap: anywhere; }
.visor__cerrar,
.visor__nav {
  display: grid; place-items: center;
  width: 44px; height: 44px;           /* objetivo táctil mínimo */
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 74, 0.45);
  color: var(--oro-claro);
  font-size: 1.5rem; line-height: 1;
  background: rgba(11, 21, 48, 0.7);
  transition: background var(--d-micro), color var(--d-micro);
}
.visor__cerrar:hover, .visor__nav:hover { background: var(--oro); color: var(--navy); }
.visor__figura {
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--e-3);
  grid-template-columns: minmax(0, 1fr);   /* la columna mide la pantalla, no el ancho natural de la foto */
  min-height: 0; min-width: 0;
  padding: var(--e-4) var(--gutter) var(--e-5);
  overflow: auto;
  overscroll-behavior: contain;
}
.visor__img {
  justify-self: center; align-self: center;
  max-height: 100%; width: auto; max-width: 100%; height: auto;
  min-width: 0; min-height: 0;
  object-fit: contain;
  background: #FBF7EF;
  box-shadow: var(--sombra-3);
  cursor: zoom-in;
}
.visor__img.is-zoom { max-height: none; max-width: none; width: 180%; cursor: zoom-out; }
.visor__leyenda { text-align: center; font-size: var(--t-sm); color: var(--niebla); }
.visor__nav {
  position: fixed; top: 50%; transform: translateY(-50%);
}
.visor__nav--prev { left: var(--e-3); }
.visor__nav--next { right: var(--e-3); }
.visor__nav[hidden] { display: none; }
@keyframes visor-entra { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }

/* .leyenda — rótulo sobre/junto a una imagen. Obligatorio en:
   ilustraciones (vuelo-1920, escenas, coach) y diploma restaurado.
   <figcaption class="leyenda">Ilustración</figcaption>
   <p class="leyenda leyenda--sello">Restauración digital · <a href="…original.webp">ver original</a></p>
   .leyenda--sobre: posicionada en la esquina inferior izquierda de un contenedor relativo. */
.leyenda {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  color: var(--texto-meta);
  margin-top: var(--e-2);
}
.leyenda--sello {
  padding: 0.25em 0.7em;
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--r-pill);
  color: var(--acento-texto);
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
}
.leyenda--sobre {
  position: absolute; left: var(--e-3); bottom: var(--e-3); margin: 0;
  padding: 0.25em 0.7em;
  background: rgba(10, 15, 31, 0.7);
  color: var(--crema);
  border-radius: var(--r-xs);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.leyenda a { color: inherit; }

/* .grid-muro — muro de reconocimientos (masonry por columnas CSS).
   <ul class="grid-muro" role="list"><li><button class="prueba prueba--papel">…</button></li>…</ul>
   1 col <480 · 2 col ≥480 · 3 col ≥900 · 4 col ≥1280.
   Cada <li> recibe --i (índice) para stagger: style="--i:3". */
.grid-muro {
  columns: 1;
  column-gap: var(--e-4);
  list-style: none; margin: 0; padding: 0;
}
.grid-muro > * {
  break-inside: avoid;
  margin-bottom: var(--e-4);
}
.grid-muro .prueba__marco { aspect-ratio: auto; }
.grid-muro .prueba__marco img { height: auto; }
@media (min-width: 480px)  { .grid-muro { columns: 2; } }
@media (min-width: 900px)  { .grid-muro { columns: 3; column-gap: var(--e-5); } .grid-muro > * { margin-bottom: var(--e-5); } }
@media (min-width: 1280px) { .grid-muro { columns: 4; } }

/* .marquesina — cinta infinita (escenarios, medios). Duplicar el contenido UNA vez,
   el duplicado con aria-hidden="true".
   <div class="marquesina" style="--duracion:40s">
     <ul class="marquesina__pista" role="list">
       <li class="marquesina__item">Campus Party México</li> …  (×2, segunda mitad aria-hidden)
     </ul>
   </div>
   .marquesina--inversa invierte dirección. Pausa en hover/focus. Nunca desborda la página. */
.marquesina {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquesina__pista {
  display: flex; width: max-content;
  gap: var(--e-6);
  list-style: none; margin: 0; padding: var(--e-3) 0;
  animation: marquesina var(--duracion, 40s) linear infinite;
}
.marquesina--inversa .marquesina__pista { animation-direction: reverse; }
.marquesina:hover .marquesina__pista,
.marquesina:focus-within .marquesina__pista { animation-play-state: paused; }
.marquesina__item {
  display: inline-flex; align-items: center; gap: var(--e-6);
  font-family: var(--f-display);
  font-size: var(--t-xl);
  font-style: italic;
  white-space: nowrap;
  color: var(--texto-suave);
}
.marquesina__item::after {
  content: ""; width: 6px; height: 6px; transform: rotate(45deg);
  background: var(--acento);
}
@keyframes marquesina { to { transform: translate3d(-50%, 0, 0); } }

/* .cita-firma — frase de cierre / Reforma (sin comillas tipográficas falsas). */
.cita-firma {
  font-family: var(--f-display);
  font-size: var(--t-3xl);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
.cita-firma em { color: var(--acento-texto); }

/* ---------- Estado inicial para reveals (solo si JS cargó) ----------
   El JS pone html.js al arrancar. Sin JS todo es visible. */
html.js [data-reveal] { opacity: 0; transform: translate3d(0, 24px, 0); }
html.js [data-reveal].is-visto {
  opacity: 1; transform: none;
  transition: opacity var(--d-media) var(--ease-salida), transform var(--d-larga) var(--ease-salida);
  transition-delay: calc(var(--i, 0) * 60ms);
}

/* ==========================================================================
   Movimiento reducido: sin animaciones, sin scroll suave, todo visible.
   El JS además debe saltarse ScrollTrigger y Lenis con
   matchMedia('(prefers-reduced-motion: reduce)').
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .titular .linea > span { transform: none !important; }
  .linea-tiempo__progreso { transform: scaleY(1); }
  .marquesina { -webkit-mask-image: none; mask-image: none; }
  .marquesina__pista { animation: none; flex-wrap: wrap; width: auto; }
  .marquesina__pista > [aria-hidden="true"] { display: none; }
  .prueba:hover { transform: none; }
}

/* Impresión: fondo claro legible */
@media print {
  body, [data-tema], .seccion { background: #fff !important; color: #000 !important; }
  .marquesina, .visor, .grano::before { display: none !important; }
}
