@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700;9..144,900&family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,500&display=swap');

:root {
  --paper: #FDF3DD;
  --card-bg: #FFFFFF;
  --ink: #211F1A;
  --ink-soft: #6E6858;
  --rule: #E3D9BF;

  --accent-mint: #4F8C7A;
  --accent-moss: #5C7350;
  --accent-mustard: #B5811F;
  --accent-rose: #A15068;

  --font-display: 'Montserrat', sans-serif;
  --font-byline: 'Montserrat', sans-serif;
  --font-utility: 'Montserrat', sans-serif;

  /* Tipografía tipo isologo, usada en los lomos y tapas de la estantería.
     Fraunces es la aproximación tipográfica más cercana al isologo que
     encontramos en Google Fonts; si tenés el archivo real de la fuente
     del logo, reemplazá este @import y este valor por esa fuente. */
  --font-logo: 'Fraunces', 'Montserrat', serif;

  --shelf-wood-dark: #2c1a0e;
  --shelf-wood-mid: #4a2e17;
  --shelf-wood-light: #6b4223;
}

html[data-theme="dark"] {
  --paper: #0A0A0A;
  --card-bg: #171717;
  --ink: #F5F4F0;
  --ink-soft: #ABA9A3;
  --rule: #3A3A3A;

  --accent-mint: #8FD8C4;
  --accent-moss: #9BBF8A;
  --accent-mustard: #E8C168;
  --accent-rose: #E3A6B8;
}

html,
body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-byline);
  -webkit-font-smoothing: antialiased;
}

/* Ninguna sección full-bleed puede generar scroll horizontal. `clip`, a
   diferencia de `hidden`, no crea un contenedor de scroll: position: sticky
   sigue funcionando dentro de las experiencias con scroll. */
html {
  overflow-x: clip;
}

.site-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Salida del contenedor editorial: el contenido conserva su columna de
   lectura y las experiencias visuales se estiran de borde a borde del
   viewport. Los pocos píxeles que 100vw suma por la barra de scroll los
   recorta el clip de arriba, así que no aparece barra horizontal. */
.full-bleed {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Eyebrow header, taken from the light reference */
.section-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 64px 0 40px;
  scroll-margin-top: 24px;
}

.section-eyebrow h2 {
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
}

.section-eyebrow .rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 36px;
  padding-bottom: 80px;
}

/* Grilla de círculos (se usa tanto para números como para notas) */
.circle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 40px;
  padding-bottom: 80px;
  justify-items: center;
}

.circle-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  width: 100%;
  max-width: 220px;
}

.circle-card figure {
  margin: 0 auto 16px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: #e8e4da;
  border: 1px solid var(--rule);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.circle-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.circle-card:hover figure,
.circle-card:focus-visible figure {
  transform: scale(1.12);
  border-color: #6a675f;
}

.circle-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.22;
  margin: 0 0 4px;
  color: var(--ink);
}

.circle-card .byline {
  font-family: var(--font-byline);
  font-style: italic;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0;
}

/* Números: círculos grandes en la portada */
.issue-grid .circle-card {
  max-width: 260px;
}

.issue-grid .circle-card figure {
  width: 220px;
}

.issue-grid .circle-card h3 {
  font-size: 26px;
}

/* ============================================================
   Números — revistas paradas
   Los números de la revista, de pie y de frente, como en el
   estante de una librería: tapa completa a la vista, foto en
   blanco y negro, sin cards, sin bordes redondeados — el objeto
   es la propia tapa.
   ============================================================ */

.bookshelf-wrap {
  padding: 32px 0 88px;
}

.bookshelf {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 24px 20px;
  width: 100%;
}

.book {
  position: relative;
  width: 168px;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(.22, .8, .28, 1.04);
}

.book:hover,
.book:focus-visible {
  transform: translateY(-6px);
  z-index: 5;
}

.standing-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 3 / 4.3;
  background: var(--mag-color, var(--rule));
  filter: drop-shadow(0 16px 20px rgba(30, 20, 10, 0.18));
  /* opacity/transform también transicionan: cuando el libro entra en
     estado .is-open la tapa se "levanta" y se apaga con el mismo tempo
     que dura la apertura del overlay. */
  transition:
    filter 0.32s ease,
    opacity 0.42s cubic-bezier(.2, .8, .28, 1),
    transform 0.42s cubic-bezier(.2, .8, .28, 1);
}

html[data-theme="dark"] .standing-cover {
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.5));
}

.book:hover .standing-cover,
.book:focus-visible .standing-cover {
  filter: drop-shadow(0 22px 26px rgba(30, 20, 10, 0.24));
}

html[data-theme="dark"] .book:hover .standing-cover,
html[data-theme="dark"] .book:focus-visible .standing-cover {
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.6));
}

.book:focus-visible .standing-cover {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}

.standing-cover-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 0;
}

.standing-cover-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}

.standing-cover-meta {
  font-family: var(--font-byline);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.6;
  white-space: nowrap;
}

.standing-cover-photo {
  position: relative;
  flex: 1;
  margin: 10px 0;
  overflow: hidden;
}

.standing-cover-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) contrast(1.04);
  transition: transform 0.6s cubic-bezier(.2, .7, .2, 1), filter 0.4s ease;
}

.book:hover .standing-cover-photo img,
.book:focus-visible .standing-cover-photo img {
  transform: scale(1.03);
  filter: grayscale(0.7) contrast(1.05);
}

.standing-cover-foot {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}

.standing-cover-name {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.standing-cover-tagline {
  font-family: var(--font-byline);
  font-weight: 500;
  font-size: 7px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* Cuatro tonos que alternan tapa a tapa, como distintas tiradas encuadernadas */
.book:nth-child(4n+1) .standing-cover { background: #FBF8F0; color: #211F1A; }
.book:nth-child(4n+2) .standing-cover { background: #C9AD82; color: #241B10; }
.book:nth-child(4n+3) .standing-cover { background: #201E1B; color: #F4EEDF; }
.book:nth-child(4n)   .standing-cover { background: #E4DFD3; color: #211F1A; }

.book:nth-child(6n+1) { --mag-color: var(--accent-moss); }
.book:nth-child(6n+2) { --mag-color: var(--accent-mustard); }
.book:nth-child(6n+3) { --mag-color: var(--accent-rose); }
.book:nth-child(6n+4) { --mag-color: #3d4a63; }
.book:nth-child(6n+5) { --mag-color: #8a5a3c; }
.book:nth-child(6n)   { --mag-color: #2f3b3a; }

/* Mientras la tapa de esta pieza está abierta en el popup, la tapa parada
   queda "vacía": se apaga, pierde color y se eleva unos píxeles, como si
   la revista se hubiera levantado de la estantería. */
.book.is-open .standing-cover {
  opacity: 0.28;
  filter: grayscale(0.65);
  transform: translateY(-6px);
}

/* La tapa vive oculta dentro de la portada hasta que se abre; en ese momento
   se transporta al popup (#magOverlayStage) para que ocupe toda la atención. */
.book-cover {
  display: none;
}

.book-cover-media {
  position: absolute;
  inset: 0;
}

.book-cover-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Nameplate arriba, como el margen blanco con la cabecera de The New Yorker */
.book-cover-mast {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 16px 40px 12px;
  background: rgba(253, 243, 221, 0.97);
  border-bottom: 1.5px solid var(--ink);
  font-family: var(--font-utility);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: #211F1A;
}

/* Sello con el número de notas, como la numeración de tirada en una tapa de revista */
.book-cover-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FDF3DD;
  border: 1.5px solid #211F1A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 15px;
  color: #211F1A;
}

.book-cover-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 70px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.84) 78%);
  color: #FFFDF8;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.14;
  text-align: center;
}

.book-cover-caption em {
  font-family: var(--font-byline);
  font-style: italic;
  font-weight: 400;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: rgba(255, 253, 248, 0.85);
}

/* ============================================================
   Popup de lectura — simula abrir la revista y concentrarte en
   sus páginas: la tapa aparece entera, por fuera de la estantería.
   ============================================================ */

body.mag-lock {
  overflow: hidden;
}

.mag-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(43, 30, 18, 0.88) 0%, rgba(15, 10, 6, 0.94) 100%);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mag-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mag-overlay-stage {
  position: relative;
  opacity: 0;
  /* La transformación de entrada la resuelve el script con Web Animations,
     midiendo el rect de la tapa parada en el estante y animando desde ahí:
     la tapa nueva "crece" desde el punto donde estaba la revista. Acá solo
     se cuida el fade del contenedor. */
  transition: opacity 0.32s ease;
  will-change: transform, opacity;
}

.mag-overlay.is-open .mag-overlay-stage {
  opacity: 1;
}

.mag-overlay-stage .book-cover {
  display: flex;
  position: relative;
  width: min(92vw, 480px);
  height: min(74vh, 660px);
  border-radius: 6px;
  overflow: hidden;
  background: var(--mag-color, var(--accent-moss));
  box-shadow:
    0 50px 90px -20px rgba(0, 0, 0, 0.6),
    0 18px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.mag-overlay-hint {
  font-family: var(--font-byline);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: rgba(253, 243, 221, 0.72);
  text-align: center;
  max-width: 420px;
}

.mag-overlay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(253, 243, 221, 0.4);
  background: rgba(253, 243, 221, 0.08);
  color: #FDF3DD;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.mag-overlay-close:hover,
.mag-overlay-close:focus-visible {
  background: rgba(253, 243, 221, 0.16);
  border-color: rgba(253, 243, 221, 0.7);
  transform: rotate(90deg);
}

@media (max-width: 640px) {
  .bookshelf-wrap {
    padding: 24px 0 64px;
  }
  .bookshelf {
    gap: 16px 12px;
  }
  .book {
    width: 40%;
  }
  .standing-cover-name { font-size: 13px; }
  .standing-cover-logo { font-size: 10px; }
  .standing-cover-meta { font-size: 8px; }
  .standing-cover-tagline { font-size: 6.3px; }
  .book:hover,
  .book:focus-visible {
    transform: translateY(-3px);
  }

  .mag-overlay {
    padding: 20px;
    gap: 14px;
  }
  .mag-overlay-stage .book-cover {
    width: min(90vw, 380px);
    height: min(70vh, 560px);
  }
  .book-cover-mast { font-size: 10px; padding: 13px 34px 10px; }
  .book-cover-badge { width: 32px; height: 32px; font-size: 13px; }
  .book-cover-caption { font-size: 24px; padding: 56px 18px 20px; }
  .book-cover-caption em { font-size: 12px; }
  .mag-overlay-close { width: 36px; height: 36px; top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .book,
  .standing-cover-photo img,
  .mag-overlay,
  .mag-overlay-stage {
    transition: opacity 0.2s ease;
  }
  .book:hover,
  .book:focus-visible {
    transform: none;
  }
  .mag-overlay-stage {
    transform: none;
  }
  .mag-overlay.is-open .mag-overlay-stage {
    transform: none;
  }
}


/* Notas dentro de un número: filas de ancho completo (foto, autor, título+extracto, flecha) */
.note-rows {
  display: flex;
  flex-direction: column;
  padding-bottom: 80px;
}

.note-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
}

.note-row:first-child {
  border-top: 1px solid var(--rule);
}

.note-row:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.note-row-media {
  flex: 0 0 auto;
  width: 120px;
  text-align: center;
}

.note-row-media figure {
  width: 120px;
  height: 120px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #e8e4da;
  border: 1px solid var(--rule);
}

.note-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.note-row-author {
  font-family: var(--font-byline);
  font-style: italic;
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

.note-row-body {
  flex: 1 1 auto;
  min-width: 0;
}

.note-row-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.28;
  margin: 0 0 8px;
  color: var(--ink);
}

.note-row-excerpt {
  font-family: var(--font-byline);
  font-weight: 400;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-row-arrow {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.note-row:hover .note-row-arrow {
  transform: translateX(5px);
  border-color: var(--ink);
  background-color: var(--ink);
  color: var(--paper);
}

@media (max-width: 640px) {
  .note-row {
    gap: 14px;
    padding: 22px 0;
    align-items: flex-start;
  }
  .note-row-media,
  .note-row-media figure {
    width: 64px;
    height: 64px;
  }
  .note-row-author {
    font-size: 10.5px;
    margin: 6px 0 0;
    line-height: 1.3;
  }
  .note-row-body h3 {
    font-size: 16px;
    margin: 0 0 6px;
  }
  .note-row-excerpt {
    font-size: 12.5px;
    line-height: 1.45;
    -webkit-line-clamp: 3;
  }
  .note-row-arrow {
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .circle-card figure {
    transition: none;
  }
}

.circle-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 50%;
}

/* Site header / footer, kept quiet on purpose */
.site-header,
.site-footer {
  font-family: var(--font-utility);
}

.site-header {
  position: sticky;
  top: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  height: 150px;
  z-index: 30;
  transition: height 0.25s ease;
  will-change: height;
}

.site-header.is-scrolled {
  height: 72px;
}

.site-header.is-scrolled .site-nav-mark img {
  height: 48px;
}

.site-header.is-scrolled .site-nav-home,
.site-header.is-scrolled .site-nav-menu-btn {
  width: 34px;
  height: 34px;
}

.site-header.has-cover {
  background-size: cover;
  background-position: center;
}

.site-header-bg {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  opacity: 0.18;
  filter: grayscale(1);
  pointer-events: none;
}

.site-nav {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.site-nav-left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav-mark {
  justify-self: center;
}

.site-nav-search {
  justify-self: end;
}

.site-nav-home {
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, width 0.25s ease, height 0.25s ease;
}

.site-nav-home:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.site-nav-menu-btn {
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.2s ease, width 0.25s ease, height 0.25s ease;
}

.site-nav-menu-btn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* Panel lateral (índice) */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 40;
}

.nav-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 280px;
  max-width: 82vw;
  background: var(--paper);
  border-right: 1px solid var(--rule);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 41;
  padding: 28px 24px;
  box-sizing: border-box;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 32px;
}

.nav-drawer-close:hover {
  border-color: var(--ink);
}

.nav-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-drawer-list a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  padding: 14px 4px;
  border-bottom: 1px solid var(--rule);
  transition: opacity 0.2s ease;
}

.nav-drawer-list a:hover {
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .nav-drawer,
  .nav-drawer-overlay {
    transition: none;
  }
}

/* Logo en el pie de página */
.site-footer-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.site-footer-logo {
  height: 56px;
  width: auto;
}

.site-footer-inner p {
  margin: 0;
}

@media (max-width: 560px) {
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .site-footer-logo {
    height: 44px;
  }
}

.site-nav-mark {
  display: block;
}

.site-nav-mark img {
  display: block;
  height: 92px;
  width: auto;
  transition: height 0.25s ease;
}

.site-nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--ink-soft);
  font-family: var(--font-utility);
  font-weight: 400;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-nav-search:hover {
  border-color: var(--ink);
  color: var(--ink);
}

@media (max-width: 560px) {
  .site-header { height: 170px; }
  .site-nav-mark img { height: 68px; }
  .site-nav-search span { display: none; }
  .site-nav-search { padding: 8px; }
}

html[data-theme="light"] .logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; }
html:not([data-theme]) .logo-dark { display: none; }

.site-nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav-theme-btn {
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.site-nav-theme-btn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: block; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 48px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* Single post */
.post-full {
  max-width: 720px;
  margin: 56px auto 100px;
}

.post-full header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 52px;
  line-height: 1.12;
  margin: 0 0 12px;
}

.post-full .byline {
  font-family: var(--font-byline);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.post-full-image {
  margin: 0 0 40px;
}

.post-full-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--rule);
}

.post-full-content {
  font-family: var(--font-byline);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
}

.post-full-content p { margin: 0 0 22px; }

.post-full-content a { color: var(--accent-mint); }

.post-full-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Required by Ghost's editor for wide and full-bleed images/cards */
.post-full-content .kg-width-wide {
  width: 100%;
  max-width: 1040px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.post-full-content .kg-width-full {
  width: 100vw;
  max-width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

.post-full-content .kg-width-full img {
  border-radius: 0;
}

/* Franja con imagen difuminada y lema, entre la barra y los números */
.hero-band {
  position: relative;
  overflow: hidden;
  height: 520px;
  margin: 0 -32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-band-bg {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  filter: blur(4px) brightness(0.55) grayscale(0.3);
  transform: scale(1.05);
}

.hero-band-text {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 24px;
  text-align: center;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.32;
  color: var(--ink);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* Banner con la imagen de portada del tag, arriba de la lista de notas */
.tag-banner {
  margin: 0 -32px 40px;
  height: 340px;
  overflow: hidden;
}

.tag-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Indice del numero destacado: notas de a dos, con circulo y foto, mas chico */
.mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
  margin: 0 auto;
  gap: 32px 28px;
  justify-items: center;
}

.mini-card {
  max-width: 160px;
}

.mini-card figure {
  width: 110px;
}

.mini-card h3 {
  font-size: 16px;
}

@media (max-width: 480px) {
  .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
  .mini-card figure {
    width: 84px;
  }
  .mini-card h3 {
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .site-wrap { padding: 0 20px; }
  .section-eyebrow { margin: 40px 0 28px; }
  .hero-band { height: 360px; margin: 0 -20px; }
  .hero-band-text { font-size: 21px; }
  .tag-banner { margin: 0 -20px 28px; height: 220px; }
}

/* Perfil de autor: foto a la izquierda, nombre grande y bio a la derecha */
.author-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 56px 0 24px;
}

.author-photo {
  flex: 0 0 auto;
  width: 140px;
  height: 140px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #e8e4da;
  border: 1px solid var(--rule);
}

.author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.author-header-text h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--ink);
}

.author-bio {
  font-family: var(--font-byline);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 520px;
}

@media (max-width: 560px) {
  .author-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    margin: 40px 0 16px;
  }
  .author-header-text h1 {
    font-size: 28px;
  }
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  padding-bottom: 80px;
}

.about-card {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.about-card figure {
  width: 140px;
  height: 140px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  background: #e8e4da;
  border: 1px solid var(--rule);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.about-card:hover figure,
.about-card:focus-visible figure {
  transform: scale(1.08);
  border-color: #6a675f;
}

.about-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--ink);
}

.about-bio {
  font-family: var(--font-byline);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 480px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Entrevistas: circulos chicos, 3 por fila, se centran incluso si la ultima fila queda incompleta */
.interviews-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 760px;
  margin: 0 auto;
  gap: 36px 28px;
}

.interview-card {
  flex: 0 0 auto;
  width: 150px;
}

.interview-card figure {
  width: 150px;
}

.interview-card h3 {
  font-size: 17px;
}

@media (max-width: 640px) {
  .interview-card {
    width: 120px;
  }
  .interview-card figure {
    width: 120px;
  }
}

/* Numeros: mismo circulo grande que arriba de todo, uno debajo del otro */
.numbers-grid {
  grid-template-columns: 1fr;
  max-width: 260px;
  margin: 0 auto;
  gap: 56px;
}

/* ============================================================
   Introducción animada — de la orilla al archivo editorial.
   El scroll recorre la escena ilustrada: la orilla sube, rompe sobre
   el mar y la arena se vuelve papel, hasta que
   la escena se convierte, sin corte visible, en el fondo crema
   habitual del sitio.
   ============================================================ */

.orilla-intro-wrap {
  position: relative;
  height: 200vh;
  width: 100vw;
  max-width: none;
  margin: 0 calc(50% - 50vw);
  background: #D7AF82;
}

.orilla-intro {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #D7AF82;
}

/* La escena ilustrada completa: cielo, mar, espuma y arena. */
.orilla-intro-scene,
.orilla-intro-waves,
.orilla-intro-wave,
.orilla-intro-shore,
.orilla-intro-shore-inner,
.orilla-intro-sand,
.orilla-intro-grain {
  position: absolute;
  inset: 0;
}

.orilla-intro-scene,
.orilla-intro-wave,
.orilla-intro-shore-inner {
  background-size: cover;
  background-position: center 62%;
  background-repeat: no-repeat;
}

.orilla-intro-scene {
  background-image: url("../images/orilla-intro-escena.webp");
  transform-origin: 50% 70%;
  will-change: transform;
}

/* Olas en movimiento: tres franjas del mismo mar (lejos, medio y cerca)
   que se mecen a distinto ritmo, como el agua que fluye hacia la orilla. */
.orilla-intro-waves {
  transform-origin: 50% 70%;
  will-change: transform;
}

.orilla-intro-wave {
  will-change: transform;
  animation: orilla-flow 9s ease-in-out infinite alternate;
}

.orilla-intro-wave--lejos {
  background-image: url("../images/orilla-intro-ola-lejos.webp");
  --dx: 16px; --dy: 2px;
  animation-duration: 10s;
}

.orilla-intro-wave--medio {
  background-image: url("../images/orilla-intro-ola-medio.webp");
  --dx: -26px; --dy: 6px;
  animation-duration: 7s;
  animation-delay: -2.5s;
}

.orilla-intro-wave--cerca {
  background-image: url("../images/orilla-intro-ola-cerca.webp");
  --dx: 34px; --dy: 2.6vh;
  animation: orilla-surge 7s cubic-bezier(.45, 0, .3, 1) infinite;
}

/* Las olas cercanas van y vienen al mismo ritmo que la marea. */
@keyframes orilla-surge {
  0%   { transform: translate3d(calc(var(--dx) * -0.5), 0, 0) scale(1.04); }
  32%  { transform: translate3d(calc(var(--dx) * 0.5), var(--dy), 0) scale(1.04); }
  46%  { transform: translate3d(calc(var(--dx) * 0.5), var(--dy), 0) scale(1.04); }
  100% { transform: translate3d(calc(var(--dx) * -0.5), 0, 0) scale(1.04); }
}

@keyframes orilla-flow {
  0% { transform: translate3d(calc(var(--dx) * -1), 0, 0) scale(1.04); }
  50% { transform: translate3d(0, var(--dy), 0) scale(1.04); }
  100% { transform: translate3d(var(--dx), 0, 0) scale(1.04); }
}

/* La orilla (arena y última espuma) recortada sobre la misma escena:
   al bajar sube y avanza sobre el mar, como la ola que rompe. */
.orilla-intro-shore {
  transform-origin: 50% 70%;
  will-change: transform;
}

.orilla-intro-shore-inner {
  background-image: url("../images/orilla-intro-orilla.webp");
  animation: orilla-tide 7s cubic-bezier(.45, 0, .3, 1) infinite;
}

/* Arena que continúa por debajo cuando la orilla sube (se mueve con ella). */
.orilla-intro-shore-inner::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 60px);
  height: calc(80vh + 60px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 60px);
  mask-image: linear-gradient(180deg, transparent 0, #000 60px);
  background: #D6AE81 url("../images/orilla-intro-arena.webp") repeat;
  background-size: 640px auto;
}

/* Marea: el agua sube sobre la arena, se queda un instante y se retira
   despacio (la orilla baja y vuelve a subir). */
@keyframes orilla-tide {
  0%   { transform: translate3d(0, -0.6vh, 0); }
  32%  { transform: translate3d(0, 4.2vh, 0); }
  46%  { transform: translate3d(0, 4.2vh, 0); }
  100% { transform: translate3d(0, -0.6vh, 0); }
}

/* Paso final: la arena se funde con el papel del sitio en la parte de
   abajo, así la sección siguiente empalma sin corte y sin pantalla vacía. */
.orilla-intro-sand {
  inset: auto 0 auto 0;
  top: 0;
  height: 22vh;
  background: linear-gradient(180deg,
    rgba(214, 174, 129, 0) 0%,
    #E3C99F 50%,
    var(--paper) 100%);
  transform: translate3d(0, 100vh, 0);
  will-change: transform;
}

.orilla-intro-grain {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.045 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.45;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.orilla-intro-logo {
  position: absolute;
  left: 50%;
  bottom: 64%;
  transform: translate(-50%, 24px);
  width: min(300px, 42vw);
  opacity: 0;
  will-change: opacity, transform;
}

.orilla-intro-logo img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.96;
}

.orilla-intro-cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(58, 50, 40, 0.72);
  font-family: var(--font-utility);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  will-change: opacity;
}

.orilla-intro-cue-line {
  width: 1px;
  height: 30px;
  background: rgba(58, 50, 40, 0.35);
  overflow: hidden;
}

.orilla-intro-cue-line::after {
  content: '';
  display: block;
  width: 100%;
  height: 40%;
  background: rgba(58, 50, 40, 0.9);
  animation: orilla-cue-drop 2.4s ease-in-out infinite;
}

@keyframes orilla-cue-drop {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(250%); }
}

/* Números arranca enseguida después de las olas. */
.orilla-intro-wrap + .section-eyebrow { margin-top: 20px; }

@media (max-width: 640px) {
  .orilla-intro-wrap { height: 175vh; }
  .orilla-intro-logo { width: min(240px, 62vw); bottom: 66%; }
  .orilla-intro-scene,
  .orilla-intro-shore-inner { background-position: 42% 62%; }
}

@media (prefers-reduced-motion: reduce) {
  .orilla-intro-wrap { height: auto; }
  .orilla-intro { position: relative; height: 72vh; }
  .orilla-intro-shore-inner,
  .orilla-intro-wave,
  .orilla-intro-cue-line::after { animation: none; }
  .orilla-intro-sand { display: none; }
  .orilla-intro-logo { opacity: 1; transform: translate(-50%, 0); }
  .orilla-intro-cue { display: none; }
}

/* Micro-movimiento físico al entrar en pantalla: las piezas se asientan,
   con un mínimo peso y deriva propios, en vez de aparecer con un fade plano. */
.reveal {
  opacity: 0;
  transform: translateY(18px) rotate(var(--reveal-tilt, 0deg));
  transition: opacity 0.9s cubic-bezier(.2, .7, .2, 1), transform 0.9s cubic-bezier(.2, .7, .2, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.circle-grid .circle-card:nth-child(3n+1) { --reveal-tilt: -0.6deg; }
.circle-grid .circle-card:nth-child(3n+2) { --reveal-tilt: 0.4deg; }
.note-rows .note-row:nth-child(2n) { --reveal-tilt: -0.3deg; }
.bookshelf .book:nth-child(2n+1) { --reveal-tilt: -0.8deg; }
.bookshelf .book:nth-child(2n) { --reveal-tilt: 0.6deg; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Experiencias editoriales de la parte baja de la home:
   .orilla-scroll-photo · .orilla-marquee · .orilla-objective
   Todo el movimiento ligado al scroll se apoya en la variable
   --p (0 a 1) que escribe assets/js/orilla-editorial.js.
   ============================================================ */

/* 1 — Fotografía dentro de una ventana: el scroll recorre la
   imagen de arriba hacia abajo, como la mirada sobre una copia. */
.orilla-scroll-photo {
  position: relative;
  height: 230vh;
  width: 100vw;
  max-width: none;
  margin: -40px calc(50% - 50vw) 0;
}

.osp-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.osp-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.osp-eyebrow {
  margin: 0;
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.osp-frame {
  position: relative;
  height: min(78vh, 860px);
  overflow: hidden;
  background: var(--rule);
}

.osp-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(33, 31, 26, 0.12);
  pointer-events: none;
}

html[data-theme="dark"] .osp-frame::after {
  box-shadow: inset 0 0 0 1px rgba(245, 244, 240, 0.14);
}

.osp-media {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 142%;
  transform: translate3d(0, calc(var(--p, 0) * -29.4%), 0) scale(calc(1.03 - var(--p, 0) * 0.03));
  will-change: transform;
}

.osp-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Encabezado propio de la nota destacada, pegado a su fotografía. */
.section-eyebrow-tight {
  margin: 56px 0 6px;
}

.section-eyebrow-tight + .orilla-scroll-photo {
  margin-top: 0;
}

@media (max-width: 640px) {
  .section-eyebrow-tight { margin: 36px 0 4px; }
}

/* El texto vive sobre la fotografía, no debajo. */
.osp-scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  background: linear-gradient(180deg, rgba(8, 10, 11, 0) 0%, rgba(8, 10, 11, 0.42) 55%, rgba(8, 10, 11, 0.76) 100%);
  pointer-events: none;
}

.osp-over {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 40px;
}

.osp-over-meta {
  margin: 0;
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253, 243, 221, 0.78);
}

.osp-over-title {
  margin: 0;
  max-width: 22ch;
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: clamp(24px, 3.1vw, 40px);
  line-height: 1.12;
  color: #FDF3DD;
  text-wrap: pretty;
}

.osp-over-title a {
  color: inherit;
  text-decoration: none;
}

.osp-over-title a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

@media (max-width: 640px) {
  .orilla-scroll-photo { height: 190vh; margin-top: -20px; }
  .osp-frame { height: 68vh; }
  .osp-over { padding: 0 20px 24px; }
}

/* 2 — Cinta tipográfica continua: pausa editorial antes del objetivo. */
.orilla-marquee {
  width: 100vw;
  max-width: none;
  margin: 26px calc(50% - 50vw) 0;
  padding: 30px 0;
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.om-row {
  display: flex;
  width: max-content;
  animation: om-slide 48s linear infinite;
  will-change: transform;
}

.om-item {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding-right: 0.4em;
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: clamp(30px, 6.2vw, 74px);
  line-height: 1.15;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.om-dot {
  flex: none;
  width: 0.15em;
  height: 0.15em;
  border-radius: 50%;
  background: var(--accent-mustard);
}

@keyframes om-slide {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@media (max-width: 640px) {
  .orilla-marquee { margin-top: 18px; padding: 20px 0; }
  .om-row { animation-duration: 30s; }
}

@media (prefers-reduced-motion: reduce) {
  .om-row { animation: none; transform: none; }
}

/* Notas que cuelgan directamente de la cinta, sin encabezado propio. */
.orilla-marquee-notes {
  margin-top: 56px;
}

@media (max-width: 640px) {
  .orilla-marquee-notes { margin-top: 36px; }
}

/* 3 — Objetivo: fotografía sostenida y texto que se aclara con el scroll. */
.orilla-objective {
  position: relative;
  height: 185vh;
  width: 100vw;
  max-width: none;
  margin: 0 calc(50% - 50vw);
  background: #0b0d0e;
}

.oo-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.oo-media {
  position: absolute;
  inset: -3% 0;
  transform: translate3d(0, calc(var(--p, 0) * -2%), 0) scale(calc(1.07 - var(--p, 0) * 0.07));
  will-change: transform;
}

.oo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oo-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 11, 0.3) 0%, rgba(8, 10, 11, 0.5) 46%, rgba(8, 10, 11, 0.78) 100%);
  opacity: calc(0.6 + var(--p, 0) * 0.4);
}

.oo-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.oo-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 11vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 22px;
}

.oo-kicker {
  margin: 0;
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #FDF3DD;
  opacity: calc(0.3 + var(--p, 0) * 0.7);
}

.oo-rule {
  width: 64px;
  height: 1px;
  background: rgba(253, 243, 221, 0.55);
  opacity: calc(0.2 + var(--p, 0) * 0.8);
}

.oo-lede {
  margin: 0;
  max-width: 26ch;
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: clamp(30px, 4.9vw, 66px);
  line-height: 1.1;
  color: #FDF3DD;
  text-wrap: pretty;
}

.oo-word {
  display: inline-block;
  will-change: opacity, filter;
  /* JS escribe --t (0..1) por palabra; el CSS interpola. Un solo write por
     palabra en vez de dos (opacity + filter) por frame. */
  opacity: calc(0.1 + 0.9 * var(--t, 0));
  filter: brightness(calc(0.34 + 0.66 * var(--t, 0)));
}

@media (max-width: 640px) {
  .orilla-objective { height: 155vh; }
  .oo-copy { padding: 0 20px 14vh; gap: 16px; }
  .oo-lede { max-width: 18ch; }
}

@media (prefers-reduced-motion: reduce) {
  .orilla-scroll-photo { height: auto; }
  .osp-sticky { position: relative; height: auto; padding: 8px 0; }
  .osp-media { position: relative; height: auto; transform: none; }
  .osp-media img { height: auto; }
  .osp-frame { height: auto; }
  .orilla-objective { height: auto; }
  .oo-sticky { position: relative; height: auto; min-height: 76vh; }
  .oo-media { transform: none; }
  .oo-veil { opacity: 1; }
  .oo-kicker,
  .oo-rule { opacity: 1; }
  .oo-copy { padding: 24vh 32px 8vh; }
}


/* ============================================================
   Número como revista vertical (tag.hbs + partials/issue-note.hbs)
   Tapa del número · tapa de cada nota (sticky) · cuerpo de la nota
   El movimiento vuelve a apoyarse en --p, que escribe
   assets/js/orilla-editorial.js.
   ============================================================ */

.issue-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}

.issue-progress span {
  display: block;
  height: 100%;
  background: var(--accent-mustard);
  transform: scaleX(var(--ip, 0));
  transform-origin: left center;
}

.issue {
  display: block;
}

/* Tapa del número: entrada al contenido, sin robarle espacio a la lectura. */
.issue-head {
  position: relative;
  height: 58vh;
  min-height: 380px;
  width: 100vw;
  max-width: none;
  margin: 0 calc(50% - 50vw);
  overflow: hidden;
  background: #0b0d0e;
}

.issue-head-media,
.issue-head-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.issue-head-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 11, 0.42) 0%, rgba(8, 10, 11, 0.28) 40%, rgba(8, 10, 11, 0.78) 100%);
}

.issue-head-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
}

.issue-back {
  align-self: flex-start;
  font-family: var(--font-utility);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253, 243, 221, 0.8);
  text-decoration: none;
}

.issue-back:hover {
  color: #FDF3DD;
}

.issue-head-title {
  margin: 0;
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: clamp(34px, 5.6vw, 74px);
  line-height: 1.04;
  color: #FDF3DD;
}

.issue-head-meta {
  margin: 0;
  font-family: var(--font-utility);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253, 243, 221, 0.72);
}

/* Tapa de cada nota: la fotografía se sostiene mientras el usuario baja y
   entrega el paso al texto. Funciona como el pase de página de la revista. */
.issue-cover {
  position: relative;
  height: 165vh;
  width: 100vw;
  max-width: none;
  margin: 0 calc(50% - 50vw);
  background: #0b0d0e;
}

.issue-cover-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.issue-cover-media {
  position: absolute;
  inset: -3% 0;
  transform: translate3d(0, calc(var(--p, 0) * -2.5%), 0) scale(calc(1.08 - var(--p, 0) * 0.08));
  will-change: transform;
}

.issue-cover-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.issue-cover-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 10, 11, 0.22) 0%, rgba(8, 10, 11, 0.34) 45%, rgba(8, 10, 11, 0.74) 100%);
  opacity: calc(0.7 + var(--p, 0) * 0.3);
}

.issue-cover-copy {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 12vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  transform: translate3d(0, calc((1 - var(--p, 0)) * 22px), 0);
}

.issue-cover-index {
  margin: 0;
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(253, 243, 221, 0.78);
  opacity: calc(var(--p, 0) * 3.4 - 0.05);
}

.issue-cover-title a {
  color: inherit;
  text-decoration: none;
}

.issue-cover-title a:hover {
  text-decoration: underline;
  text-underline-offset: 7px;
}

.issue-cover-title {
  margin: 0;
  max-width: 24ch;
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 58px);
  line-height: 1.1;
  color: #FDF3DD;
  text-wrap: pretty;
  opacity: calc(var(--p, 0) * 2.6 - 0.12);
}

/* Cuerpo de la nota: columna de lectura, mismo sistema que la nota individual. */
.issue-note {
  max-width: 720px;
  margin: 0 auto;
  padding: 92px 0 116px;
}

.issue-note-head {
  margin-bottom: 40px;
}

.issue-note-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.issue-note-title a {
  color: var(--ink);
  text-decoration: none;
}

.issue-note-title a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.issue-note-byline {
  margin: 0 0 20px;
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.issue-note-lede {
  margin: 0;
  font-family: var(--font-byline);
  font-size: clamp(18px, 1.9vw, 22px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 34ch;
  text-wrap: pretty;
}

/* Cierre del número. */
.issue-end {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.issue-end-rule {
  width: 1px;
  height: 72px;
  background: var(--rule);
}

.issue-end-label {
  margin: 0;
  font-family: var(--font-utility);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.issue-end .issue-back {
  align-self: center;
  color: var(--ink);
}

@media (max-width: 640px) {
  .issue-head { height: 52vh; min-height: 320px; }
  .issue-head-copy { padding: 0 20px 28px; }
  .issue-cover { height: 135vh; }
  .issue-cover-copy { padding: 0 20px 14vh; gap: 10px; }
  .issue-note { padding: 64px 0 88px; }
  .issue-note-head { margin-bottom: 28px; }
  .issue-end { padding-bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .issue-progress { display: none; }
  .issue-cover { height: auto; }
  .issue-cover-sticky { position: relative; height: 76vh; }
  .issue-cover-media { transform: none; }
  .issue-cover-scrim { opacity: 1; }
  .issue-cover-copy { transform: none; }
  .issue-cover-index,
  .issue-cover-title { opacity: 1; }
}


/* ============================================================
   Índice del número (tag.hbs + partials/issue-index-layer.hbs)
   Cada historia es una capa de la orilla: niveles de arena, la marca
   que deja el agua al retirarse y estrías finas de distinta densidad.
   Todo con la paleta existente, sin texturas fotográficas.
   ============================================================ */

.issue-index {
  position: relative;
  width: 100vw;
  max-width: none;
  margin: 0 calc(50% - 50vw);
  padding: 104px 0 116px;
  overflow: hidden;
}

.issue-index-strata {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.issue-index-label {
  margin: 0;
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.issue-index-hint {
  margin: 6px 0 52px;
  font-family: var(--font-byline);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
}

.strata-layer {
  position: relative;
  display: block;
  padding: 34px 0 42px;
  text-decoration: none;
  color: var(--ink);
  opacity: 0;
  transform: translate3d(var(--from-x, 0), var(--from-y, 22px), 0);
  transition: opacity 0.9s cubic-bezier(.2, .7, .2, 1), transform 1s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
}

.issue-index.is-in .strata-layer {
  opacity: 1;
  transform: none;
}

/* La arena se asienta: cada capa llega de un lado distinto y se queda quieta. */
.strata-layer:nth-child(odd) { --from-x: -16px; --from-y: 10px; }
.strata-layer:nth-child(3n+2) { --from-x: 14px; --from-y: 16px; }

/* Acumulación: anchos, sangrados y sangría del texto varían por capa. */
.strata-layer:nth-child(4n+2) { width: 100%; margin-left: 0; --pad: 0px; }
.strata-layer:nth-child(4n+3) { width: 86%; margin-left: 14%; --pad: 26px; }
.strata-layer:nth-child(4n+4) { width: 95%; margin-left: 5%; --pad: 8px; }
.strata-layer:nth-child(4n+5) { width: 80%; margin-left: 20%; --pad: 34px; }

/* Nivel de arena: el tono cruza la costa y se disuelve en los extremos,
   nunca es un rectángulo alrededor del texto. */
.strata-layer:nth-child(odd)::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50vw;
  right: -50vw;
  background: rgba(110, 104, 88, 0.05);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 82%, transparent 100%);
  pointer-events: none;
}

html[data-theme="dark"] .strata-layer:nth-child(odd)::before {
  background: rgba(245, 244, 240, 0.05);
}

/* Estrías finas: la arena peinada por el agua. Cambian de densidad por capa
   y se apagan hacia los bordes, así la capa no termina en una línea recta. */
.strata-layer::after {
  content: '';
  position: absolute;
  left: -8%;
  right: -6%;
  bottom: 0;
  height: 26px;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(110, 104, 88, 0.16) 0px,
    rgba(110, 104, 88, 0.16) 1px,
    transparent 1px,
    transparent calc(4px + var(--i, 0) * 1px)
  );
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 calc(9% + var(--i, 0) * 3%), #000 calc(74% - var(--i, 0) * 2%), transparent 100%),
    linear-gradient(180deg, #000 0%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 calc(9% + var(--i, 0) * 3%), #000 calc(74% - var(--i, 0) * 2%), transparent 100%),
    linear-gradient(180deg, #000 0%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  pointer-events: none;
  transition: opacity 0.5s ease;
  opacity: 0.85;
}

html[data-theme="dark"] .strata-layer::after {
  background-image: repeating-linear-gradient(
    180deg,
    rgba(245, 244, 240, 0.18) 0px,
    rgba(245, 244, 240, 0.18) 1px,
    transparent 1px,
    transparent calc(4px + var(--i, 0) * 1px)
  );
}

/* La marca del agua: el límite superior del estrato, disuelto en las puntas. */
.strata-line {
  position: absolute;
  top: 0;
  left: -4%;
  right: -2%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--rule) calc(7% + var(--i, 0) * 2%), var(--rule) 78%, transparent 100%);
  transform: rotate(calc(var(--i, 0) * 0.012deg - 0.04deg));
  transform-origin: left center;
  transition: height 0.45s ease, opacity 0.45s ease;
}

.strata-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: var(--pad, 0px);
  transition: transform 0.5s cubic-bezier(.2, .7, .2, 1);
}

.strata-num {
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1;
  color: var(--ink-soft);
  opacity: 0.6;
  transition: color 0.45s ease, opacity 0.45s ease;
}

.strata-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2.4vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  max-width: 26ch;
  text-wrap: pretty;
}

.strata-author {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(13px, 1.2vw, 15px);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  opacity: 0.75;
}

/* Hover: la capa se corre unos píxeles y la arena se define. */
.strata-layer:hover .strata-copy,
.strata-layer:focus-visible .strata-copy {
  transform: translate3d(7px, 0, 0);
}

.strata-layer:hover::after,
.strata-layer:focus-visible::after {
  opacity: 1;
}

.strata-layer:hover .strata-num,
.strata-layer:focus-visible .strata-num {
  opacity: 1;
}

.strata-layer:focus-visible {
  outline: 1px solid var(--accent-mustard);
  outline-offset: 8px;
}

/* La nota que se está leyendo: su capa queda un poco más presente. */
.strata-layer.is-current .strata-line {
  height: 2px;
}

.strata-layer.is-current .strata-num {
  color: var(--accent-mustard);
  opacity: 1;
}

@media (max-width: 640px) {
  .issue-index { padding: 72px 0 80px; }
  .issue-index-strata { padding: 0 20px; }
  .issue-index-hint { margin-bottom: 34px; }
  .strata-layer { padding: 26px 0 32px; }
  .strata-layer:nth-child(4n+2),
  .strata-layer:nth-child(4n+3),
  .strata-layer:nth-child(4n+4),
  .strata-layer:nth-child(4n+5) { width: 100%; margin-left: 0; }
  .strata-layer:nth-child(4n+3) { --pad: 14px; }
  .strata-layer:nth-child(4n+5) { --pad: 20px; }
  .strata-layer::after { left: -6%; right: -6%; height: 20px; }
  .strata-num { font-size: 28px; }
  .strata-title { font-size: 20px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .strata-layer {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .strata-copy,
  .strata-line,
  .strata-layer::after { transition: none; }
  .strata-layer:hover .strata-copy,
  .strata-layer:focus-visible .strata-copy { transform: none; }
}

/* ============================================================
   SECCIÓN DE LA NOTA (Sociedad, Cultura, Política…)
   Se carga con una tag cuyo slug empiece con "seccion-".
   Ej.: nombre "Sociedad", slug "seccion-sociedad".
   ============================================================ */

/* Color de cada sección. Las que no estén en la lista usan mostaza. */
[data-section] { --section-color: var(--accent-mustard); --section-cover: #E8C168; }
[data-section="seccion-sociedad"] { --section-color: var(--accent-mint); --section-cover: #8FD8C4; }
[data-section="seccion-cultura"]  { --section-color: var(--accent-rose); --section-cover: #E3A6B8; }
[data-section="seccion-politica"] { --section-color: var(--accent-mustard); --section-cover: #E8C168; }
[data-section="seccion-economia"] { --section-color: var(--accent-moss); --section-cover: #9BBF8A; }

/* Índice del número: la sección va al lado del título. */
.strata-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.strata-section {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 6px 13px 6px 11px;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color 0.45s ease, color 0.45s ease;
}

.strata-section-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--section-color);
}

.strata-layer:hover .strata-section,
.strata-layer:focus-visible .strata-section,
.strata-layer.is-current .strata-section {
  border-color: var(--section-color);
  color: var(--ink);
}

/* Tapa de la nota: la sección va arriba del título, en un recuadro con
   marcas de corte en las esquinas, como una prueba de imprenta. */
.issue-cover-section {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px 4px;
  padding: 11px 20px 11px 16px;
  border: 1px solid rgba(253, 243, 221, 0.3);
  background: rgba(10, 10, 10, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-utility);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #FDF3DD;
  opacity: calc(var(--p, 0) * 3 - 0.08);
}

.issue-cover-section::before {
  content: '';
  position: absolute;
  inset: -5px;
  pointer-events: none;
  --t: 1.5px;
  --l: 11px;
  background:
    linear-gradient(var(--section-cover) 0 0) top left / var(--l) var(--t) no-repeat,
    linear-gradient(var(--section-cover) 0 0) top left / var(--t) var(--l) no-repeat,
    linear-gradient(var(--section-cover) 0 0) top right / var(--l) var(--t) no-repeat,
    linear-gradient(var(--section-cover) 0 0) top right / var(--t) var(--l) no-repeat,
    linear-gradient(var(--section-cover) 0 0) bottom left / var(--l) var(--t) no-repeat,
    linear-gradient(var(--section-cover) 0 0) bottom left / var(--t) var(--l) no-repeat,
    linear-gradient(var(--section-cover) 0 0) bottom right / var(--l) var(--t) no-repeat,
    linear-gradient(var(--section-cover) 0 0) bottom right / var(--t) var(--l) no-repeat;
}

.issue-cover-section-rule {
  width: 22px;
  height: 1.5px;
  background: var(--section-cover);
}

@media (max-width: 640px) {
  .strata-section { font-size: 10px; padding: 5px 11px 5px 10px; }
  .issue-cover-section { font-size: 11.5px; padding: 9px 16px 9px 13px; gap: 10px; }
  .issue-cover-section-rule { width: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .issue-cover-section { opacity: 1; }
  .strata-section { transition: none; }
}

/* ============================================================
   ÍNDICE: foto de portada de fondo en cada capa.
   Nítida en todas las capas.
   ============================================================ */

/* Sin la bajada del índice, el espacio se mantiene vacío. */
.issue-index-label { margin-bottom: 52px; }

.strata-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50vw;
  right: -50vw;
  overflow: hidden;
  opacity: 0.62;
  pointer-events: none;
  transition: opacity 0.6s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.strata-bg-img {
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

/* Todas las capas con la foto nítida, como la primera. */
.strata-bg-soft { display: none; }

/* Velo del lado del texto: la foto se ve, pero el título se sigue leyendo. */
.strata-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--paper) 0%, transparent) 0%,
    color-mix(in srgb, var(--paper) 72%, transparent) 38%,
    color-mix(in srgb, var(--paper) 40%, transparent) 60%,
    color-mix(in srgb, var(--paper) 8%, transparent) 85%);
}

html:not([data-theme="dark"]) .strata-bg { opacity: 0.5; }

.strata-layer:hover .strata-bg,
.strata-layer:focus-visible .strata-bg,
.strata-layer.is-current .strata-bg { opacity: 0.85; }

html:not([data-theme="dark"]) .strata-layer:hover .strata-bg,
html:not([data-theme="dark"]) .strata-layer:focus-visible .strata-bg,
html:not([data-theme="dark"]) .strata-layer.is-current .strata-bg { opacity: 0.68; }

@media (max-width: 640px) {
  .issue-index-label { margin-bottom: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .strata-bg { transition: none; }
}

/* ============================================================
   FILAS DE NOTAS: epígrafe como extracto
   ============================================================ */
.note-row-excerpt.is-epigraph {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.note-row-epigraph {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: italic;
  color: var(--ink);
  opacity: 0.85;
}

.note-row-epigraph-by {
  display: block;
  margin-top: 6px;
  font-family: var(--font-utility);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ==========================================================
   Epígrafe: tarjeta "Header" de Ghost con la estética Orilla
   Pisa el fondo negro que Ghost pone por defecto (v1 y v2).
   ========================================================== */
.kg-card.kg-header-card,
.kg-card.kg-header-card.kg-v2,
.kg-card.kg-header-card.kg-style-dark,
.kg-card.kg-header-card.kg-style-accent,
.kg-card.kg-header-card.kg-style-light {
  background: transparent !important;
  background-image: none !important;
  color: var(--ink) !important;
  min-height: 0 !important;
  max-width: 34rem;
  margin: 3rem auto !important;
  padding: 2rem 0 !important;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 0 !important;
  text-align: center;
  position: relative;
}
.kg-card.kg-header-card::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--accent-mustard);
  margin: 0 auto 1.5rem;
}
.kg-header-card .kg-header-card-content,
.kg-header-card .kg-header-card-text {
  padding: 0 !important;
  min-height: 0 !important;
  background: none !important;
}
.kg-header-card .kg-header-card-image,
.kg-header-card .kg-header-card-button { display: none !important; }
.kg-header-card h2,
.kg-header-card .kg-header-card-heading,
.kg-header-card .kg-header-card-header {
  font-family: var(--font-logo) !important;
  font-weight: 600 !important;
  font-style: italic;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem) !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  color: var(--ink) !important;
  margin: 0 !important;
}
.kg-header-card p,
.kg-header-card h3,
.kg-header-card .kg-header-card-subheading,
.kg-header-card .kg-header-card-subheader {
  font-family: var(--font-utility) !important;
  font-size: .72rem !important;
  font-weight: 600 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase;
  color: var(--ink-soft) !important;
  margin: 1.25rem 0 0 !important;
  max-width: none !important;
}
.kg-header-card p::before,
.kg-header-card h3::before { content: "— "; }

/* Pie: Instagram junto al copyright */
.site-footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer-socials:not(:has(a)) { display: none; }
.site-footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.site-footer-social:hover,
.site-footer-social:focus-visible {
  border-color: var(--accent-mustard);
  color: var(--accent-mustard);
  transform: translateY(-1px);
}
@media (max-width: 560px) {
  .site-footer-right { gap: 12px; }
}

/* Número: botón flotante para volver al índice */
.issue-index { scroll-margin-top: 90px; }
.issue-to-index {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s, border-color .2s ease, color .2s ease;
}
.issue-to-index.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s, border-color .2s ease, color .2s ease;
}
.issue-to-index:hover,
.issue-to-index:focus-visible {
  border-color: var(--accent-mustard);
  color: var(--accent-mustard);
}
@media (prefers-reduced-motion: reduce) {
  .issue-to-index, .issue-to-index.is-visible { transition: none; transform: none; }
}

/* ============================================================
   Celular: la foto de portada de cada nota del número se ve completa
   (sin recorte). El espacio libre queda con el fondo oscuro de la tapa.
   En computadora no cambia nada.
   ============================================================ */
@media (max-width: 640px) {
  .issue-cover-sticky {
    height: 100vh;
    height: 100svh;
  }
  .issue-cover-media {
    inset: 0;
    transform: translate3d(0, calc(var(--p, 0) * -2%), 0);
  }
  .issue-cover-media img {
    object-fit: contain;
    object-position: center 42%;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .issue-cover-sticky { height: 76vh; height: 76svh; }
  .issue-cover-media { transform: none; }
}
