:root {
  --verde: #18332e;
  --verde-medio: #295149;
  --papel: #f3eee4;
  --papel-oscuro: #dfd6c7;
  --tinta: #17201d;
  --rojo: #b74832;
  --blanco: #fffdf7;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  color: var(--tinta);
  background: var(--papel);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: inherit;
}

.portada {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.25rem 1.5rem;
  color: var(--blanco);
  background:
    radial-gradient(circle at 80% 22%, rgba(255,255,255,.08) 0 1px, transparent 2px),
    linear-gradient(145deg, var(--verde-medio), var(--verde) 60%);
  background-size: 17px 17px, auto;
}

.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.marca {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
}

.portada-contenido {
  width: 100%;
  max-width: 42rem;
  margin: auto;
}

.sobrelinea {
  margin: 0 0 .65rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1,
h2,
.cierre {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .95;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(4.25rem, 21vw, 8rem);
}

.bajada {
  max-width: 31rem;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.24rem;
  line-height: 1.45;
}

.datos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.35);
}

.datos div {
  min-width: 0;
}

.datos dt {
  font-size: .65rem;
  letter-spacing: .1em;
  opacity: .65;
  text-transform: uppercase;
}

.datos dd {
  margin: .2rem 0 0;
  font-size: .83rem;
  font-weight: 700;
  line-height: 1.25;
}

.continuar {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.35);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

.introduccion {
  padding: 5rem 1.25rem 2.5rem;
}

.introduccion h2,
.estacion h2 {
  margin: 0 0 1.4rem;
  font-size: clamp(3.2rem, 15vw, 5.5rem);
}

.introduccion > p:last-child {
  max-width: 38rem;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.16rem;
}

.mapa-recorrido {
  padding: 1rem 1.25rem 5rem;
}

.mapa-encabezado h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 13vw, 5rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1;
}

.mapa-encabezado > p {
  max-width: 30rem;
  margin: 1.1rem 0 1.8rem;
  font-family: var(--serif);
}

.plano {
  width: 100%;
  max-width: 44rem;
  margin-bottom: 1.25rem;
  padding: .5rem;
  border: 1px solid rgba(23,32,29,.28);
  background: #e8dfd0;
}

.plano-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  shape-rendering: geometricPrecision;
  text-rendering: optimizeLegibility;
}

.svg-orientacion,
.svg-calle-principal,
.svg-nombres-calles text,
.svg-etiqueta,
.svg-detalle,
.svg-numero {
  font-family: var(--sans);
}

.svg-orientacion {
  fill: var(--verde);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.svg-calle-principal {
  fill: rgba(23,32,29,.55);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.svg-calles {
  fill: none;
  stroke: rgba(23,32,29,.14);
  stroke-width: 1;
}

.svg-nombres-calles text {
  fill: rgba(23,32,29,.5);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.svg-nombres-calles .principal {
  fill: var(--verde);
  font-weight: 900;
}

.svg-recorrido {
  fill: none;
  stroke: var(--rojo);
  stroke-width: 5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.svg-estaciones circle {
  fill: var(--verde);
  stroke: var(--papel);
  stroke-width: 4;
}

.svg-estaciones a {
  fill: none;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.svg-estaciones a:focus circle,
.svg-estaciones a:hover circle {
  fill: var(--rojo);
}

.svg-numero {
  fill: var(--blanco);
  font-size: 8px;
  font-weight: 900;
}

.svg-etiqueta {
  fill: var(--tinta);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .35px;
}

.svg-detalle {
  fill: rgba(23,32,29,.62);
  font-size: 8px;
  font-weight: 700;
}

/*
 * El plano usa SVG para que el eje y los ramales mantengan coordenadas
 * exactas al adaptarse a cualquier ancho de pantalla.
 */
.plano-leyenda {
  color: rgba(23,32,29,.58);
}

.mapa-boton {
  width: 100%;
  max-width: 44rem;
  text-align: center;
}

.indice {
  padding: 0 1.25rem 5rem;
}

.indice ol {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--tinta);
  list-style: none;
}

.indice a {
  display: grid;
  grid-template-columns: 2.3rem 1fr;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(23,32,29,.35);
  text-decoration: none;
}

.indice span {
  grid-row: 1 / 3;
  color: var(--rojo);
  font-size: .76rem;
  font-weight: 800;
}

.indice strong {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
}

.indice small {
  margin-top: .15rem;
  color: #58635f;
  font-size: .76rem;
}

.estacion {
  position: relative;
  padding: 5rem 1.25rem;
  overflow: hidden;
  background: var(--blanco);
  border-top: 1px solid var(--papel-oscuro);
}

.estacion:nth-child(even) {
  background: var(--papel-oscuro);
}

.numero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3.8rem;
  color: var(--rojo);
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: 1;
}

.numero span {
  padding: .35rem .6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.direccion {
  margin: -1rem 0 1.5rem;
  color: var(--rojo);
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.descripcion {
  width: 100%;
  max-width: none;
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-size: 1.16rem;
  overflow-wrap: anywhere;
}

.galeria {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin: 0 -1.25rem 2.5rem;
  padding: 0 1.25rem .7rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.marco {
  margin: 0;
  flex: 0 0 82vw;
  max-width: 31rem;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  color: rgba(255,255,255,.75);
  background:
    linear-gradient(135deg, rgba(255,255,255,.06), transparent),
    var(--verde);
  scroll-snap-align: center;
  text-align: center;
}

.marco.imagen {
  display: flex;
  flex-direction: column;
  aspect-ratio: auto;
  padding: .9rem .65rem 0;
  overflow: hidden;
  color: var(--blanco);
  background: #111a17;
}

.marco.imagen img {
  display: block;
  width: 100%;
  height: min(64svh, 34rem);
  object-fit: contain;
}

.marco.imagen.tapa {
  flex-basis: 68vw;
  max-width: 22rem;
  background: #28231e;
}

.marco.imagen.tapa img {
  height: min(64svh, 34rem);
}

.marco.imagen figcaption {
  min-height: 3.8rem;
  display: flex;
  align-items: center;
  padding: .75rem .25rem .85rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .055em;
  line-height: 1.35;
  text-align: left;
  text-transform: uppercase;
}

.marco.imagen.documento figcaption {
  display: block;
  min-height: auto;
  padding-top: .85rem;
  color: #eee4d5;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.45;
  text-transform: none;
}

.video {
  margin: 0 0 2.5rem;
  background: #101815;
}

.video video {
  display: block;
  width: 100%;
  max-height: 72svh;
  background: #000;
}

.video figcaption {
  padding: .8rem .9rem .9rem;
  color: var(--blanco);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .055em;
  line-height: 1.35;
  text-transform: uppercase;
}

.marco.libro {
  aspect-ratio: 3 / 4;
  max-width: 22rem;
  background: var(--rojo);
}

.marco.archivo {
  color: var(--tinta);
  background: #c4b49d;
}

.marco span {
  max-width: 10rem;
  font-family: var(--serif);
  font-style: italic;
}

blockquote {
  margin: 0 0 2rem;
  padding: 1.5rem 0 0 1.25rem;
  border-top: 1px solid var(--tinta);
  border-left: 3px solid var(--rojo);
}

blockquote p {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.35;
}

blockquote cite {
  font-size: .72rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fragmento {
  margin: 0 0 2rem;
  border-top: 1px solid var(--tinta);
  border-bottom: 1px solid rgba(23,32,29,.3);
}

.fragmento summary {
  position: relative;
  padding: 1rem 2.3rem 1rem 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  list-style: none;
}

.fragmento summary::-webkit-details-marker {
  display: none;
}

.fragmento summary::after {
  content: "+";
  position: absolute;
  top: .65rem;
  right: 0;
  color: var(--rojo);
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 400;
}

.fragmento[open] summary::after {
  content: "–";
}

.fragmento blockquote {
  margin-bottom: 1.5rem;
}

.fragmento blockquote + blockquote {
  margin-top: 2.2rem;
}

.fragmento-pendiente {
  margin: 0 0 2rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(23,32,29,.35);
  border-bottom: 1px solid rgba(23,32,29,.35);
  color: #69736f;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .75rem 1rem;
  color: var(--blanco);
  background: var(--verde);
  border: 1px solid var(--verde);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}

.boton-claro {
  min-height: 2.3rem;
  padding: .5rem .8rem;
  color: var(--blanco);
  background: transparent;
  border-color: rgba(255,255,255,.55);
  font-size: .63rem;
}

.volver-plano {
  display: block;
  width: max-content;
  margin-top: 1.35rem;
  color: #59645f;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.estacion.final {
  color: var(--blanco);
  background: var(--verde);
}

.estacion.final blockquote {
  border-top-color: rgba(255,255,255,.5);
}

.estacion.final .fragmento {
  border-top-color: rgba(255,255,255,.65);
  border-bottom-color: rgba(255,255,255,.25);
}

.estacion.final .volver-plano {
  color: rgba(255,255,255,.72);
}

.estacion.final .boton {
  color: var(--verde);
  background: var(--blanco);
  border-color: var(--blanco);
}

footer {
  padding: 5rem 1.25rem 2rem;
  color: var(--blanco);
  background: #101c19;
}

.cierre {
  margin: 0 0 3.5rem;
  font-size: clamp(3.3rem, 16vw, 6rem);
}

.seguir {
  margin-bottom: 4rem;
}

.seguir h2 {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.seguir ul {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,.35);
  list-style: none;
}

.seguir li {
  border-bottom: 1px solid rgba(255,255,255,.35);
}

.seguir a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35rem 1rem;
  padding: 1.15rem 0;
  text-decoration: none;
}

.seguir span {
  grid-column: 1;
  color: #aebbb6;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.seguir strong {
  grid-column: 1;
  max-width: 40rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.35;
}

.seguir i {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--rojo);
  font-size: 1.35rem;
  font-style: normal;
}

footer > a {
  display: block;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.35);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

@media (min-width: 760px) {
  .portada,
  .introduccion,
  .mapa-recorrido,
  .indice,
  .estacion,
  footer {
    padding-right: max(2.5rem, calc((100vw - 68rem) / 2));
    padding-left: max(2.5rem, calc((100vw - 68rem) / 2));
  }

  .indice a {
    grid-template-columns: 3.5rem 1fr auto;
    align-items: baseline;
  }

  .indice span {
    grid-row: auto;
  }

  .indice small {
    font-size: .82rem;
  }

  .mapa-encabezado {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 3rem;
    max-width: 44rem;
    margin-bottom: 1.8rem;
  }

  .mapa-encabezado > p {
    max-width: 17rem;
    margin: 0;
  }

  .galeria {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .marco {
    flex-basis: 32rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
