/* ==========================================================
   Intii · Hogares que renacen
   Mundo editorial: serif grande, reglas finas, mucho aire.
   Color del logotipo (carbón sobre crema) y de las obras (madera).
   Ver DESIGN.md.
   ========================================================== */

:root {
  --cream: #f4efe7;
  --paper: #faf7f1;
  --sand: #e9e0d2;
  --wood: #b5875a;
  --wood-dark: #6e4e30;
  --ink: #2b2926;
  --ink-soft: #57524b;
  --line: #d9cfbf;
  --white: #ffffff;

  --serif: "Brygada 1918", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 20px;
  --topbar-h: 64px;
}

@media (min-width: 720px) { :root { --gutter: 40px; --topbar-h: 72px; } }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 8px);
  scrollbar-color: var(--wood) var(--paper);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

::selection { background: var(--ink); color: var(--cream); }
input, textarea { caret-color: var(--wood-dark); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: clamp(2.25rem, 6vw, 4.25rem); }
h3 { font-size: 1.35rem; line-height: 1.2; }
em { font-style: italic; }
h1 em, h2 em { color: var(--wood-dark); }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--wood-dark); outline-offset: 3px; }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: 0 1.4rem;
  border-radius: 2px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--cream);
  font: 700 .98rem/1 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), transform .12s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--small { min-height: 40px; padding: 0 1rem; font-size: .92rem; }
.btn--light { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn--full { width: 100%; }
@media (hover: hover) {
  .btn:hover { background: #45413c; }
  .btn--ghost:hover { background: var(--ink); color: var(--cream); }
  .btn--light:hover { background: var(--white); }
}

/* ---------- Cabecera ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: rgb(250 247 241 / 0);
  transition: background-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.topbar.is-scrolled { background: rgb(250 247 241 / .94); box-shadow: 0 1px 0 var(--line); }
@supports (backdrop-filter: blur(1px)) {
  .topbar.is-scrolled { background: rgb(250 247 241 / .82); backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px); }
}
.topbar__in { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* logotipo original: casita + palabra, recortados del archivo de Intii */
.brand { display: inline-flex; align-items: flex-end; gap: .5rem; text-decoration: none; }
.brand img { width: auto; display: block; }
.brand__icon { height: 32px; }
.brand__word { height: 24px; margin-bottom: 1px; }
.brand--small .brand__icon { height: 24px; }
.brand--small .brand__word { height: 18px; }
.follow__logo { width: 96px; height: auto; margin-bottom: 2rem; }

.nav { display: none; align-items: center; gap: 2rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink-soft); background: linear-gradient(currentColor 0 0) 0 100% / 0 1px no-repeat; padding: 4px 0; transition: background-size .3s var(--ease-out), color .2s; }
@media (hover: hover) { .nav a:not(.btn):hover { color: var(--ink); background-size: 100% 1px; } }

.menu-btn {
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-content: center; gap: 7px; margin-right: -10px; color: var(--ink);
}
.menu-btn span { width: 24px; height: 1.5px; background: currentColor; transition: transform .25s var(--ease-out); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

.mobile-menu { border-top: 1px solid var(--line); background: var(--paper); padding: .5rem var(--gutter) 1.25rem; box-shadow: 0 1px 0 var(--line); }
.mobile-menu a { display: block; padding: .8rem 0; font-family: var(--serif); font-size: 1.6rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }

@media (min-width: 960px) {
  .nav { display: flex; }
  .menu-btn, .mobile-menu { display: none !important; }
}

/* ==========================================================
   PORTADA · escena que se construye con el scroll
   ========================================================== */
.scene { position: relative; height: 560vh; background: var(--cream); }
.scene__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene__art { position: absolute; inset: 0; }
.scene__svg { width: 100%; height: 100%; display: block; }
.scene--portrait .scene__art { top: var(--topbar-h); bottom: 8.5rem; }
.scene--portrait .scene__svg {
  -webkit-mask-image: linear-gradient(to bottom, transparent 18%, #000 30%, #000 62%, transparent 72%);
  mask-image: linear-gradient(to bottom, transparent 18%, #000 30%, #000 62%, transparent 72%);
}

/* trazos y rellenos de la ilustración */
.scene__svg .wall { fill: #f6f1e8; }
.scene__svg .wall--side { fill: #efe8dc; }
.scene__svg .wall--ceil { fill: #f3ede3; }
.scene__svg .floor { fill: #ece2d1; }
.scene__svg .wall-old { fill: #ddd2bf; }
.scene__svg .s-line, .scene__svg .s-line * { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.scene__svg .s-line .stain { fill: #c9b9a0; fill-opacity: .45; stroke: none; }
.scene__svg .s-line .brick-patch { fill: #d7b79a; }
.scene__svg .s-line .window { fill: #fbf8f2; }
.scene__svg .s-line .window--door { fill: #f1eadf; }
.scene__svg .s-line .cab { fill: #f7f2ea; }
.scene__svg .s-line .counter { fill: #fdfbf7; }
.scene__svg .s-line .tiles { fill: #eef0ea; }
.scene__svg .s-line .hood { fill: #f4ede2; }
.scene__svg .s-line .island { fill: #fbf9f5; }
.scene__svg .s-line .vein { stroke: #b9ab98; stroke-width: 1; }
.scene__svg .s-line .shade { fill: var(--wood); }
.scene__svg .s-line .seat { fill: #c99a6b; }
.scene__svg .s-line .pot { fill: #c98a63; }
.scene__svg .s-line .leaf { fill: #8f9c78; fill-opacity: .55; }
.scene__svg .s-floor line { stroke: #b9a88f; stroke-width: 1; }
.scene__svg .s-tiles line { stroke: #b8b9ad; stroke-width: .8; }
.scene__svg .beam { stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.scene__svg .beam--old { fill: #7d7468; }
.scene__svg .beam--new { fill: #b98a5c; }
.scene__svg .s-sun polygon { fill: #f1d3a3; fill-opacity: .5; }

/* piezas animadas: transform sobre su propia caja */
.scene__svg [data-in], .scene__svg [data-out] { transform-box: fill-box; transform-origin: 50% 100%; }

/* texto de portada */
.scene__intro {
  position: absolute; inset: auto 0 0; padding: 0 0 clamp(7.5rem, 22vh, 11rem);
  background: linear-gradient(to top, rgb(244 239 231 / .97) 30%, rgb(244 239 231 / .85) 62%, rgb(244 239 231 / 0));
  padding-top: 6rem;
}
.scene h1 { font-size: clamp(3.1rem, 10.5vw, 6rem); line-height: .98; letter-spacing: -.03em; max-width: 9ch; }
.scene__tagline { font-family: var(--serif); font-size: clamp(1.25rem, 3.2vw, 1.7rem); margin: .9rem 0 .6rem; }
.scene__tagline em { color: var(--wood-dark); }
.scene__lead { max-width: 36ch; color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 1.6rem; }
.scene__cta { display: flex; flex-wrap: wrap; gap: .65rem; }
.scene__cta .btn { flex: 1 1 190px; }

/* fases antes / durante / después */
.scene__story {
  position: absolute; inset: auto 0 0; padding: 3.5rem 0 calc(1.25rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgb(244 239 231 / .94) 45%, rgb(244 239 231 / 0));
}
.scene__story-in { display: grid; gap: .6rem; }
.phases { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; }
.phase {
  border: 0; background: none; padding: 6px 0; cursor: pointer;
  font: 400 1.25rem/1 var(--serif); color: #6c645a;
  transition: color .3s var(--ease-out);
}
.phase.is-active { color: var(--ink); font-style: italic; }
.phase-text { position: relative; min-height: 3.2em; max-width: 46ch; }
.phase-text p { position: absolute; inset: 0 0 auto; margin: 0; color: var(--ink-soft); font-size: .98rem; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }
.phase-text p.is-active { opacity: 1; transform: none; }
.phase-text a { color: var(--ink); font-weight: 700; }
.phase-hint { color: var(--wood-dark); font-weight: 700; white-space: nowrap; }
.phase-bar { height: 1px; background: var(--line); overflow: hidden; }
.phase-bar span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* sin JS: escena terminada y estática */
html:not(.js) .scene { height: auto; }
html:not(.js) .scene__sticky { position: relative; height: 100svh; }
html:not(.js) .scene [data-out] { display: none; }
html:not(.js) .scene__intro { display: block; }
html:not(.js) .scene__story { display: none; }

/* movimiento reducido: sin arrastre; fases con botones */
@media (prefers-reduced-motion: reduce) {
  .scene { height: auto; }
  .scene__sticky { position: relative; height: 100svh; min-height: 640px; }
  .scene__svg [data-in], .scene__svg [data-out], .scene__svg [data-draw] { transition: opacity .4s ease; }
  .scene__intro { padding-bottom: 9.5rem; }
}

@media (min-width: 960px) {
  .scene__intro { background: linear-gradient(to right, rgb(244 239 231 / .96) 28%, rgb(244 239 231 / .7) 48%, rgb(244 239 231 / 0) 66%); inset: 0; display: flex; align-items: center; padding: var(--topbar-h) 0 0; }
  .scene__intro .wrap { padding-bottom: 4rem; }
  .scene__cta .btn { flex: 0 0 auto; }
  .scene__story-in { grid-template-columns: auto 1fr; align-items: end; column-gap: 3rem; }
  .phase-bar { grid-column: 1 / -1; }
  .phase { font-size: 1.4rem; }
}

/* ---------- Secciones ---------- */
.section { padding: 5.5rem 0; }
.section--tint { background: var(--cream); }
.section--dark { background: var(--ink); color: var(--cream); }
.section--rule { border-top: 1px solid var(--line); }
.section__head { max-width: 760px; margin-bottom: 3rem; }
.section__head p { color: var(--ink-soft); margin-top: 1.25rem; max-width: 56ch; font-size: 1.1rem; }
@media (min-width: 960px) { .section { padding: 8.5rem 0; } }

/* ---------- Cómo trabajamos ---------- */
.manifesto__lead { font-size: clamp(2rem, 5.4vw, 4rem); max-width: 20ch; line-height: 1.1; }
.manifesto__cols { display: grid; gap: 2.25rem; margin-top: 3.5rem; }
.manifesto__cols > div { border-top: 1px solid var(--ink); padding-top: 1.1rem; }
.manifesto__cols h3 { margin-bottom: .6rem; }
.manifesto__cols p { color: var(--ink-soft); margin: 0; }
@media (min-width: 760px) { .manifesto__cols { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 5rem; } }

/* ---------- Transformaciones ---------- */
.filters { display: flex; gap: 1.75rem; overflow-x: auto; margin-bottom: 3rem; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; border: 0; background: none; cursor: pointer; padding: .7rem 0;
  font: 600 .98rem var(--sans); color: var(--ink-soft);
  box-shadow: inset 0 -1px 0 transparent; transition: box-shadow .25s var(--ease-out), color .2s;
}
.filter.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
@media (hover: hover) { .filter:hover { color: var(--ink); } }

.projects { display: grid; gap: 4.5rem; }
.project { display: grid; gap: 1.6rem; }
.project[hidden] { display: none; }

.stages__frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.stages__frame .photo { position: absolute; inset: 0; opacity: 0; transition: opacity .45s var(--ease-out); }
.stages[data-stage="antes"] [data-for="antes"],
.stages[data-stage="durante"] [data-for="durante"],
.stages[data-stage="despues"] [data-for="despues"] { opacity: 1; }
.stages__tabs { display: flex; gap: 1.5rem; margin-top: .9rem; }
.stages__tabs button {
  border: 0; background: none; padding: 6px 0; cursor: pointer;
  font: 400 1.15rem var(--serif); color: #6c645a; transition: color .2s;
}
.stages__tabs button[aria-selected="true"] { color: var(--ink); font-style: italic; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }

.photo { position: relative; margin: 0; overflow: hidden; background: var(--sand); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo__ph {
  position: absolute; inset: 0; display: none; place-content: center; text-align: center; gap: .3rem;
  font-family: var(--serif); font-size: 1.6rem; color: var(--ink-soft);
  background: linear-gradient(160deg, #efe6d8, #e2d6c4);
}
.photo__ph small { display: block; font-family: var(--sans); font-size: .8rem; color: var(--wood-dark); }
.photo.is-missing img { visibility: hidden; }
.photo.is-missing .photo__ph { display: grid; }

.project__kind { font-size: .92rem; color: var(--ink-soft); margin-bottom: .7rem; }
.project__kind strong { color: var(--wood-dark); }
.project h3 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 1.5rem; }
.story { margin: 0; display: grid; gap: 1.1rem; }
.story div { border-top: 1px solid var(--line); padding-top: .8rem; }
.story dt { font-weight: 700; font-size: .92rem; color: var(--ink); }
.story dd { margin: .25rem 0 0; color: var(--ink-soft); }

.follow-note { margin: 4.5rem 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1.3rem; }
.follow-note a { color: var(--ink); font-style: italic; }

@media (min-width: 960px) {
  .projects { gap: 7rem; }
  .project { grid-template-columns: 7fr 5fr; gap: 4rem; align-items: start; }
  .project:nth-child(even) { grid-template-columns: 5fr 7fr; }
  .project:nth-child(even) .stages { order: 2; }
  .project__body { padding-top: .5rem; }
}

/* ---------- Reforma con Intii: lista editorial ---------- */
.ledger { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--ink); }
.ledger li { border-top: 1px solid var(--ink); padding: 1.4rem 0 1.5rem; display: grid; gap: .5rem; }
.ledger h3 { font-size: clamp(1.9rem, 5vw, 3.4rem); line-height: 1.05; }
.ledger p { margin: 0; color: var(--ink-soft); max-width: 44ch; }
.reforma__next { max-width: 40ch; font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.35; margin: 3rem 0 0; }
@media (min-width: 860px) {
  .ledger li { grid-template-columns: 1fr 22rem; align-items: baseline; gap: 2rem; padding: 1.8rem 0 2rem; }
}

/* ---------- Contacto ---------- */
.contact { display: grid; gap: 3.5rem; }
.contact__intro > p { color: var(--ink-soft); margin-top: 1rem; font-size: 1.1rem; }
.contact__list { margin: 2.5rem 0 0; display: grid; gap: 0; }
.contact__list div { border-top: 1px solid var(--line); padding: .85rem 0; display: grid; gap: .1rem; }
.contact__list dt { font-size: .85rem; font-weight: 700; color: var(--wood-dark); }
.contact__list dd { margin: 0; }

.form { display: grid; gap: 1.6rem; align-content: start; }
.field { display: grid; gap: .25rem; }
.field label { font-weight: 700; font-size: .92rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  padding: .7rem 0; min-height: 48px; resize: vertical;
  transition: border-color .2s, box-shadow .2s var(--ease-out);
}
.field input::placeholder, .field textarea::placeholder { color: #6c645a; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--wood-dark); box-shadow: 0 1px 0 var(--wood-dark); }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: #a8462e; box-shadow: 0 1px 0 #a8462e; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.check.is-invalid span { color: #a8462e; }
.form__msg { margin: 0; font-size: .95rem; min-height: 1.4em; }
.form__msg.is-error { color: #a8462e; }
.form__msg.is-ok { color: #3c6343; }

@media (min-width: 960px) {
  .contact { grid-template-columns: 5fr 6fr; gap: 6rem; }
  .form { padding-top: .75rem; }
}

/* ---------- Guía ---------- */
.guide { display: grid; gap: 2.5rem; }
.guide__head { display: grid; gap: 1.5rem; align-content: start; }
.guide__icon { width: 40px; height: 40px; fill: none; stroke: var(--wood); stroke-width: 1.2; stroke-linejoin: round; }
.guide h2 { color: var(--cream); font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 18ch; }
.guide h2 em { color: #d9b48c; }
.guide p { color: #d4ccbf; max-width: 56ch; }
.guide__list { list-style: none; padding: 0; margin: 1.5rem 0 2.25rem; border-bottom: 1px solid rgb(244 239 231 / .2); }
.guide__list li { border-top: 1px solid rgb(244 239 231 / .2); padding: .8rem 0; color: var(--cream); }
@media (min-width: 960px) { .guide { grid-template-columns: 7fr 5fr; gap: 5rem; align-items: start; } }

/* ---------- Síguenos ---------- */
.follow { border-top: 1px solid var(--line); }
.follow__in { max-width: 860px; }
.follow p { color: var(--ink-soft); margin: 1.25rem 0 2rem; max-width: 52ch; font-size: 1.1rem; }
.ig { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0 6.5rem; font-size: .95rem; color: var(--ink-soft); }
.footer__in { display: grid; gap: .8rem; justify-items: start; }
.footer p { margin: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.footer nav a { text-decoration: none; }
@media (hover: hover) { .footer nav a:hover { color: var(--ink); text-decoration: underline; } }
@media (min-width: 960px) {
  .footer { padding-bottom: 2.5rem; }
  .footer__in { grid-template-columns: auto 1fr auto auto; align-items: center; gap: 2.5rem; }
}

/* ---------- Botón fijo (móvil) ---------- */
.fab {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40; display: flex; justify-content: center; align-items: center; min-height: 52px;
  background: var(--ink); color: var(--cream); border-radius: 2px;
  font-weight: 700; text-decoration: none; box-shadow: 0 10px 28px -10px rgb(43 41 38 / .55);
  transform: translateY(160%); transition: transform .4s var(--ease-out);
}
.fab.is-visible { transform: none; }
@media (min-width: 960px) { .fab { display: none; } }
.section__head .section__note { font-size: .92rem; color: var(--wood-dark); margin-top: .5rem; }

/* ---------- Portada con fotos (si están las cuatro) ---------- */
.scene__photos { position: absolute; inset: 0; display: none; overflow: hidden; }
.scene__photos img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(calc(1.08 - .08 * var(--p, 0)));
}
.scene--photo .scene__photos { display: block; }
.scene--photo .scene__svg { display: none; }
.scene--photo.scene--portrait .scene__art { top: 0; bottom: 0; }
.scene--photo .scene__intro { background: linear-gradient(to right, rgb(244 239 231 / .9) 22%, rgb(244 239 231 / .55) 46%, rgb(244 239 231 / 0) 64%); }
@media (max-width: 959px) {
  .scene--photo .scene__intro { background: linear-gradient(to top, rgb(244 239 231 / .97) 35%, rgb(244 239 231 / .75) 65%, rgb(244 239 231 / 0)); }
}
/* mientras cargan las fotos no se enseña el dibujo (es otra estancia) */
.js .scene.is-loading .scene__svg { visibility: hidden; }

/* Barrido de abajo arriba entre fases (--r va de 0 a 1). El borde difuminado ocupa el 75 % de la altura. */
.scene__photos img[data-reveal] {
  --edge: calc(var(--r, 0) * 175% - 75%);
  -webkit-mask-image: linear-gradient(to top, #000 var(--edge), transparent calc(var(--edge) + 75%));
  mask-image: linear-gradient(to top, #000 var(--edge), transparent calc(var(--edge) + 75%));
}

/* ---------- Frases grandes de cada fase (aparecen con el scroll) ---------- */
.scene__captions { position: absolute; inset: 0; pointer-events: none; }
.caption {
  --pad: max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter)));
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 12rem max(var(--gutter), calc(100% - var(--pad) - 19ch)) 8.75rem var(--pad);
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.14; letter-spacing: -.02em; text-wrap: balance;
  background: radial-gradient(130% 95% at 0% 100%, rgb(244 239 231 / .96) 0 32%, rgb(244 239 231 / .7) 52%, rgb(244 239 231 / 0) 74%);
  will-change: opacity, transform;
}
.caption em { color: var(--wood-dark); }
.caption__hint, .caption__link {
  display: block; margin-top: 1rem; width: max-content;
  font: 700 .95rem/1.4 var(--sans); letter-spacing: 0; color: var(--wood-dark);
}
.caption__link { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; pointer-events: auto; }
@media (min-width: 960px) {
  .caption { padding-bottom: 9.5rem; background: radial-gradient(100% 115% at 0% 100%, rgb(244 239 231 / .97) 0 38%, rgb(244 239 231 / .8) 54%, rgb(244 239 231 / 0) 78%); }
}
@media (max-width: 959px) {
  .caption { background: linear-gradient(to top, rgb(244 239 231 / .97) 0 48%, rgb(244 239 231 / .86) 66%, rgb(244 239 231 / 0) 92%); }
}

/* ---------- Página legal ---------- */
.legal { padding: calc(var(--topbar-h) + 3.5rem) 0 5rem; }
.legal__in { max-width: 780px; }
.legal h1 { font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.02; }
.legal h1 em { color: var(--wood-dark); }
.legal__updated { color: var(--ink-soft); font-size: .92rem; margin-top: 1rem; }
.legal__toc { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 2rem 0 1rem; padding: 1rem 0; border-block: 1px solid var(--line); }
.legal__toc a { font-weight: 700; text-decoration: none; }
.legal section { padding-top: 3.5rem; scroll-margin-top: var(--topbar-h); }
.legal h2 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); margin-bottom: 1.25rem; }
.legal h3 { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; letter-spacing: 0; margin: 2rem 0 .5rem; }
.legal p, .legal li { color: var(--ink-soft); max-width: 68ch; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal li { margin-bottom: .4rem; }
.legal__data { margin: 1rem 0 0; }
.legal__data div { display: grid; gap: .1rem; border-top: 1px solid var(--line); padding: .7rem 0; }
.legal__data div:last-child { border-bottom: 1px solid var(--line); }
.legal__data dt { font-size: .85rem; font-weight: 700; color: var(--wood-dark); }
.legal__data dd { margin: 0; }
@media (min-width: 720px) { .legal__data div { grid-template-columns: 11rem 1fr; gap: 1rem; } }
mark.todo { background: #f6dfb3; color: var(--ink); padding: 0 .25em; border-radius: 2px; }
.legal-page .footer { padding-bottom: 2.5rem; }

/* Información básica de privacidad bajo el formulario */
.form__privacy { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--ink-soft); }
.form__privacy a, .check a { color: var(--ink); }
