/* ============================================================
   DailyPeru — sistema editorial cinematográfico
   Tipos: Archivo (grotesca, UI) · Newsreader (serif de lectura)
   ============================================================ */

:root {
  --accent:     #e2673a;   /* terracota, único acento */
  --accent-soft:#ef8a5c;

  --maxw: 1240px;
  --measure: 40rem;
  --r: 5px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --f-sans: "Archivo", system-ui, sans-serif;
  --f-serif: "Newsreader", Georgia, serif;

  --hero-img-filter: grayscale(0.72) contrast(1.08) brightness(0.92);
}

/* Tema OSCURO (por defecto) */
:root,
[data-theme="dark"] {
  --ink:        #0b0f18;
  --ink-2:      #0e131e;
  --ink-panel:  #131a28;
  --ink-hover:  #1a2334;
  --paper:      #f0ebe1;
  --paper-soft: #c9cdd6;
  --muted:      #8b95a6;
  --muted-dim:  #626b7b;
  --line:       rgba(240, 235, 225, 0.13);
  --line-soft:  rgba(240, 235, 225, 0.07);
  --header-bg:  rgba(11, 15, 24, 0.72);
  --footer-bg:  #080b12;
  --accent-soft:#ef8a5c;
  --grain-opacity: 0.05;
}

/* Tema CLARO (papel editorial) */
[data-theme="light"] {
  --ink:        #f6f2e9;
  --ink-2:      #f1ece0;
  --ink-panel:  #ece5d6;
  --ink-hover:  #e6ddca;
  --paper:      #17191f;
  --paper-soft: #454a54;
  --muted:      #756f61;
  --muted-dim:  #a49d8c;
  --line:       rgba(23, 25, 31, 0.15);
  --line-soft:  rgba(23, 25, 31, 0.08);
  --header-bg:  rgba(246, 242, 233, 0.75);
  --footer-bg:  #efe8d8;
  --accent-soft:#c1531f;
  --grain-opacity: 0.035;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* ---- grano de película ---- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* ---- barra de progreso de lectura ---- */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  z-index: 80;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
body.is-article .read-progress { opacity: 1; }

/* ---- transición entre vistas ---- */
.route-anim {
  animation: routeIn 0.5s var(--ease-out) both;
}
@keyframes routeIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ============================================================ HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 68px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark { display: inline-flex; align-items: center; gap: 11px; }
.dp-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: none;
  background: var(--accent); color: #fff;
  font-family: var(--f-sans); font-weight: 800; font-size: 0.82rem;
  letter-spacing: -0.04em;
  border-radius: 7px;
  box-shadow: 0 4px 14px -6px var(--accent);
}
.wordmark-text {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: 1.34rem;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.header-right { display: flex; align-items: center; gap: 12px; }
.site-nav {
  display: flex; align-items: center; gap: 2px;
  font-family: var(--f-sans);
  font-size: 0.9rem; font-weight: 500;
}
.site-nav a {
  position: relative;
  padding: 8px 13px;
  color: var(--paper-soft);
  border-radius: var(--r);
  transition: color 0.2s var(--ease);
}
.site-nav a:hover { color: var(--paper); }
.site-nav a.active { color: var(--paper); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 3px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.32s var(--ease);
}
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a.active::after { transform: scaleX(1); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}
.theme-toggle:hover { border-color: var(--paper-soft); background: var(--ink-hover); }
.theme-toggle:active { transform: scale(0.92); }
.theme-glyph {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
}

/* ============================================================ LAYOUT */
main { flex: 1 0 auto; outline: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 30px; }

.kicker {
  font-family: var(--f-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

/* botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-sans); font-weight: 600; font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  will-change: transform;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 30px -10px var(--accent); }
.btn-primary:hover { background: var(--accent-soft); box-shadow: 0 14px 40px -12px var(--accent); }
.btn-ghost { color: var(--paper); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--paper); background: color-mix(in srgb, var(--paper) 6%, transparent); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }

/* ============================================================
   HERO CINEMATOGRÁFICO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: -68px;      /* pasa por debajo del header translúcido */
  padding-top: 68px;
}
html.flat .hero { min-height: 600px; }
html.flat .manifesto { padding: 80px 0 70px; }
html.flat .featured { padding-top: 20px; }
html.flat .index-section { padding: 70px 0 80px; }
html.flat .article-hero { height: 460px; min-height: 0; }
html.flat .ba-section, html.flat .stats, html.flat .map-section,
html.flat .timeline-section, html.flat .footer-cta { padding-top: 56px; padding-bottom: 56px; }
.hero-stage { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: var(--hero-img-filter);
  opacity: 0;
  transform: scale(1.12);
  animation: heroKen 20s linear infinite;
  will-change: transform, opacity;
}
.hero-slide.active { opacity: 1; transition: opacity 1.6s var(--ease); }
@keyframes heroKen {
  from { transform: scale(1.08) translate(0, 0); }
  to   { transform: scale(1.2) translate(-2%, -2%); }
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(6,8,13,0.62) 0%, rgba(6,8,13,0.30) 32%, rgba(6,8,13,0.55) 68%, var(--ink) 100%),
    radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(6,8,13,0.5) 100%);
}

.hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 30px 8vh;
}
.hero .kicker { color: #f0b79c; }
.hero h1 {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 20px 0 0;
  max-width: 16ch;
  color: #fbf7ef;
}
.hero h1 em { font-style: italic; color: var(--accent-soft); }
.hero-lead {
  margin: 28px 0 0;
  max-width: 40ch;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.5;
  color: #d9d4c9;
}
.hero-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

/* headline cinético: palabra por palabra */
.kin { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.18em 0 0.14em; margin: -0.18em 0 -0.14em; }
.kin > span {
  display: inline-block;
  transform: translateY(110%);
  animation: kinUp 0.9s var(--ease-out) forwards;
}
@keyframes kinUp { to { transform: translateY(0); } }

/* progreso de slides del hero */
.hero-ticks {
  position: absolute; z-index: 2;
  right: 30px; bottom: 8vh;
  display: flex; gap: 8px;
}
.hero-ticks span {
  width: 26px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.28);
  overflow: hidden;
}
.hero-ticks span.on { background: rgba(255,255,255,0.9); }

/* ============================================================
   SECCIÓN MANIFIESTO (tipografía grande)
   ============================================================ */
.manifesto { padding: 16vh 0 12vh; }
.manifesto p {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4.2vw, 3.4rem);
  line-height: 1.24;
  letter-spacing: -0.015em;
  max-width: 20ch;
  margin: 0;
}
.manifesto .word-dim { color: var(--muted-dim); }
.manifesto .accent { color: var(--accent-soft); font-style: italic; }

/* ============================================================
   HISTORIA DESTACADA (cinematográfica, con parallax)
   ============================================================ */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 34px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.section-head h2 {
  font-family: var(--f-sans); font-weight: 700;
  font-size: 1rem; letter-spacing: 0.02em; margin: 0;
  text-transform: uppercase;
}
.section-head .see-all {
  font-family: var(--f-sans); font-size: 0.85rem; font-weight: 500;
  color: var(--muted); transition: color 0.2s var(--ease);
}
.section-head .see-all:hover { color: var(--accent-soft); }

.featured { padding: 4vh 0 0; }
.featured-card { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 54px; align-items: center; }
.featured-media {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--ink-panel);
}
.featured-media .p-img {
  position: absolute; inset: -12% 0;
  width: 100%; height: 124%;
  object-fit: cover;
}
.featured-index {
  position: absolute; top: 16px; left: 18px;
  font-family: var(--f-sans); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.1em;
  color: #fff; mix-blend-mode: difference;
}
.featured-body .kicker { display: block; margin-bottom: 16px; }
.featured-body h3 {
  font-family: var(--f-serif); font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.08; letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.featured-body h3 a { background-image: linear-gradient(var(--accent-soft), var(--accent-soft)); background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 0.4s var(--ease), color 0.2s var(--ease); }
.featured-body h3 a:hover { color: var(--accent-soft); }
.featured-body p { color: var(--paper-soft); font-size: 1.12rem; margin: 0 0 24px; max-width: 34ch; }

.byline { font-family: var(--f-sans); font-size: 0.8rem; color: var(--muted); }
.byline .dot { margin: 0 8px; opacity: 0.5; }

/* ============================================================
   ÍNDICE HOVER-REVEAL (firma de la home)
   ============================================================ */
.index-section { padding: 12vh 0 14vh; position: relative; }
.reveal-index { border-top: 1px solid var(--line); }
.ri-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 26px; align-items: center;
  padding: 30px 6px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease), color 0.3s var(--ease);
}
.ri-item .ri-num { font-family: var(--f-sans); font-size: 0.85rem; font-weight: 600; color: var(--muted-dim); }
.ri-item h4 {
  font-family: var(--f-serif); font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.1; letter-spacing: -0.015em; margin: 0;
  color: var(--paper);
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.ri-item .ri-meta { font-family: var(--f-sans); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.ri-item .ri-arrow { font-family: var(--f-sans); color: var(--accent-soft); opacity: 0; transform: translateX(-8px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }

/* cuando hay hover en la lista, los demás se atenúan */
@media (hover: hover) {
  .reveal-index.hovering .ri-item h4 { opacity: 0.32; }
  .reveal-index.hovering .ri-item:hover h4 { opacity: 1; color: var(--accent-soft); }
  .ri-item:hover { padding-left: 22px; }
  .ri-item:hover .ri-arrow { opacity: 1; transform: none; }
}
.ri-preview {
  position: fixed;
  top: 0; left: 0;
  width: 300px; height: 210px;
  border-radius: var(--r);
  overflow: hidden;
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
  box-shadow: 0 30px 70px -24px rgba(0,0,0,0.7);
  will-change: transform, opacity;
}
.ri-preview.show { opacity: 1; }
.ri-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 26px 0;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex; gap: 0;
  animation: marquee 34s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-family: var(--f-serif); font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--muted-dim);
  padding: 0 2.5rem;
}
.marquee-track span::after { content: "·"; color: var(--accent); margin-left: 2.5rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   PÁGINAS INTERNAS
   ============================================================ */
.page-head {
  padding: 90px 0 46px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.page-head .kicker { display: block; }
.page-head h1 {
  font-family: var(--f-serif); font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.02em; line-height: 1.02;
  margin: 16px 0 0;
}
.page-head p { margin: 16px 0 0; max-width: 40rem; color: var(--paper-soft); font-size: 1.14rem; }

/* Archivo: primera destacada + grid */
.archive-lead { margin-bottom: 60px; }
.archive-lead .featured-card { grid-template-columns: 1.3fr 0.7fr; gap: 48px; }
.archive-lead .featured-media { aspect-ratio: 16 / 10; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px 40px;
  padding-bottom: 14vh;
}
.card { display: flex; flex-direction: column; gap: 16px; }
.card-media {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ink-panel);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.2);
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}
.card:hover .card-media img { transform: scale(1.06); filter: grayscale(0); }
.card .kicker { display: block; }
.card h3 {
  font-family: var(--f-serif); font-weight: 500;
  font-size: 1.5rem; line-height: 1.14; letter-spacing: -0.01em;
  margin: 2px 0 0;
  transition: color 0.2s var(--ease);
}
.card:hover h3 { color: var(--accent-soft); }
.card p { color: var(--paper-soft); margin: 0; font-size: 1rem; }
.card .byline { margin-top: 2px; }

/* Notes */
.notes-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px; padding-bottom: 14vh;
}
.note-card {
  position: relative;
  background: var(--ink-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 34px 32px 28px;
  display: flex; flex-direction: column; gap: 18px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.35s var(--ease-out), background 0.3s var(--ease);
}
.note-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: 0 0;
  transition: transform 0.4s var(--ease);
}
.note-card:hover { transform: translateY(-4px); border-color: var(--line); background: var(--ink-hover); }
.note-card:hover::before { transform: scaleY(1); }
.note-card .quote-mark { font-family: var(--f-serif); font-size: 2.6rem; line-height: 0.3; color: var(--accent); height: 18px; }
.note-card p { font-family: var(--f-serif); font-size: 1.34rem; line-height: 1.32; margin: 0; }
.note-card .note-link { font-family: var(--f-sans); font-size: 0.8rem; font-weight: 500; color: var(--muted); transition: color 0.2s var(--ease); }
.note-card:hover .note-link { color: var(--accent-soft); }

/* Acerca de */
.about { max-width: var(--measure); margin: 0 auto; padding: 90px 30px 14vh; }
.about .kicker { display: block; margin-bottom: 18px; }
.about h1 {
  font-family: var(--f-serif); font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 30px;
}
.about p { font-size: 1.24rem; line-height: 1.66; margin: 0 0 24px; }
.about p.soft { color: var(--paper-soft); font-size: 1.12rem; }
.about-divider { height: 1px; background: var(--line); margin: 44px 0; }
.about-social { display: flex; gap: 12px; flex-wrap: wrap; }
.about-social a {
  font-family: var(--f-sans); font-size: 0.9rem; font-weight: 500;
  padding: 11px 20px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--paper);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.about-social a:hover { border-color: var(--accent); color: var(--accent-soft); }

/* ============================================================
   ARTÍCULO
   ============================================================ */
.article { padding-bottom: 12vh; }
.article-hero {
  position: relative;
  height: 82vh;
  min-height: 520px;
  display: flex; align-items: flex-end;
  overflow: hidden;
  margin-top: -68px;
  padding-top: 68px;
}
.article-hero .p-img {
  position: absolute; inset: -8% 0; width: 100%; height: 116%;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.05) brightness(0.9);
  z-index: 0;
}
.article-hero .scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(6,8,13,0.45) 0%, rgba(6,8,13,0.2) 40%, rgba(6,8,13,0.7) 78%, var(--ink) 100%);
}
.article-hero .inner {
  position: relative; z-index: 2;
  max-width: 62rem; margin: 0 auto; width: 100%;
  padding: 0 30px 6vh; text-align: center;
}
.article-hero .kicker { display: block; margin-bottom: 18px; color: #f0b79c; }
.article-hero h1 {
  font-family: var(--f-serif); font-weight: 400;
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  line-height: 1.04; letter-spacing: -0.02em;
  margin: 0 auto; max-width: 20ch; color: #fbf7ef;
}
.article-hero .dek {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.42;
  color: #ddd8cd; font-style: italic; margin: 22px auto 20px; max-width: 36rem;
}
.article-hero .article-meta { font-family: var(--f-sans); font-size: 0.85rem; color: #b9b5aa; }
.article-hero .article-meta .dot { margin: 0 9px; opacity: 0.5; }
.article-credit { text-align: center; font-family: var(--f-sans); font-size: 0.76rem; color: var(--muted-dim); padding: 14px 30px 0; }

.article-body { max-width: var(--measure); margin: 0 auto; padding: 50px 30px 0; }
.article-body > p { font-size: 1.24rem; line-height: 1.72; margin: 0 0 28px; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--f-serif); font-weight: 500;
  float: left; font-size: 4.4rem; line-height: 0.82;
  padding: 6px 14px 0 0; color: var(--accent);
}
.article-body h2 {
  font-family: var(--f-serif); font-weight: 600;
  font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.01em;
  margin: 50px 0 18px;
}
.article-body figure { margin: 46px 0; }
.article-body figure img { width: 100%; border-radius: var(--r); background: var(--ink-panel); }
figcaption { font-family: var(--f-sans); font-size: 0.78rem; color: var(--muted-dim); margin-top: 12px; line-height: 1.4; }
.article-body .pullquote {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.3;
  color: var(--paper);
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 28px; margin: 48px 0;
}
.article-foot {
  max-width: var(--measure); margin: 64px auto 0;
  padding: 44px 30px 0; border-top: 1px solid var(--line); text-align: center;
}
.article-foot p { font-family: var(--f-sans); color: var(--muted); font-size: 0.95rem; margin: 0 0 20px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-sans); font-size: 0.9rem; font-weight: 500;
  color: var(--paper-soft); margin-top: 28px;
  transition: gap 0.25s var(--ease), color 0.2s var(--ease);
}
.back-link:hover { gap: 13px; color: var(--accent-soft); }

/* ============================================================ FOOTER */
.site-footer { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--footer-bg); overflow: hidden; }
.footer-cta { padding: 12vh 0 8vh; border-bottom: 1px solid var(--line); }
.footer-cta .kicker { display: block; margin-bottom: 18px; }
.footer-cta h2 {
  font-family: var(--f-serif); font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 0 34px; max-width: 20ch;
}
.subscribe { display: flex; gap: 12px; max-width: 480px; flex-wrap: wrap; }
.subscribe input {
  flex: 1 1 220px; min-width: 0;
  font-family: var(--f-sans); font-size: 1rem;
  padding: 13px 18px;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s var(--ease);
}
.subscribe input::placeholder { color: var(--muted-dim); }
.subscribe input:focus { outline: none; border-color: var(--accent); }

.footer-bottom { padding: 46px 0 30px; position: relative; }
.footer-cols { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-word { font-size: 1.24rem; }
.footer-brand p { margin: 10px 0 0; color: var(--muted); font-size: 0.98rem; max-width: 30rem; }
.footer-links { display: flex; gap: 24px; height: fit-content; font-family: var(--f-sans); font-size: 0.9rem; font-weight: 500; }
.footer-links a { color: var(--paper-soft); transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--accent-soft); }
.footer-mega {
  font-family: var(--f-sans); font-weight: 800;
  font-size: clamp(3.5rem, 18vw, 17rem);
  line-height: 0.8; letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  text-stroke: 1px var(--line);
  margin: 6vh 0 3vh;
  user-select: none;
  white-space: nowrap;
}
.footer-legal { color: var(--muted-dim); font-family: var(--f-sans); font-size: 0.78rem; margin: 0; }

/* ============================================================ RESPONSIVE */
@media (max-width: 980px) {
  .featured-card, .archive-lead .featured-card { grid-template-columns: 1fr; gap: 30px; }
  .featured-media { aspect-ratio: 16 / 10; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 30px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .header-inner { height: auto; flex-direction: column; gap: 8px; padding: 12px 18px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 6px 9px; }
  .wrap, .about, .article-body, .article-hero .inner, .article-credit { padding-left: 20px; padding-right: 20px; }
  .archive-grid { grid-template-columns: 1fr; gap: 40px; }
  .notes-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { align-items: flex-end; }
  .hero-inner { padding-bottom: 12vh; }
  .hero-ticks { display: none; }
  .ri-item { grid-template-columns: 1fr; gap: 8px; padding: 22px 4px; }
  .ri-item .ri-num, .ri-item .ri-arrow { display: none; }
  .ri-item .ri-meta { order: -1; }
  .manifesto p { font-size: 1.9rem; }
  .article-hero { height: 74vh; }
}

/* ============================================================
   PARALLAX por scroll (CSS nativo, con degradación elegante)
   ============================================================ */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .article-hero .p-img {
      animation: parY linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
  @keyframes parY { from { transform: translateY(-7%); } to { transform: translateY(7%); } }
}

/* ============================================================
   INTRO (revelado de entrada)
   ============================================================ */
.intro {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.9s var(--ease-out);
}
.intro.lift { transform: translateY(-100%); }
.intro.hidden { display: none; }
.intro-inner { display: flex; align-items: center; gap: 20px; }
.intro-logo {
  width: clamp(56px, 9vw, 84px); height: clamp(56px, 9vw, 84px);
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  border-radius: clamp(12px, 2vw, 18px);
  transform: scale(0) rotate(-12deg);
  animation: introMark 0.8s var(--ease-out) 0.1s forwards;
}
.intro-word {
  font-family: var(--f-sans); font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -0.03em;
  color: var(--paper);
  opacity: 0;
  transform: translateX(-14px);
  animation: introWord 0.8s var(--ease-out) 0.4s forwards;
}
@keyframes introMark { to { transform: scale(1) rotate(0); } }
@keyframes introWord { to { opacity: 1; transform: none; } }

/* ============================================================
   ANTES Y AHORA (slider comparativo)
   ============================================================ */
.ba-section { padding: 10vh 0 12vh; }
.ba-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 20px;
}
.ba-tab {
  font-family: var(--f-sans); font-size: 0.85rem; font-weight: 500;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  color: var(--paper-soft); background: transparent;
  border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.ba-tab:hover { border-color: var(--paper-soft); color: var(--paper); }
.ba-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.beforeafter {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  aspect-ratio: 16 / 11;
  border-radius: var(--r);
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  background: var(--ink-panel);
}
.beforeafter img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  filter: grayscale(0.15) contrast(1.04);
}
.ba-before { clip-path: inset(0 50% 0 0); filter: grayscale(0.85) contrast(1.08) brightness(0.95); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: rgba(255,255,255,0.9);
  transform: translateX(-1px);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.ba-handle::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 46px; height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 6px 24px -6px rgba(0,0,0,0.6);
}
.ba-handle::before {
  content: "‹ ›";
  position: absolute; top: 50%; left: 50%; z-index: 1;
  transform: translate(-50%, -52%);
  font-family: var(--f-sans); font-weight: 700; font-size: 1rem; letter-spacing: 0.05em;
  color: #fff;
}
.ba-label {
  position: absolute; top: 16px;
  font-family: var(--f-sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff;
  background: rgba(6,8,13,0.5);
  backdrop-filter: blur(6px);
  padding: 7px 13px; border-radius: 999px;
}
.ba-label-before { left: 16px; }
.ba-label-after { right: 16px; }
.ba-controls {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 18px auto 0; max-width: 860px;
}
.ba-jump {
  font-family: var(--f-sans); font-size: 0.82rem; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  color: var(--paper); background: transparent; border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.ba-jump:hover { border-color: var(--accent); color: var(--accent-soft); }
.ba-jump:active { transform: scale(0.96); }
.ba-tag {
  font-family: var(--f-sans); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.ba-caption {
  font-family: var(--f-sans); font-size: 0.9rem; color: var(--muted);
  margin: 14px auto 0; text-align: center; max-width: 40rem; line-height: 1.4;
}

/* ============================================================
   WORD REVEAL (scroll)
   ============================================================ */
.wr .wr-w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.7em);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.wr.in .wr-w { opacity: 1; transform: none; }
.wr .accent { color: var(--accent-soft); font-style: italic; }

/* ============================================================
   GRADACIÓN DE IMÁGENES (cohesión editorial)
   ============================================================ */
.card-media img, .featured-media .p-img, .article-body figure img {
  filter: grayscale(0.28) contrast(1.05) brightness(0.98);
}
.card:hover .card-media img { filter: grayscale(0) contrast(1.03); }
[data-theme="light"] .card-media img,
[data-theme="light"] .featured-media .p-img,
[data-theme="light"] .article-body figure img { filter: grayscale(0.18) contrast(1.03) sepia(0.04); }

/* destacada: al pasar el cursor, la foto toma color */
.featured-card { position: relative; }
.featured-media .p-img { transition: filter 0.6s var(--ease); }
.featured-media:hover .p-img { filter: grayscale(0) contrast(1.03) brightness(1); }

/* ============================================================
   TRANSICIÓN TELÓN (curtain) por sección
   ============================================================ */
.curtain { position: relative; }
.curtain::after {
  content: ""; position: absolute; inset: 0; z-index: 5;
  background: var(--accent);
  pointer-events: none;
  transition: transform 0.9s var(--ease-out);
}
.curtain.in::after { transform: translateY(-101%); }
.card-media.curtain::after { background: var(--ink-panel); }

/* ============================================================
   SELLO GIRATORIO
   ============================================================ */
.spin-badge {
  position: absolute; left: 22px; bottom: 22px;
  width: 108px; height: 108px;
  z-index: 6; pointer-events: none;
}
.spin-badge::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(5,7,11,0.62) 42%, rgba(5,7,11,0) 74%);
}
.spin-badge svg { position: relative; width: 100%; height: 100%; animation: spin 20s linear infinite; }
.spin-badge text {
  font-family: var(--f-sans); font-size: 9px; font-weight: 700;
  letter-spacing: 0.2em; fill: #fff; text-transform: uppercase;
}
.spin-badge-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-sans); font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 10px 28px -8px var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   AÑO GIGANTE DE FONDO
   ============================================================ */
.featured { position: relative; }
.ghost-year {
  position: absolute; bottom: -6vh; right: -5vw; z-index: 0;
  font-family: var(--f-sans); font-weight: 800;
  font-size: clamp(7rem, 20vw, 18rem); line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-soft);
  text-stroke: 1px var(--line-soft);
  pointer-events: none; user-select: none;
}
.featured .section-head, .featured .featured-card { position: relative; z-index: 1; }

/* ============================================================
   PARALLAX extra (CSS nativo)
   ============================================================ */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .featured-media .p-img {
      animation: parY linear both;
      animation-timeline: view(); animation-range: cover 0% cover 100%;
    }
    .ghost-year {
      animation: ghostPar linear both;
      animation-timeline: view(); animation-range: cover 0% cover 100%;
    }
    .footer-mega {
      animation: megaPar linear both;
      animation-timeline: view(); animation-range: entry 0% exit 100%;
    }
  }
  @keyframes ghostPar { from { transform: translateY(14%); } to { transform: translateY(-14%); } }
  @keyframes megaPar  { from { transform: translateX(7%); } to { transform: translateX(-9%); } }
}

@media (max-width: 980px) {
  .spin-badge { width: 88px; height: 88px; left: 16px; bottom: 16px; }
  .ghost-year { font-size: 26vw; }
}
@media (max-width: 640px) {
  .spin-badge { display: none; }
  .ghost-year { display: none; }
}

/* ============================================================
   CONTADORES
   ============================================================ */
.stats { padding: 2vh 0 10vh; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--line); }
.stat { padding-top: 32px; }
.stat-num {
  display: block; font-family: var(--f-sans); font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 4.2rem); letter-spacing: -0.03em; line-height: 0.95;
  color: var(--accent-soft);
}
.stat-label { display: block; margin-top: 14px; color: var(--muted); font-size: 0.95rem; max-width: 22ch; line-height: 1.35; }
@media (max-width: 860px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 24px; } }
@media (max-width: 460px) { .stats-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ============================================================
   MAPA INTERACTIVO
   ============================================================ */
.map-section { padding: 4vh 0 10vh; }
.map-canvas {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--r); overflow: hidden;
  background: linear-gradient(155deg, var(--ink-panel), var(--ink-2));
  border: 1px solid var(--line-soft);
}
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-sea { fill: color-mix(in srgb, #2f7d94 22%, transparent); }
.map-coast { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 6; }
.map-sea-label {
  position: absolute; left: 3.5%; top: 52%; transform: rotate(-90deg); transform-origin: left top;
  font-family: var(--f-sans); font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted-dim); pointer-events: none;
}
.map-place {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--f-sans); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); pointer-events: none; white-space: nowrap;
}
.map-pin { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.map-dot {
  display: block; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); position: relative;
  transition: transform 0.2s var(--ease);
  box-shadow: 0 4px 14px -3px var(--accent);
}
.map-dot::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0.6;
  animation: pinPulse 2.6s ease-out infinite;
}
@keyframes pinPulse { 0% { transform: scale(0.55); opacity: 0.7; } 100% { transform: scale(2.3); opacity: 0; } }
.map-tip {
  position: absolute; left: 50%; bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(6px);
  background: var(--paper); color: var(--ink);
  font-family: var(--f-serif); font-size: 0.95rem; line-height: 1.22;
  padding: 9px 13px; border-radius: 7px; width: max-content; max-width: 210px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  box-shadow: 0 16px 36px -12px rgba(0,0,0,0.55);
}
.map-pin:hover, .map-pin:focus-visible { z-index: 4; outline: none; }
.map-pin:hover .map-tip, .map-pin:focus-visible .map-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.map-pin:hover .map-dot, .map-pin:focus-visible .map-dot { transform: scale(1.3); }
@media (max-width: 640px) { .map-canvas { aspect-ratio: 3 / 4; } .map-place { font-size: 0.6rem; } }

/* ============================================================
   LÍNEA DE TIEMPO
   ============================================================ */
.timeline-section { padding: 4vh 0 10vh; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-line { position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.tl-line::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.tl-item { position: relative; padding: 26px 0 26px 44px; }
.tl-marker {
  position: absolute; left: 0; top: 34px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--accent); z-index: 1;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.tl-item.in .tl-marker { background: var(--accent); transform: scale(1.15); }
.tl-node { display: block; }
.tl-year { font-family: var(--f-sans); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; color: var(--accent-soft); }
.tl-node h4 { font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.08; letter-spacing: -0.015em; margin: 8px 0; }
.tl-node p { color: var(--paper-soft); margin: 0; font-size: 1.05rem; max-width: 48ch; }
a.tl-node .tl-go { display: inline-block; margin-top: 12px; font-family: var(--f-sans); font-size: 0.85rem; font-weight: 500; color: var(--muted); transition: color 0.2s var(--ease); }
a.tl-node:hover h4, a.tl-node:hover .tl-go { color: var(--accent-soft); }

/* ============================================================
   GALERÍA + LIGHTBOX
   ============================================================ */
.article-gallery { margin: 7vh auto 0; }
.article-gallery .kicker { display: block; margin-bottom: 18px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item {
  padding: 0; border: 0; cursor: pointer; border-radius: var(--r); overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--ink-panel);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.22); transition: transform 0.6s var(--ease), filter 0.4s var(--ease); }
.gallery-item:hover img { transform: scale(1.06); filter: none; }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(5,7,11,0.95);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 6vh 7vw;
}
.lightbox.open { display: flex; animation: lbIn 0.3s var(--ease-out); }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--r); box-shadow: 0 40px 90px -24px #000; }
.lb-btn {
  position: absolute; width: 50px; height: 50px; border-radius: 999px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.22); color: #fff;
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.lb-btn:hover { background: rgba(255,255,255,0.24); }
.lb-btn:active { transform: scale(0.92); }
.lb-close { top: 4vh; right: 5vw; }
.lb-prev { left: 3vw; top: 50%; transform: translateY(-50%); }
.lb-next { right: 3vw; top: 50%; transform: translateY(-50%); }

/* fill de la línea de tiempo por scroll */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tl-line::after {
      animation: tlGrow linear both;
      animation-timeline: view();
      animation-range: cover 8% cover 88%;
    }
  }
  @keyframes tlGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}

/* ============================================================ RESPONSIVE extra */
@media (max-width: 640px) {
  .footer-cols { flex-direction: column; gap: 18px; }
  .footer-mega { font-size: 22vw; }
  .ba-section { padding: 8vh 0 10vh; }
  .footer-cta { padding: 9vh 0 7vh; }
}
