/* --------------------------------------------------------------------------
   MERCADO PERIFÉRICO — Dossier de arquitectura
   Sistema editorial: papel de dibujo, tinta grafito, rojo óxido.
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. Fuentes
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spline Sans Mono";
  src: url("../fonts/spline-sans-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spline Sans Mono";
  src: url("../fonts/spline-sans-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   02. Base
   -------------------------------------------------------------------------- */

:root {
  --paper: var(--color-paper, #f5f3ed);
  --paper-soft: var(--color-paper-soft, #fbfaf6);
  --paper-deep: var(--color-paper-deep, #e9e5dc);
  --ink: var(--color-ink, #171715);
  --ink-soft: var(--color-ink-soft, #2d2d29);
  --muted: var(--color-muted, #6e6a61);
  --muted-2: var(--color-muted-2, #716d64);
  --line: var(--color-line, #d2cec3);
  --line-strong: var(--color-line-strong, #a9a499);
  --accent: var(--color-accent, #d2482b);
  --accent-text: var(--color-accent-deep, #a6331d);
  --accent-soft: var(--color-accent-soft, #e8c6bb);
  --accent-light: var(--color-accent-light, #f08a6a);
  --slate: var(--color-slate, #1b2223);
  --slate-soft: var(--color-slate-soft, #273031);
  --slate-line: var(--color-slate-line, #3b4445);
  --green: var(--color-green, #aebfa9);
  --green-soft: var(--color-green-soft, #dde4d6);
  --dark-text: var(--color-dark-text, #e9e5dc);
  --dark-muted: var(--color-dark-muted, #b8b4a8);
  --white: var(--color-white, #ffffff);
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "Spline Sans Mono", "SFMono-Regular", Consolas, monospace;
  --max: 1560px;
  --gutter: clamp(20px, 4vw, 64px);
  --nav-h: 84px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root,
[data-theme] {
  --p: 14 66% 50%;
  --pc: 0 0% 100%;
  --b1: 48 20% 94%;
  --b2: 48 20% 90%;
  --b3: 48 20% 86%;
  --bc: 60 2% 8%;
  --a: 14 66% 50%;
  --ac: 0 0% 100%;
  --n: 180 5% 12%;
  --nc: 48 20% 94%;
  --rounded-box: 0;
  --rounded-btn: 0;
  --rounded-badge: 0;
  --border-btn: 1px;
  --animation-btn: 0;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -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;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open,
body.dialog-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
}

button,
[role="button"] {
  cursor: pointer;
}

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

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

::selection {
  background: var(--accent);
  color: var(--paper);
}

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

html {
  scrollbar-color: var(--accent) var(--paper);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--paper);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border: 3px solid var(--paper);
}

/* --------------------------------------------------------------------------
   03. Utilidades
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

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

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 210;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--accent);
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  padding: 0.2rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.tag--pending {
  color: var(--accent-text);
  border-color: var(--accent-soft);
  background: rgba(210, 72, 43, 0.045);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0 0 0.12rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.text-link:hover {
  color: var(--accent-text);
  border-color: var(--accent);
}

.text-link span {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.text-link--arrow:hover span {
  transform: translate(2px, -2px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 46px;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

.button--solid {
  background: var(--ink);
  color: var(--paper);
}

.button--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.button--ghost {
  border-color: var(--line-strong);
}

.button span {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.button:hover span {
  transform: translate(2px, -2px);
}

.button--solid:hover span {
  transform: translateY(2px);
}

/* --------------------------------------------------------------------------
   04. Navegación
   -------------------------------------------------------------------------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark {
  width: 75px;
  height: 75px;
  flex: none;
  object-fit: contain;
}

.brand-word {
  line-height: 1;
}

.brand-code {
  color: var(--accent-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.2vw, 1.3rem);
  margin-left: auto;
}

.nav-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  border-bottom: 1px solid transparent;
  padding: 0.35rem 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-links a span {
  color: var(--muted-2);
  font-size: 0.48rem;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  border-color: var(--accent);
}

.nav-links a.is-active span {
  color: var(--accent-text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: none;
}

.status-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 0.25rem 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.status-button:hover {
  color: var(--accent-text);
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 0.5rem 0.65rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.menu-toggle svg {
  width: 20px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   05. Menú móvil
   -------------------------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  background: var(--ink);
  color: var(--paper);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100svh;
  padding-top: 18px;
  padding-bottom: 20px;
}

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--slate-line);
  padding-bottom: 14px;
  color: var(--dark-muted);
}

.mobile-menu-close {
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-menu-close span {
  margin-left: 0.4rem;
  color: var(--accent-light);
  font-size: 1.1rem;
}

.mobile-links {
  display: flex;
  flex-direction: column;
  margin-block: auto;
  padding-block: 1.5rem;
}

.mobile-links a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--slate-line);
  padding: 0.55rem 0;
  color: var(--paper);
  font-size: clamp(1.55rem, 5.4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  transition: color 0.2s ease;
}

.mobile-links a span {
  flex: none;
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.mobile-links a:hover {
  color: var(--accent-light);
}

.mobile-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--slate-line);
  padding-top: 14px;
  color: var(--dark-muted);
}

.mobile-menu-foot .text-link {
  color: var(--paper);
  border-color: var(--paper);
}

.mobile-menu-foot .mono {
  max-width: 46ch;
  text-align: right;
  font-size: 0.55rem;
  color: var(--dark-muted);
}

/* --------------------------------------------------------------------------
   06. Hero
   -------------------------------------------------------------------------- */

.hero-section {
  position: relative;
  padding-top: var(--nav-h);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(23, 23, 21, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 23, 21, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: stretch;
  gap: clamp(2rem, 5vw, 5rem);
  padding-top: clamp(28px, 4vw, 58px);
  padding-bottom: clamp(28px, 3vw, 48px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(1.4rem, 2.5vw, 2.4rem);
  min-width: 0;
}

.hero-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
  color: var(--muted);
}

.hero-edition {
  color: var(--muted-2);
  text-align: right;
}

.hero-title {
  max-width: 12ch;
  font-size: clamp(3.1rem, 7.2vw, 6rem);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hero-statement {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 56ch;
}

.hero-subtitle {
  max-width: 24ch;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.hero-lugar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-lugar .mono {
  color: var(--accent-text);
}

.hero-lead {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.4rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: auto;
}

.hero-meta dt {
  margin-bottom: 0.15rem;
  color: var(--accent-text);
}

.hero-meta dd {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}

.hero-plate-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  align-self: start;
}

.plate-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper-soft);
}

.hero-plate {
  aspect-ratio: 620 / 820;
}

.hero-plate > img,
.hero-plate > svg {
  display: block;
  width: 100%;
  height: auto;
}

.plate-scanner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
}

.plate-frame.is-loaded .plate-scanner {
  animation: scan 1.5s var(--ease) forwards;
}

@keyframes scan {
  0% {
    top: 0;
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

#hero-plate .hero-sheet .sheet-axo {
  opacity: 0;
  transition: opacity 1s var(--ease);
}

#hero-plate .hero-sheet .sheet-plan {
  opacity: 0;
  transition: opacity 1s var(--ease) 0.35s;
}

#hero-plate .hero-sheet .sheet-anno {
  opacity: 0;
  transition: opacity 0.8s var(--ease) 0.9s;
}

#hero-plate.is-loaded .hero-sheet .sheet-axo,
#hero-plate.is-loaded .hero-sheet .sheet-plan,
#hero-plate.is-loaded .hero-sheet .sheet-anno {
  opacity: 1;
}

.plate-caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.plate-caption .mono {
  color: var(--accent-text);
  margin-bottom: 0.15rem;
}

.plate-disclaimer {
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.hero-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-block: 0.9rem;
}

.hero-index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.4rem;
}

.hero-index-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.hero-index-links a span {
  color: var(--muted-2);
  font-size: 0.48rem;
}

.hero-index-links a:hover {
  color: var(--ink);
}

.hero-index-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
}

.hero-index-status .mono {
  color: var(--muted);
  font-size: 0.55rem;
}

/* --------------------------------------------------------------------------
   07. Secciones
   -------------------------------------------------------------------------- */

.section {
  position: relative;
  border-top: 1px solid var(--line);
  padding-block: clamp(72px, 9vw, 140px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.section-index {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--muted);
}

.section-index > .mono:first-child {
  color: var(--accent-text);
  font-size: 0.8rem;
}

.section-index-line {
  display: block;
  width: 100%;
  max-width: 76px;
  height: 1px;
  background: var(--line-strong);
}

.section-title-wrap {
  min-width: 0;
}

.section-title {
  max-width: 14ch;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.section-intro {
  max-width: 54ch;
  padding-top: 0.2rem;
}

.lead {
  color: var(--ink-soft);
  font-size: clamp(1.04rem, 1.4vw, 1.24rem);
  line-height: 1.55;
}

.lead + .lead {
  margin-top: 1rem;
}

.body-copy {
  max-width: 66ch;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.body-copy + .body-copy {
  margin-top: 1rem;
}

.serif-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   08. Proyecto
   -------------------------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(3rem, 6vw, 6rem);
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-quote {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.project-quote blockquote {
  max-width: 23ch;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3.1vw, 2.9rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.project-quote figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
}

.project-moves {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.8rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.project-moves article {
  border-top: 1px solid var(--line-strong);
  padding-top: 0.7rem;
}

.project-moves .mono {
  color: var(--accent-text);
  font-size: 0.56rem;
}

.project-moves h3 {
  margin: 0.35rem 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.project-moves p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.project-ficha {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border-top: 1px solid var(--ink);
  padding-top: 0.9rem;
}

.ficha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.7rem;
}

.ficha-head .mono {
  color: var(--accent-text);
}

.ficha-list > div {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.62rem 0;
}

.ficha-list dt {
  color: var(--muted);
  font-size: 0.58rem;
}

.ficha-list dd {
  font-size: 0.86rem;
  line-height: 1.4;
}

.ficha-note {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.project-ficha .text-link,
.memory-ficha .text-link {
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   09. Contexto
   -------------------------------------------------------------------------- */

.context-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(3rem, 6vw, 6rem);
}

.layer-panel {
  min-width: 0;
}

.layer-media {
  border: 1px solid var(--line-strong);
  background: var(--paper-soft);
}

.layer-media-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.8rem;
  color: var(--muted);
}

.layer-media-top .mono {
  font-size: 0.55rem;
}

.layer-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-soft);
}

.layer-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.layer-img.is-active {
  opacity: 1;
}

.layer-caption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.layer-caption .mono {
  color: var(--accent-text);
  margin-bottom: 0.15rem;
}

.layer-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.layer-tabs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.layer-tabs button {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0.65rem 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
  text-align: left;
  transition: color 0.22s ease, background 0.22s ease;
}

.layer-tabs button .mono {
  color: var(--muted-2);
  font-size: 0.54rem;
}

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

.layer-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: rgba(210, 72, 43, 0.045);
}

.layer-tabs button[aria-selected="true"] .mono {
  color: var(--accent-text);
}

.layer-copy {
  border-top: 1px solid var(--ink);
  padding-top: 0.8rem;
}

.layer-count {
  color: var(--accent-text);
}

.layer-copy h3 {
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.layer-copy > p:not(.mono) {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.layer-note {
  margin-top: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.context-bottom {
  margin-top: clamp(2.4rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.findings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.findings-head > .mono {
  color: var(--accent-text);
}

.findings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
}

.findings-grid h3 {
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.findings-grid li {
  display: flex;
  gap: 0.55rem;
  border-top: 1px solid var(--line);
  padding: 0.55rem 0;
  font-size: 0.94rem;
  line-height: 1.4;
}

.findings-grid li::before {
  content: "—";
  color: var(--accent-text);
}

.findings-note {
  max-width: 72ch;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. Concepto
   -------------------------------------------------------------------------- */

.section--concept {
  border-top-color: var(--slate);
  background: var(--slate);
  color: var(--paper);
}

.section--concept .section-index {
  color: var(--dark-muted);
}

.section--concept .section-index > .mono:first-child {
  color: var(--accent-light);
}

.section--concept .section-index-line {
  background: var(--slate-line);
}

.section--concept .section-title {
  color: var(--paper);
}

.section--concept .section-title em {
  color: var(--accent-light);
}

.section--concept .lead {
  color: var(--dark-muted);
}

.concept-quote {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: clamp(2.5rem, 5vw, 5rem);
  border-top: 1px solid var(--slate-line);
  padding-top: 1.6rem;
}

.concept-quote .serif-quote {
  max-width: 18ch;
  color: var(--paper);
  font-size: clamp(2.1rem, 4.8vw, 4.8rem);
}

.concept-quote .mono {
  color: var(--accent-light);
}

.concept-ops {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 2.8rem);
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.concept-op {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-top: 1px solid var(--slate-line);
  padding-top: 0.9rem;
}

.concept-op-head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.concept-op-head .mono {
  color: var(--accent-light);
}

.concept-op h3 {
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.concept-op > p {
  color: var(--dark-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.concept-figure {
  margin-top: auto;
}

.concept-figure a {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--slate-line);
  background: var(--paper);
}

.concept-figure img {
  width: 100%;
  height: auto;
  transition: transform 0.5s var(--ease);
}

.concept-figure a:hover img {
  transform: scale(1.015);
}

.concept-figure figcaption {
  margin-top: 0.45rem;
  color: var(--dark-muted);
  font-size: 0.54rem;
}

.img-action {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.2rem 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.concept-figure a:hover .img-action,
.process-figure a:hover .img-action,
.archive-item:hover .img-action {
  opacity: 1;
  transform: none;
}

.concept-criteria {
  margin-top: clamp(2.5rem, 5vw, 5rem);
  border-top: 1px solid var(--slate-line);
  padding-top: 1rem;
}

.criteria-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  color: var(--dark-muted);
}

.concept-criteria ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 3rem;
}

.concept-criteria li {
  display: flex;
  gap: 0.7rem;
  border-top: 1px solid var(--slate-line);
  padding: 0.7rem 0;
  color: var(--paper);
  font-size: 0.92rem;
  line-height: 1.45;
}

.concept-criteria li .mono {
  flex: none;
  color: var(--accent-light);
  font-size: 0.54rem;
}

.concept-note {
  margin-top: 1.4rem;
  max-width: 68ch;
  color: var(--dark-muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   11. Proceso
   -------------------------------------------------------------------------- */

.process-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(3rem, 6vw, 6rem);
}

.process-aside {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.process-aside > .mono {
  color: var(--accent-text);
}

.process-current-number {
  font-size: clamp(4rem, 8vw, 7.5rem);
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--accent-text);
}

.process-current-title {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.process-rail {
  position: relative;
  width: 1px;
  height: 190px;
  margin: 1rem 0 0.6rem;
  background: var(--line);
}

.process-rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.18s linear;
}

.process-rail-dot {
  position: absolute;
  left: -2px;
  width: 5px;
  height: 5px;
  background: var(--line-strong);
}

.process-rail-dot--1 { top: 0; }
.process-rail-dot--2 { top: 14.28%; }
.process-rail-dot--3 { top: 28.57%; }
.process-rail-dot--4 { top: 42.85%; }
.process-rail-dot--5 { top: 57.14%; }
.process-rail-dot--6 { top: 71.42%; }
.process-rail-dot--7 { top: 85.71%; }
.process-rail-dot--8 { top: 100%; }

.process-rail-dot.is-active {
  background: var(--accent);
}

.process-index {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.process-index li {
  display: flex;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.process-index li .mono {
  flex: none;
  color: var(--muted-2);
  font-size: 0.5rem;
}

.process-index li.is-active {
  color: var(--ink);
}

.process-index li.is-active .mono {
  color: var(--accent-text);
}

.process-aside-note {
  margin-top: 0.8rem;
  max-width: 26ch;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.process-steps {
  min-width: 0;
}

.process-step {
  border-top: 1px solid var(--line);
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
}

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

.process-step-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.step-number {
  flex: none;
  color: var(--line-strong);
  font-size: 1.9rem;
  line-height: 1;
  transition: color 0.25s ease;
}

.process-step.is-current .step-number {
  color: var(--accent-text);
}

.process-step h3 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.step-total {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.55rem;
}

.process-step-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(170px, 0.7fr);
  align-items: start;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  margin-top: 1rem;
}

.process-prompts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.process-prompts .mono {
  margin-bottom: 0.25rem;
  color: var(--accent-text);
  font-size: 0.57rem;
}

.process-prompts p:not(.mono) {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}

.process-figure {
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}

.process-figure a {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.process-figure img {
  width: 100%;
  height: auto;
  transition: transform 0.4s var(--ease);
}

.process-figure a:hover img {
  transform: scale(1.02);
}

.process-figure figcaption {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.52rem;
}

.process-end-note {
  max-width: 74ch;
  margin-top: 1.6rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   12. Planos
   -------------------------------------------------------------------------- */

.plans-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.7rem;
}

.plans-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.filter-button {
  border: 1px solid transparent;
  background: none;
  padding: 0.4rem 0.55rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-button span {
  margin-left: 0.2rem;
  color: var(--line-strong);
}

.filter-button:hover {
  border-color: var(--line);
  color: var(--ink);
}

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

.filter-button.is-active span {
  color: var(--accent-light);
}

.plans-count {
  flex: none;
  color: var(--muted);
  font-size: 0.55rem;
}

.plates-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: 1.4rem;
}

.plate-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-top: 1px solid var(--ink);
  padding-top: 0.55rem;
  color: var(--ink);
  text-align: left;
}

.plate-card--wide,
.plate-card.is-solo {
  grid-column: span 12;
}

.plate-card.is-hidden,
.plate-card[hidden] {
  display: none;
}

.plate-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
  color: var(--muted);
}

.plate-card-top .mono {
  font-size: 0.57rem;
}

.plate-dot {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--accent);
}

.plate-card-media {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.plate-card-media img {
  width: 100%;
  height: auto;
  transition: transform 0.5s var(--ease);
}

.plate-card:hover .plate-card-media img {
  transform: scale(1.012);
}

.plate-card-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.55rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}

.plate-card-bottom h3 {
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.plate-open {
  flex: none;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plate-open span {
  display: inline-block;
  transition: transform 0.25s ease;
}

.plate-card:hover .plate-open span {
  transform: translate(2px, -2px);
}

.plans-note {
  max-width: 86ch;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   13. Propuesta
   -------------------------------------------------------------------------- */

.compare-wrap {
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
  color: var(--muted);
}

.compare-head .mono {
  font-size: 0.55rem;
}

.compare-arrow {
  color: var(--accent-text);
}

.compare {
  --pct: 50%;
}

.compare-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-top: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--paper-soft);
  touch-action: pan-y;
}

.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.compare-overlay {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 calc(100% - var(--pct)));
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pct);
  width: 1px;
  background: var(--accent);
  pointer-events: none;
}

.compare-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--accent);
  background: var(--paper);
}

.compare-handle span::before,
.compare-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

.compare-handle span::before {
  left: 5px;
}

.compare-handle span::after {
  right: 5px;
}

.compare-label {
  position: absolute;
  top: 0.7rem;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.22rem 0.35rem;
  color: var(--ink);
  font-size: 0.56rem;
}

.compare-label--before {
  left: 0.7rem;
}

.compare-label--after {
  right: 0.7rem;
}

.compare-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem 1rem;
  margin-top: 0.8rem;
}

.compare-controls label {
  color: var(--accent-text);
}

.compare-range {
  width: 100%;
  height: 24px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.compare-range::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--line-strong);
}

.compare-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -6.5px;
  border: 2px solid var(--paper);
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.compare-range::-moz-range-track {
  height: 1px;
  background: var(--line-strong);
}

.compare-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--paper);
  background: var(--accent);
}

#compare-help {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.4;
}

.compare-noscript {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.compare-noscript a {
  border-bottom: 1px solid currentColor;
}

.proposal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.proposal-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.proposal-decisions {
  border-top: 1px solid var(--ink);
  padding-top: 0.9rem;
}

.decision-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.decision-head > .mono {
  color: var(--accent-text);
}

.proposal-decisions ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
}

.proposal-decisions li {
  display: flex;
  gap: 0.7rem;
  border-top: 1px solid var(--line);
  padding: 0.7rem 0;
}

.proposal-decisions li .mono {
  flex: none;
  color: var(--accent-text);
  font-size: 0.54rem;
}

.proposal-decisions h3 {
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.proposal-decisions p {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.proposal-note {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   14. Memoria
   -------------------------------------------------------------------------- */

.memory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(3rem, 6vw, 6rem);
}

.memory-main {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
}

.memory-print {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.print-header {
  display: none;
}

.memory-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.4rem;
  margin: 0.6rem 0 0.8rem;
}

.memory-accordion {
  border-top: 1px solid var(--ink);
}

.memory-item {
  border-bottom: 1px solid var(--line);
}

.memory-item summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0;
  list-style: none;
  cursor: pointer;
}

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

.memory-item summary .mono {
  flex: none;
  color: var(--accent-text);
  font-size: 0.54rem;
}

.memory-item summary > span:nth-child(2) {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.35;
}

.memory-icon {
  position: relative;
  width: 12px;
  height: 12px;
  flex: none;
}

.memory-icon::before,
.memory-icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.25s ease;
}

.memory-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.memory-icon::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
}

.memory-item[open] .memory-icon::after {
  transform: scaleY(0);
}

.memory-item-body {
  max-width: 68ch;
  padding: 0 0 0.9rem 2rem;
}

.memory-item-body p,
.memory-item-body li {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.65;
}

.memory-item-body ul {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 1rem;
  list-style: disc;
}

.memory-ficha {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border-top: 1px solid var(--ink);
  padding-top: 0.9rem;
}

.memory-ficha .ficha-list dd {
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   15. Archivo
   -------------------------------------------------------------------------- */

.archive-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.2rem);
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.archive-item {
  position: relative;
  grid-column: span 4;
  display: block;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}

.archive-item--7 { grid-column: span 7; }
.archive-item--5 { grid-column: span 5; }
.archive-item--4 { grid-column: span 4; }
.archive-item--6 { grid-column: span 6; }

.archive-item figure {
  margin: 0;
}

.archive-item img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  transition: transform 0.5s var(--ease);
}

.archive-item:hover img {
  transform: scale(1.008);
}

.archive-item figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.35rem;
  color: var(--muted);
  font-size: 0.55rem;
}

.archive-item .img-action {
  right: 0.5rem;
  bottom: 2.2rem;
}

.archive-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 190px;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  background: var(--paper-soft);
  padding: 0.8rem;
}

.placeholder-cross {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--line) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--line) 50%, transparent calc(50% + 0.5px));
  pointer-events: none;
}

.placeholder-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--muted);
}

.placeholder-copy .mono:first-child {
  color: var(--accent-text);
}

.archive-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.archive-note {
  max-width: 72ch;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   16. Conclusiones
   -------------------------------------------------------------------------- */

.section--conclusion {
  border-top: 1px solid var(--line);
}

.conclusion-quote {
  margin-top: clamp(2rem, 5vw, 5rem);
  border-top: 1px solid var(--ink);
  padding-top: 1.4rem;
}

.conclusion-quote .serif-quote {
  max-width: 16ch;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
}

.conclusion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(2rem, 4vw, 4rem);
}

.conclusion-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.next-step h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.next-step > p:not(.mono) {
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.end-mark {
  flex: none;
  color: var(--muted);
  font-size: 0.55rem;
}

/* --------------------------------------------------------------------------
   17. Pie
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding-top: clamp(2.5rem, 5vw, 5rem);
}

.footer-top {
  border-bottom: 1px solid var(--slate-line);
  padding-bottom: 1.4rem;
}

.footer-kicker {
  color: var(--accent-light);
}

.footer-project {
  max-width: 16ch;
  margin-top: 0.8rem;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.footer-lugar {
  margin-top: 0.8rem;
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2rem, 4vw, 3.5rem);
}

.footer-col h3 {
  margin-bottom: 0.8rem;
  color: var(--accent-light);
  font-size: 0.58rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-col ul a {
  color: var(--dark-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.footer-col ul a:hover {
  color: var(--paper);
}

.footer-data > div {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.8rem;
  border-bottom: 1px solid var(--slate-line);
  padding: 0.45rem 0;
}

.footer-data dt {
  color: var(--dark-muted);
  font-size: 0.55rem;
}

.footer-data dd {
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.footer-note,
.footer-copy {
  max-width: 42ch;
  color: var(--dark-muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.footer-note {
  margin-top: 0.8rem;
}

.footer-copy + .footer-copy {
  margin-top: 0.7rem;
}

.footer-col .text-link {
  margin-top: 0.9rem;
  color: var(--paper);
  border-color: var(--paper);
}

.footer-col .text-link:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--slate-line);
  padding-block: 0.9rem;
  color: var(--dark-muted);
}

.footer-bottom .mono {
  font-size: 0.52rem;
}

.footer-up {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer-up:hover {
  color: var(--accent-light);
}

/* --------------------------------------------------------------------------
   18. Visor y modales
   -------------------------------------------------------------------------- */

dialog.modal {
  background: transparent;
}

dialog.modal::backdrop {
  background: rgba(12, 14, 14, 0.74);
}

.modal-box {
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
}

.plan-viewer .viewer-box {
  display: flex;
  flex-direction: column;
  width: min(1200px, calc(100vw - 32px));
  max-width: 1200px;
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  overflow: hidden;
}

.viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1.1rem;
  flex: none;
}

.viewer-head .mono {
  color: var(--accent-text);
  font-size: 0.55rem;
}

.viewer-head h2 {
  margin-top: 0.15rem;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.viewer-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.viewer-stage {
  display: block;
  flex: 0 0 auto;
  height: clamp(320px, 64svh, 720px);
  overflow: auto;
  background: #e9e6dd;
  padding: 1rem;
}

.viewer-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.viewer-stage img {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  max-height: calc(clamp(320px, 64svh, 720px) - 2rem);
  height: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  transform-origin: top center;
}

.viewer-stage.is-zoomed .viewer-canvas {
  align-items: flex-start;
}

.viewer-stage.is-zoomed img {
  max-width: none;
  max-height: none;
}

.viewer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  padding: 0.65rem 1.1rem;
  flex: none;
}

.viewer-foot > .mono {
  color: var(--muted);
  font-size: 0.56rem;
}

.viewer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.viewer-zoom,
.viewer-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.viewer-zoom button,
.viewer-nav button {
  min-width: 32px;
  height: 30px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.viewer-zoom button:hover,
.viewer-nav button:hover {
  background: var(--ink);
  color: var(--paper);
}

.viewer-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#viewer-zoom-label {
  min-width: 44px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  text-align: center;
}

.status-modal .status-box {
  width: min(660px, calc(100vw - 32px));
  max-width: 660px;
  padding: 1.4rem;
  border: 1px solid var(--line-strong);
}

.status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.7rem;
}

.status-head .mono {
  color: var(--accent-text);
  font-size: 0.55rem;
}

.status-box h2 {
  margin: 1rem 0 0.7rem;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.status-box p {
  margin-bottom: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.status-actions .mono {
  color: var(--muted);
  font-size: 0.56rem;
}

/* --------------------------------------------------------------------------
   19. Aparición progresiva
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* --------------------------------------------------------------------------
   20. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .nav-links,
  .status-button {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-inner {
    gap: 1rem;
  }
}

@media (max-width: 1100px) {
  .section-head {
    grid-template-columns: minmax(100px, 0.4fr) minmax(0, 1.6fr);
  }

  .section-intro {
    grid-column: 2;
    padding-top: 0.6rem;
  }

  .project-grid,
  .context-grid,
  .memory-grid {
    grid-template-columns: 1fr;
  }

  .project-ficha,
  .memory-ficha {
    position: static;
  }

  .project-ficha {
    max-width: 620px;
  }

  .memory-ficha {
    max-width: 680px;
  }

  .process-layout {
    grid-template-columns: 1fr;
  }

  .process-aside {
    position: static;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: end;
    gap: 0.3rem 0.8rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-block: 0.8rem;
  }

  .process-aside > .mono {
    grid-column: 1 / -1;
  }

  .process-current-number {
    font-size: 3.4rem;
  }

  .process-current-title {
    align-self: center;
    font-size: 1rem;
  }

  .process-rail,
  .process-index,
  .process-aside-note {
    display: none;
  }
}

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    gap: 1.3rem;
  }

  .hero-title {
    max-width: 13ch;
    font-size: clamp(3.2rem, 10vw, 5.4rem);
  }

  .hero-plate-wrap {
    width: min(100%, 620px);
    margin-inline: auto;
  }

  .hero-index {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .concept-ops {
    grid-template-columns: 1fr;
  }

  .concept-op {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.75fr);
    align-items: start;
    gap: 0.5rem 1.5rem;
  }

  .concept-op-head,
  .concept-op > p {
    grid-column: 1;
  }

  .concept-figure {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
  }

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

  .conclusion-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .hero-meta {
    grid-template-columns: 1fr;
  }

  .project-moves {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .findings-grid,
  .conclusion-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .proposal-decisions ol {
    grid-template-columns: 1fr;
  }

  .process-step-body {
    grid-template-columns: 1fr;
  }

  .process-figure {
    max-width: 360px;
  }

  .plans-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .plate-card,
  .plate-card--wide {
    grid-column: span 12;
  }

  .archive-item,
  .archive-item--7,
  .archive-item--5,
  .archive-item--4,
  .archive-item--6 {
    grid-column: span 12;
  }

  .archive-grid {
    gap: 1.1rem;
  }

  .archive-placeholder {
    min-height: 240px;
  }

  .archive-foot,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .viewer-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewer-stage {
    min-height: 55svh;
  }
}

@media (max-width: 700px) {
  :root {
    --nav-h: 84px;
    --gutter: 20px;
  }

  .brand {
    font-size: 0.62rem;
  }

  .brand-mark {
    width: 75px;
    height: 75px;
  }

  .hero-grid {
    padding-top: 24px;
  }

  .hero-title {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .hero-subtitle {
    font-size: 1.35rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: space-between;
  }

  .hero-actions .text-link {
    align-self: flex-start;
  }

  .hero-index-links {
    gap: 0.45rem 1rem;
  }

  .section {
    padding-block: 64px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .section-index {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .section-index-line {
    width: 48px;
  }

  .section-intro {
    grid-column: auto;
    padding-top: 0;
  }

  .section-title {
    max-width: 18ch;
    font-size: clamp(2.15rem, 10vw, 3.2rem);
  }

  .project-quote blockquote {
    max-width: 100%;
  }

  .layer-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .layer-tabs::-webkit-scrollbar {
    display: none;
  }

  .layer-tabs button {
    flex: 0 0 auto;
    min-width: 150px;
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 0.6rem 0.5rem;
  }

  .concept-op {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .concept-figure {
    margin-top: 0.4rem;
    max-width: 420px;
  }

  .concept-criteria ol {
    grid-template-columns: 1fr;
  }

  .process-prompts {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .process-prompts > div {
    border-top: 1px solid var(--line);
    padding-top: 0.4rem;
  }

  .plans-filters {
    gap: 0.15rem;
  }

  .filter-button {
    padding: 0.35rem 0.4rem;
  }

  .compare-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .compare-controls {
    grid-template-columns: 1fr;
  }

  .memory-item summary {
    flex-wrap: wrap;
  }

  .memory-item summary > span:nth-child(2) {
    flex: 1 1 100%;
  }

  .memory-item-body {
    padding-left: 0;
  }

  .archive-placeholder {
    min-height: 200px;
  }

  .status-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewer-head {
    padding: 0.75rem;
  }

  .viewer-stage {
    padding: 0.5rem;
  }

  .viewer-foot {
    padding: 0.6rem 0.75rem;
  }
}

@media (max-width: 460px) {
  .hero-title {
    font-size: clamp(2.35rem, 12vw, 3rem);
  }

  .hero-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .hero-edition {
    text-align: left;
  }

  .hero-index-links a {
    font-size: 0.52rem;
  }

  .plate-card-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .footer-project {
    font-size: 2.2rem;
  }

  .next-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .next-actions .button {
    width: 100%;
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------------------
   21. Movimiento reducido
   -------------------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-plate .hero-sheet .sheet-axo,
  .hero-plate .hero-sheet .sheet-plan,
  .hero-plate .hero-sheet .sheet-anno {
    opacity: 1 !important;
  }

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

/* --------------------------------------------------------------------------
   22. Impresión
   -------------------------------------------------------------------------- */

@media print {
  @page {
    margin: 18mm;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .skip-link,
  .scroll-progress,
  .site-nav,
  .mobile-menu,
  .site-footer,
  .plan-viewer,
  .status-modal,
  .hero-section,
  .section--project,
  .section--context,
  .section--concept,
  .section--process,
  .section--plans,
  .section--proposal,
  .section--archive,
  .section--conclusion,
  .memory-actions,
  .memory-accordion,
  .memory-ficha .text-link,
  .memory-ficha .status-dot {
    display: none !important;
  }

  .section--memory {
    display: block !important;
    border: 0;
    padding: 0;
  }

  .section--memory .section-head {
    display: none;
  }

  .memory-grid {
    display: block;
  }

  .memory-ficha {
    display: block;
    position: static;
    margin-top: 20px;
    border-top: 1px solid #000;
  }

  .memory-print {
    display: block;
  }

  .memory-print .print-header {
    display: block;
    border-bottom: 1px solid #000;
    margin-bottom: 14px;
    padding-bottom: 8px;
  }

  .print-title {
    font-size: 22pt;
    font-weight: 600;
    line-height: 1.1;
    margin-top: 4px;
  }

  .print-sub {
    font-family: var(--font-mono);
    font-size: 8pt;
    margin-top: 4px;
  }

  .memory-print .body-copy {
    color: #000;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .memory-ficha .ficha-list > div {
    border-bottom: 1px solid #cccccc;
  }

  .memory-ficha .ficha-note {
    color: #333333;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}

/* --------------------------------------------------------------------------
   Mercado Periférico — proyecto terminado, mapa, fases y créditos
   -------------------------------------------------------------------------- */

.hero-title {
  max-width: 20ch;
  font-size: clamp(2.35rem, 4vw, 3.75rem);
  line-height: 0.92;
}

.hero-title-line {
  display: block;
}

.hero-title-line--second {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero-plate--project {
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem;
  background: var(--paper-soft);
}

.hero-plate-head,
.hero-plate-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.52rem;
}

.hero-plate-head .mono:first-child {
  color: var(--color-path-deep, #8e470d);
}

.hero-plate-foot {
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}

.hero-plate-figure {
  margin: 0;
}

.hero-plate-figure > a {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.hero-plate-figure img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s var(--ease);
}

.hero-plate-figure a:hover img {
  transform: scale(1.012);
}

.hero-plate-figure figcaption {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.52rem;
}

.hero-map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: 1px;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--ink);
  background: var(--ink);
}

.hero-map-frame {
  min-height: 340px;
  background: var(--paper-soft);
}

.hero-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
}

.hero-map-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: var(--paper-soft);
  padding: clamp(1.2rem, 2.5vw, 2rem);
}

.hero-map-card > .mono {
  color: var(--color-path-deep, #8e470d);
}

.hero-map-card h2 {
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-map-card p:not(.mono) {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}

.hero-map-empty {
  display: grid;
  place-content: center;
  gap: 0.35rem;
  min-height: 340px;
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
}

.footer-project {
  max-width: 20ch;
  font-size: clamp(1.9rem, 4.2vw, 3.8rem);
  line-height: 0.95;
}

.footer-credit {
  margin-top: 0.55rem;
  color: var(--accent-light);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  padding: 0;
  cursor: pointer;
}

.media-frame img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s var(--ease);
}

.media-frame:hover img {
  transform: scale(1.012);
}

.media-item {
  min-width: 0;
  margin: 0;
}

.media-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.55rem;
  line-height: 1.4;
}

.media-caption .mono {
  color: var(--color-path-deep, #8e470d);
}

.media-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.media-play > span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--paper);
  background: rgba(23, 23, 21, 0.72);
}

.media-play > span::before {
  content: "";
  margin-left: 4px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--paper);
}

.media-video-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--slate);
}

.finished-featured-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.75fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.finished-featured {
  margin: 0;
}

.finished-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}

.finished-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  background: var(--line);
}

.finished-gallery > * {
  background: var(--paper);
  padding: 0.6rem;
}

.finished-comparator {
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.finished-note,
.phases-note {
  max-width: 80ch;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.finished-empty,
.finished-gallery-empty,
.compare-empty {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px dashed var(--line-strong);
  background: var(--paper-soft);
  padding: 1.2rem;
}

.finished-empty > .mono,
.finished-gallery-empty > .mono,
.compare-empty .mono {
  color: var(--accent-text);
}

.finished-empty p:not(.mono),
.finished-gallery-empty p:not(.mono),
.compare-empty p:not(.mono) {
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.finished-gallery-empty {
  margin-top: 1px;
}

.plate-card-desc {
  max-width: 52ch;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.viewer-desc {
  max-width: 70ch;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.video-box {
  max-width: min(1100px, 94vw);
  padding: 0;
  border: 1px solid var(--line-strong);
}

.video-stage {
  display: grid;
  place-items: center;
  min-height: 320px;
  background: #0f1211;
}

.video-stage iframe,
.video-stage video {
  display: block;
  width: 100%;
  max-height: 70vh;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.actual-media {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.actual-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.actual-gallery > * {
  background: var(--paper);
  padding: 0.6rem;
}

.actual-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
}

.actual-location-card {
  border: 1px solid var(--ink);
  background: var(--paper-soft);
}

.actual-location-media img {
  display: block;
  width: 100%;
  height: auto;
}

.actual-location-empty {
  display: grid;
  place-content: center;
  gap: 0.3rem;
  min-height: 180px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.actual-location-copy {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
}

.actual-location-copy > .mono {
  color: var(--accent-text);
}

.actual-location-copy p:not(.mono) {
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.actual-analysis-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--ink);
  padding-top: 0.7rem;
  color: var(--muted);
}

.section--phases {
  border-top-color: var(--slate);
  background: var(--slate);
  color: var(--paper);
}

.section--phases .section-index {
  color: var(--dark-muted);
}

.section--phases .section-index > .mono:first-child {
  color: var(--accent-light);
}

.section--phases .section-index-line {
  background: var(--slate-line);
}

.section--phases .section-title {
  color: var(--paper);
}

.section--phases .section-title em {
  color: var(--accent-light);
}

.section--phases .lead {
  color: var(--dark-muted);
}

.phases-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 2fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: clamp(3rem, 6vw, 6rem);
}

.phases-aside {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.phases-aside > .mono {
  color: var(--accent-light);
}

.phases-count {
  color: var(--dark-muted);
  font-size: 0.9rem;
}

.phases-count strong {
  display: block;
  color: var(--paper);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.05em;
}

.phases-progress-label {
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.phases-progress-label span {
  color: var(--accent-light);
}

.phases-aside .process-current-number {
  color: var(--accent-light);
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.phases-aside .process-current-title {
  color: var(--paper);
}

.phases-aside .process-rail {
  background: var(--slate-line);
}

.phases-aside .process-rail-fill {
  background: var(--accent-light);
}

.phases-aside .process-rail-dot {
  background: var(--slate-line);
}

.phases-aside .process-rail-dot.is-active {
  background: var(--accent-light);
}

.phase-index {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.phase-index li a {
  display: flex;
  gap: 0.5rem;
  color: var(--dark-muted);
  font-size: 0.7rem;
  line-height: 1.35;
  transition: color 0.25s ease;
}

.phase-index li .mono {
  flex: none;
  color: var(--dark-muted);
  font-size: 0.5rem;
}

.phase-index li.is-active a {
  color: var(--paper);
}

.phase-index li.is-active .mono {
  color: var(--accent-light);
}

.phases-aside-note {
  max-width: 26ch;
  margin-top: 0.8rem;
  color: var(--dark-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.phase-steps {
  min-width: 0;
}

.phase-step {
  border-top: 1px solid var(--slate-line);
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
}

.phase-step:last-child {
  border-bottom: 1px solid var(--slate-line);
}

.phase-step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.phase-step-head .step-number {
  color: var(--slate-line);
  font-size: 1.9rem;
  line-height: 1;
}

.phase-step.is-current .step-number {
  color: var(--accent-light);
}

.phase-step-title {
  flex: 1;
}

.phase-step-title .mono {
  margin-bottom: 0.2rem;
  color: var(--accent-light);
  font-size: 0.55rem;
}

.phase-step h3 {
  color: var(--paper);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.phase-step .tag {
  flex: none;
  color: var(--dark-muted);
  border-color: var(--slate-line);
  background: transparent;
}

.phase-step .tag--done {
  color: #b9d4a9;
  border-color: #5e7a52;
}

.phase-step .tag--active {
  color: var(--accent-light);
  border-color: #7a3a2b;
}

.phase-step .tag--paused {
  color: #c7b58a;
  border-color: #6e6248;
}

.phase-step-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(200px, 0.9fr);
  align-items: start;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  margin-top: 1rem;
}

.phase-description p {
  margin-bottom: 0.6rem;
  color: var(--dark-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.phase-changes {
  margin-top: 1rem;
  border-top: 1px solid var(--slate-line);
  padding-top: 0.8rem;
}

.phase-changes .mono {
  margin-bottom: 0.35rem;
  color: var(--accent-light);
}

.phase-changes ul {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.phase-changes li {
  position: relative;
  padding-left: 0.9rem;
  color: var(--dark-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.phase-changes li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-light);
}

.phase-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.phase-media .media-frame {
  border-color: var(--slate-line);
  background: var(--paper);
}

.phase-media .media-caption {
  color: var(--dark-muted);
}

.phase-media .media-caption .mono {
  color: var(--accent-light);
}

.phase-media-empty {
  display: grid;
  place-content: center;
  gap: 0.3rem;
  min-height: 170px;
  border: 1px solid var(--slate-line);
  color: var(--dark-muted);
  text-align: center;
}

.phases-empty {
  max-width: 60ch;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--slate-line);
  padding-top: 1.2rem;
}

.phases-empty .mono {
  color: var(--accent-light);
}

.phases-empty h3 {
  margin: 0.4rem 0;
  color: var(--paper);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.phases-empty p:not(.mono) {
  color: var(--dark-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.phases-note {
  border-top: 1px solid var(--slate-line);
  padding-top: 0.9rem;
  color: var(--dark-muted);
}

.memory-method {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--ink);
  padding-top: 0.8rem;
}

.memory-method-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.memory-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.memory-method-grid figure {
  margin: 0;
  background: var(--paper);
  padding: 0.6rem;
}

.memory-method-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.memory-method-grid figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.52rem;
}

.memory-method-note {
  max-width: 74ch;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.credits-titleblock {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 5rem);
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}

.credits-logos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.credits-logo {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 150px;
  margin: 0;
  background: var(--paper);
  padding: 0.8rem;
}

.credits-logo-media {
  display: grid;
  place-items: center;
  min-height: 100px;
}

.credits-logo-media img {
  max-width: 100%;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.credits-logo figcaption {
  color: var(--muted);
  font-size: 0.55rem;
}

.credits-logo--empty {
  display: grid;
  place-content: center;
  gap: 0.35rem;
  border: 1px dashed var(--line-strong);
  background: var(--paper-soft);
  color: var(--muted);
  text-align: center;
}

.credits-logo--empty .mono:first-child {
  color: var(--accent-text);
}

.credits-data {
  border-top: 1px solid var(--ink);
  padding-top: 0.8rem;
}

.credits-data > .mono {
  color: var(--accent-text);
}

.credits-data-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.credits-data-list > div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.45rem;
}

.credits-data-list dt {
  color: var(--muted);
}

.credits-data-list dd {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.credits-people-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--ink);
  padding-top: 0.7rem;
  color: var(--muted);
}

.credits-people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.credit-person {
  background: var(--paper);
  padding: 1rem;
}

.credit-person > .mono {
  color: var(--accent-text);
  font-size: 0.55rem;
}

.credit-person h3 {
  margin: 0.35rem 0 0.7rem;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.credit-person dl {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.credit-person dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.35rem;
}

.credit-person dt {
  color: var(--muted);
}

.credit-person dd {
  color: var(--ink-soft);
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: right;
}

.credit-person dd a {
  border-bottom: 1px solid currentColor;
}

.credits-people-empty {
  max-width: 60ch;
  margin-top: 1px;
  border: 1px dashed var(--line-strong);
  background: var(--paper-soft);
  padding: 1.2rem;
}

.credits-people-empty .mono {
  color: var(--accent-text);
}

.credits-people-empty p:not(.mono) {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.credits-note {
  max-width: 80ch;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .phases-aside {
    position: static;
  }

  .phases-aside .process-rail,
  .phase-index,
  .phases-aside-note {
    display: none;
  }

  .phases-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1000px) {
  .hero-title {
    max-width: 18ch;
    font-size: clamp(2.4rem, 6vw, 4rem);
  }

  .hero-map-shell,
  .finished-featured-wrap,
  .actual-media,
  .credits-titleblock {
    grid-template-columns: 1fr;
  }

  .finished-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .credits-people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .hero-title {
    max-width: 16ch;
    font-size: clamp(2.2rem, 7vw, 3.2rem);
  }

  .hero-map-frame,
  .hero-map-frame iframe,
  .hero-map-empty {
    min-height: 280px;
  }

  .finished-gallery,
  .actual-gallery,
  .credits-logos,
  .credits-people-grid,
  .memory-method-grid {
    grid-template-columns: 1fr;
  }

  .phase-step-head {
    flex-wrap: wrap;
  }

  .phase-step-head .tag {
    margin-left: 2.8rem;
  }

  .phase-step-body {
    grid-template-columns: 1fr;
  }

  .credits-data-list > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .actual-analysis-head,
  .memory-method-head,
  .credits-people-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (max-width: 460px) {
  .hero-title {
    max-width: 100%;
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .footer-project {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .finished-empty,
  .finished-gallery-empty,
  .compare-empty {
    flex-direction: column;
  }
}

.plate-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  max-height: 360px;
  padding: 0.35rem;
}

.plate-card-media picture {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.plate-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.actual-diagnostico {
  max-width: 82ch;
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.65;
}

.hero-map-frame {
  position: relative;
  background-color: var(--paper-soft);
  background-image:
    linear-gradient(to right, rgba(23, 23, 21, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 23, 21, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hero-map-frame::before {
  content: "MAPA / LA ISABELICA · CARGANDO";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.hero-map-frame iframe {
  position: relative;
  z-index: 1;
  background: transparent;
}

.finished-gallery .media-frame {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-deep);
}

.finished-gallery .media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.actual-gallery .media-frame {
  aspect-ratio: 4 / 3;
}

.actual-gallery .media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-close {
  max-width: 34ch;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--ink);
  padding-top: 1rem;
}

.memory-close .serif-quote {
  color: var(--ink);
  font-size: clamp(1.9rem, 3.8vw, 3.3rem);
  line-height: 1.02;
}

.memory-close > .mono {
  margin-top: 0.6rem;
  color: var(--accent-text);
}

.actual-gallery:empty {
  display: none;
}

.actual-media:has(.actual-gallery:empty) {
  grid-template-columns: minmax(0, 1fr);
}

.phase-media:empty {
  display: none;
}

.phase-step-body:has(.phase-media:empty) {
  grid-template-columns: 1fr;
}

.credits-logos:empty {
  display: none;
}

.credits-titleblock:has(.credits-logos:empty) {
  grid-template-columns: 1fr;
}

.actual-media--solo {
  grid-template-columns: 1fr;
}

.credits-titleblock > .credits-data:only-child {
  grid-column: 1 / -1;
}
