/* ============================================================
   Historia Corrupta — prototipo en clave Lois "Time Machine"
   Layout 3 columnas · Archivo Black display · oxblood acento
   ============================================================ */

:root {
  --paper:        #F7F4EC;
  --paper-soft:   #EFEBE0;
  --ink:          #0E0E0E;
  --ink-soft:    #2A2722;
  --mid:          #6B655C;
  --rule:         #1A1714;
  --rule-soft:    #D6D1C7;
  --ghost:        #D6D2C6;
  --accent:       #A8231C;
  --accent-bright:#C2241B;

  --font-display: "Archivo Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-sans:    "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --topbar-h: 84px;
  --col-left-w: 28vw;
  --col-left-max: 460px;
  --col-left-min: 340px;
  --gutter-x: 56px;
  --gutter-y: 80px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Ocultar scrollbars internos visualmente — mantener funcionalidad de mouse wheel, touch y teclado.
   El scrollbar principal del navegador (html/body) se mantiene. */
.col-left,
.scroll-area,
.detail__body,
.drawer__body,
.lightbox {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge legacy */
}
.col-left::-webkit-scrollbar,
.scroll-area::-webkit-scrollbar,
.detail__body::-webkit-scrollbar,
.drawer__body::-webkit-scrollbar,
.lightbox::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, WebKit */
  width: 0;
  height: 0;
}

/* grano global sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.25;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.07  0 0 0 0 0.06  0 0 0 0 0.05  0 0 0 0.17 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 60;
  background: linear-gradient(to bottom, var(--paper) 70%, rgba(247,244,236,0));
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.logo__mark {
  width: 34px; height: 34px;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
  position: relative;
}
.logo__mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--paper);
  pointer-events: none;
}
.logo__wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  line-height: 1;
}
.logo__wordmark em {
  color: var(--accent);
  font-style: normal;
}
.menu-btn {
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
  padding: 8px 4px;
}
.menu-btn .ast {
  color: var(--accent);
  font-size: 22px;
  transform: translateY(-1px);
  display: inline-block;
}
.menu-btn:hover { color: var(--accent); }
.menu-btn:hover .ast { transform: translateY(-1px) rotate(45deg); transition: transform 0.25s; }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  position: relative;
  padding-top: var(--topbar-h);
  padding-left: clamp(var(--col-left-min), var(--col-left-w), var(--col-left-max));
}

/* ---------- columna izquierda (fija) ---------- */
.col-left {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  width: clamp(var(--col-left-min), var(--col-left-w), var(--col-left-max));
  height: calc(100vh - var(--topbar-h));
  padding: 60px 40px 40px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
  background: var(--paper);
}
.col-left__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 4.6vw, 76px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 24px;
  color: var(--ink);
  word-break: break-word;
  hyphens: auto;
}
.col-left__title .dot { color: var(--accent); }
.col-left__bajada {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.3;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 48px;
  max-width: 360px;
}

.era-index {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 8px;
}
.era-index__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 4px;
}
.era-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 0;
  position: relative;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s, padding-left 0.2s;
}
.era-link span {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mid);
}
.era-link::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--accent);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.era-link:hover { color: var(--accent); }
.era-link.is-active {
  color: var(--accent);
  padding-left: 16px;
}
.era-link.is-active::before { transform: translateY(-50%) scaleX(1); }
.era-link.is-active span { color: var(--accent); }

/* ============================================================
   COLUMNA CENTRAL + DERECHA (rows alineados)
   Cada hijo directo ocupa todo el ancho; el grid interno se hace
   dentro de .hero y de cada .case.
   ============================================================ */
.scroll-area {
  display: block;
}
#cases-root { display: contents; }

/* ---------- HERO (primera pantalla) ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: calc(100vh - var(--topbar-h));
  align-items: stretch;
}
.hero__center, .hero__right {
  padding: 80px var(--gutter-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__right {
  padding-left: var(--gutter-x);
  border-left: 1px solid var(--ink);
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero__tesis {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 3.8vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 32px;
  text-wrap: balance;
}
.hero__tesis em { color: var(--accent); font-style: normal; }
.hero__body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0 0 36px;
}
.hero__body + .hero__body { margin-top: -16px; }

.hero__cue {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}
.hero__cue-arrow {
  width: 1px; height: 36px;
  background: var(--ink);
  position: relative;
  animation: cue 1.8s ease-in-out infinite;
}
.hero__cue-arrow::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  width: 8px; height: 8px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: translate(-50%, 50%) rotate(45deg);
}
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50%      { transform: translateY(6px); opacity: 1; }
}

.hero__right .ph {
  width: 100%;
}

/* ============================================================
   CASOS — cada uno = una fila con center + right
   ============================================================ */
.case {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  position: relative;
  border-top: 1px solid var(--ink);
  transition: opacity 0.35s ease, filter 0.35s ease;
}
.case.is-dimmed {
  opacity: 0.18;
  filter: grayscale(0.9);
  pointer-events: none;
}
.case.is-hidden { display: none; }

/* hover / click affordance: solo el título-botón y "Leer ficha" abren la ficha */
.case { cursor: default; }
.case__lede { cursor: text; }
.case__readmore {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.case__readmore::after {
  content: "→";
  display: inline-block;
  transition: transform 0.2s;
}
.case__readmore:hover {
  background: var(--ink);
  color: var(--paper);
}
.case:hover .case__readmore::after { transform: translateX(4px); }

.case__center {
  padding: 96px var(--gutter-x) 96px;
  position: relative;
}
.case__right {
  padding: 96px var(--gutter-x) 96px;
  border-left: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.case__year-ghost {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(120px, 14vw, 220px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ghost);
  margin: 0 0 36px;
  user-select: none;
  text-align: right;
}
.case__eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.case__eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.case__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.02;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  margin: 0 0 28px;
  text-wrap: balance;
}
.case__title-btn {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 0.2s ease, background-size 0.3s ease;
}
.case__title-btn:hover,
.case__title-btn:focus-visible {
  color: var(--accent);
  background-size: 100% 2px;
  outline: none;
}
.case__title-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.case__lede {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 22px;
  text-wrap: pretty;
}

.case__inline {
  margin: 36px 0 28px;
}

.case__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}
.tag {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.tag--type {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================================
   MEDIA PLACEHOLDERS
   ============================================================ */
.ph {
  position: relative;
  display: block;
  width: 100%;
  background: #1A1714;
  color: var(--paper);
  overflow: hidden;
  border: none;
  margin: 0;
}
.ph__caption {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-top: 12px;
  padding: 0 2px;
  text-wrap: pretty;
}
.ph__label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(0,0,0,0.45);
  padding: 5px 8px;
  mix-blend-mode: normal;
  z-index: 4;
}
.ph__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: multiply;
  opacity: 0.85;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.05  0 0 0 0 0.04  0 0 0 0 0.03  0 0 0 0.65 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
.ph__shape {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Imagen real dentro del placeholder — tratamiento editorial Nivel 1 */
.ph__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 50%;
  z-index: 1;
  filter: grayscale(0.65) contrast(1.18) brightness(0.9) sepia(0.18) saturate(0.85);
}
.ph__tint {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(10,8,7,0) 55%, rgba(10,8,7,0.7) 100%),
    linear-gradient(180deg, rgba(10,8,7,0.18) 0%, rgba(10,8,7,0) 35%, rgba(10,8,7,0) 70%, rgba(10,8,7,0.6) 100%);
}
.ph__tint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  mix-blend-mode: multiply;
  opacity: 0.14;
}
.ph--has-image { background: #0a0807; }
.ph--has-image .ph__shape { display: none; }
.ph--has-image .ph__grain { opacity: 0.55; }
/* ocultar pseudo-decoraciones de cada kind cuando hay imagen real */
.ph--has-image.ph--portrait::before,
.ph--has-image.ph--document::before,
.ph--has-image.ph--document::after,
.ph--has-image.ph--poster::before { display: none !important; }
/* documento con imagen: mostrar completo, fondo crema visible alrededor */
.ph--has-image.ph--document { background: #ECE6D2; }
.ph--has-image.ph--document .ph__img {
  object-fit: contain;
  filter: contrast(1.1) brightness(0.95) sepia(0.05);
}
.ph--has-image.ph--document .ph__tint {
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(20,15,10,0) 60%, rgba(20,15,10,0.25) 100%);
}
.ph--has-image.ph--document .ph__label {
  color: var(--paper);
  background: rgba(20,15,10,0.7);
}

/* poster con imagen (escudos heráldicos, sellos): fondo oscuro para que respiren los colores */
.ph--has-image.ph--poster {
  background:
    radial-gradient(120% 90% at 50% 45%, #1c1814 0%, #0e0b08 100%);
}
.ph--has-image.ph--poster .ph__img {
  object-fit: contain;
  padding: 8% 12%;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.4));
}
.ph--has-image.ph--poster .ph__tint {
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(168,35,28,0) 60%, rgba(168,35,28,0.18) 100%);
}

/* ============================================================
   Variantes de fondo (bgMode) para imágenes con transparencia,
   escudos, sellos, dibujos a línea, grabados en negro, etc.
   Uso: data.js → item.bgMode = "light" | "dark" | "paper"
   ============================================================ */

/* bg light: papel crema editorial — ideal para escudos oscuros, sellos, dibujos en tinta */
.ph--has-image.ph--bg-light {
  background:
    radial-gradient(120% 90% at 50% 45%, #F2EBDA 0%, #DDD3BD 100%);
}
.ph--has-image.ph--bg-light .ph__img {
  object-fit: contain;
  padding: 8% 12%;
  filter: drop-shadow(0 6px 18px rgba(60,40,20,0.18));
}
.ph--has-image.ph--bg-light .ph__tint {
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(168,35,28,0) 65%, rgba(168,35,28,0.10) 100%),
    linear-gradient(180deg, rgba(20,15,10,0) 70%, rgba(20,15,10,0.18) 100%);
}
.ph--has-image.ph--bg-light .ph__label {
  color: #1A1714;
  background: rgba(255, 250, 240, 0.78);
}
.ph--has-image.ph--bg-light .ph__grain { opacity: 0.35; mix-blend-mode: multiply; }

/* bg paper: variante crema más cálida (para documentos manuscritos) */
.ph--has-image.ph--bg-paper {
  background: #ECE6D2;
}
.ph--has-image.ph--bg-paper .ph__img {
  object-fit: contain;
  filter: contrast(1.05) brightness(0.97);
}
.ph--has-image.ph--bg-paper .ph__label {
  color: #1A1714;
  background: rgba(255,255,255,0.7);
}

/* bg dark: fondo profundo — ideal para grabados con tono medio o láminas blancas */
.ph--has-image.ph--bg-dark {
  background:
    radial-gradient(120% 90% at 50% 45%, #1c1814 0%, #0a0807 100%);
}
.ph--has-image.ph--bg-dark .ph__img {
  object-fit: contain;
  padding: 6% 8%;
}

/* tipo: photo (paisaje, 4:3 / 16:9) — gradiente tono sepia + estrías */
.ph--photo {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(120% 80% at 30% 70%, #3a342b 0%, #1a1612 60%, #0b0907 100%);
}
.ph--photo .ph__shape {
  background:
    repeating-linear-gradient(
      85deg,
      rgba(255,255,255,0.06) 0px,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent 6px
    ),
    linear-gradient(120deg, rgba(255,240,210,0.08), rgba(0,0,0,0.4));
}

/* photo wide (16/9) */
.ph--photo-wide { aspect-ratio: 16 / 9; }

/* tipo: portrait (vertical 3:4) — silueta + grain */
.ph--portrait {
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(80% 50% at 50% 35%, #6a5e4d 0%, #2a241d 55%, #0e0b08 100%);
}
.ph--portrait .ph__shape {
  background:
    radial-gradient(closest-side at 50% 36%, rgba(245,235,210,0.18) 0%, rgba(245,235,210,0) 50%),
    radial-gradient(closest-side at 50% 80%, rgba(245,235,210,0.12) 10%, rgba(245,235,210,0) 60%);
}
.ph--portrait::before {
  /* silueta (cabeza + hombros) */
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 60%;
  height: 78%;
  transform: translateX(-50%);
  background:
    radial-gradient(38% 38% at 50% 32%, #0a0807 0%, #0a0807 55%, rgba(10,8,7,0) 60%),
    radial-gradient(85% 60% at 50% 110%, #0a0807 0%, #0a0807 40%, rgba(10,8,7,0) 60%);
  z-index: 2;
  opacity: 0.85;
}

/* tipo: document (papel amarillento + líneas de texto falsas) */
.ph--document {
  aspect-ratio: 5 / 6;
  background: #ECE6D2;
  color: #1A1714;
  border: 1px solid #4a4438;
}
.ph--document .ph__shape {
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 16px,
      #6b655c 16px,
      #6b655c 17px,
      transparent 17px,
      transparent 22px,
      #6b655c 22px,
      #6b655c 23px,
      transparent 23px,
      transparent 30px
    );
  margin: 38px 22px 28px;
  inset: auto;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.55;
}
.ph--document::before {
  content: "EXPEDIENTE";
  position: absolute;
  top: 12px; left: 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #1A1714;
  z-index: 3;
}
.ph--document::after {
  /* "sello" */
  content: "S / R";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 56px; height: 56px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  transform: rotate(-12deg);
  z-index: 3;
  opacity: 0.85;
}
.ph--document .ph__label {
  color: #1A1714;
  background: rgba(255,255,255,0.65);
}
.ph--document .ph__grain { opacity: 0.4; }

/* tipo: poster (color sólido tipo afiche, tipografía gigante) */
.ph--poster {
  aspect-ratio: 4 / 5;
  background: var(--accent);
  color: #fff;
}
.ph--poster .ph__shape {
  background:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.25) 100%);
}
.ph--poster::before {
  content: attr(data-glyph);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(72px, 9vw, 140px);
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.93);
  text-transform: uppercase;
  z-index: 3;
  line-height: 0.85;
}
.ph--poster .ph__label {
  background: rgba(0,0,0,0.6);
}

/* tipo: video — fondo oscuro + barra de controles "fake" */
.ph--video {
  aspect-ratio: 16 / 9;
  background: #0a0807;
}
.ph--video .ph__shape {
  background:
    radial-gradient(60% 80% at 50% 50%, rgba(180,180,180,0.18) 0%, rgba(0,0,0,0) 70%);
}
.ph--video::before {
  content: "▶";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  color: rgba(255,255,255,0.9);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.ph--video::after {
  content: "0:00 / 0:52";
  position: absolute;
  bottom: 12px; right: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
  z-index: 3;
}

/* ============================================================
   COLUMNA DERECHA — composición asimétrica
   ============================================================ */
.case__right > .media-item:nth-child(2) {
  margin-left: 12%;
  max-width: 88%;
}
.case__right > .media-item:nth-child(3) {
  margin-right: 8%;
  max-width: 92%;
}
.media-item { width: 100%; }

/* ============================================================
   CIERRE
   ============================================================ */
.closing {
  border-top: 1px solid var(--ink);
  padding: 140px var(--gutter-x) 96px;
  background: var(--paper);
}
.closing__inner { max-width: 1100px; }
.closing__kicker {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.closing__quote {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.018em;
  text-transform: uppercase;
  margin: 0 0 64px;
  text-wrap: balance;
}
.closing__quote em {
  color: var(--accent);
  font-style: normal;
}
.closing__credits {
  border-top: 1px solid var(--ink);
  padding-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}
.closing__credits strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-family: var(--font-body);
}
.closing__credits strong a,
.closing__link {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 0.2s ease, background-size 0.3s ease;
}
.closing__credits strong a:hover,
.closing__link:hover,
.closing__credits strong a:focus-visible,
.closing__link:focus-visible {
  color: var(--accent);
  background-size: 100% 2px;
  outline: none;
}
.closing__author-note {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--mid);
  max-width: 640px;
  text-wrap: pretty;
}
.closing__author-note a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(168, 35, 28, 0.4);
  transition: text-decoration-color 0.2s ease;
}
.closing__author-note a:hover {
  text-decoration-color: var(--accent);
}

/* ============================================================
   DRAWER (MENÚ / FILTROS)
   ============================================================ */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(14,14,14,0);
  pointer-events: none;
  z-index: 90;
  transition: background 0.3s;
}
.drawer-overlay.is-open {
  background: rgba(14,14,14,0.55);
  pointer-events: auto;
}
.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(540px, 100vw);
  background: var(--paper);
  border-left: 1px solid var(--ink);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0.2, 1);
  z-index: 95;
  display: flex;
  flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }

.drawer__head {
  padding: 26px 36px;
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.drawer__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}
.drawer__close {
  background: transparent;
  border: 1px solid var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  color: var(--ink);
}
.drawer__close:hover { background: var(--ink); color: var(--paper); }

.drawer__body {
  padding: 36px;
  overflow-y: auto;
  flex: 1;
}
.drawer__section {
  margin-bottom: 40px;
}
.drawer__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  margin: 0 0 14px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 8px 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s;
}
.chip:hover { background: var(--ink); color: var(--paper); }
.chip.is-active {
  background: var(--ink);
  color: var(--paper);
}
.chip[data-key="all"].is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.drawer__count {
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mid);
  text-transform: uppercase;
}
.drawer__count strong {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.drawer__reset {
  background: transparent;
  border: none;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 0;
}
.drawer__reset:hover { text-decoration: underline; }

/* ============================================================
   DETAIL PANEL — slide-in derecho, estética v2
   ============================================================ */
.detail-overlay {
  position: fixed; inset: 0;
  background: rgba(14,14,14,0);
  pointer-events: none;
  z-index: 180;
  transition: background 0.3s ease;
}
.detail-overlay.is-open {
  background: rgba(14,14,14,0.55);
  pointer-events: auto;
}
.detail {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(720px, 100vw);
  background: var(--paper);
  border-left: 1px solid var(--ink);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0.2, 1);
  z-index: 190;
  display: flex;
  flex-direction: column;
  box-shadow: -24px 0 60px rgba(14,14,14,0.12);
}
.detail.is-open { transform: translateX(0); }

.detail__head {
  padding: 22px 40px;
  border-bottom: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: var(--paper);
}
.detail__crumb {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.detail__crumb .sep {
  display: inline-block;
  margin: 0 8px;
  color: var(--accent);
}
.detail__close {
  background: transparent;
  border: 1px solid var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.detail__close:hover { background: var(--ink); color: var(--paper); }

.detail__body {
  overflow-y: auto;
  padding: 48px 40px 32px;
  flex: 1;
}

.detail__year {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(72px, 8vw, 120px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ghost);
  margin: 0 0 -12px;
}
.detail__eyebrow {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 28px 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.detail__eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.detail__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -0.018em;
  text-transform: uppercase;
  margin: 0 0 24px;
  text-wrap: balance;
}
.detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.detail__hero {
  margin: 0 0 36px;
}

.detail__section {
  margin: 36px 0;
}
.detail__section-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-soft);
}

.detail__lede {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.detail__lede:last-child { margin-bottom: 0; }

.fact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.fact-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--rule-soft);
}
.fact-row:last-child { border-bottom: none; }
.fact-row__label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  padding-top: 2px;
}
.fact-row__value {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
}

.actor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.actor-pill {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  background: var(--paper-soft);
  border: 1px solid var(--rule-soft);
  color: var(--ink-soft);
}

.source-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.source-list li {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--mid);
  padding: 10px 0 10px 24px;
  position: relative;
  border-bottom: 1px dashed var(--rule-soft);
}
.source-list li:last-child { border-bottom: none; }
.source-list li::before {
  content: "§";
  position: absolute;
  left: 0;
  top: 10px;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 14px;
}

/* ----- Eco contemporáneo (paralelo actual) ----- */
.detail__parallel {
  margin: 28px 0 32px;
  padding: 22px 22px 18px;
  border-left: 3px solid var(--accent);
  background: var(--paper-soft);
  position: relative;
}
.detail__parallel::before {
  content: "↳";
  position: absolute;
  top: 14px;
  right: 18px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
  opacity: 0.7;
}
.detail__parallel-kicker {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.detail__parallel-title {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.detail__parallel-body {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.detail__parallel-body:last-of-type { margin-bottom: 14px; }
.detail__parallel-sources {
  list-style: none;
  padding: 12px 0 0;
  margin: 0;
  border-top: 1px dashed var(--rule-soft);
}
.detail__parallel-sources li {
  font-size: 12px;
  line-height: 1.5;
  color: var(--mid);
  padding: 4px 0 4px 18px;
  position: relative;
}
.detail__parallel-sources li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

.detail__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}
.detail__nav-btn {
  background: transparent;
  border: 1px solid var(--rule-soft);
  padding: 16px 18px;
  text-align: left;
  color: var(--ink);
  transition: border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.detail__nav-btn:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--accent);
}
.detail__nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.detail__nav-btn.next { text-align: right; }
.detail__nav-hint {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 6px;
}
.detail__nav-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
}

.placeholder-note {
  margin: 8px 0 0;
  padding: 10px 14px;
  background: rgba(168, 35, 28, 0.06);
  border-left: 2px solid var(--accent);
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.4;
  color: var(--accent);
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .detail { width: 100vw; }
  .detail__head, .detail__body { padding-left: 24px; padding-right: 24px; }
  .fact-row { grid-template-columns: 1fr; gap: 4px; }
}

.empty-state {
  display: none;
  padding: 120px var(--gutter-x);
  border-top: 1px solid var(--ink);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  text-transform: uppercase;
  color: var(--mid);
}
.scroll-area.is-empty .empty-state { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1280px) {
  :root { --gutter-x: 40px; }
  .case__center, .case__right { padding-top: 72px; padding-bottom: 72px; }
  .case__year-ghost { font-size: clamp(96px, 11vw, 160px); }
  .case__title { font-size: clamp(22px, 2.1vw, 30px); }
}

@media (max-width: 1140px) {
  .layout { padding-left: 0; }
  .col-left {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    width: 100vw;
    max-width: none;
    height: calc(100vh - var(--topbar-h));
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0.2, 1);
    z-index: 80;
    border-right: 1px solid var(--ink);
  }
  .col-left.is-open { transform: translateX(0); }

  .topbar { padding: 0 24px; }
  .menu-btn { display: none; }
  .topbar-mobile-buttons { display: flex; gap: 8px; }

  .hero,
  .case {
    grid-template-columns: 1fr;
  }
  .hero__right,
  .case__right {
    border-left: none;
    border-top: 1px solid var(--ink);
    padding: 60px 24px;
  }
  .hero__center,
  .case__center {
    padding: 60px 24px;
  }
  .case__year-ghost { text-align: left; font-size: clamp(96px, 22vw, 160px); }
  .case__right { gap: 36px; }
  .case__right > .media-item:nth-child(2),
  .case__right > .media-item:nth-child(3) {
    margin-left: 0; margin-right: 0;
    max-width: 100%;
  }
  .closing { padding: 100px 24px 80px; }
}

@media (max-width: 540px) {
  .logo__wordmark { font-size: 14px; }
  .logo__mark { width: 28px; height: 28px; font-size: 14px; }
  .col-left { padding: 36px 24px; }
}

/* ============================================================
   LIGHTBOX — visor de imagen ampliada
   ============================================================ */
.ph--has-image { cursor: zoom-in; }
.ph--has-image:hover .ph__tint { opacity: 0.85; transition: opacity 0.25s ease; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 5, 0.92);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__figure {
  position: relative;
  max-width: min(1400px, 100%);
  max-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: #0a0807;
}
.lightbox__caption {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--paper);
  opacity: 0.85;
  max-width: 720px;
  text-align: center;
  text-wrap: pretty;
}
.lightbox__caption em {
  font-style: italic;
  opacity: 0.7;
}
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 96;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(245, 240, 230, 0.4);
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lightbox__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 640px) {
  .lightbox { padding: 56px 16px 24px; }
  .lightbox__img { max-height: calc(100vh - 140px); }
  .lightbox__close { top: 14px; right: 14px; }
}
