/* ==========================================================================
   Tasación Gratis - tasaciongratis.es (un servicio de Dauria Inmobiliaria)
   Web de un solo objetivo: que el propietario pida su valoración gratuita.

   Sistema de diseño
   - Un acento (terracota) sobre azul petróleo y neutros fríos.
   - Titulares en serif (Playfair Display), texto en sans (Geist).
   - Formas: botones en píldora, tarjetas 20px, campos y opciones 14px.
   - Pensado para todas las edades: letra base de 19px, objetivos táctiles
     de 56px o más, contraste AA, botón para agrandar la letra.
   - Claro y oscuro según el sistema (prefers-color-scheme).
   - Portada: ilustración propia con ciclo de día y noche (escena.js).
   ========================================================================== */

@font-face { font-family: "Playfair Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/playfair-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/playfair-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-style: italic; font-display: swap; src: url("fonts/playfair-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/geist-400.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/geist-500.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/geist-600.woff2") format("woff2"); }

:root {
  --bg: #f5f7f7;
  --surface: #ffffff;
  --ink: #0b2530;
  --ink-2: #3b525c;
  --line: #d8e0e3;
  --line-strong: color-mix(in srgb, var(--ink) 38%, transparent);
  --accent: #c4471c;
  --on-accent: #ffffff;
  --accent-soft: #fbe9e2;
  --teal-soft: #e3eef0;
  --deep: #08181f;
  --on-deep: #eef4f6;
  --error: #b3261e;
  --ok: #1f7a4d;

  /* Portada: suelo bajo la calle y cielo de día (el ciclo lo añade escena.js) */
  --ground: #0d1726;
  --sky-day: linear-gradient(to top, #d3e9f4 0%, #b2d8ee 4%, #7db6df 10%, #4f92cb 18%, #3479b7 25%, #2867a7 34%, #1f5593 48%, #184577 72%, #143a66 100%);
  --sky-dusk: linear-gradient(to top, #ffc27a 0%, #ff9f6b 5%, #ec7a78 11%, #bf5a86 18%, #8a4488 26%, #5d3378 36%, #3c2864 52%, #2a2152 100%);
  --sky-night: linear-gradient(to top, #2c3d6c 0%, #22325e 6%, #19274f 14%, #121d42 25%, #0d1636 42%, #0a1129 100%);

  --r-card: 1.25rem;
  --r-field: 0.875rem;
  --r-pill: 999px;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --nav-h: 4.5rem;
  --wrap: 76rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1a21;
    --surface: #12262f;
    --ink: #eaf1f3;
    --ink-2: #aabdc5;
    --line: #24404b;
    --accent: #e0623a;
    --on-accent: #0b1a21;
    --accent-soft: #3a2119;
    --teal-soft: #163039;
    --deep: #06121a;
    --error: #ff8a80;
    --ok: #6fd3a0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
html[data-size="2"] { font-size: 112.5%; }
html[data-size="3"] { font-size: 125%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1.1875rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.015em; }
h1 em, h2 em { font-style: italic; padding-right: 0.06em; }
p { margin: 0; }
button, select { font: inherit; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus { position: fixed; z-index: 100; top: 0.75rem; left: 0.75rem; width: auto; height: auto; clip: auto; padding: 0.75rem 1.25rem; border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Lenis (scroll suave) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.5rem; padding: 0 1.75rem;
  border-radius: var(--r-pill); border: 2px solid transparent;
  font-weight: 600; font-size: 1.0625rem; line-height: 1.1; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.25s, color 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.55); }
.btn-light:hover { border-color: #fff; background: rgb(255 255 255 / 0.08); transform: translateY(-2px); }
.btn-lg { min-height: 4rem; padding: 0 2.25rem; font-size: 1.125rem; }
.btn-sm { min-height: 3.5rem; padding: 0 1.25rem; font-size: 1rem; }
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; box-shadow: none; }
.link-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 3.5rem; padding: 0 0.25rem;
  background: none; border: 0; color: var(--ink); font-weight: 600; cursor: pointer; text-underline-offset: 4px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn[hidden] { display: none; }

.setup-bar { position: relative; z-index: 90; padding: 0.5rem 1rem; background: #ffd84d; color: #2a2100; font: 500 0.85rem/1.3 var(--font-body); text-align: center; }

/* ---------- Barra de progreso de lectura ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 80; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ---------- Navegación ---------- */
.nav {
  --nav-fg: var(--ink);
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h); color: var(--nav-fg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s, border-color 0.35s, color 0.35s;
}
.nav:not(.is-solid) { --nav-fg: #fff; background: rgb(13 29 51 / 0.72); border-color: transparent; }
.motion-ok .nav:not(.is-solid) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav .wrap { width: min(100% - 2rem, 92rem); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: grid; text-decoration: none; line-height: 1.1; }
.brand b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.brand i { font-style: italic; font-weight: 600; }
.brand span { display: none; font-size: 0.8125rem; font-weight: 500; opacity: 0.85; margin-top: 0.2rem; white-space: nowrap; }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 1rem; opacity: 0.9; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.nav-right { display: flex; align-items: center; gap: 0.6rem; }
.nav-phone { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 3.5rem; padding: 0 0.25rem; text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav-phone .txt { display: none; }
.nav-phone .txt-m { display: inline; }
.size-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 3.5rem; min-width: 3.5rem; padding: 0 0.9rem;
  border: 2px solid color-mix(in srgb, var(--nav-fg) 45%, transparent); border-radius: var(--r-pill);
  background: transparent; color: var(--nav-fg); font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
.size-btn:hover { border-color: var(--nav-fg); }
.size-btn .lbl { display: none; }
.nav .btn-primary { display: none; }

/* ==========================================================================
   Portada: titular, escena ilustrada y asistente
   ========================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--ground);
  padding: calc(var(--nav-h) + 1.25rem) 0 2.5rem;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); width: min(100% - 2rem, 92rem); margin-inline: auto; }
.hero-main { position: relative; display: flex; flex-direction: column; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5.25rem); line-height: 1.06; font-weight: 700; letter-spacing: -0.025em; padding-bottom: 0.08em; text-wrap: balance; text-shadow: 0 2px 24px rgb(6 16 34 / 0.35); }
.hero .lead { margin-top: 0.9rem; font-size: 1.25rem; line-height: 1.5; color: #fff; max-width: 30ch; text-shadow: 0 1px 16px rgb(6 16 34 / 0.45); }

/* Escena: el cielo cubre toda la portada; la calle queda justo debajo del titular */
.scene { position: relative; z-index: -2; height: clamp(11.5rem, 31svh, 16rem); margin-top: 0.75rem; }
.sky { position: absolute; left: -100vw; right: -100vw; bottom: 0; top: -300%; background: var(--sky-day); }
.sky > * { position: absolute; inset: 0; pointer-events: none; }
.city {
  position: absolute; left: 50%; bottom: 0; height: calc(100% / 0.985); aspect-ratio: 4400 / 1000;
  transform: translateX(-50%); container-type: size;
}
.city > * { position: absolute; display: block; }
.city-poster { inset: 0; width: 100%; height: 100%; max-width: none; }
.city::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7%; background: linear-gradient(transparent, var(--ground)); }
/* Velo para que el titular se lea bien a cualquier hora */
.scene::after {
  content: ""; position: absolute; z-index: 1; left: -100vw; right: -100vw; bottom: calc(100% - 1.5rem); top: -150%;
  background: linear-gradient(to top, transparent, rgb(8 20 38 / 0.3) 4rem, rgb(8 20 38 / 0.36));
}

.hero-down {
  display: none; position: absolute; left: 50%; bottom: 1.25rem; z-index: 2; width: 3.5rem; height: 3.5rem; margin-left: -1.75rem;
  place-items: center; border-radius: 50%; color: #fff; font-size: 1.25rem;
  background: rgb(8 20 38 / 0.35); border: 2px solid rgb(255 255 255 / 0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s var(--ease), background-color 0.2s, border-color 0.2s;
}
.hero-down:hover { transform: translateY(3px); border-color: #fff; background: rgb(8 20 38 / 0.55); }

/* Capas del ciclo (las crea escena.js) */
.sky .s-dusk { background: var(--sky-dusk); opacity: 0; will-change: opacity; }
.sky .s-night { background: var(--sky-night); opacity: 0; will-change: opacity; }
.sky .s-stars {
  opacity: 0; will-change: opacity; background-repeat: repeat; background-position: 50% 100%; bottom: 8%;
  /* Detrás del titular las estrellas se atenúan para no restar contraste */
  -webkit-mask-image: linear-gradient(to top, #000 14%, rgb(0 0 0 / 0.28) 21%);
  mask-image: linear-gradient(to top, #000 14%, rgb(0 0 0 / 0.28) 21%);
}
.city .l { max-width: none; }
.motion-ok .city .l { will-change: opacity; }
.city .l.o0, .city .o0 { opacity: 0; }
.motion-ok .city .sun, .motion-ok .city .moon, .motion-ok .city .cloud, .motion-ok .city .palm, .motion-ok .city .car { will-change: transform; }
.city .sun > i, .city .moon > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.city .sun-day { border-radius: 50%; background: radial-gradient(circle, #fffdf3 0 14%, #fff4d2 15%, rgb(255 240 196 / 0.55) 17%, rgb(255 238 190 / 0.16) 40%, transparent 68%); }
.city .sun-dusk { border-radius: 50%; opacity: 0; will-change: opacity; background: radial-gradient(circle, #ffe3ad 0 15%, #ffac68 17%, rgb(255 140 90 / 0.5) 23%, rgb(255 120 80 / 0.18) 44%, transparent 70%); }
.city .moon { opacity: 0; will-change: transform, opacity; }
.city .cloud-in, .city .palm > img, .city .car-in, .city .car-in > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.city .cloud[hidden] { display: none; }
.city .car-in.flip { transform: scaleX(-1); }
.city .cloud-in { will-change: opacity; }
.city .cloud-in > img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Luces: ventanas, local, portal, farolillos y farolas */
.city .w {
  opacity: 0; will-change: opacity;
  background: linear-gradient(#ffe7b0, #ffbb66);
  box-shadow: 0 0 1.2cqh 0.15cqh rgb(255 184 100 / 0.55);
}
.city .w::before { content: ""; position: absolute; top: 0; bottom: 0; left: 47%; width: 6%; background: rgb(96 60 30 / 0.55); }
.city .w.t1 { background: linear-gradient(#fff7e6, #ffe2b6); box-shadow: 0 0 1.2cqh 0.15cqh rgb(255 232 196 / 0.5); }
.city .w.t2 { background: linear-gradient(#d4e3ff, #92acf2); box-shadow: 0 0 1.4cqh 0.2cqh rgb(140 170 255 / 0.55); }
.city .w.c::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: linear-gradient(90deg, rgb(150 64 36 / 0.5), rgb(150 64 36 / 0.12)); }
.city .w.shop { background: linear-gradient(#fff3d6, #ffcf8a); box-shadow: 0 0 2.4cqh 0.4cqh rgb(255 196 120 / 0.45); }
.city .w.shop::before { left: 32.5%; width: 2%; background: rgb(40 36 40 / 0.8); box-shadow: 7.1cqh 0 0 rgb(40 36 40 / 0.8); }
.city .w.portal::before { left: 45%; width: 10%; background: rgb(40 36 40 / 0.85); }
.city .glowb { opacity: 0; will-change: opacity; border-radius: 50%; }
.city .lamp-glow { background: radial-gradient(circle, rgb(255 246 220 / 0.95) 0 6%, rgb(255 216 150 / 0.5) 11%, rgb(255 200 130 / 0.16) 32%, transparent 66%); }
.city .lamp-pool { border-radius: 50%; background: radial-gradient(closest-side, rgb(255 214 150 / 0.45), transparent); }
.city .lantern-glow { background: radial-gradient(circle, rgb(255 238 196 / 0.95) 0 10%, rgb(255 200 130 / 0.42) 22%, transparent 66%); }
.hero .shoot { position: absolute; z-index: -1; top: 34%; left: 58%; width: 10rem; height: 2px; opacity: 0; pointer-events: none; transform-origin: 100% 50%; rotate: -18deg; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.9)); border-radius: 2px; }

/* ---------- Asistente de valoración ---------- */
.wiz {
  position: relative; color: var(--ink); background: var(--surface); border-radius: var(--r-card);
  padding: 1.25rem; box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.65);
}
.wiz-top { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; }
.wiz-count { font-size: 0.95rem; font-weight: 600; color: var(--ink-2); }
.segs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.seg { height: 0.4rem; border-radius: 99px; background: var(--line); transition: background-color 0.4s; }
.seg.on { background: var(--accent); }
.step { border: 0; padding: 0; margin: 0; min-width: 0; }
.step[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .step.enter { animation: stepIn 0.5s var(--ease) both; }
  @keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
}
.wiz-q { font-size: 1.6rem; line-height: 1.2; margin-bottom: 1rem; outline: none; }
.wiz-hint { margin: -0.5rem 0 1rem; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }

.opts { display: grid; gap: 0.7rem; grid-template-columns: minmax(0, 1fr); }
.opts.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt { position: relative; display: block; min-width: 0; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.opt .box {
  position: relative; display: flex; align-items: center; gap: 0.75rem; min-height: 3.75rem; padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 2px solid var(--line-strong); border-radius: var(--r-field); background: var(--bg);
  font-weight: 500; line-height: 1.25; transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
.opt:hover .box { border-color: var(--ink); }
.opt input:active + .box { transform: scale(0.98); }
.opt input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 3px; }
.opt input:checked + .box { border-color: var(--accent); background: var(--accent-soft); }
.opt .tick { position: absolute; right: 0.75rem; top: 50%; margin-top: -0.625rem; color: var(--accent); opacity: 0; transform: scale(0.5); transition: opacity 0.2s, transform 0.3s var(--ease); }
.opt input:checked + .box .tick { opacity: 1; transform: none; }
.opt .ico { font-size: 1.75rem; color: var(--accent); }
.opts.tiles .box { flex-direction: column; justify-content: center; text-align: center; min-height: 6.25rem; gap: 0.5rem; padding: 0.75rem; }
.opts.tiles .tick { top: 0.6rem; right: 0.6rem; margin-top: 0; }
.opts .span-2 { grid-column: 1 / -1; }
.opts.tiles .span-2 .box { flex-direction: row; min-height: 4rem; }

.field { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.field label, .field .lab { font-weight: 600; font-size: 1.0625rem; }
.field input[type="text"], .field input[type="tel"], .select select {
  width: 100%; min-height: 3.75rem; padding: 0 1rem; color: var(--ink); background: var(--bg);
  border: 2px solid var(--line-strong); border-radius: var(--r-field); font: 400 1.1875rem var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:hover, .select select:hover { border-color: var(--ink); }
.field input:focus-visible, .select select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 24%, transparent); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 3rem; cursor: pointer; text-overflow: ellipsis; }
.select .icon { position: absolute; right: 1rem; top: 50%; margin-top: -0.625rem; pointer-events: none; color: var(--ink-2); }
.field .hint { color: var(--ink-2); font-size: 0.95rem; line-height: 1.4; }
.field[data-invalid] input, .field[data-invalid] select { border-color: var(--error); }
.field .error { display: none; color: var(--error); font-size: 0.95rem; font-weight: 600; }
.field[data-invalid] .error { display: block; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.segmented .box { justify-content: center; padding-right: 1rem; font-weight: 600; }
.nowrap { white-space: nowrap; }
.consent { font-weight: 400 !important; display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.75rem; align-items: start; font-size: 1rem; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.consent input { width: 1.6rem; height: 1.6rem; margin: 0.1rem 0 0; accent-color: var(--accent); }
.consent a { color: var(--ink); text-underline-offset: 3px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.recap { margin-bottom: 1rem; padding: 0.9rem 1rem; border-radius: var(--r-field); background: var(--teal-soft); font-size: 1.0625rem; line-height: 1.45; }
.recap strong { font-weight: 600; }
.recap button { margin-left: 0.25rem; padding: 0.35rem 0.25rem; min-height: 2.75rem; background: none; border: 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.step-error { margin-top: 0.9rem; color: var(--error); font-weight: 600; font-size: 1rem; }
.step-error[hidden] { display: none; }
.wiz-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.wiz-nav .btn { margin-left: auto; }
.wiz-nav [hidden] { display: none; }
.form-status { min-height: 1.4em; margin-top: 0.75rem; font-weight: 600; font-size: 1rem; }
.form-status:empty { min-height: 0; margin-top: 0; }
.form-status.err { color: var(--error); }
.form-status a { color: inherit; text-underline-offset: 3px; }

.form-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.wiz.at-last .wiz-alt { display: none; }
.wiz-alt { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--line); display: grid; gap: 0.6rem; }
.wiz-alt p { font-size: 1rem; color: var(--ink-2); }
.wiz-alt div { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.wiz-done { text-align: left; }
.wiz-done[hidden] { display: none; }
.wiz-done .badge { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--teal-soft); color: var(--ok); display: grid; place-items: center; font-size: 2rem; margin-bottom: 1rem; }
.wiz-done h2 { font-size: 2rem; line-height: 1.15; outline: none; }
.wiz-done p { margin-top: 0.75rem; color: var(--ink-2); max-width: 40ch; }
.wiz-done ol { margin: 1.25rem 0 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; color: var(--ink-2); }
.wiz-done .btn { margin-top: 1.5rem; }
.wiz.is-done .wiz-top, .wiz.is-done form, .wiz.is-done .wiz-alt { display: none; }

/* ---------- Secciones ---------- */
.section { padding: 5rem 0; }
.section h2, .flow h2 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.1; max-width: 18ch; text-wrap: balance; }
.section .lead { margin-top: 1rem; color: var(--ink-2); max-width: 56ch; font-size: 1.25rem; }

/* Frase de confianza (aparece palabra a palabra) */
.manifesto { padding: 5.5rem 0 4.5rem; }
.manifesto p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.22; letter-spacing: -0.015em; max-width: 26ch; text-wrap: balance; }
.manifesto em { color: var(--accent); }

/* Proceso (se fija con el scroll en escritorio) */
.flow { padding: 4.5rem 0; }
.flow-grid { display: grid; gap: 2.5rem; align-items: center; }
.flow-media { border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 3; background: var(--teal-soft); }
.flow-media picture { height: 100%; }
.flow-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 56%; transform-origin: 50% 55%; }
.flow-copy h2 { max-width: 12ch; }
.flow-steps { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: 2rem; position: relative; }
.flow-step { --a: 1; display: grid; grid-template-columns: 3.25rem 1fr; gap: 1.1rem; transform: translateX(calc((1 - var(--a)) * -10px)); }
.flow-step h3, .flow-step .ico { opacity: calc(0.6 + 0.4 * var(--a)); }
.flow-step .ico { width: 3.25rem; height: 3.25rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 1.6rem; }
.flow-step h3 { font-size: 1.6rem; line-height: 1.2; }
.flow-step p { margin-top: 0.4rem; color: var(--ink-2); max-width: 44ch; }

/* Ventajas */
.bento { margin-top: 2.5rem; display: grid; gap: 1rem; grid-template-columns: 1fr; }
.tile { border-radius: var(--r-card); padding: 1.75rem; display: flex; flex-direction: column; gap: 0.9rem; min-height: 15rem; border: 1px solid transparent; transition: transform 0.4s var(--ease), box-shadow 0.4s; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 30px 50px -35px color-mix(in srgb, var(--ink) 55%, transparent); }
.tile .ico { font-size: 2rem; color: var(--accent); }
.tile h3 { font-size: 1.65rem; line-height: 1.2; max-width: 18ch; }
.tile p { max-width: 42ch; color: var(--ink-2); }
.tile-a { background: var(--accent-soft); }
.tile-b { background: var(--surface); border-color: var(--line); }
.tile-c { background: var(--deep); color: var(--on-deep); border-color: color-mix(in srgb, var(--on-deep) 12%, transparent); }
.tile-c .ico { color: var(--on-deep); }
.tile-c p { color: color-mix(in srgb, var(--on-deep) 80%, transparent); }
.tile-d { background: radial-gradient(circle at 92% 8%, color-mix(in srgb, #2f7f96 24%, transparent), transparent 58%), var(--teal-soft); }

/* Tipos de propiedad: banda que se desplaza (una sola en toda la página) */
.kinds .head { margin-bottom: 2.25rem; }
.marquee { overflow: hidden; padding: 0.5rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 3rem; margin: 0; padding: 0 1.5rem; list-style: none; }
.marquee li { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 8vw, 5.5rem); line-height: 1.15; letter-spacing: -0.02em; white-space: nowrap; }
.marquee li:nth-child(even) { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Preguntas frecuentes */
.faq-list { margin-top: 2rem; max-width: 52rem; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; min-height: 4rem; padding: 1.25rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; line-height: 1.25;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { transition: transform 0.35s var(--ease); color: var(--accent); font-size: 1.5rem; }
.faq-list details[open] summary .icon { transform: rotate(45deg); }
.faq-body p { padding: 0 0 1.5rem; color: var(--ink-2); max-width: 60ch; }

/* Cierre */
.closing {
  position: relative; isolation: isolate; overflow: hidden; color: var(--on-deep); padding: 6rem 0;
  background: radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 46%), radial-gradient(circle at 0% 100%, color-mix(in srgb, #2f7f96 40%, transparent), transparent 50%), var(--deep);
}
.closing h2 { font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1.08; max-width: 14ch; font-weight: 700; }
.closing .lead { margin-top: 1.25rem; font-size: 1.3125rem; max-width: 36ch; color: rgb(255 255 255 / 0.88); }
.closing-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.closing-phone { margin-top: 2.5rem; }
.closing-phone small { display: block; font-size: 1rem; color: rgb(255 255 255 / 0.75); }
.closing-phone a { display: inline-block; margin-top: 0.25rem; font-family: var(--font-body); font-weight: 600; font-size: clamp(2.1rem, 6.5vw, 3.5rem); text-decoration: none; letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.closing-phone a:hover { text-decoration: underline; text-underline-offset: 8px; }

/* Pie */
.footer { background: var(--deep); color: var(--on-deep); padding: 3.5rem 0 6rem; border-top: 1px solid rgb(255 255 255 / 0.08); }
.footer-grid { display: grid; gap: 2rem; }
.footer-lead { margin-top: 0.75rem; max-width: 40ch; }
.footer p, .footer li { color: rgb(255 255 255 / 0.78); font-size: 1rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer a { text-underline-offset: 3px; }
.footer h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; letter-spacing: 0; }
.credits { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.12); font-size: 0.875rem; color: rgb(255 255 255 / 0.7) !important; line-height: 1.6; }

/* Barra fija en móvil */
.dock {
  position: fixed; inset: auto 0 0 0; z-index: 55; display: grid; grid-template-columns: 1.5fr 1fr; gap: 0.6rem;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); transition: transform 0.4s var(--ease);
}
.dock.is-hidden { transform: translateY(110%); }
.dock .btn { min-height: 3.5rem; padding: 0 0.5rem; font-size: 1rem; }

/* Páginas de texto (privacidad) */
.prose { padding: calc(var(--nav-h) + 3rem) 0 6rem; }
.prose .wrap { max-width: 48rem; }
.prose h1 { font-size: clamp(2.2rem, 6vw, 3.25rem); margin-bottom: 0.5rem; }
.prose h2 { font-size: 1.6rem; margin: 2.5rem 0 0.75rem; max-width: none; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 0.75rem; }
.prose ul { padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.draft-note { margin: 1.25rem 0 0; padding: 0.9rem 1.1rem; border-radius: var(--r-field); background: #ffd84d; color: #2a2100 !important; font-weight: 500; font-size: 1rem; }

/* ---------- Movimiento (solo si el usuario no pide reducirlo) ---------- */
.motion-ok .split-h:not(.is-split), .motion-ok .split-w:not(.is-split) { visibility: hidden; }
.motion-ok .reveal, .motion-ok .tile { opacity: 0; }

/* Entrada de la portada: solo CSS, para que se vea al instante sin esperar a JavaScript */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero .wiz { animation: rise 0.9s var(--ease) both; }
  .hero .lead { animation-delay: 0.12s; }
  .hero .wiz { animation-delay: 0.22s; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .marquee-track { animation: none; width: auto; flex-wrap: wrap; }
  .marquee-track ul[aria-hidden="true"] { display: none; }
  .marquee ul { flex-wrap: wrap; gap: 1rem 2rem; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Tablet y escritorio ---------- */
@media (min-width: 768px) {
  :root { --nav-h: 5rem; }
  .nav .btn-primary { display: inline-flex; }
  .size-btn .lbl { display: inline; }
  .dock { display: none; }
  .footer { padding-bottom: 3.5rem; }
  .section { padding: 7rem 0; }
  .wiz { padding: 2rem; }
  .wiz-q { font-size: 1.75rem; }
  .scene { height: clamp(15rem, 34svh, 22rem); }
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile-a { grid-column: span 4; }
  .tile-b, .tile-c { grid-column: span 2; }
  .tile-d { grid-column: span 4; }
  .flow-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3.5rem; }
}
@media (min-width: 1024px) {
  .brand span { display: block; }
  .nav-phone .txt { display: inline; }
  .nav-phone .txt-m { display: none; }
  .hero { min-height: 100svh; padding: calc(var(--nav-h) + 1.25rem) 0 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 30rem; gap: 3rem; width: min(100% - 4rem, 92rem); align-items: start; }
  /* La columna izquierda ocupa la primera pantalla: titular arriba y calle abajo */
  .hero-main { height: max(34rem, calc(100svh - var(--nav-h) - 1.25rem)); }
  .hero-copy { padding-top: clamp(0.5rem, 3vh, 2rem); }
  .scene { flex: 1 1 auto; height: auto; min-height: 14rem; margin-top: 1.5rem; }
  .wiz { padding: 1.75rem 2rem; }
  .hero-down { display: grid; }
}
@media (min-width: 1200px) {
  .nav-links { display: flex; }
}
/* Escritorio con poca altura: el asistente se compacta para verse entero */
@media (min-width: 1024px) and (max-height: 820px) {
  .wiz { padding: 1.35rem 1.75rem; }
  .wiz-top { margin-bottom: 0.9rem; }
  .wiz-q { font-size: 1.55rem; margin-bottom: 0.75rem; }
  .opts.tiles .box { min-height: 5rem; }
  .opts.tiles .span-2 .box { min-height: 3.75rem; }
  .wiz-nav { margin-top: 1rem; }
  .wiz-alt { margin-top: 0.9rem; padding-top: 0.8rem; gap: 0.45rem; }
  .wiz-alt p { font-size: 0.95rem; }
  .wiz-alt div { flex-wrap: nowrap; }
  .hero-down { display: none; }
}
/* Escritorio muy bajo: el teléfono ya está en el menú, así que se omite el bloque de contacto del asistente */
@media (min-width: 1024px) and (max-height: 700px) {
  .wiz-alt { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 0.75rem); }
}
@media (min-width: 900px) {
  .flow { min-height: 100dvh; display: flex; align-items: center; padding: 6rem 0 3rem; }
  .flow .wrap { width: min(100% - 2rem, var(--wrap)); }
  .flow-media { aspect-ratio: 4 / 5; max-height: 74dvh; margin-left: auto; width: 100%; }
}
@media (max-width: 767px) {
  body { padding-bottom: 5.25rem; }
  .brand b { font-size: 1.45rem; }
  .closing-cta .btn { flex: 1 1 100%; }
}
