/* CONOCIMIENTO · Viewing Room · prototipo oct 2026
   Crema de Julio (#F4F0E5), tinta del logo, dorado para etiquetas.
   Tipografías gratis (Google Fonts, licencia abierta), las más parecidas a las de la marca:
   Cormorant Garamond en lugar de Bell MT y Jost en lugar de Neuzeit Grotesk. */

:root {
  --papel: #F4F0E5;
  --papel-2: #ECE6D6;
  --tinta: #16181D;
  --tinta-2: #4B4A45;
  --azul: #14213D;
  --oro: #7A5D1F;  /* 5.6:1 sobre el crema (AA para texto chico) */
  --linea: #D6CDB9;
  --serif: "Cormorant Garamond", "Bell MT", Baskerville, Georgia, serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--papel); color: var(--tinta);
  font-family: var(--serif); font-weight: 500; font-size: clamp(18.5px, 1.3vw, 21px); line-height: 1.5; font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, figure, dl, dd, blockquote { margin: 0; }
::selection { background: var(--azul); color: var(--papel); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Idioma: solo se ve el activo */
html[data-lang="es"] [lang="en"], html[data-lang="es"] [lang="fr"],
html[data-lang="en"] [lang="es"], html[data-lang="en"] [lang="fr"],
html[data-lang="fr"] [lang="es"], html[data-lang="fr"] [lang="en"] { display: none !important; }

/* Etiquetas */
.etq { font-family: var(--sans); font-weight: 300; font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; line-height: 1.7; color: var(--tinta-2); }
.etq a:hover { color: var(--tinta); }

/* Grano de papel */
.grano {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .55;
  transform: translateZ(0); will-change: transform; contain: strict;  /* capa propia: no se repinta al hacer scroll */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .12  0 0 0 0 .1  0 0 0 0 .06  0 0 0 .085 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Cursor */
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    display: grid; place-items: center; position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none;
    width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--tinta);
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, opacity .3s;
    opacity: 0;
  }
  .cursor.is-on { opacity: 1; }
  .cursor.is-on.is-off { opacity: 0; }
  .cursor-label { font-family: var(--sans); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--papel); opacity: 0; transition: opacity .2s; white-space: nowrap; }
  .cursor.is-ver { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--azul); }
  .cursor.is-ver .cursor-label { opacity: 1; transition-delay: .12s; }
}

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 200; background: var(--papel); display: grid; place-items: center;
  animation: intro-fuera .6s 4s forwards;
}
.intro-in { text-align: center; }
.intro-libro { width: 150px; margin: 0 auto 26px; }
.intro-nombre { font-family: var(--serif); font-weight: 700; font-size: clamp(22px, 3vw, 34px); letter-spacing: .52em; margin-right: -.52em; color: var(--azul); }
.intro-lema { font-family: var(--sans); font-weight: 300; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; margin-top: 12px; color: var(--tinta-2); }
.visto .intro, .p-ficha .intro { display: none; }
@keyframes intro-fuera { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }

/* ---------- Header ---------- */
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; gap: 32px; padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) 18px;
  transition: transform .5s var(--ease), background .4s, box-shadow .4s;
}
.hdr.is-scrolled { background: rgba(244, 240, 229, .97); box-shadow: 0 1px 0 var(--linea); }  /* sin desenfoque: se recalculaba en cada cuadro del scroll */
.hdr.is-hidden { transform: translateY(-105%); }
.marca { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.marca-libro { width: 52px; height: auto; }
.marca-txt { display: flex; flex-direction: column; }
.marca-nombre { font-family: var(--serif); font-weight: 700; font-size: 17px; letter-spacing: .42em; color: var(--azul); line-height: 1.2; }
.marca-lema { font-family: var(--sans); font-weight: 300; font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--tinta-2); margin-top: 3px; }
.nav { display: flex; gap: 34px; }
.nav a, .idioma button { font-family: var(--sans); font-weight: 300; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.idioma { display: flex; gap: 6px; align-items: center; font-family: var(--sans); font-size: 12px; color: var(--linea); }
.idioma button { color: var(--tinta-2); opacity: .55; letter-spacing: .14em; }
.idioma button[aria-pressed="true"] { opacity: 1; color: var(--tinta); }
.menu-btn { display: none; width: 34px; height: 34px; position: relative; }
.menu-btn span:not(.sr) { position: absolute; left: 6px; right: 6px; height: 1px; background: var(--tinta); transition: transform .4s var(--ease); }
.menu-btn span:nth-child(1) { top: 13px; } .menu-btn span:nth-child(2) { top: 20px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.menu-movil { position: fixed; inset: 0; z-index: 75; background: var(--papel); display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 0 var(--gutter); }
.menu-movil[hidden] { display: none; }
.menu-movil a { font-family: var(--serif); font-size: 42px; line-height: 1.1; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px;
  background: var(--azul); color: var(--papel); border: 1px solid var(--azul); border-radius: 999px;
  font-family: var(--sans); font-weight: 300; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  transition: background .35s, color .35s, transform .35s var(--ease);
}
.btn:hover { background: var(--tinta); border-color: var(--tinta); }
.btn-linea { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.btn-linea:hover { background: var(--tinta); color: var(--papel); }
.btn-claro { background: var(--papel); color: var(--tinta); border-color: var(--papel); }
.btn-claro:hover { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.sub-link { display: inline-flex; gap: 10px; font-family: var(--sans); font-weight: 300; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--azul); padding-bottom: 6px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .45s var(--ease); }
.sub-link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ---------- Animación: estados iniciales (solo si hay JS + GSAP) ---------- */
.js [data-reveal] { opacity: 0; }
.js [data-lines] { visibility: hidden; }
.ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln-in { display: block; }
.w { opacity: .14; }
html:not(.js) .w { opacity: 1; }

/* ---------- Capítulos de la portada ---------- */
/* Cada sección grande abre con una línea gruesa que se dibuja, su número y su nombre: así se nota el cambio. */
.cap { --cap: 1; grid-column: 1 / -1; position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px clamp(18px, 2.4vw, 36px); padding-top: clamp(16px, 1.6vw, 22px); margin-bottom: clamp(24px, 3vw, 44px); }
.cap::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--tinta); transform-origin: left center; transform: scaleX(var(--cap)); }
.js .cap { --cap: 0; }
.cap-n { font-weight: 500; font-size: clamp(40px, 4.6vw, 72px); line-height: .9; color: var(--oro); }
.cap-t { font-family: var(--sans); font-weight: 400; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--tinta); }
.cap-d { margin-left: auto; text-align: right; }

/* ---------- Hero: CONOCIMIENTO ---------- */
main { display: block; }
.hero { padding: 112px var(--gutter) 0; max-width: var(--max); margin: 0 auto; }
.hero .cap { margin-bottom: 0; }
.portadilla { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(36px, 5.5vh, 60px); }
.hero-libro { width: clamp(140px, 15vw, 230px); margin-bottom: clamp(16px, 2.6vh, 28px); }
.hero-marca { font-weight: 700; font-size: min(8.6vw, 140px); line-height: 1; letter-spacing: .12em; margin-right: -.12em; color: var(--azul); white-space: nowrap; }
.hero-marca .l { display: inline-block; }
.hero-lema { margin-top: clamp(14px, 2.4vh, 26px); font-family: var(--sans); font-weight: 300; font-size: clamp(11px, 1vw, 13px); letter-spacing: .32em; margin-right: -.32em; text-transform: uppercase; color: var(--tinta-2); }
.hero-t { margin-top: clamp(30px, 4.6vh, 52px); text-align: center; font-weight: 400; font-style: italic; font-size: clamp(30px, 4vw, 64px); line-height: 1.06; letter-spacing: -.01em; }
.js .hero-libro, .js .hero-marca .l, .js .hero-lema { opacity: 0; }

/* ---------- Manifiesto ---------- */
.manifiesto { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 6vw, 96px) var(--gutter) clamp(72px, 8vw, 120px); display: grid; grid-template-columns: 1fr 3fr; gap: 32px; }
.manifiesto-t p { font-size: clamp(26px, 3.3vw, 52px); line-height: 1.2; letter-spacing: -.006em; max-width: 24em; }
.manifiesto-firma { grid-column: 2; display: flex; flex-direction: column; gap: 4px; font-style: italic; font-size: clamp(20px, 1.6vw, 24px); }
.manifiesto-firma::before { content: ""; width: 40px; height: 1px; background: var(--oro); margin-bottom: 14px; }

/* ---------- COSMOS ---------- */
.cosmos { background: var(--papel-2); padding-top: clamp(56px, 6.5vw, 100px); }
.cosmos-cab { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 3fr; gap: 10px 32px; align-items: end; }
.cosmos-cab > .etq { align-self: start; padding-top: 1.2em; }
.cosmos-t { font-weight: 700; font-size: clamp(52px, 11vw, 190px); line-height: .84; letter-spacing: .06em; color: var(--azul); grid-column: 2; grid-row: 2 / span 2; }
.cosmos-sub { grid-column: 1; font-style: italic; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.35; max-width: 14em; }
.pan { position: relative; height: 100vh; height: 100svh; overflow-x: auto; overflow-y: hidden; }
.has-gsap .pan { overflow: hidden; }
.pan-track { height: 100%; display: flex; align-items: center; gap: clamp(40px, 6vw, 120px); padding: 0 var(--gutter); width: max-content; }
.pan-fig { flex: none; }
.pan-fig img { height: min(72vh, 900px); height: min(72svh, 900px); width: auto; max-width: none; box-shadow: 0 30px 60px -30px rgba(22, 24, 29, .35); }
.pan-fig figcaption { margin-top: 14px; }
.pan-cita { flex: none; width: min(34vw, 470px); }
.pan-cita-t { font-style: italic; font-size: clamp(28px, 3vw, 48px); line-height: 1.15; margin-top: 16px; }
.proyecto { max-width: var(--max); margin: 0 auto; padding: clamp(36px, 4.5vw, 64px) var(--gutter) clamp(64px, 7vw, 110px); display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.proyecto-lead { font-size: clamp(24px, 2.4vw, 38px); line-height: 1.25; }
.ficha-proy { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; margin: clamp(28px, 3.5vw, 48px) 0; padding-top: 22px; border-top: 1px solid var(--linea); }
.ficha-proy dd { font-size: 18px; margin-top: 4px; }
.programa { list-style: none; margin: 0; padding: 0; }
.programa li { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--linea); }
.programa li:last-child { border-bottom: 1px solid var(--linea); }
.artista { position: sticky; top: 120px; }
.artista-img { overflow: hidden; aspect-ratio: 4 / 5; }
.artista-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); }
.artista figcaption { margin-top: 20px; }
.artista figcaption p:not(.etq) { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--tinta-2); }
.artista blockquote { margin-top: 18px; font-style: italic; font-size: 21px; line-height: 1.35; }

/* ---------- Viewing Room ---------- */
.vr { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 7vw, 110px) var(--gutter) clamp(32px, 4vw, 64px); }
.vr-cab { display: grid; grid-template-columns: 1fr 3fr; gap: 32px; align-items: end; margin-bottom: clamp(36px, 4.5vw, 68px); }
.vr-cab .etq { align-self: start; padding-top: .6em; }
.vr-t { font-weight: 400; font-size: clamp(48px, 8vw, 132px); line-height: .95; letter-spacing: -.01em; }
.vr-txt { grid-column: 2; max-width: 32em; color: var(--tinta-2); }
.vr-grupo { margin-bottom: clamp(56px, 6.5vw, 100px); }
.vr-grupo-t { border-top: 1px solid var(--tinta); padding-top: 12px; margin-bottom: clamp(22px, 2.6vw, 38px); }
.vr-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2.4vw, 40px); row-gap: clamp(40px, 5vw, 76px); align-items: start; }
.obra-card { display: block; }
.l-full { grid-column: 1 / -1; }
.l-tall-l { grid-column: 1 / span 5; }
.l-tall-r { grid-column: 7 / span 6; margin-top: clamp(30px, 8vw, 130px); }
.l-tall-c { grid-column: 3 / span 5; }
.l-wide-r { grid-column: 7 / span 6; align-self: center; }
.l-mid-l { grid-column: 2 / span 6; }
.l-mid-c { grid-column: 4 / span 6; }
.l-cx-b { grid-column: 1 / span 7; }
.l-cx-c { grid-column: 9 / span 4; margin-top: clamp(24px, 5vw, 90px); }
/* .multiplica: el tono del papel ya viene horneado en el archivo (build.py), así el scroll no recalcula la mezcla */
.l-sm { grid-column: span 3; }
.obra-fig { overflow: hidden; background: var(--papel-2); }
.vr-peq .obra-fig { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 14%; }
.vr-peq .obra-fig img { width: auto; height: auto; max-width: 100%; max-height: 100%; box-shadow: 0 14px 30px -18px rgba(22, 24, 29, .45); }
.l-wide-r .obra-fig { padding: 10% 4%; }
.obra-fig img { width: 100%; transition: transform 1.1s var(--ease); }
.obra-card:hover .obra-fig img { transform: scale(1.035); }
.obra-meta { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; margin-top: 16px; }
.obra-t { font-weight: 400; font-style: italic; font-size: clamp(22px, 2vw, 30px); line-height: 1.15; }
.obra-d { grid-column: 1; font-family: var(--sans); font-weight: 300; font-size: 13px; letter-spacing: .02em; line-height: 1.5; color: var(--tinta-2); }
.obra-p { grid-column: 2; grid-row: 1 / span 2; align-self: start; text-align: right; font-size: 18px; white-space: nowrap; }
.obra-p small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .1em; color: var(--tinta-2); }
.a-solicitud { font-family: var(--sans); font-weight: 300; font-size: 11.5px !important; letter-spacing: .18em; text-transform: uppercase; color: var(--oro); }

/* ---------- Habitar ---------- */
.habitar { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: end; overflow: hidden; color: var(--papel); }
.habitar-img { position: absolute; inset: 0; overflow: hidden; }
.habitar-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); }
.habitar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22,24,29,.62) 0%, rgba(22,24,29,.28) 40%, rgba(22,24,29,0) 65%), linear-gradient(180deg, rgba(22,24,29,0) 45%, rgba(22,24,29,.45) 100%); }
.habitar-txt { position: relative; z-index: 1; padding: 0 var(--gutter) clamp(48px, 7vw, 100px); max-width: 760px; }
.habitar h2 { font-weight: 400; font-size: clamp(54px, 9vw, 150px); line-height: .92; }
.habitar h2 em { font-style: italic; }
.habitar p { margin: 22px 0 28px; font-size: clamp(18px, 1.5vw, 22px); max-width: 26em; }

/* ---------- Video ---------- */
/* Video vertical: en pantalla grande va junto al texto; en celular, a todo lo ancho */
.video { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 7vw, 110px) var(--gutter); display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 7vw, 120px); align-items: center; }
.video-txt h2 { font-weight: 400; font-size: clamp(44px, 6vw, 100px); line-height: .95; margin: 18px 0 26px; }
.video-txt h2 em { font-style: italic; }
.video-txt p:not(.etq) { max-width: 24em; font-size: clamp(17px, 1.4vw, 20px); color: var(--tinta-2); }
.video-marco { position: relative; aspect-ratio: 9 / 16; height: min(84vh, 860px); height: min(84svh, 860px); background: var(--tinta); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(22, 24, 29, .45); }
@media (max-width: 980px) {
  .video { grid-template-columns: 1fr; }
  .video-marco { height: auto; width: min(100%, 460px); }
}
.video-v { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-sonido { position: absolute; right: 20px; bottom: 20px; padding: 12px 20px; border-radius: 999px; background: rgba(244, 240, 229, .92); font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Adquirir ---------- */
.adquirir { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 6vw, 96px) var(--gutter) clamp(64px, 7vw, 110px); }
.adq-cab { display: grid; grid-template-columns: 1fr 3fr; gap: 32px; margin-bottom: clamp(32px, 4vw, 60px); }
.adq-cab h2 { font-weight: 400; font-size: clamp(48px, 7vw, 116px); line-height: .95; }
.adq-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); border-top: 1px solid var(--tinta); }
.adq-cols article { padding-top: 22px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.adq-n { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; color: var(--oro); }
.adq-cols h3 { font-weight: 400; font-style: italic; font-size: clamp(24px, 2vw, 30px); line-height: 1.15; }
.adq-cols p:not(.adq-n) { color: var(--tinta-2); font-size: 17px; flex: 1; }
.adq-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(32px, 4vw, 56px); }

/* ---------- Nosotros ---------- */
.nosotros { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 6.5vw, 100px) var(--gutter) clamp(64px, 7vw, 110px); display: grid; grid-template-columns: 1fr 3fr; gap: 32px; }
.nosotros h2 { grid-column: 2; font-weight: 400; font-style: italic; font-size: clamp(30px, 3.6vw, 58px); line-height: 1.12; max-width: 18em; }
.nosotros-txt { grid-column: 2; columns: 2; column-gap: clamp(28px, 4vw, 64px); margin-top: clamp(20px, 3vw, 40px); color: var(--tinta-2); }
.nosotros-txt p { margin-bottom: 1em; break-inside: avoid; }

/* ---------- Pie ---------- */
.pie { background: var(--azul); color: var(--papel); padding: clamp(52px, 6vw, 88px) var(--gutter) 28px; position: relative; z-index: 1; }
.pie .etq { color: rgba(244, 240, 229, .62); }
.pie-marca img { width: 70px; filter: brightness(0) invert(.93) sepia(.25); }
.pie-nombre { font-weight: 700; letter-spacing: .5em; font-size: clamp(26px, 4.4vw, 64px); margin-top: 20px; line-height: 1.1; }
.pie-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(32px, 4vw, 60px); padding-top: 22px; border-top: 1px solid rgba(244, 240, 229, .22); }
.pie-cols p { display: flex; flex-direction: column; gap: 4px; font-size: 17px; }
.pie-cols a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pie-legal { margin-top: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-family: var(--sans); font-size: 11.5px; letter-spacing: .06em; color: rgba(244, 240, 229, .72); }
.pie-links { display: flex; gap: 22px; }
.pie-links a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Ficha de obra ---------- */
.ficha { max-width: var(--max); margin: 0 auto; padding: 104px var(--gutter) clamp(48px, 6vw, 90px); }
.migas { display: flex; gap: 10px; margin-bottom: 20px; }
.migas a { color: var(--azul); }
.ficha-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 90px); align-items: start; }
.vistas { display: flex; gap: 22px; margin-bottom: 14px; }
.vistas button { font-family: var(--sans); font-weight: 300; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--tinta-2); padding-bottom: 6px; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.vistas button[aria-selected="true"] { color: var(--tinta); border-color: var(--tinta); }
.lupa-marco { position: relative; aspect-ratio: 1 / 1.06; background: var(--papel-2); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.vista-img { opacity: 0; transition: opacity .7s var(--ease); }
.vista-img.is-on { opacity: 1; }
.vista-img[data-vista-img="obra"] { max-width: 86%; max-height: 86%; width: auto; height: auto; box-shadow: 0 30px 60px -30px rgba(22, 24, 29, .45); }
.vista-img[data-vista-img="espacio"] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vista-img.multiplica { box-shadow: none !important; }
.vista-img.contener { object-fit: contain; padding: 4%; }
.miniaturas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mini { width: 76px; height: 76px; padding: 6px; background: var(--papel-2); border: 1px solid transparent; opacity: .55; transition: opacity .3s, border-color .3s; }
.mini:hover { opacity: .9; }
.mini.is-on { opacity: 1; border-color: var(--tinta); }
.mini img { width: 100%; height: 100%; object-fit: contain; }
.lupa { position: absolute; left: 0; top: 0; width: 220px; height: 220px; border-radius: 50%; pointer-events: none; background-repeat: no-repeat; background-color: var(--papel-2); box-shadow: 0 0 0 1px rgba(244, 240, 229, .9), 0 18px 40px rgba(22, 24, 29, .35); opacity: 0; transform: scale(.6); transition: opacity .25s; }
.lupa.is-on { opacity: 1; }
.media-pie { margin-top: 12px; }
.solo-espacio { display: none; }
.en-espacio .solo-espacio { display: inline; }
.en-espacio .solo-obra { display: none; }
.ficha-info { position: sticky; top: 110px; }
.ficha-t { font-weight: 400; font-style: italic; font-size: clamp(44px, 5vw, 84px); line-height: 1; margin: 8px 0 22px; }
.ficha-datos > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--linea); }
.ficha-datos > div:last-child { border-bottom: 1px solid var(--linea); }
.ficha-datos dd { font-size: 17px; line-height: 1.45; }
.ficha-precio { font-size: 22px !important; }
.ficha-precio.a-solicitud { font-size: 13px !important; padding-top: .35em; }
.ficha-precio small { font-family: var(--sans); font-size: 12px; color: var(--tinta-2); letter-spacing: .08em; }
.ficha-cta { display: flex; flex-direction: column; gap: 12px; margin: 28px 0 22px; }
.ficha-incluye { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-weight: 300; font-size: 13.5px; color: var(--tinta-2); }
.ficha-incluye li { padding-left: 22px; position: relative; margin-bottom: 7px; }
.ficha-incluye li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 1px; background: var(--oro); }
.escala { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--linea); }
.escala-svg { width: 100%; max-height: 170px; margin-top: 12px; overflow: visible; }
.escala-svg .persona { fill: var(--tinta-2); opacity: .55; }
.escala-svg .obra { fill: rgba(160, 124, 44, .18); stroke: var(--oro); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.escala-svg .piso { stroke: var(--tinta-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ficha-nota { max-width: 30em; margin: clamp(48px, 6vw, 88px) 0 0 calc(100% / 12 * 2); font-size: clamp(26px, 2.8vw, 44px); line-height: 1.22; font-style: italic; }
.leer { margin: clamp(36px, 4.5vw, 64px) 0 0 calc(100% / 12 * 2); max-width: 760px; }
.leer ul { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: l; }
.leer li { counter-increment: l; display: grid; grid-template-columns: 44px 1fr; padding: 14px 0; border-top: 1px solid var(--linea); }
.leer li::before { content: counter(l, decimal-leading-zero); font-family: var(--sans); font-size: 12px; letter-spacing: .14em; color: var(--oro); padding-top: .3em; }
.leer-nota { margin-top: 18px; font-style: italic; color: var(--tinta-2); }
.otras { display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(56px, 7vw, 100px); border-top: 1px solid var(--tinta); }
.otra { display: flex; flex-direction: column; gap: 6px; padding: 24px 0; }
.otra-sig { text-align: right; align-items: flex-end; border-left: 1px solid var(--linea); }
.otra-t { font-style: italic; font-size: clamp(28px, 3.4vw, 54px); line-height: 1.05; transition: color .3s; }
.otra:hover .otra-t { color: var(--azul); }
.caja { position: fixed; inset: 0; z-index: 150; background: var(--papel); }
.caja[hidden] { display: none; }
.caja-in { position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; align-items: flex-start; justify-content: flex-start; }
.caja-in img { width: 200vw; max-width: none; margin: auto; }
.caja-cerrar { position: fixed; top: 14px; right: 16px; z-index: 2; width: 48px; height: 48px; border-radius: 50%; background: var(--tinta); color: var(--papel); font-size: 26px; line-height: 1; }
@media (min-width: 900px) { .caja-in { align-items: center; justify-content: center; } .caja-in img { width: auto; max-height: 100vh; max-width: 100vw; } }


/* ---------- Cosmocolor se arma ---------- */
.leer-cc { position: relative; background: var(--papel); }
.p-inicio .leer-cc { background: var(--papel-2); }  /* en la portada es parte del capítulo COSMOS */
.leer-pin { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(24px, 5vw, 90px); max-width: var(--max); margin: 0 auto; padding: 96px var(--gutter) 40px; }
.leer-lienzo { position: relative; height: min(76vh, 860px); height: min(76svh, 860px); max-width: 100%; justify-self: center; }
.pz { position: absolute; height: auto; max-width: none; will-change: transform, opacity; }
.leer-pasos { position: relative; min-height: 9.5em; margin-top: 22px; }
.paso { position: absolute; left: 0; right: 0; top: 0; }
.paso:not(.is-on) { opacity: 0; visibility: hidden; }
.has-gsap .paso:not(.is-on) { opacity: 1; visibility: visible; }
.paso-n { font-family: var(--sans); font-weight: 300; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--oro); }
.paso-t { font-size: clamp(25px, 2.6vw, 40px); line-height: 1.2; margin-top: 12px; max-width: 17em; }
.paso-t b { font-weight: 700; }
.paso-sub { margin: 16px 0 22px; color: var(--tinta-2); font-style: italic; }
.leer-lead { margin-top: 10px; font-style: italic; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.35; color: var(--tinta-2); max-width: 26em; }
.leer-hint { margin-top: 26px; font-family: var(--sans); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.leer-flecha { display: inline-block; }
@keyframes flecha { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
html:not(.has-gsap) .leer-hint { display: none; }
.ficha .leer-cc, .ficha .despliegue { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); margin-top: clamp(44px, 5.5vw, 84px); }
html:not(.has-gsap) .leer-pin { grid-template-columns: 1fr 1fr; }
html:not(.has-gsap) .paso { position: static; opacity: 1; visibility: visible; margin-bottom: 22px; }

/* ---------- Codex abierto ---------- */
.despliegue { background: var(--papel-2); }
.recorrido { background: var(--papel-2); }
.despliegue .pan-track, .cosmos .pan-track, .recorrido .pan-track { background: var(--papel-2); }  /* el 'multiplicar' necesita fondo dentro de la pista animada */
.despliegue .pan-fig img { height: min(60vh, 700px); height: min(60svh, 700px); box-shadow: none; }
.pan-fig img.multiplica { box-shadow: none; }  /* el Codex abierto va "impreso" en el papel, sin sombra de cuadro */
.despliegue .pan-cita .etq:last-child { margin-top: 14px; }

@media (max-width: 760px) {
  .leer-pin { grid-template-columns: 1fr; align-content: start; gap: 8px; padding-top: 76px; }
  .leer-lienzo { height: 40vh; height: 40svh; }
  .leer-hint { margin-top: 18px; }
  .leer-pasos { min-height: 8em; }
  .leer-lead { font-size: 15px; }
  .paso-t { font-size: 19px; }
  .despliegue .pan-fig img { height: 48vh; height: 48svh; }
}


/* ---------- Accesibilidad ---------- */
.saltar { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; background: var(--azul); color: var(--papel); font-family: var(--sans); font-size: 13px; border-radius: 6px; transition: top .2s; }
.saltar:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }
.pie a:focus-visible { outline-color: var(--papel); }

/* ---------- Páginas de texto (aviso, términos, 404) ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 140px var(--gutter) clamp(70px, 9vw, 120px); }
.legal-t { font-weight: 500; font-size: clamp(40px, 6vw, 72px); line-height: 1.02; margin: 10px 0 clamp(32px, 4vw, 56px); text-wrap: balance; }
.legal-sec { padding: 22px 0; border-top: 1px solid var(--linea); }
.legal-sec h2 { font-weight: 600; font-size: clamp(22px, 2vw, 28px); line-height: 1.2; margin-bottom: 10px; }
.legal-sec p { color: var(--tinta-2); max-width: 62ch; }
.legal a { color: var(--azul); text-decoration: underline; text-underline-offset: 3px; }
.no-existe p { color: var(--tinta-2); }
.no-existe-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.legal a.btn { color: var(--papel); text-decoration: none; }
.legal a.btn-linea { color: var(--tinta); }
.legal a.btn-linea:hover { color: var(--papel); }


/* ---------- Codex destacados en Obra disponible ---------- */
.vr-codex .vr-grid { row-gap: clamp(36px, 4.5vw, 72px); }
.codex-card { grid-column: 1 / -1; display: grid; grid-template-columns: 8fr 4fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.codex-card:nth-child(even) { grid-template-columns: 4fr 8fr; }
.codex-card:nth-child(even) .obra-fig { order: 2; }
.codex-card .obra-fig { padding: clamp(12px, 2vw, 32px) clamp(10px, 1.5vw, 24px); }
.codex-meta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.codex-t { font-weight: 500; font-style: italic; font-size: clamp(36px, 4.4vw, 68px); line-height: 1; }
.codex-nota { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.35; max-width: 22em; }
.codex-meta .obra-p { text-align: left; margin-top: 4px; }
.codex-card:hover .sub-link { background-size: 0 1px; background-position: 100% 100%; }
@media (max-width: 980px) {
  .codex-card, .codex-card:nth-child(even) { grid-template-columns: 1fr; }
  .codex-card:nth-child(even) .obra-fig { order: 0; }
}


/* ---------- Indicador "sigue bajando" en las secciones fijas ---------- */
.indicador { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 3; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--papel); border: 1px solid var(--linea);
  box-shadow: 0 6px 18px -10px rgba(22, 24, 29, .4);
  font-family: var(--sans); font-weight: 400; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--tinta);
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .4s; }
.activo > .indicador { opacity: 1; }
.al-final > .indicador { opacity: 0; }
.ind-barra { position: relative; display: inline-block; width: 52px; height: 2px; border-radius: 2px; background: rgba(22, 24, 29, .14); overflow: hidden; vertical-align: middle; }
.ind-barra i { position: absolute; inset: 0; background: var(--oro); transform-origin: left center; transform: scaleX(0); }
.ind-flecha, .leer-flecha { color: var(--oro); font-size: 12px; line-height: 1; animation: flecha 1.6s ease-in-out infinite; }
.leer-hint { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--papel); border: 1px solid var(--linea);
  box-shadow: 0 6px 18px -10px rgba(22, 24, 29, .4); color: var(--tinta); font-weight: 400; }
@media (max-width: 760px) {
  .indicador, .leer-hint { gap: 8px; padding: 7px 12px; font-size: 10px; letter-spacing: .15em; }
  .ind-barra { width: 40px; }
}

/* Teléfonos bajitos (iPhone SE y similares): Cosmocolor más compacto para que el texto y el aviso quepan */
@media (max-width: 760px) and (max-height: 720px) {
  .leer-lienzo { height: 34vh; height: 34svh; }
  .leer-lead { display: none; }
}
/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .idioma { margin-left: auto; }
  .marca { margin-right: 0; }
  .hdr { gap: 18px; }
  .manifiesto, .cosmos-cab, .vr-cab, .adq-cab, .nosotros { grid-template-columns: 1fr; }
  .cosmos-t, .vr-txt, .nosotros h2, .nosotros-txt, .manifiesto-firma { grid-column: 1; }
  .cosmos-t { grid-row: auto; }
  .cosmos-sub { grid-column: 1; }
  .proyecto, .ficha-grid { grid-template-columns: 1fr; }
  .artista, .ficha-info { position: static; }
  .adq-cols { grid-template-columns: 1fr; }
  .nosotros-txt { columns: 1; }
  .ficha-nota, .leer { margin-left: 0; }
}
@media (max-width: 760px) {
  .marca-libro { width: 34px; }
  .marca-nombre { font-size: 12.5px; letter-spacing: .22em; }
  /* con tres idiomas el encabezado no cabía: sin diagonales y más junto */
  .hdr { gap: 12px; }
  .idioma { gap: 9px; }
  .idioma > span { display: none; }
  .idioma button { font-size: 11px; letter-spacing: .08em; }
  .marca-lema { display: none; }
  .hero { padding-top: 96px; }
  .hero-marca { font-size: 8.4vw; letter-spacing: .1em; margin-right: -.1em; }
  .hero-t { font-size: clamp(28px, 8vw, 40px); }
  .cap-n { font-size: 40px; }
  .cap-t { font-size: 12px; letter-spacing: .26em; }
  .cap-d { flex-basis: 100%; margin-left: 0; text-align: left; }
  .vr-grid { column-gap: 14px; }
  .obra-card[class*="l-"] { grid-column: 1 / -1; margin-top: 0; }
  .obra-card.l-sm { grid-column: span 6; }
  .vr-peq .obra-meta { grid-template-columns: 1fr; }
  .vr-peq .obra-p { grid-column: 1; grid-row: auto; text-align: left; }
  .vr-peq .obra-t { font-size: 20px; }
  .programa li { grid-template-columns: 90px 1fr; }
  .ficha-proy { grid-template-columns: 1fr; }
  .pie-cols { grid-template-columns: 1fr; }
  .otras { grid-template-columns: 1fr; }
  .otra-sig { border-left: 0; border-top: 1px solid var(--linea); }
  .habitar { min-height: 86vh; min-height: 86svh; }
  .pan-cita { width: 78vw; }
  .pan-fig img { height: 62vh; height: 62svh; }
}
