/* =========================================================
   ARQUITECTURA DE ESPAÑA / ARCHITECTURE OF SPAIN
   Editorial atlas — 2026
   ========================================================= */

:root {
  --paper: #f2ecdf;
  --paper-deep: #e8decc;
  --paper-light: #fbf7ee;
  --ink: #16120f;
  --ink-soft: #3d352e;
  --muted: #7b6f61;
  --line: rgba(22, 18, 15, 0.18);
  --line-soft: rgba(22, 18, 15, 0.1);
  --red: #b23a2b;
  --saffron: #d99a2b;
  --blue: #21445f;
  --white: #fffaf2;
  --gutter: clamp(18px, 4.2vw, 68px);
  --max: 1540px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(22, 18, 15, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 18, 15, 0.035) 1px, transparent 1px);
  background-size: 8.333vw 8.333vw;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 85%);
}

::selection {
  background: var(--red);
  color: var(--white);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  transform: translateY(-160%);
  transition: transform 0.25s ease;
}

.skip:focus {
  transform: translateY(0);
}

body.menu-open {
  overflow: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

/* Language */
body[data-lang="es"] .en,
body[data-lang="en"] .es {
  display: none !important;
}

body[data-lang="both"] .note-cat .en::before,
body[data-lang="both"] .palette .en::before,
body[data-lang="both"] .atlas-place .en::before,
body[data-lang="both"] .chapter-kicker .en::before {
  content: " / ";
  color: var(--muted);
}

body[data-lang="both"] .main-nav a .en::before {
  content: " / ";
  color: var(--muted);
}

body[data-lang="es"] .main-nav a .en::before,
body[data-lang="en"] .main-nav a .en::before {
  content: "";
}

/* =========================================================
   HEADER
   ========================================================= */

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  padding: 16px var(--gutter);
  transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(242, 236, 223, 0.94), rgba(242, 236, 223, 0.58));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-head.is-scrolled {
  padding-top: 10px;
  padding-bottom: 10px;
  background: rgba(242, 236, 223, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-shrink: 0;
}

.brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: background 0.3s ease, color 0.3s ease;
}

.brand__mark span {
  color: var(--red);
}

.brand:hover .brand__mark {
  background: var(--ink);
  color: var(--paper);
}

.brand__text {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  margin-left: auto;
}

.main-nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.head-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: rgba(255, 250, 242, 0.35);
}

.lang button {
  border: 0;
  background: transparent;
  padding: 6px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.25s ease, color 0.25s ease;
}

.lang button:hover {
  color: var(--ink);
}

.lang button.is-active {
  background: var(--ink);
  color: var(--paper);
}

.menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  place-items: center;
  gap: 5px;
  padding: 0;
}

.menu-toggle > span:not(.sr-only) {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s ease;
}

.menu-toggle[aria-expanded="true"] > span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] > span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

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

.progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 18px var(--gutter) 30px;
  display: flex;
  flex-direction: column;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu .brand__mark {
  border-color: var(--paper);
  color: var(--paper);
}

.menu-close {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 250, 242, 0.35);
  background: transparent;
  color: var(--paper);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu__links {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu__links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 250, 242, 0.16);
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.mobile-menu__links a span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--saffron);
}

.mobile-menu__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 250, 242, 0.65);
}

.mobile-menu__foot p {
  margin-left: auto;
}

/* =========================================================
   RAIL
   ========================================================= */

.rail {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 90;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rail a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted);
}

.rail a span {
  opacity: 0.65;
}

.rail a i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.3s ease, transform 0.3s ease;
}

.rail a b {
  position: absolute;
  right: 24px;
  font-weight: 400;
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 7px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.rail a:hover b {
  opacity: 1;
  transform: translateX(0);
}

.rail a.is-active i {
  background: var(--red);
  transform: scale(1.55);
}

.rail a.is-active span {
  color: var(--ink);
  opacity: 1;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: clamp(108px, 12vh, 150px) var(--gutter) 28px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 82% 8%, rgba(217, 154, 43, 0.12), transparent 38%),
    radial-gradient(ellipse at 12% 88%, rgba(178, 58, 43, 0.07), transparent 34%);
}

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.hero__index {
  color: var(--muted);
  text-align: right;
}

.hero__title-wrap {
  position: relative;
  margin-top: clamp(26px, 5vh, 60px);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 13.1vw, 13.4rem);
  line-height: 0.79;
  letter-spacing: -0.065em;
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 35, "WONK" 0;
}

.hero__line {
  display: block;
}

.hero__line--2 {
  margin-left: 8.5vw;
}

.hero__line em {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.055em;
}

.hero__line .dot {
  width: 0.11em;
  height: 0.11em;
  margin-left: 0.04em;
  vertical-align: baseline;
  background: var(--red);
}

.hero__sub {
  margin-top: 14px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__body {
  display: grid;
  grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  margin-top: clamp(30px, 5vh, 68px);
}

.hero__intro {
  max-width: 470px;
  border-left: 1px solid var(--line);
  padding-left: clamp(14px, 1.6vw, 24px);
}

.hero__intro p {
  font-size: 0.98rem;
  line-height: 1.65;
}

.hero__intro .en {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  height: clamp(230px, 31vw, 430px);
}

.strip {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
  height: 78%;
  transition: height 0.5s var(--ease);
}

.strip:nth-child(1) { height: 66%; }
.strip:nth-child(2) { height: 88%; }
.strip:nth-child(3) { height: 74%; }
.strip:nth-child(4) { height: 100%; }
.strip:nth-child(5) { height: 82%; }

.strip a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.03);
  transition: transform 0.9s var(--ease), filter 0.5s ease;
}

.strip a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 9, 7, 0.8), transparent 48%);
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.strip:hover img {
  transform: scale(1.045);
  filter: saturate(1) contrast(1.04);
}

.strip:hover a::after {
  opacity: 1;
}

.strip__num {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--white);
  background: rgba(12, 9, 7, 0.4);
  padding: 3px 5px;
}

.strip__caption {
  position: absolute;
  left: 10px;
  right: 8px;
  bottom: 9px;
  z-index: 2;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.strip__caption small {
  display: block;
  margin-top: 2px;
  font-size: 7.5px;
  color: rgba(255, 250, 242, 0.72);
  letter-spacing: 0.1em;
}

.hero__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-top: auto;
  padding-top: clamp(18px, 3vh, 32px);
  border-top: 1px solid var(--line);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-cue__line {
  display: block;
  width: 1px;
  height: 38px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: translateY(-100%);
  animation: scrollLine 2.2s var(--ease) infinite;
}

@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  45% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

.seal {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.seal svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: rotateSeal 34s linear infinite;
}

.seal text {
  font-family: var(--font-mono);
  font-size: 8.2px;
  letter-spacing: 0.22em;
  fill: var(--ink);
}

.seal > span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

@keyframes rotateSeal {
  to { transform: rotate(360deg); }
}

/* =========================================================
   MARQUEE
   ========================================================= */

.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  animation: marquee 44s linear infinite;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee__track i {
  color: var(--saffron);
  font-style: normal;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* =========================================================
   SHARED TYPOGRAPHY
   ========================================================= */

.display {
  font-family: var(--font-display);
  font-weight: 350;
  line-height: 0.92;
  letter-spacing: -0.055em;
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0;
}

.display em {
  font-style: italic;
  font-weight: 300;
}

.kicker,
.section-label,
.mini-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.kicker {
  font-size: 9px;
  color: var(--muted);
}

.section-label {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
  font-size: 9px;
  color: var(--muted);
}

.section-label span:first-child {
  color: var(--red);
}

.mini-label {
  font-size: 8px;
  color: var(--muted);
}

/* =========================================================
   MANIFESTO
   ========================================================= */

.manifesto {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(80px, 12vw, 180px) var(--gutter);
}

.manifesto__title {
  max-width: 1150px;
  margin: clamp(34px, 5vw, 70px) 0 clamp(40px, 6vw, 90px);
  font-size: clamp(3.1rem, 8.2vw, 9rem);
}

.manifesto__title > .en {
  display: block;
  margin-top: 0.24em;
  font-size: 0.44em;
  line-height: 0.95;
  color: var(--muted);
  letter-spacing: -0.035em;
}

.manifesto__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: start;
}

.manifesto__lead {
  max-width: 670px;
}

.manifesto__lead .es {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.6;
}

.manifesto__lead .en {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.stat {
  border-bottom: 1px solid var(--line);
  padding: 18px 0 16px;
}

.stat:nth-child(odd) {
  border-right: 1px solid var(--line);
  padding-right: 20px;
}

.stat:nth-child(even) {
  padding-left: 20px;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 4.6rem);
  font-weight: 350;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-lang="both"] .stat .en::before {
  content: " / ";
}

body[data-lang="es"] .stat .en::before,
body[data-lang="en"] .stat .en::before {
  content: "";
}

/* =========================================================
   ATLAS
   ========================================================= */

.atlas {
  position: relative;
  z-index: 1;
  background: var(--paper-deep);
  padding: clamp(70px, 10vw, 150px) var(--gutter);
  overflow: clip;
}

.atlas__head {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.atlas__head .display {
  margin: clamp(30px, 4vw, 56px) 0 0;
  font-size: clamp(3.2rem, 7.7vw, 8.4rem);
}

.atlas__head .display > .es,
.atlas__head .display > .en {
  display: block;
}

.atlas__head .display > .en {
  margin-top: 0.28em;
  font-size: 0.44em;
  line-height: 0.95;
  color: var(--muted);
}

body[data-lang="en"] .atlas__head .display > .en {
  margin-top: 0;
  color: var(--ink);
  font-size: 1em;
}

body[data-lang="both"] .atlas__head .display > .en {
  display: none;
}

.atlas__hint {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.atlas-list {
  width: min(100%, var(--max));
  margin: clamp(36px, 5vw, 66px) auto 0;
  position: relative;
}

.atlas-row {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1.5fr) minmax(0, 1fr) 130px 26px;
  align-items: center;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  transition: color 0.35s ease, padding 0.35s var(--ease);
  z-index: 1;
}

.atlas-row:last-child {
  border-bottom: 1px solid var(--line);
}

.atlas-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
  z-index: 0;
}

.atlas-row > * {
  position: relative;
  z-index: 1;
}

.atlas-row:hover,
.atlas-row:focus-visible {
  color: var(--paper);
  padding-left: 16px;
  padding-right: 16px;
}

.atlas-row:hover::before,
.atlas-row:focus-visible::before {
  transform: scaleY(1);
}

.atlas-num,
.atlas-place,
.atlas-year {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.35s ease;
}

.atlas-row:hover .atlas-num,
.atlas-row:hover .atlas-place,
.atlas-row:hover .atlas-year,
.atlas-row:focus-visible .atlas-num,
.atlas-row:focus-visible .atlas-place,
.atlas-row:focus-visible .atlas-year {
  color: rgba(255, 250, 242, 0.62);
}

.atlas-name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.1vw, 3rem);
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.035em;
}

.atlas-name .en {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.atlas-row:hover .atlas-name .en {
  color: rgba(255, 250, 242, 0.55);
}

.atlas-place .es,
.atlas-place .en {
  display: block;
}

.atlas-arrow {
  font-size: 18px;
  text-align: right;
  transition: transform 0.35s var(--ease);
}

.atlas-row:hover .atlas-arrow {
  transform: translate(3px, -3px);
}

.atlas-preview {
  position: fixed;
  right: 7vw;
  top: 31vh;
  width: 230px;
  height: 305px;
  z-index: 110;
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px) rotate(2.5deg) scale(0.96);
  transition: opacity 0.35s ease, transform 0.45s var(--ease);
  box-shadow: 0 30px 60px rgba(22, 18, 15, 0.25);
  overflow: hidden;
  background: var(--paper);
}

.atlas-preview.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(2.5deg) scale(1);
}

.atlas-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   CHAPTER
   ========================================================= */

.chapter {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(70px, 9vw, 140px) var(--gutter) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 70px;
}

.chapter-head {
  position: relative;
  padding-top: 10px;
}

.chapter-ghost {
  position: absolute;
  top: -0.1em;
  right: 1vw;
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(12rem, 22vw, 27rem);
  font-weight: 300;
  line-height: 0.7;
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(22, 18, 15, 0.13);
  pointer-events: none;
  user-select: none;
}

.chapter-kicker {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.chapter-number {
  color: var(--accent);
}

.chapter-title {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  margin: clamp(22px, 3vw, 48px) 0 clamp(28px, 4vw, 60px);
  font-family: var(--font-display);
  font-size: clamp(4.1rem, 10.8vw, 12.4rem);
  font-weight: 350;
  line-height: 0.79;
  letter-spacing: -0.065em;
  font-variation-settings: "opsz" 144, "SOFT" 35, "WONK" 0;
}

.chapter-title em {
  color: var(--accent);
  font-style: italic;
  font-weight: 300;
}

.chapter-title.is-long {
  max-width: 15ch;
  font-size: clamp(3.2rem, 7.8vw, 8.8rem);
  line-height: 0.86;
}

.chapter-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1fr 1.1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-cell {
  padding: 15px 18px 15px 0;
  border-right: 1px solid var(--line);
}

.meta-cell:not(:first-child) {
  padding-left: 18px;
}

.meta-cell:last-child {
  border-right: 0;
}

.meta-cell dt {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-cell dd {
  margin-top: 6px;
  font-size: 0.86rem;
  line-height: 1.4;
}

.meta-cell dd small {
  display: block;
  margin-top: 3px;
  font-size: 0.7rem;
  color: var(--muted);
}

.meta-cell dd .es,
.meta-cell dd .en {
  display: block;
}

.chapter-media {
  position: relative;
  margin: clamp(42px, 5vw, 78px) 0 0;
}

.chapter-media__frame {
  position: relative;
  height: clamp(400px, 62vw, 820px);
  overflow: hidden;
  background: var(--ink);
}

.chapter-media__frame > picture,
.chapter-media__frame > picture img {
  display: block;
  width: 100%;
  height: 100%;
}

.chapter-media__frame > picture img {
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.03);
  transition: transform 1.2s var(--ease);
}

.chapter-media__frame:hover > picture img {
  transform: scale(1.025);
}

.chapter-media__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10, 8, 6, 0.5), transparent 26%),
    linear-gradient(to top, rgba(10, 8, 6, 0.78), transparent 36%);
}

.chapter-media__top {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 250, 242, 0.85);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 3;
}

.chapter-media__bottom {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  z-index: 3;
}

.media-caption {
  max-width: 680px;
  color: var(--white);
}

.media-caption .es {
  display: block;
  font-size: 0.83rem;
  line-height: 1.45;
}

.media-caption .en {
  display: block;
  margin-top: 5px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(255, 250, 242, 0.7);
}

.media-caption .credit {
  display: block;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 250, 242, 0.55);
}

.pins {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  gap: 7px;
  transform: translate(-50%, -50%);
}

.pin__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 250, 242, 0.2), 0 1px 8px rgba(0, 0, 0, 0.4);
}

.pin__label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 7px;
  background: rgba(15, 12, 10, 0.62);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.82;
  transition: opacity 0.25s ease;
}

.pin__label .en {
  color: rgba(255, 250, 242, 0.6);
}

.pin:hover .pin__label {
  opacity: 1;
}

.zoom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 250, 242, 0.45);
  background: rgba(12, 9, 7, 0.28);
  color: var(--white);
  padding: 8px 11px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.zoom:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.zoom__icon {
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  position: relative;
}

.zoom__icon::before,
.zoom__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.zoom__icon::before {
  width: 5px;
  height: 1px;
  left: 2px;
  top: 4px;
}

.zoom__icon::after {
  width: 1px;
  height: 5px;
  left: 4px;
  top: 2px;
}

.zoom__label {
  display: flex;
  gap: 5px;
}

.zoom__label .en::before {
  content: " / ";
}

body[data-lang="es"] .zoom__label .en::before,
body[data-lang="en"] .zoom__label .en::before {
  content: "";
}

.chapter-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  padding: clamp(44px, 6vw, 84px) 0;
  border-bottom: 1px solid var(--line);
}

.lead-es {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.8vw, 2.8rem);
  font-weight: 350;
  line-height: 1.18;
  letter-spacing: -0.03em;
  max-width: 820px;
}

.lead-en {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
  max-width: 520px;
}

.chapter-main {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(34px, 5vw, 86px);
  padding: clamp(42px, 5vw, 76px) 0 0;
}

.chapter-aside {
  position: relative;
}

.aside-sticky {
  position: sticky;
  top: 110px;
}

.facts {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.facts dt {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: right;
  max-width: 60%;
}

.aside-note {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.aside-note .en {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.palette-block {
  margin-top: 26px;
}

.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.palette li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--ink-soft);
}

.note-index {
  margin-top: 30px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.note-index ol {
  margin-top: 8px;
}

.note-index a {
  display: flex;
  gap: 7px;
  padding: 5px 0;
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1.4;
  color: var(--muted);
  transition: color 0.2s ease;
}

.note-index a:hover {
  color: var(--accent);
}

.idx-num {
  color: var(--accent);
}

.notes {
  min-width: 0;
}

.note {
  padding: clamp(28px, 3.5vw, 54px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 100px;
}

.note:first-child {
  padding-top: 0;
  border-top: 0;
}

.note-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.note-num {
  color: var(--accent);
}

.note-cat {
  text-align: right;
}

.note-title {
  margin-top: 14px;
}

.note-title h3.es {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.25vw, 2.1rem);
  font-weight: 380;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.note-title h3.en {
  margin-top: 5px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
  font-style: italic;
}

.note-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 46px);
  margin-top: 18px;
}

.note-text p {
  font-size: 0.93rem;
  line-height: 1.7;
}

.note-text .en {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
  padding-left: clamp(16px, 2vw, 30px);
  border-left: 1px solid var(--line-soft);
}

body[data-lang="es"] .note-text,
body[data-lang="en"] .note-text {
  grid-template-columns: 1fr;
}

body[data-lang="es"] .note-text .en,
body[data-lang="en"] .note-text .en {
  border-left: 0;
  padding-left: 0;
}

.chapter-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  margin: clamp(48px, 7vw, 110px) 0;
  background: var(--accent-soft);
}

.chapter-detail__media {
  position: relative;
  min-height: 440px;
  overflow: hidden;
}

.chapter-detail__media picture,
.chapter-detail__media picture img {
  display: block;
  width: 100%;
  height: 100%;
}

.chapter-detail__media picture img {
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.chapter-detail:hover .chapter-detail__media picture img {
  transform: scale(1.025);
}

.chapter-detail__media .zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
}

.chapter-detail figcaption {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(26px, 4vw, 58px);
}

.chapter-detail figcaption > p.es {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.chapter-detail figcaption > p.en {
  margin-top: 7px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--muted);
}

.credit {
  display: block;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chapter-archive {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 3vw, 44px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.chapter-archive__media {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper-deep);
}

.chapter-archive__media picture,
.chapter-archive__media picture img {
  display: block;
  width: 100%;
  height: 100%;
}

.chapter-archive__media picture img {
  object-fit: cover;
}

.chapter-archive figcaption p.es {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.chapter-archive figcaption p.en {
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--muted);
}

.pull {
  position: relative;
  max-width: 960px;
  margin: clamp(64px, 9vw, 140px) auto;
  padding: clamp(46px, 6vw, 90px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.pull__mark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 8rem);
  line-height: 0.6;
  color: var(--accent);
  height: 0.5em;
}

.pull p.es {
  margin-top: 0.35em;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.1vw, 4rem);
  font-weight: 330;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.pull p.en {
  margin-top: 14px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
  font-style: italic;
}

.pull cite {
  display: block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.next {
  position: relative;
  display: block;
  margin: clamp(56px, 7vw, 110px) 0 0;
  padding: clamp(22px, 3vw, 38px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: color 0.35s ease, padding 0.35s var(--ease);
}

.next::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
  z-index: 0;
}

.next > * {
  position: relative;
  z-index: 1;
}

.next:hover {
  color: var(--paper);
  padding-left: 2vw;
  padding-right: 2vw;
}

.next:hover::before {
  transform: scaleY(1);
}

.next__top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.35s ease;
}

.next:hover .next__top {
  color: rgba(255, 250, 242, 0.55);
}

.next__main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: 9px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  font-weight: 350;
  line-height: 1;
  letter-spacing: -0.045em;
}

.next__place {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.next__arrow {
  position: absolute;
  right: 2vw;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.next:hover .next__arrow {
  opacity: 1;
  transform: translate(4px, -50%);
}

/* =========================================================
   MAP
   ========================================================= */

.map-section {
  position: relative;
  z-index: 1;
  margin-top: clamp(50px, 8vw, 120px);
  padding: clamp(80px, 11vw, 160px) var(--gutter);
  background: var(--ink);
  color: var(--paper);
}

.map-head {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.map-head .kicker {
  color: rgba(255, 250, 242, 0.55);
}

.map-head .display {
  margin: 30px 0 0;
  font-size: clamp(3.2rem, 8vw, 8.6rem);
}

.map-head .display > .es,
.map-head .display > .en {
  display: block;
}

.map-head .display > .en {
  margin-top: 0.28em;
  font-size: 0.42em;
  line-height: 0.95;
  color: rgba(255, 250, 242, 0.5);
}

body[data-lang="en"] .map-head .display > .en {
  margin-top: 0;
  color: var(--paper);
  font-size: 1em;
}

body[data-lang="both"] .map-head .display > .en {
  display: none;
}

.map-head .display em {
  color: var(--saffron);
}

.map-intro {
  max-width: 570px;
  margin-top: 24px;
  font-size: 0.94rem;
  line-height: 1.65;
  color: rgba(255, 250, 242, 0.72);
}

.map-intro.en {
  margin-top: 9px;
  font-size: 0.86rem;
  color: rgba(255, 250, 242, 0.48);
}

.map-stage {
  position: relative;
  width: min(100%, var(--max));
  height: clamp(420px, 44vw, 580px);
  margin: clamp(34px, 5vw, 62px) auto 0;
  border: 1px solid rgba(255, 250, 242, 0.18);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 250, 242, 0.04), transparent 62%),
    rgba(255, 250, 242, 0.015);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 250, 242, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 250, 242, 0.08) 1px, transparent 1px);
  background-size: 10% 12.5%;
  opacity: 0.8;
}

.map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-lines polyline {
  fill: none;
  stroke: rgba(217, 154, 43, 0.55);
  stroke-width: 0.18;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 2 2;
}

.map-city {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
  z-index: 3;
}

.map-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(178, 58, 43, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-city:hover .map-dot {
  transform: scale(1.3);
  box-shadow: 0 0 0 9px rgba(178, 58, 43, 0.24);
}

.map-label {
  position: absolute;
  left: 18px;
  top: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
  color: var(--paper);
}

.map-city--left .map-label {
  left: auto;
  right: 18px;
  text-align: right;
}

.map-label b {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--saffron);
}

.map-label span {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.map-label small {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 250, 242, 0.48);
}

.map-axis {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 250, 242, 0.3);
}

.map-axis--x {
  left: 18px;
  bottom: 13px;
}

.map-axis--y {
  right: 13px;
  top: 18px;
  writing-mode: vertical-rl;
}

.map-compass {
  position: absolute;
  right: 26px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 250, 242, 0.22);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(255, 250, 242, 0.65);
}

.map-compass i {
  position: absolute;
  top: 6px;
  width: 1px;
  height: 12px;
  background: var(--saffron);
  transform: rotate(18deg);
  transform-origin: bottom;
}

.map-note {
  width: min(100%, var(--max));
  margin: 18px auto 0;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 250, 242, 0.38);
}

/* =========================================================
   CLOSING
   ========================================================= */

.closing {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(80px, 12vw, 170px) var(--gutter) clamp(60px, 8vw, 110px);
}

.closing__title {
  margin: clamp(34px, 5vw, 64px) 0 clamp(36px, 5vw, 70px);
  font-size: clamp(3.5rem, 9vw, 10rem);
}

.closing__title > .es,
.closing__title > .en {
  display: block;
}

.closing__title > .en {
  margin-top: 0.15em;
  font-size: 0.5em;
  color: var(--muted);
}

.closing__title em {
  color: var(--red);
}

.closing__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 180px;
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.closing__grid > .es {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.6;
}

.closing__grid > .en {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.closing__mark {
  width: 150px;
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  justify-self: end;
  position: relative;
}

.closing__mark span {
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--line);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.closing__mark i {
  position: absolute;
  inset: 9px;
  border: 1px dashed var(--line);
  border-radius: 50%;
  animation: rotateSeal 40s linear infinite;
}

.to-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: clamp(40px, 6vw, 80px);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}

.to-top:hover {
  color: var(--ink);
}

.to-top span:last-child {
  font-size: 14px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-foot {
  position: relative;
  z-index: 1;
  background: var(--paper-deep);
  padding: clamp(60px, 8vw, 120px) var(--gutter) 22px;
}

.foot-head {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: end;
  padding-bottom: clamp(40px, 6vw, 70px);
  border-bottom: 1px solid var(--line);
}

.foot-head .kicker {
  grid-column: 1 / -1;
}

.foot-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.4vw, 5.4rem);
  font-weight: 350;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.foot-head h2 em {
  font-style: italic;
  color: var(--red);
}

.foot-intro {
  max-width: 380px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.foot-intro .en {
  display: block;
  margin-top: 7px;
  font-size: 0.76rem;
  line-height: 1.55;
}

.foot-head h2 .en {
  display: block;
  margin-top: 0.45em;
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.7vw, 10px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.foot-grid {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 100px);
  padding: clamp(34px, 5vw, 60px) 0;
}

.foot-col h3 {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.credits {
  columns: 1;
}

.credits li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  break-inside: avoid;
}

.credit-work {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
}

.credit-meta {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  color: var(--muted);
  line-height: 1.5;
}

.credit-meta a,
.sources a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 0.5px;
}

.credit-meta a:hover,
.sources a:hover {
  color: var(--red);
}

.sources li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

.sources a {
  color: var(--ink-soft);
}

.license-note {
  margin-top: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.28);
}

.license-note p {
  font-size: 0.7rem;
  line-height: 1.55;
  color: var(--muted);
}

.license-note p + p {
  margin-top: 7px;
  font-size: 0.66rem;
}

.foot-bottom {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   LIGHTBOX
   ========================================================= */

.lightbox {
  width: min(92vw, 1120px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(8, 7, 6, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox__body {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

.lightbox__body > img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #0b0908;
}

.lightbox__caption {
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(255, 250, 242, 0.16);
}

.lightbox__caption p {
  font-size: 0.86rem;
  line-height: 1.5;
}

.lightbox__caption p.en {
  margin-top: 4px;
  font-size: 0.78rem;
  color: rgba(255, 250, 242, 0.55);
}

.lightbox__caption .credit {
  margin-top: 8px;
  color: rgba(255, 250, 242, 0.4);
}

.lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 250, 242, 0.35);
  background: rgba(10, 8, 7, 0.55);
  color: var(--paper);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox__close:hover {
  background: var(--paper);
  color: var(--ink);
}

/* =========================================================
   REVEAL
   ========================================================= */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.js .chapter-media[data-reveal] {
  transform: translateY(18px) scale(0.995);
}

html.js .chapter-media[data-reveal].is-visible {
  transform: translateY(0) scale(1);
}

/* =========================================================
   ENGLISH-ONLY READING MODE
   ========================================================= */

body[data-lang="en"] .hero__intro .en {
  margin-top: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.65;
}

body[data-lang="en"] .manifesto__lead .en {
  margin-top: 0;
  color: var(--ink);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.6;
}

body[data-lang="en"] .manifesto__title > .en {
  margin-top: 0;
  color: var(--ink);
  font-size: 1em;
  line-height: 0.92;
}

body[data-lang="en"] .closing__title > .en {
  margin-top: 0;
  color: var(--ink);
  font-size: 1em;
}

body[data-lang="en"] .chapter-lead {
  grid-template-columns: 1fr;
}

body[data-lang="en"] .closing__grid {
  grid-template-columns: minmax(0, 1fr) 180px;
}

body[data-lang="en"] .lead-en {
  max-width: 900px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.8vw, 2.8rem);
  font-weight: 350;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

body[data-lang="en"] .note-title h3.en {
  margin-top: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.25vw, 2.1rem);
  font-style: normal;
  font-weight: 380;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

body[data-lang="en"] .note-text .en {
  padding-left: 0;
  border-left: 0;
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.7;
}

body[data-lang="en"] .chapter-detail figcaption > p.en {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

body[data-lang="en"] .foot-head h2 .en {
  margin-top: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 350;
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-transform: none;
}

body[data-lang="en"] .foot-intro .en {
  margin-top: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1280px) {
  .rail {
    display: none;
  }

  .chapter-main {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
  }

  .atlas-preview {
    width: 210px;
    height: 280px;
  }
}

@media (max-width: 1080px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .head-tools {
    margin-left: auto;
  }

  .hero__body {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero__intro {
    max-width: 620px;
  }

  .hero__strip {
    height: clamp(220px, 38vw, 380px);
  }

  .manifesto__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stats {
    max-width: 600px;
  }

  .chapter-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .chapter-aside {
    order: 2;
  }

  .aside-sticky {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 36px;
    align-items: start;
  }

  .aside-sticky > .kicker {
    grid-column: 1 / -1;
  }

  .facts {
    margin-top: 0;
  }

  .palette-block,
  .note-index {
    grid-column: 1 / -1;
  }

  .note-index {
    margin-top: 0;
  }

  .note-index ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }

  .foot-head,
  .foot-grid {
    grid-template-columns: 1fr;
  }

  .foot-head h2 {
    max-width: 700px;
  }
}

@media (max-width: 820px) {
  :root {
    --gutter: 20px;
  }

  body::before {
    background-size: 20vw 20vw;
  }

  .brand__text {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 96px;
  }

  .hero__top {
    font-size: 7.5px;
  }

  .hero__index {
    display: none;
  }

  .hero__title {
    font-size: clamp(3.7rem, 15.6vw, 7.5rem);
    line-height: 0.82;
  }

  .hero__line--2 {
    margin-left: 0;
  }

  .hero__sub {
    position: static;
    margin-top: 14px;
    writing-mode: horizontal-tb;
    transform: none;
    text-align: right;
  }

  .hero__strip {
    display: flex;
    height: 250px;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .hero__strip::-webkit-scrollbar {
    display: none;
  }

  .strip {
    flex: 0 0 54vw;
    height: 100%;
  }

  .strip:nth-child(1),
  .strip:nth-child(2),
  .strip:nth-child(3),
  .strip:nth-child(4),
  .strip:nth-child(5) {
    height: 100%;
  }

  .seal {
    display: none;
  }

  .hero__bottom {
    padding-top: 16px;
  }

  .chapter-ghost {
    display: none;
  }

  .manifesto__title {
    line-height: 1.02;
    padding-top: 0.04em;
    letter-spacing: -0.035em;
  }

  .manifesto__title > .en {
    margin-top: 0.48em;
    line-height: 1.08;
  }

  .chapter-meta {
    grid-template-columns: 1fr 1fr;
  }

  .meta-cell {
    border-bottom: 1px solid var(--line);
  }

  .meta-cell:nth-child(2n) {
    border-right: 0;
  }

  .meta-cell:nth-child(n + 3) {
    border-bottom: 0;
  }

  .chapter-media__frame {
    height: 58vh;
    min-height: 340px;
  }

  .pins {
    display: none;
  }

  .chapter-media__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .chapter-lead {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .lead-en {
    max-width: 100%;
  }

  .lead-es {
    font-size: clamp(1.45rem, 5.4vw, 2.1rem);
  }

  .chapter-detail {
    grid-template-columns: 1fr;
  }

  .chapter-detail__media {
    min-height: 300px;
  }

  .chapter-detail figcaption {
    min-height: 220px;
  }

  .chapter-archive {
    grid-template-columns: 1fr;
  }

  .chapter-archive__media {
    max-width: 240px;
  }

  .next__main {
    display: block;
  }

  .next__place {
    display: block;
    margin-top: 8px;
    text-align: left;
  }

  .next__arrow {
    display: none;
  }

  .map-stage {
    height: 460px;
  }

  .map-label span {
    font-size: 1rem;
  }

  .closing__grid {
    grid-template-columns: 1fr;
  }

  .closing__mark {
    justify-self: start;
    width: 120px;
    height: 120px;
  }

  .closing__mark span {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 620px) {
  .lang button {
    padding: 6px 7px;
    font-size: 8px;
  }

  .head-tools {
    gap: 9px;
  }

  .hero {
    padding-top: 88px;
  }

  .hero__title {
    font-size: clamp(3.2rem, 16.6vw, 5.8rem);
  }

  .hero__intro p {
    font-size: 0.92rem;
  }

  .hero__meta {
    font-size: 7px;
  }

  .hero__strip {
    height: 210px;
  }

  .strip {
    flex-basis: 62vw;
  }

  .manifesto,
  .atlas,
  .chapter {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .manifesto__title {
    font-size: clamp(2.7rem, 12vw, 4.4rem);
  }

  .manifesto__title > .en {
    font-size: 0.4em;
  }

  .atlas__head .display {
    font-size: clamp(2.7rem, 12vw, 4.4rem);
  }

  .atlas-row {
    grid-template-columns: 34px 1fr 22px;
    gap: 10px;
    padding: 18px 0;
  }

  .atlas-place,
  .atlas-year {
    display: none;
  }

  .atlas-name {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }

  .atlas-arrow {
    font-size: 14px;
  }

  .chapter-title {
    font-size: clamp(3.1rem, 16.4vw, 6rem);
  }

  .chapter-title.is-long {
    font-size: clamp(2.5rem, 11.8vw, 4.6rem);
  }

  .chapter-meta {
    grid-template-columns: 1fr;
  }

  .meta-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 11px 0;
  }

  .meta-cell:not(:first-child) {
    padding-left: 0;
  }

  .meta-cell:nth-child(n + 3) {
    border-bottom: 1px solid var(--line-soft);
  }

  .meta-cell:last-child {
    border-bottom: 0;
  }

  .chapter-media__frame {
    height: 54vh;
    min-height: 300px;
  }

  .chapter-media__top {
    font-size: 7px;
    top: 10px;
    left: 12px;
    right: 12px;
  }

  .chapter-media__bottom {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .media-caption .es {
    font-size: 0.75rem;
  }

  .media-caption .en {
    font-size: 0.69rem;
  }

  .media-caption .credit {
    display: none;
  }

  .note-text {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .note-text .en {
    padding-left: 0;
    border-left: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
  }

  .note-title h3.es {
    font-size: 1.45rem;
  }

  .aside-sticky {
    grid-template-columns: 1fr;
  }

  .note-index ol {
    grid-template-columns: 1fr;
  }

  .pull {
    margin: 60px auto;
    padding: 44px 0;
  }

  .next {
    margin-top: 50px;
  }

  .map-section {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .map-head .display {
    font-size: clamp(2.8rem, 12.5vw, 4.8rem);
  }

  .map-stage {
    height: 430px;
  }

  .map-label span {
    font-size: 0.92rem;
  }

  .map-label small {
    display: none;
  }

  .map-axis {
    display: none;
  }

  .map-compass {
    width: 34px;
    height: 34px;
    right: 12px;
    bottom: 12px;
  }

  .foot-head h2 {
    font-size: clamp(2.3rem, 11vw, 3.8rem);
  }

  .closing__title {
    font-size: clamp(2.8rem, 13.6vw, 5rem);
  }

  .closing__grid > .es {
    font-size: 1rem;
  }

  .to-top {
    font-size: 7px;
  }

  .foot-bottom {
    display: grid;
    gap: 6px;
  }
}

@media (max-width: 380px) {
  .lang button {
    padding: 5px 6px;
    font-size: 7.5px;
  }

  .hero__title {
    font-size: 3rem;
  }

  .strip {
    flex-basis: 70vw;
  }

  .chapter-title {
    font-size: 3rem;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
