/* ==========================================================================
   "Cristal clínico" — ver DESIGN.md.
   Blanco cálido + gris perla + turquesa clínico + azul profundo.
   --primary (color de la clínica, config.js) es el ÚNICO color de acción.
   Rejilla: contenedor de 1280px, 12 columnas, separación 24px; los splits parten en la columna 7.
   Cada sección mide una pantalla (dos en celular cuando el contenido lo pide); la cabecera fija va encima.
   ========================================================================== */
:root {
  --primary: #0b5f7a;
  --primary-ink: #ffffff;
  --primary-soft: color-mix(in srgb, var(--primary) 10%, #ffffff);

  --bg: #fbfaf7;
  --paper: #ffffff;
  --pearl: #edefef;
  --pearl-2: #dde2e3;
  --teal: #1f9c98;
  --teal-deep: #137a77;
  --teal-soft: #d5eeec;
  --deep: #0e2a47;
  --ink: #0e2a47;
  --ink-2: #33475b;
  --muted: #4d5f71;
  --banner-bg: #ffd60a;
  --banner-ink: #111111;
  --error: #b42318;
  --focus: #1a73e8;

  --font-display: "Newsreader", "Newsreader Fallback", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font: "Manrope", "Manrope Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(14, 42, 71, .06);
  --shadow: 0 1px 2px rgba(14, 42, 71, .05), 0 14px 34px -14px rgba(14, 42, 71, .2);
  --shadow-lg: 0 2px 6px rgba(14, 42, 71, .05), 0 40px 80px -28px rgba(14, 42, 71, .32);
  --glass: rgba(255, 255, 255, .6);
  --glass-line: rgba(255, 255, 255, .75);
  --blur: blur(18px) saturate(1.4);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --banner-h: 2.5rem;            /* app.js lo mide en vivo */
  --header-h: 4.25rem;
  --top: calc(var(--banner-h) + var(--header-h));
  --pad-x: clamp(1.25rem, 5.5vw, 5rem);
  --gutter: 24px;
  --screen: 100svh;
  --hero-pad-top: clamp(7.25rem, 15vh, 10rem);
}

/* Respaldos con las métricas de Newsreader y Manrope (medidas en el navegador): el cambio a la fuente web no mueve el layout */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"), local("Times New Roman"), local("Noto Serif"); size-adjust: 99%; ascent-override: 74.9%; descent-override: 27.3%; line-gap-override: 0%; }
@font-face { font-family: "Manrope Fallback"; src: local("Arial"), local("Helvetica"), local("Roboto"); size-adjust: 100.7%; ascent-override: 106.3%; descent-override: 29.8%; line-gap-override: 0%; }

/* Lenis (equivalente a lenis.css, en línea para ahorrar una petición) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; font-size: 1rem; overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.12; color: var(--ink); text-wrap: balance; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 3px; }
strong, b { font-weight: 700; }
.i { width: 1.2rem; height: 1.2rem; flex: none; }
@media (max-width: 479px) { .hide-sm { display: none; } :root { --hero-pad-top: 9.25rem; } }

.display, .display-2 { font-family: var(--font-display); font-weight: 360; letter-spacing: -.022em; font-optical-sizing: auto; }
.display { font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: 1; margin-bottom: .32em; }
.display-2 { font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.05; margin-bottom: .45em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1280px, 100% - 2 * var(--pad-x)); margin-inline: auto; position: relative; z-index: 1; }

/* ==========================  Cabecera fija (banner legal + barra)  ========================== */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 60;
  background: rgba(251, 250, 247, .95);
  box-shadow: 0 1px 0 rgba(14, 42, 71, .07);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 100; background: #fff; color: var(--ink); padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow); }
.skip-link:focus { top: calc(var(--top) + .5rem); }

/* Banner DEMOSTRACIÓN (no tocar: requisito legal; siempre visible) */
.demo-banner {
  background: var(--banner-bg); color: var(--banner-ink);
  font-size: .85rem; text-align: center; padding: .5rem 1rem; line-height: 1.35;
  border-bottom: 2px solid #111;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); min-width: 0; min-height: 44px; }
.brand-mark {
  width: 2.5rem; height: 2.5rem; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--deep); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 6px 14px -6px rgba(14,42,71,.5);
}
.brand-mark svg { width: 1.3rem; height: 1.3rem; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; font-size: .95rem; max-width: 52vw; line-height: 1.2; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================  Botones: uno primario, uno secundario  ========================== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; letter-spacing: -.01em; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background-color .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; }
.btn-sm { min-height: 44px; padding: .5rem 1.1rem; font-size: .9rem; white-space: nowrap; }
.btn-lg { min-height: 58px; padding: .95rem 1.7rem; font-size: 1.03rem; }
.btn-note { font-weight: 500; opacity: .85; }
.btn-primary {
  background: var(--primary); color: var(--primary-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 26px -12px color-mix(in srgb, var(--primary) 80%, transparent);
}
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, #000); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 20px 34px -14px color-mix(in srgb, var(--primary) 85%, transparent); }
.btn-quiet { background: #fff; color: var(--ink); border-color: var(--pearl-2); }
.btn-quiet:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow); }
.btn-quiet .i-wa { color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--pearl-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-link { background: none; color: var(--muted); text-decoration: underline; min-height: 44px; }
.btn-link:hover { color: var(--ink); }
.i-arrow { transition: transform .3s var(--ease-out); }
.btn:hover .i-arrow, .link-arrow:hover .i { transform: translateX(4px); }
.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; text-decoration: none; min-height: 44px;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 0 1.5px no-repeat;
  transition: background-size .35s var(--ease-out);
}
.link-arrow:hover { background-size: calc(100% - 1.6rem) 1.5px; }
.link-arrow .i { transition: transform .3s var(--ease-out); }

/* ==========================  Hero  ========================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(var(--screen), 34rem); display: flex; align-items: flex-start;
  /* Relleno fijo (no depende de la altura medida del banner): sin saltos de layout al cargar */
  padding: var(--hero-pad-top, 8rem) 0 2rem;
}
.hero-ground {
  position: absolute; inset: 0; z-index: -2; overflow: hidden;
  background:
    radial-gradient(48rem 32rem at 82% 18%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 62%),
    radial-gradient(40rem 30rem at 12% 88%, rgba(31, 156, 152, .2), transparent 60%),
    radial-gradient(36rem 26rem at 60% 70%, rgba(213, 238, 236, .9), transparent 65%),
    linear-gradient(160deg, #fbfaf7 0%, #eef2f2 55%, #e6eef0 100%);
}
.hero-shader { position: absolute; inset: -6% 0; opacity: 0; transition: opacity 1.4s var(--ease); will-change: transform; }
.hero-shader.is-ready { opacity: 1; }
.hero-ground::after {
  /* Velo para que el titular siempre tenga contraste sobre el shader */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(251,250,247,.78) 0%, rgba(251,250,247,.4) 45%, rgba(251,250,247,0) 72%);
}
.hero-3d { display: none; }
.hero-grid { display: grid; gap: 2.5rem; align-items: start; }
.hero-start { display: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1.4rem;
  padding: .4rem .9rem .4rem .7rem; border-radius: 999px; background: rgba(255,255,255,.72);
  border: 1px solid var(--glass-line); box-shadow: var(--shadow-sm);
  font-size: .88rem; font-weight: 600; color: var(--ink-2);
}
.eyebrow .i { width: 1rem; height: 1rem; color: var(--teal-deep); }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.28rem); color: var(--ink-2); max-width: 34rem; margin-bottom: 1.9rem; line-height: 1.55; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.6rem; }
.hero-ctas .btn { flex: 1 1 16rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 0; margin: 0 0 1.2rem; list-style: none; color: var(--ink-2); font-size: .95rem; font-weight: 500; }
.hero-points li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-points .i { width: 1.1rem; height: 1.1rem; color: var(--teal-deep); }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: .22rem .65rem; border-radius: 999px; margin: 0; }
.tag-ejemplo { background: #fff4cc; color: #5c4300; border: 1px solid #e7c75a; }

/* Palabras del titular (motion.js las envuelve) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; will-change: transform; }
html.m-enter:not(.m-enter-done) .hero [data-split] { opacity: 0; }

/* Paso 1 del quiz dentro del hero (vidrio esmerilado) */
.glass {
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.9);
}
.hero-start { position: relative; border-radius: var(--r-lg); padding: 1.6rem; width: 100%; }
.start-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.start-step { margin: 0; font-size: .88rem; font-weight: 700; color: var(--primary); }
.start-time { margin: 0; display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.start-time .i { width: 1rem; height: 1rem; }
.start-title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1.1; letter-spacing: -.015em; margin-bottom: 1.1rem; color: var(--ink); }
.start-options { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.start-opt {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%;
  min-height: 58px; padding: .7rem 1.1rem .7rem 1.3rem; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.25; text-align: left; color: var(--ink); cursor: pointer;
  background: #fff; border: 1.5px solid var(--pearl-2);
  transition: transform .3s var(--ease-out), border-color .2s, color .2s, box-shadow .3s var(--ease-out);
}
.start-opt .i { width: 1.1rem; height: 1.1rem; color: var(--muted); transition: transform .3s var(--ease-out), color .2s; }
.start-opt:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow); }
.start-opt:hover .i { transform: translateX(3px); color: var(--primary); }
.start-opt:active { transform: scale(.97); transition-duration: .08s; }
.start-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.start-bar { height: 5px; border-radius: 999px; background: rgba(14,42,71,.08); margin: 1.3rem 0 .9rem; overflow: hidden; }
.start-bar span { display: block; width: 25%; height: 100%; border-radius: inherit; background: var(--primary); }
.start-note { margin: 0; font-size: .9rem; color: var(--ink-2); }

/* Cascada del hero: CSS puro, no espera a JS */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
/* La cascada del hero nunca parte invisible: el texto pinta al instante y solo se asienta (bueno para el LCP) */
@keyframes settle { from { opacity: .45; transform: translateY(14px); } to { opacity: 1; transform: none; } }
html.motion .hero .cascade { animation: settle .9s var(--ease-out) both; }
html.motion .hero .lead.cascade { animation-delay: .45s; }
html.motion .hero .hero-ctas.cascade { animation-delay: .58s; }
html.motion .hero .hero-points.cascade { animation-delay: .7s; }
html.motion .hero .tag.cascade { animation-delay: .78s; }
html.motion .hero .hero-start.cascade { animation: settle 1.1s var(--ease-out) .5s both; }

/* ==========================  Secciones (una pantalla cada una)  ========================== */
.section {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: calc(var(--h, 1) * var(--screen));
  padding: calc(var(--top) + 1.25rem) 0 3rem;
}
.section-pearl { background: var(--pearl); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-lead { font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--ink-2); margin: 0 0 2rem; max-width: 36rem; }
.section-head .section-lead { margin-bottom: 0; }
.split { display: grid; gap: 3rem; align-items: start; }

/* Contadores */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin: 0; }
.stat { display: flex; flex-direction: column-reverse; gap: .3rem; padding-top: 1rem; border-top: 2px solid var(--deep); }
.stat dt { font-size: .92rem; color: var(--ink-2); font-weight: 500; line-height: 1.35; }
.stat dd { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .45rem; }
.stat-num { font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1; letter-spacing: -.03em; color: var(--deep); font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 1rem; font-weight: 700; color: var(--teal-deep); }

/* Maqueta: plan de evaluación */
.plan {
  background: #fff; border-radius: var(--r-lg); padding: 1.75rem; box-shadow: var(--shadow-lg);
  border: 1px solid var(--pearl-2);
}
.plan-head { display: flex; align-items: center; gap: .9rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--pearl-2); }
.plan-mark { width: 2.75rem; height: 2.75rem; }
.plan-title { margin: 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.plan-sub { margin: .15rem 0 0; font-size: .9rem; color: var(--ink-2); }
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-list li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.15rem 0; border-bottom: 1px solid var(--pearl-2); color: var(--ink-2); }
.plan-list b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: .15rem; }
.plan-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.2rem; padding: .9rem 1.1rem; border-radius: 999px; background: var(--primary-soft); color: var(--ink-2); font-size: .92rem; }
.plan-foot b { color: var(--primary); }
.icon-tile {
  width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--teal-soft); color: var(--teal-deep);
}
.icon-tile svg { width: 1.5rem; height: 1.5rem; }
.faq-icon { margin-bottom: 1rem; }

/* Pasos + conversación */
.steps { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; }
.steps li { display: flex; gap: 1.2rem; align-items: flex-start; padding: .85rem 0; border-top: 1px solid var(--pearl-2); }
.steps li:last-child { border-bottom: 1px solid var(--pearl-2); }
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--ink-2); }
.step-n {
  flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1;
  background: var(--paper); color: var(--deep); border: 1px solid var(--pearl-2);
}
.steps li:first-child .step-n { background: var(--deep); color: #fff; border-color: var(--deep); }

.chat { width: 100%; border-radius: 30px; overflow: hidden; background: #efeae2; box-shadow: var(--shadow-lg); border: 6px solid #fff; }
.chat-top { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; background: var(--deep); color: #fff; }
.chat-top b { display: block; font-size: .95rem; line-height: 1.2; }
.chat-top small { display: block; font-size: .78rem; opacity: .8; }
.chat-avatar { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); flex: none; }
.chat-avatar svg { width: 1.1rem; height: 1.1rem; }
.chat-body { display: flex; flex-direction: column; gap: .8rem; padding: 1.4rem 1.2rem 1.7rem; }
.msg { max-width: 82%; padding: .7rem .9rem .4rem; border-radius: 14px; font-size: .95rem; line-height: 1.5; box-shadow: 0 1px 1px rgba(0,0,0,.08); color: #111b21; }
.msg p { margin: 0; }
.msg-out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 4px; }
.msg-in { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.msg-time { display: block; text-align: right; font-size: .72rem; color: #5b6b74; margin-top: .15rem; }

/* Testimonios */
.grid-3 { display: grid; gap: var(--gutter); grid-template-columns: 1fr; }
.card {
  background: var(--paper); border: 1px solid var(--pearl-2); border-radius: var(--r); padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--shadow-sm);
}
.testi { position: relative; display: flex; flex-direction: column; }
.testi .tag { position: absolute; top: 1.2rem; right: 1.2rem; }
.testi-quote { width: 1.9rem; height: 1.9rem; color: var(--teal); margin-bottom: 1rem; }
.testi blockquote { margin: 0 0 1.75rem; font-family: var(--font-display); font-size: clamp(1.32rem, 1.7vw, 1.55rem); font-weight: 380; line-height: 1.38; color: var(--ink); flex: 1; }
.testi-head { display: flex; align-items: center; gap: .75rem; padding-top: 1.1rem; border-top: 1px solid var(--pearl-2); }
.avatar {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 700; font-size: .85rem; letter-spacing: .03em; color: var(--teal-deep); background: var(--teal-soft);
}
.testi-name { font-weight: 700; margin: 0; line-height: 1.3; }
.testi-meta { margin: 0; color: var(--ink-2); font-size: .86rem; }
.stars { margin: 0 0 0 auto; color: var(--teal-deep); letter-spacing: .08em; font-size: .85rem; }

/* FAQ */
.faq details { border-bottom: 1px solid #cdd4d6; }
.faq details:first-child { border-top: 1px solid #cdd4d6; }
.faq summary {
  cursor: pointer; padding: 1.35rem 3.25rem 1.35rem 0; font-weight: 700; font-size: 1.1rem; position: relative;
  list-style: none; min-height: 44px; transition: color .2s;
}
.faq summary:hover { color: var(--primary); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .25rem; top: 50%; width: 2rem; height: 2rem; margin-top: -1rem;
  border-radius: 50%; background: var(--paper) no-repeat center/1rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e2a47' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 1px var(--pearl-2);
  transition: transform .4s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 3.25rem 1.35rem 0; margin: 0; color: var(--ink-2); }
html.motion .faq details[open] p { animation: rise .45s var(--ease-out); }

/* ==========================  Cierre (pie de una pantalla)  ========================== */
.closing {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: calc(var(--h, 1) * var(--screen));
  padding: calc(var(--top) + 1rem) 0 1.5rem;
  color: #c3d0dc; font-size: .95rem;
  background:
    radial-gradient(42rem 22rem at 50% 0%, color-mix(in srgb, var(--primary) 45%, transparent), transparent 70%),
    var(--deep);
}
.closing-wrap { display: grid; gap: clamp(2rem, 3.5vw, 2.25rem); }
.cta-panel { text-align: start; }
.cta-panel h2 { color: #fff; }
.cta-panel p { max-width: 32rem; margin: 0 0 1.5rem; font-size: 1.12rem; color: #d9e3ec; }
.cta-panel .hero-ctas { margin: 0; }
.footer-legal { display: grid; gap: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14); }
.footer-brand { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; font-size: 1.05rem; margin: 0 0 .25rem; }
.footer-brand .i { color: var(--teal-soft); }
.footer-sub { margin: 0 0 1rem; }
.footer-muted { color: #aebfce; }
.closing a { color: #fff; }
.closing .btn-quiet { color: var(--ink); }
.privacy h3 { font-size: 1.05rem; color: #fff; margin-bottom: .6rem; }
.privacy p { max-width: 44rem; }
.privacy p:last-child, .footer-brand-col p:last-child { margin-bottom: 0; }
.privacy strong { color: #fff; }

/* WhatsApp flotante con pulso suave */
.actionbar {
  position: fixed; inset: auto 0 0; z-index: 40; display: flex; gap: .6rem; align-items: center;
  padding: .65rem var(--pad-x) calc(.65rem + env(safe-area-inset-bottom));
  background: rgba(251, 250, 247, .97); box-shadow: 0 -1px 0 rgba(14, 42, 71, .08), 0 -10px 30px -18px rgba(14, 42, 71, .3);
}
.actionbar-quiz { flex: 1; }
body { padding-bottom: 4.6rem; }
.wa-float {
  position: relative; flex: none; width: 3.25rem; height: 3.25rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff;
  box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--primary) 80%, transparent), 0 0 0 4px rgba(255,255,255,.92);
  transition: transform .35s var(--ease-out);
}
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: -1; background: var(--primary); opacity: 0; }
html.motion .wa-float::before { animation: pulse 2.8s var(--ease) 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .35; } 70%, 100% { transform: scale(1.7); opacity: 0; } }
.wa-float:hover { transform: translateY(-3px) scale(1.05); }
.wa-float:active { transform: scale(.95); }
.wa-float svg { width: 1.9rem; height: 1.9rem; }

/* ==========================  Precalificador  ========================== */
.quiz {
  width: min(36rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem);
  border: 1px solid var(--glass-line); border-radius: var(--r-lg); padding: 0; color: var(--ink);
  background: rgba(255,255,255,.92);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 50px 100px -30px rgba(14, 42, 71, .55);
}
html.motion .quiz[open] { animation: pop-in .45s var(--ease-out); }
.quiz::backdrop { background: rgba(14, 42, 71, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.quiz form { padding: 1.5rem; overflow: hidden; }
.quiz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.1rem; }
.quiz-kicker { margin: 0 0 .35rem; font-size: .88rem; font-weight: 700; color: var(--teal-deep); }
.quiz-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.95rem; line-height: 1.05; letter-spacing: -.015em; margin: 0; }
.quiz-close {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--pearl); border: 0; color: var(--ink); cursor: pointer; transition: background-color .2s, transform .35s var(--ease-out);
}
.quiz-close:hover { background: var(--pearl-2); transform: rotate(90deg); }
.quiz-close svg { width: 1.1rem; height: 1.1rem; }
.progress { height: 8px; background: var(--pearl); border-radius: 999px; overflow: hidden; }
.progress-bar {
  position: relative; height: 100%; width: 25%; border-radius: inherit; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 75%, #fff), var(--primary));
  transition: width .6s var(--ease-out);
}
.progress-bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
  transform: translateX(-100%);
}
html.motion .progress-bar::after { animation: shimmer 2.4s var(--ease) infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
.progress-text { font-size: .88rem; font-weight: 700; color: var(--ink-2); margin: .55rem 0 1.25rem; }
.step { border: 0; padding: 0; margin: 0; min-width: 0; }
html.motion #quiz-form[data-dir="fwd"] .step:not([hidden]) { animation: step-fwd .45s var(--ease-out); }
html.motion #quiz-form[data-dir="back"] .step:not([hidden]) { animation: step-back .45s var(--ease-out); }
@keyframes step-fwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes step-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.step legend { font-weight: 700; font-size: 1.18rem; letter-spacing: -.015em; margin-bottom: .95rem; padding: 0; }
.sublabel, .field-label { font-weight: 700; margin: 1.05rem 0 .45rem; display: block; font-size: .92rem; color: var(--ink-2); }
.options { display: grid; gap: .55rem; }
.options-2 { grid-template-columns: 1fr 1fr; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: flex; align-items: center; gap: .7rem; min-height: 54px; padding: .75rem 1rem;
  border: 1.5px solid var(--pearl-2); border-radius: var(--r-sm); font-weight: 600; background: var(--paper);
  transition: border-color .2s, background-color .2s, box-shadow .25s, transform .25s var(--ease-out);
}
.opt span::before {
  content: ""; flex: none; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  border: 1.5px solid #b9c3c8; background: var(--paper) no-repeat center/.72rem;
  transition: background-color .2s, border-color .2s, transform .25s var(--ease-out);
}
.opt:hover span { border-color: color-mix(in srgb, var(--primary) 45%, var(--pearl-2)); transform: translateY(-1px); }
.opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.opt input:checked + span::before {
  border-color: var(--primary); background-color: var(--primary); transform: scale(1.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.opt input:active + span { transform: scale(.985); }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.input {
  width: 100%; min-height: 54px; padding: .75rem 1rem; border: 1.5px solid var(--pearl-2); border-radius: var(--r-sm);
  font: inherit; background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.input:hover { border-color: #b9c3c8; }
.input:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--error); }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.75rem; }
.select-wrap .i { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.consent { display: flex; gap: .65rem; align-items: flex-start; margin-top: 1.15rem; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.consent input { width: 1.3rem; height: 1.3rem; margin-top: .15rem; flex: none; accent-color: var(--primary); }
.error { color: var(--error); font-weight: 600; font-size: .9rem; min-height: 1.2em; margin: .65rem 0 0; }
.quiz-nav { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--pearl-2); }
.quiz-nav .btn { flex: 1; }
.step-done { text-align: center; padding: 1rem 0 0; }
.step-done h3 { font-family: var(--font-display); font-weight: 400; font-size: 2.1rem; }
.step-done p { color: var(--ink-2); }
.step-done .btn { width: 100%; margin-bottom: .5rem; }
.done-icon {
  width: 4.25rem; height: 4.25rem; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; margin: 0 auto 1.2rem;
  box-shadow: 0 0 0 9px var(--primary-soft);
}
html.motion .done-icon { animation: pop-in .6s var(--ease-out); }
.done-icon svg { width: 2rem; height: 2rem; }
@keyframes pop-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================  Celular: secciones de dos pantallas cuando el contenido lo pide  ========================== */
@media (max-width: 639px) {
  .h2-phone, .closing { --h: 2; }
  .hero-ctas .btn { flex-basis: 100%; }
  .hero { padding-bottom: 5.5rem; }
}
/* En celular la barra inferior ya trae el botón del quiz: la cabecera queda solo con la marca */
@media (max-width: 719px) { .header-inner > .btn { display: none; } }

/* ==========================  Tablet  ========================== */
@media (min-width: 720px) {
  :root { --banner-h: 2.2rem; }
  .hero-ctas .btn { flex: 0 1 auto; }
  .actionbar { inset: auto 1.5rem 1.5rem auto; padding: 0; background: none; box-shadow: none; }
  .actionbar-quiz { display: none; }
  body { padding-bottom: 0; }
  .wa-float { width: 3.75rem; height: 3.75rem; }
  .brand-name { font-size: 1rem; }
  .footer-legal { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
  .footer-brand-col { grid-column: 1 / span 5; }
  .privacy { grid-column: 7 / span 6; }
}

/* ==========================  Escritorio: splits de 12 columnas, parten en la columna 7  ========================== */
@media (min-width: 1024px) {
  .hero-grid, .split { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 0; }
  .hero-copy, .split-text { grid-column: 1 / span 6; }
  .hero-start, .split > :last-child { grid-column: 7 / span 6; }
  .hero-start { display: block; }
  .hero-3d {
    display: block; position: absolute; z-index: -1; pointer-events: none;
    top: calc(50% + var(--top) / 2); right: calc(max(var(--pad-x), (100vw - 1280px) / 2) + 314px - 380px);
    width: 760px; aspect-ratio: 1; transform: translateY(-50%);
    opacity: 0; transition: opacity 1.6s var(--ease);
  }
  .hero-3d.is-ready { opacity: 1; }
  .hero-3d::before {
    /* Respaldo fijo si el shader no compila: una perla suave en el mismo lugar (con WebGL queda como halo) */
    content: ""; position: absolute; inset: 22%; border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #fff 0%, rgba(213,238,236,.85) 38%, rgba(31,156,152,.28) 70%, rgba(31,156,152,0) 100%);
    filter: blur(2px);
  }
  .hero-3d canvas { width: 100% !important; height: 100% !important; display: block; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
