/* Ubiqa: ubiqa.app — hoja de estilos única. Paleta y tipografías oficiales. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-var.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-var.woff2") format("woff2");
}

:root {
  --ink: #0b1020;
  --ink-2: #151c33;
  --ink-3: #1b2442;
  --line-d: #2a3556;
  --paper: #f6f4ef;
  --paper-2: #ece9e0;
  --line-l: #e3dfd3;
  --text: #1b2236;
  --muted-l: #4d566b;
  --muted-d: #b3bbd0;
  --coral: #ff5a3c;
  --coral-d: #ff6a4d;
  --coral-t: #c4301a;
  --blue: #2f4be0;
  --blue-d: #8fa8ff;

  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --wrap: min(1200px, 100% - var(--gutter) * 2);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: light;
  interpolate-size: allow-keywords;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

.wrap { width: var(--wrap); margin-inline: auto; }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  background: var(--paper); color: var(--ink);
  padding: 12px 18px; border-radius: 999px; font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--blue-d); }
.on-coral :focus-visible { outline-color: var(--ink); }

/* ---------- Tipografía ---------- */
.display, .h2, .h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display { font-size: clamp(2.5rem, 6.7vw, 6.2rem); line-height: 0.98; letter-spacing: -0.022em; }
.h2 { font-size: clamp(2rem, 4.6vw, 3.9rem); line-height: 1.04; }
.h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.1; letter-spacing: -0.02em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 34em; text-wrap: pretty; }
p { text-wrap: pretty; }
.prose-narrow { max-width: 34em; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 28px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; line-height: 1.1; text-align: center;
  transition: transform 0.18s var(--ease), background-color 0.18s, color 0.18s, box-shadow 0.18s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-primary:hover { background: var(--coral-d); box-shadow: 0 10px 30px -10px rgba(255, 90, 60, 0.7); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-3); }
.btn-small { min-height: 42px; padding: 9px 20px; font-size: 0.95rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.link-quiet {
  font-weight: 600; text-decoration: underline; text-underline-offset: 6px;
  text-decoration-thickness: 2px; text-decoration-color: currentColor;
}
.link-quiet:hover { text-decoration-color: var(--coral-d); }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  color: var(--paper);
  transition: background-color 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(11, 16, 32, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line-d);
}
.header-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand { color: var(--paper); }
.brand .logo { height: 34px; width: auto; display: block; }
.foot-brand .brand .logo { height: 40px; }
.nav { display: none; gap: 32px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.98rem; color: var(--muted-d); transition: color 0.15s; }
.nav a:hover { color: var(--paper); }
@media (min-width: 900px) { .nav { display: flex; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: clip; color: var(--paper);
  background: radial-gradient(circle at 88% 12%, #1b2a68 0%, var(--ink) 58%);
  padding: calc(var(--header-h) + clamp(32px, 7vw, 88px)) 0 clamp(72px, 9vw, 132px);
}
.hero-grid { display: grid; gap: clamp(48px, 7vw, 72px); align-items: center; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
  .hero { min-height: min(100svh, 920px); display: flex; align-items: center; padding-bottom: clamp(56px, 6vw, 96px); }
  .hero > .wrap { padding-block: 0; }
}

.status {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 9px 18px 9px 14px; border-radius: 999px;
  border: 1px solid var(--line-d); background: rgba(21, 28, 51, 0.7);
  color: var(--muted-d); font-size: 0.95rem; font-weight: 500;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.dot {
  position: relative; width: 9px; height: 9px; border-radius: 50%;
  background: var(--coral-d); flex: none;
}
.dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--coral-d); opacity: 0;
}
.ln { display: block; white-space: nowrap; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.ln > span { display: block; }
.hero .lede { margin-top: clamp(24px, 3vw, 36px); color: var(--muted-d); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: clamp(28px, 4vw, 44px); }
.cta-row .link-quiet { color: var(--paper); }

.hero-visual { position: relative; width: min(100%, 560px); margin-inline: auto; padding-bottom: 72px; }
.map { width: 100%; height: auto; overflow: visible; }
.map-bg { fill: var(--ink-2); stroke: var(--line-d); stroke-width: 2; }
.street { fill: none; stroke: var(--line-d); stroke-width: 11; stroke-linecap: round; }
.street.big { stroke-width: 16; }
.street-core { fill: none; stroke: #3a4770; stroke-width: 1.5; stroke-dasharray: 7 9; stroke-linecap: round; }
.river { fill: none; stroke: var(--blue); stroke-width: 30; stroke-linecap: round; opacity: 0.32; }
.lot { fill: var(--ink-3); }
.ring { fill: none; stroke: #3b4a78; stroke-width: 2; stroke-dasharray: 5 9; transform-box: fill-box; transform-origin: center; }
.link-line { fill: none; stroke: var(--blue-d); stroke-width: 2.5; stroke-dasharray: 3 8; stroke-linecap: round; opacity: 0.8; }
.near { fill: var(--blue-d); stroke: var(--ink-2); stroke-width: 4; }
.spot { fill: var(--coral-d); }
.house { fill: var(--coral-d); stroke: var(--paper); stroke-width: 4; stroke-linejoin: round; }
.house-door { fill: var(--ink); }
.pin-shape { fill: var(--blue-d); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.pin-dot { fill: var(--ink); }
.pin { transform-box: fill-box; transform-origin: 50% 100%; }
.map-label { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; fill: var(--paper); text-anchor: middle; }

.listing {
  position: absolute; left: clamp(-8px, -2vw, 0px); bottom: 0; width: min(88%, 362px);
  background: var(--paper); color: var(--text); border-radius: 22px;
  padding: 20px 22px 20px; box-shadow: 0 28px 60px -22px rgba(0, 0, 0, 0.65);
}
.listing-sample { font-size: 0.8rem; font-weight: 600; color: var(--muted-l); margin-bottom: 4px; }
.listing-title { font-weight: 700; font-size: 1.02rem; color: var(--muted-l); }
.listing-price { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.15; color: var(--ink); margin-top: 2px; }
.listing-price span { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; letter-spacing: 0; color: var(--muted-l); }
.listing-meta { font-size: 0.95rem; margin-top: 4px; color: #33405a; }
@media (max-width: 599px) {
  .hero-visual { padding-bottom: 0; }
  .listing { position: relative; left: auto; bottom: auto; width: auto; margin: -56px 12px 0; }
}
.fresh {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 14px;
  background: var(--ink); color: var(--coral-d); padding: 8px 16px 8px 14px;
  border-radius: 999px; font-weight: 700; font-size: 0.92rem;
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(80px, 11vw, 160px); }
.on-paper { background: var(--paper); color: var(--text); }
.on-dark { background: var(--ink); color: var(--paper); }
.on-coral { background: var(--coral); color: var(--ink); }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 80px); }
.on-paper .h2, .on-paper .h3 { color: var(--ink); }

/* Problema */
.split { display: grid; gap: clamp(40px, 6vw, 88px); }
@media (min-width: 940px) { .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } .split .sticky-head { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.facts { display: grid; }
.fact { display: grid; gap: 6px; padding-block: 28px; border-top: 2px solid var(--ink); }
.fact:last-child { border-bottom: 2px solid var(--ink); }
.fact h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; }
.fact p { color: var(--muted-l); max-width: 36em; }
.foot-note { margin-top: 20px; font-size: 0.95rem; color: var(--muted-l); }

/* Cómo funciona: escenario fijo */
.how { position: relative; }
.how-grid { display: grid; gap: 32px; align-items: start; }
.how .section-head { margin-bottom: clamp(28px, 4vw, 56px); }
.how .section-head p { color: var(--muted-d); }
.stage {
  --s: 1;
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 2;
  width: 100%; aspect-ratio: 520 / 420; overflow: hidden;
  border-radius: 28px; background: var(--ink-2); border: 1px solid var(--line-d);
}
.panel {
  position: absolute; left: 0; top: 0; width: 520px; height: 420px;
  transform: scale(var(--s)); transform-origin: 0 0;
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
  color: var(--paper); font-size: 15px; line-height: 1.4;
}
.how[data-step="1"] .panel[data-panel="1"],
.how[data-step="2"] .panel[data-panel="2"],
.how[data-step="3"] .panel[data-panel="3"],
.how[data-step="4"] .panel[data-panel="4"] { opacity: 1; visibility: visible; }
.panel-title { font-weight: 600; color: var(--muted-d); font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.panel-title em { font-style: normal; color: var(--muted-d); opacity: 0.8; }

.steps { display: grid; gap: 0; padding-top: 12px; }
.step { min-height: 72svh; display: flex; flex-direction: column; justify-content: center; gap: 16px; opacity: 0.32; transition: opacity 0.4s; padding-block: 24px; }
.how[data-step="1"] .step[data-step="1"],
.how[data-step="2"] .step[data-step="2"],
.how[data-step="3"] .step[data-step="3"],
.how[data-step="4"] .step[data-step="4"] { opacity: 1; }
.step h3 { color: var(--paper); font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.05; }
.step p { color: var(--muted-d); max-width: 30em; }
.step p strong { color: var(--paper); font-weight: 600; }
@media (min-width: 900px) {
  .how-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(48px, 7vw, 96px); }
  .stage { grid-column: 2; grid-row: 1; top: calc(50svh - 232px); }
  .steps { grid-column: 1; grid-row: 1; }
  .step { min-height: 82svh; }
}
@media (max-width: 899px) {
  .stage { top: calc(var(--header-h) + 4px); }
  .step { min-height: 64svh; justify-content: flex-start; padding-top: 28px; }
  .how-grid { gap: 8px; }
}

/* Panel 1 */
.p-local-body { display: flex; gap: 20px; align-items: center; flex: 1; }
.rings { width: 190px; height: 190px; flex: none; }
.rings circle.r { fill: none; stroke: #3b4a78; stroke-width: 2; stroke-dasharray: 4 7; }
.rows { display: grid; gap: 10px; flex: 1; }
.rows li { background: var(--ink-3); border: 1px solid var(--line-d); border-radius: 14px; padding: 11px 14px; display: grid; gap: 6px; }
.rows b { font-weight: 600; }
.tag { justify-self: start; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag-in { background: var(--coral-d); color: var(--ink); }
.tag-near { background: transparent; color: var(--blue-d); border: 1.5px solid var(--blue-d); }
.p-note { color: var(--muted-d); font-size: 13.5px; margin-top: auto; }

/* Panel 2 */
.chat { display: flex; flex-direction: column; gap: 10px; flex: 1; justify-content: flex-end; }
.bubble { max-width: 82%; padding: 11px 15px; border-radius: 18px; font-size: 15px; }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
.bubble.bot { align-self: flex-start; background: var(--ink-3); border: 1px solid var(--line-d); border-bottom-left-radius: 5px; }
.bubble .pics { display: flex; gap: 6px; margin-top: 8px; }
.bubble .pics i { width: 38px; height: 28px; border-radius: 6px; background: rgba(255, 255, 255, 0.25); }
.quick { display: flex; gap: 8px; margin-top: 9px; }
.quick span { font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px; background: var(--coral-d); color: var(--ink); }
.quick span + span { background: transparent; color: var(--paper); border: 1.5px solid var(--muted-d); }

/* Panel 3 */
.mini-card { background: var(--paper); color: var(--text); border-radius: 16px; padding: 10px 16px; line-height: 1.3; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mini-card b { font-family: var(--display); font-size: 21px; letter-spacing: -0.02em; color: var(--ink); }
.states { display: grid; gap: 7px; flex: 1; align-content: start; }
.state { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: center; padding: 7px 14px; line-height: 1.3; border-radius: 14px; border: 1px solid var(--line-d); background: var(--ink-3); opacity: 0.45; }
.state i { width: 12px; height: 12px; border-radius: 50%; background: var(--line-d); }
.state b { display: block; font-weight: 600; }
.state small { color: var(--muted-d); font-size: 12.5px; }

/* Panel 4 */
.search-box { background: var(--ink-3); border: 2px solid var(--line-d); border-radius: 16px; padding: 14px 16px; min-height: 84px; font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--coral-d); vertical-align: -0.15em; margin-left: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 999px; }
.chip.guess { background: transparent; color: var(--coral-d); border: 1.5px dashed var(--coral-d); }

/* Para quién */
.audience { display: grid; gap: 0; }
.aud { padding-block: 32px; border-top: 2px solid var(--ink); display: grid; gap: 16px; align-content: start; }
.aud h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.03em; color: var(--ink); }
.aud li { position: relative; padding-left: 22px; color: var(--muted-l); }
.aud li + li { margin-top: 10px; }
.aud li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 2px; background: var(--coral-t); }
@media (min-width: 900px) {
  .audience { grid-template-columns: repeat(3, 1fr); }
  .aud { padding-right: 36px; }
  .aud + .aud { padding-left: 36px; border-left: 1px solid var(--line-l); }
}
.rules { margin-top: clamp(64px, 9vw, 120px); display: grid; gap: 28px; }
@media (min-width: 900px) { .rules { grid-template-columns: repeat(3, 1fr); gap: 56px; } }
.rule { display: grid; gap: 10px; align-content: start; }
.rule h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.3vw, 2rem); letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.rule p { color: var(--muted-l); }

/* Avance */
.progress-list { counter-reset: none; display: grid; position: relative; }
.progress-list::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 2px; background: var(--line-d); }
.pl { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 24px; padding-bottom: 36px; }
.pl:last-child { padding-bottom: 0; }
.pl-mark { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); border: 2px solid var(--line-d); margin-top: 4px; }
.pl.now .pl-mark { background: var(--coral-d); border-color: var(--coral-d); }
.pl.now .pl-mark::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--coral-d); opacity: 0; }
.pl h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.02em; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--paper); line-height: 1.2; }
.pl p { color: var(--muted-d); margin-top: 4px; max-width: 34em; }
.pl-state { font-family: var(--sans); font-size: 0.82rem; font-weight: 700; letter-spacing: 0; padding: 3px 12px; border-radius: 999px; border: 1.5px solid var(--line-d); color: var(--muted-d); }
.pl.now .pl-state { background: var(--coral-d); color: var(--ink); border-color: var(--coral-d); }
.pl.next .pl-state { border-color: var(--blue-d); color: var(--blue-d); }
.avance-intro { color: var(--muted-d); max-width: 30em; }

/* Lista de espera */
.waitlist { display: grid; gap: clamp(36px, 6vw, 80px); }
@media (min-width: 940px) { .waitlist { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); align-items: start; } }
.waitlist .lede { margin-top: 20px; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field > label, .field > legend, legend { font-weight: 700; font-size: 1rem; padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.input { width: 100%; min-height: 56px; padding: 14px 18px; border-radius: 14px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 1.05rem; }
.input::placeholder { color: #6b7388; }
.roles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.role { position: relative; }
.role input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.role span { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--ink); font-weight: 600; transition: background-color 0.15s, color 0.15s; }
.role input:checked + span { background: var(--ink); color: var(--paper); }
.role input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 0.95rem; line-height: 1.45; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.consent a { font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; font-weight: 700; }
.form-status.err { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; font-weight: 500; }
.form-status.err a { color: var(--coral-d); font-weight: 700; }
.done { display: none; background: var(--ink); color: var(--paper); border-radius: 24px; padding: clamp(28px, 4vw, 44px); }
.done h3 { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.1; }
.done p { margin-top: 12px; color: var(--muted-d); }
.waitlist.is-done .form { display: none; }
.waitlist.is-done .done { display: block; animation: settle 0.5s var(--ease) both; }

/* Preguntas */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line-l); }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px; font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.5rem); letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 22px; height: 22px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat; transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq .ans { padding: 0 0 26px; color: var(--muted-l); max-width: 44em; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.3s var(--ease), content-visibility 0.3s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* Pie */
.site-footer { background: var(--ink); color: var(--muted-d); padding-block: clamp(56px, 8vw, 96px) 36px; border-top: 1px solid var(--line-d); }
.foot-grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot-brand .brand { color: var(--paper); }
.foot-brand p { margin-top: 16px; max-width: 22em; }
.foot-col h2 { font-size: 0.95rem; font-weight: 700; color: var(--paper); margin-bottom: 14px; }
.foot-col li + li { margin-top: 8px; }
.foot-col a { text-decoration: none; }
.foot-col a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.foot-base { margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 1px solid var(--line-d); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 0.92rem; }

/* Páginas legales y 404 */
.legal-hero { padding: calc(var(--header-h) + clamp(40px, 7vw, 88px)) 0 clamp(32px, 5vw, 56px); background: radial-gradient(circle at 88% 0%, #1b2a68 0%, var(--ink) 60%); color: var(--paper); }
.legal-hero .h2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); }
.legal-hero p { margin-top: 16px; color: var(--muted-d); }
.legal { padding-block: clamp(48px, 7vw, 96px); }
.legal-grid { display: grid; gap: 40px; }
@media (min-width: 940px) { .legal-grid { grid-template-columns: 260px minmax(0, 1fr); gap: 72px; } .toc { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; } }
.toc h2 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.toc ol { display: grid; gap: 8px; font-size: 0.95rem; }
.toc a { color: var(--muted-l); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.doc { max-width: 46em; }
.doc h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 1.85rem); letter-spacing: -0.02em; color: var(--ink); margin: 2.4em 0 0.6em; line-height: 1.15; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: #2b3350; }
.doc p + p { margin-top: 1em; }
.doc ul { margin: 0.8em 0; display: grid; gap: 8px; }
.doc ul li { position: relative; padding-left: 22px; }
.doc ul li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 2px; background: var(--coral-t); }
.doc a { color: var(--blue); font-weight: 600; text-underline-offset: 3px; }
.doc .updated { font-size: 0.95rem; color: var(--muted-l); margin-bottom: 2em; }
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; color: var(--paper); background: radial-gradient(circle at 80% 10%, #1b2a68 0%, var(--ink) 58%); padding: 120px var(--gutter) 64px; }
.nf .display { font-size: clamp(2.6rem, 8vw, 6rem); }
.nf p { margin: 20px auto 32px; color: var(--muted-d); max-width: 28em; }

/* ---------- Movimiento (solo si la persona no lo ha reducido) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Una sola secuencia al cargar: titular, mapa que se traza, pin que cae, ficha. */
  .ln > span { animation: rise 1s var(--ease) both; animation-delay: calc(var(--i) * 0.1s + 0.15s); }
  .status, .hero .lede, .cta-row { animation: settle 0.8s var(--ease) both; }
  .status { animation-delay: 0s; }
  .hero .lede { animation-delay: 0.55s; }
  .cta-row { animation-delay: 0.7s; }
  .site-header { animation: settle 0.8s var(--ease) 0.2s both; }

  .map-bg { animation: fade 0.6s ease 0.1s both; }
  .river { animation: draw 1.6s ease-out 0.3s both; stroke-dasharray: 1; }
  .street, .street-core { stroke-dasharray: 1; animation: draw 1.5s ease-out both; animation-delay: calc(var(--d) * 1s + 0.3s); }
  .street-core { stroke-dasharray: 7 9; animation-name: fade; }
  .lot { animation: pop 0.5s var(--ease) both; animation-delay: calc(var(--d) * 1s + 0.6s); transform-box: fill-box; transform-origin: center; }
  .house { animation: fade 0.5s ease 1.5s both; }
  .house-door { animation: fade 0.5s ease 1.5s both; }
  .pin { animation: drop 0.9s cubic-bezier(0.5, 0, 0.9, 0.5) 1.7s both; }
  .pin-in { animation: squash 0.5s ease 2.55s both; transform-box: fill-box; transform-origin: 50% 100%; }
  .ring { animation: ring 1.6s var(--ease) both; animation-delay: calc(var(--d) * 1s + 2.5s); }
  .link-line { stroke-dasharray: 3 8; animation: fade 0.6s ease both; animation-delay: calc(var(--d) * 1s + 2.9s); }
  .near { animation: pop 0.5s var(--ease) both; animation-delay: calc(var(--d) * 1s + 2.9s); transform-box: fill-box; transform-origin: center; }
  .spot { animation: pop 0.5s var(--ease) both; animation-delay: calc(var(--d) * 1s + 3s); transform-box: fill-box; transform-origin: center; }
  .map-label { animation: fade 0.6s ease 2.6s both; }
  .listing { animation: card 0.9s var(--ease) 3.2s both; }
  .dot::after { animation: ping 2.4s ease-out infinite; }
  .listing .dot::after { animation-delay: 4s; }

  /* El único movimiento que responde al scroll: el escenario de “cómo funciona”. */
  .how[data-step="2"] .bubble { animation: bubble 0.55s var(--ease) both; animation-delay: calc(var(--i) * 0.95s + 0.25s); }
  .how:not([data-step="2"]) .bubble { opacity: 0; }
  .how[data-step="1"] .rows li { animation: settle 0.6s var(--ease) both; animation-delay: calc(var(--i) * 0.12s + 0.15s); }
  .how[data-step="1"] .rings .near-d { animation: pop 0.5s var(--ease) both; animation-delay: calc(var(--i) * 0.15s + 0.3s); transform-box: fill-box; transform-origin: center; }
  .how[data-step="3"] .state { animation: hl 8s linear infinite; animation-delay: calc(var(--i) * 2s - 8s); }
  .how[data-step="3"] .state i { animation: hldot 8s linear infinite; animation-delay: calc(var(--i) * 2s - 8s); }
  .how[data-step="4"] .caret { animation: blink 1s steps(2) infinite; }
  .how[data-step="4"] .chip { animation: pop 0.45s var(--ease) both; animation-delay: calc(var(--i) * 0.14s); }
  .how[data-step="4"] .chips { opacity: 0; }
  .how[data-step="4"].typed .chips { opacity: 1; }
  .how[data-step="4"]:not(.typed) .chip { animation: none; opacity: 0; }

  .pl.now .pl-mark::after { animation: ping 2.4s ease-out infinite; }
  .btn-primary { background-size: 200% 100%; }
}

@keyframes rise { from { transform: translateY(108%); } }
@keyframes settle { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes drop { 0% { transform: translateY(-190px); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes squash { 0% { transform: scale(1, 1); } 35% { transform: scale(1.14, 0.84); } 70% { transform: scale(0.96, 1.07); } 100% { transform: scale(1, 1); } }
@keyframes ring { from { opacity: 0; transform: scale(0.1); } 30% { opacity: 1; } }
@keyframes card { from { opacity: 0; transform: translateY(40px) rotate(-1.5deg); } }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 80%, 100% { transform: scale(1.7); opacity: 0; } }
@keyframes bubble { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hl {
  0% { opacity: 1; border-color: var(--coral-d); background: #20294a; }
  25% { opacity: 1; border-color: var(--coral-d); background: #20294a; }
  25.01%, 100% { opacity: 0.45; border-color: var(--line-d); background: var(--ink-3); }
}
@keyframes hldot { 0%, 25% { background: var(--coral-d); } 25.01%, 100% { background: var(--line-d); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .state:first-child { opacity: 1; }
}

@media print {
  .site-header, .stage, .waitlist { display: none; }
  body { background: #fff; }
}

/* Consentimiento de cookies (solo aparece si hay analítica configurada) */
.consent-banner {
  position: fixed; z-index: 60; left: var(--gutter); right: var(--gutter); bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 720px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  padding: 18px 22px; border-radius: 20px; background: var(--ink); color: var(--paper);
  border: 1px solid var(--line-d); box-shadow: 0 24px 60px -20px rgba(11, 16, 32, 0.6);
  font-size: 0.95rem; line-height: 1.5;
}
.consent-banner p { flex: 1 1 320px; margin: 0; color: var(--muted-d); }
.consent-banner strong { color: var(--paper); }
.consent-banner a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: 10px; }
.consent-banner .btn-ghost { background: transparent; color: var(--paper); border: 1px solid var(--line-d); }
.consent-banner .btn-ghost:hover { background: var(--ink-3); }
.consent-open { margin-left: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.consent-open[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .consent-banner { animation: consent-in 0.4s var(--ease) both; }
  @keyframes consent-in { from { opacity: 0; transform: translateY(12px); } }
}
