/* Editorial Ochenta — landing (dirección B «Índice»).
   Tokens muestreados de primeras ediciones (dominio público):
   azul        #305674  tinta azul de «AZUL...» en la portada de 1888, Valparaíso
   azul-tinta  #1A3E5C  el centro de esas mismas letras
   papel       #F6E5C6  el papel de esa portada, como está hoy
   ocre        #E4A848  papel de la cubierta de Los heraldos negros, Lima 1918
   Motion: ninguno. Solo estados que responden a una acción. Rutas relativas: sirve igual en
   la raíz o bajo cualquier subcarpeta. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2?v=2f5dbedc9a") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-italic-var.woff2?v=9bd06d952e") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --azul: #305674;
  --azul-tinta: #1A3E5C;
  --papel: #F6E5C6;
  --ocre: #E4A848;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--azul);
  color: var(--papel);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-kerning: normal;
  font-variant-numeric: lining-nums proportional-nums;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.16em;
}
a:hover { color: var(--ocre); }

:focus-visible {
  outline: 3px solid var(--ocre);
  outline-offset: 3px;
}

::selection { background: var(--ocre); color: var(--azul-tinta); }

.wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ---------- Cabecera e índice ---------- */

.hero { padding-top: 1.5rem; padding-bottom: 4.5rem; }

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 2rem;
  flex-wrap: wrap;
}

/* Marca: mayúsculas espaciadas como el «RUBÉN DARÍO» de la portada de 1888. Una sola vez. */
.wordmark {
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }

.hero h1 {
  margin-top: 4.5rem;
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.5rem, 1rem + 6.2vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  max-width: 12ch;
}

.index-head {
  margin-top: 4rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.index-head h2 { font-weight: 600; font-size: 1.25rem; }
.index-head p { font-size: 1.0625rem; }

.index {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  border-top: 2px solid var(--papel);
}

.entry {
  display: grid;
  grid-template-columns: 3rem 17rem auto 1fr auto;
  grid-template-areas: "n author title leader year";
  align-items: baseline;
  column-gap: 1rem;
  padding: 1.1rem 0 1rem;
  border-bottom: 1px solid var(--papel);
}
.entry .n {
  grid-area: n;
  color: var(--ocre);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
}
.entry .author { grid-area: author; font-size: 1.125rem; }
.entry .title {
  grid-area: title;
  font-weight: 600;
  font-size: 1.875rem;
  line-height: 1.1;
  text-decoration: none;
}
.entry .title:hover { text-decoration: underline; }
.entry .leader {
  /* Puntos conductores: los tres puntos de «AZUL...», en fila. */
  grid-area: leader;
  align-self: end;
  height: 0.5rem;
  margin: 0 0 0.35rem;
  background-image: radial-gradient(circle at 0.1875rem 0.1875rem, var(--ocre) 0.125rem, transparent 0.15625rem);
  background-size: 0.75rem 0.375rem;
  background-repeat: repeat-x;
  background-position: left bottom;
}
.entry .year {
  grid-area: year;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- La casa ---------- */

.house { padding-bottom: 5rem; }
.house .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem 6rem;
  align-items: start;
}
.house h2 {
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 1.25rem;
}
.house p {
  max-width: 54ch;
  font-size: 1.1875rem;
  line-height: 1.5;
}
.house p + p { margin-top: 1rem; }

/* ---------- La colección: portadas en código ---------- */

.collection {
  background: var(--azul-tinta);
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}
.collection h2 { font-weight: 600; font-size: 1.25rem; }
.collection .lead { margin-top: 0.5rem; max-width: 60ch; }

.covers {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 2rem;
  align-items: start;
}

.cover { min-width: 0; }

/* La portada: 13 × 20, compuesta como la portadilla de 1888. */
.face {
  aspect-ratio: 13 / 20;
  min-width: 0;
  padding: 1.5rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  background: var(--papel);
  color: var(--azul);
}
.face.ink { background: var(--azul-tinta); color: var(--papel); border: 1px solid var(--papel); }
.face.ochre { background: var(--ocre); color: var(--azul-tinta); }
.face.ink.ochre-type { color: var(--ocre); }

.face .c-title {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.5rem, 0.6rem + 2.4vw, 2.5rem);
  line-height: 0.98;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.face .c-author {
  margin-top: 1rem;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.face .c-foot {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-top: 2px solid currentColor;
  font-weight: 600;
  font-size: 1rem;
}
.face .c-foot .num { font-size: 1.5rem; line-height: 1; }

.cover figcaption {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* ---------- Para leer ---------- */

.reading { padding-top: 4.5rem; padding-bottom: 4rem; }
.reading .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem 6rem;
  align-items: start;
}
.reading h2 { grid-column: 1 / -1; font-weight: 600; font-size: 1.25rem; }
.reading .lead { grid-column: 1 / -1; margin-top: -2rem; max-width: 60ch; }

.poem-head h3 { font-weight: 700; font-size: 2rem; line-height: 1.1; }
.poem-head p { margin-top: 0.4rem; font-size: 1.0625rem; }

.poem {
  margin-top: 2rem;
  font-size: 1.25rem;
  line-height: 1.45;
  max-width: 34em;
}
.poem p { margin: 0 0 1.2em; }
.poem p:last-child { margin-bottom: 0; }
/* Verso largo: si se parte, la vuelta entra con sangría francesa. */
.poem .l { display: block; padding-left: 2em; text-indent: -2em; }

.source { margin-top: 1.5rem; max-width: 46ch; font-size: 0.9375rem; }

/* ---------- La edición ---------- */

.edition {
  background: var(--azul-tinta);
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}
.edition h2 { font-weight: 600; font-size: 1.25rem; }
.edition dl {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 4rem;
  max-width: 64rem;
}
.edition dt { color: var(--ocre); font-weight: 600; }
.edition dd { margin-top: 0.2rem; max-width: 46ch; }

/* ---------- Salida honesta y crédito ---------- */

.exit { padding-top: 4rem; padding-bottom: 2rem; }
.exit h2 {
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 3rem);
  line-height: 1;
  text-transform: uppercase;
  max-width: 16ch;
}
.exit p { margin-top: 1.25rem; max-width: 54ch; font-size: 1.1875rem; }

.credit {
  margin-top: 3rem;
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--papel);
  font-size: 0.875rem;
}
.credit p + p { margin-top: 0.4rem; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .entry {
    grid-template-columns: 2.5rem auto 1fr auto;
    grid-template-areas:
      "n title leader year"
      "n author author author";
    row-gap: 0.2rem;
  }
  .entry .title { font-size: 1.625rem; }
  .entry .year { font-size: 1.375rem; }
  .house .wrap, .reading .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .reading .lead { margin-top: -1.5rem; }
  .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edition dl { grid-template-columns: 1fr; gap: 1.25rem; }
}

@media (max-width: 720px) {
  .wrap { padding-left: 1rem; padding-right: 1rem; }
  .hero { padding-bottom: 3.5rem; }
  .hero h1 { margin-top: 3rem; }
  .index-head { margin-top: 3rem; }
  .entry { column-gap: 0.75rem; padding: 0.9rem 0 0.8rem; }
  .entry .n { font-size: 1.375rem; }
  .entry .title { font-size: 1.375rem; }
  .entry .year { font-size: 1.125rem; }
  .entry .author { font-size: 1rem; }
  .entry .leader { margin-bottom: 0.2rem; }
  .house { padding-bottom: 3.5rem; }
  .house p { font-size: 1.0625rem; }
  .collection, .edition { padding-top: 3rem; padding-bottom: 3.5rem; }
  .covers { gap: 2rem 1rem; }
  .face { padding: 1rem 0.875rem 0.875rem; }
  .face .c-author { margin-top: 0.75rem; font-size: 0.75rem; letter-spacing: 0.1em; }
  .face .c-foot { padding-top: 1rem; font-size: 0.875rem; }
  .face .c-foot .num { font-size: 1.25rem; }
  .reading { padding-top: 3.5rem; }
  .poem { font-size: 1.125rem; }
  .exit p { font-size: 1.0625rem; }
}

@media (max-width: 400px) {
  .masthead { gap: 0.5rem 1rem; }
  .nav { gap: 1rem; }
  .entry .title { font-size: 1.25rem; }
  .face .c-title { font-size: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
