/* =====================================================================
   Exploremos: página de presentación pública ("/" sin sesión)
   Independiente de app.css (sin Bootstrap), con los tokens oscuros de "Noche clara"
   (docs/DISENO.md, app.css § 1). La protagonista es la propia interfaz de la app.
   Movimiento: un solo sistema (tokens --dur/--ease de la app), solo transform y opacity.
     · Hero: la pantalla de Inicio se arma (landing.js) y la luz sigue al puntero.
     · Recorrido: teléfono fijo cuyo contenido cambia por paso (landing.js, IntersectionObserver).
     · Entradas y riel de progreso: animation-timeline: view() con respaldo por IO.
   Sin JS o con movimiento reducido: estado final.
   ===================================================================== */

/* 1. Tokens (= [data-bs-theme="dark"] de app.css) --------------------- */
:root {
  --brand: #059669;
  --exp-primary: var(--brand);
  --ground: #0B0C0E;
  --surface: #131518;
  --raised: #1C1F23;
  --overlay: #181B1F;
  --border: #23272C;
  --rule: #1E2125;
  --control: #383D45;
  --text: #F3F4F6;
  --muted: #A6ACB5;   /* 8:1 sobre surface */
  --faint: #828993;   /* 5.1:1 sobre surface */
  --accent: color-mix(in srgb, var(--brand) 58%, #A7F3D0);
  --on-accent: #052419;
  --positive: #52D69B;
  --negative: #FF7B7F;
  --warning: #F2B84B;
  --info: #7DB4FF;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 16%, transparent);
  --positive-soft: color-mix(in srgb, var(--positive) 14%, transparent);
  --negative-soft: color-mix(in srgb, var(--negative) 13%, transparent);
  --warning-soft: color-mix(in srgb, var(--warning) 14%, transparent);
  --ring: color-mix(in srgb, var(--accent) 75%, transparent);
  --shadow-3: 0 28px 72px rgba(0, 0, 0, .65), 0 0 0 1px #262A30;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Escala tipográfica (12 · 13 · 14 · 16 · 18 · 20 · 28→40 · 38→60) */
  --fs-hero: clamp(2.375rem, 1.55rem + 3.3vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
  --fs-lede: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  --fs-body: 1rem; --fs-sm: .875rem; --fs-xs: .8125rem; --fs-2xs: .75rem;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1);
  --dur-press: 120ms; --dur-hover: 180ms; --dur-ui: 240ms; --dur-enter: 420ms; --dur-draw: 900ms;
  --stagger: 40ms;

  --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --wrap: 1180px;
  --gutter: 16px;
  --top-h: 64px;
  /* Teléfono */
  --pw: min(316px, calc(100vw - 2 * var(--gutter)));
  --ph: 640px;
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* 2. Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font-family: var(--font); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 700; line-height: 1.12; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.bi { line-height: 1; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-md); background: var(--text); color: var(--ground); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Botones (mismo lenguaje que .btn-primary / .btn-light de la app) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-md); border: 1px solid transparent; background: var(--accent); color: var(--on-accent);
  font: 600 var(--fs-body)/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; touch-action: manipulation;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}
.btn:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.btn:active { transform: scale(.97); }
.btn .bi { font-size: .95em; transition: transform var(--dur-ui) var(--ease-out); }
.btn:hover .bi-arrow-right { transform: translateX(3px); }
.btn-lg { min-height: 52px; padding: 0 22px; border-radius: 14px; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: var(--fs-sm); }
.btn-quiet { background: var(--raised); color: var(--text); border-color: var(--border); box-shadow: none; }
.btn-quiet:hover { background: color-mix(in srgb, var(--raised) 84%, var(--text)); }
.btn-quiet[aria-pressed="true"] { background: var(--text); color: var(--ground); }

/* 3. Encabezado -------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 40; height: var(--top-h); border-bottom: 1px solid transparent;
  transition: background-color var(--dur-ui) ease, border-color var(--dur-ui) ease; }
.top.is-scrolled { background: color-mix(in srgb, var(--ground) 86%, transparent); border-color: var(--rule);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); }
.top-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 1.0625rem; letter-spacing: -.02em; text-decoration: none; }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); color: var(--muted);
  font-size: var(--fs-sm); font-weight: 600; text-decoration: none; transition: color var(--dur-hover) ease, background-color var(--dur-hover) ease; }
.top-link:hover { color: var(--text); background: var(--raised); }
.top-nav .btn { margin-left: 6px; }
@media (max-width: 767.98px) { .hide-sm { display: none; } }
@media (max-width: 389.98px) { .brand-name { display: none; } .top-link { padding: 0 10px; } }

/* 4. Hero -------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; padding: 28px 0 72px; }
.hero::before { /* el mismo brillo del .hero-panel de la app, detrás del teléfono */
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(48% 42% at 76% 46%, var(--accent-glow), transparent 70%),
              radial-gradient(30% 30% at 92% 80%, color-mix(in srgb, var(--info) 7%, transparent), transparent 70%);
}
.hero-in { display: grid; gap: 48px; align-items: center; }
.hero-copy { max-width: 36rem; }
.hero h1 { font-size: var(--fs-hero); letter-spacing: -.04em; line-height: 1.04; }
.lede { margin-top: 20px; font-size: var(--fs-lede); color: var(--muted); max-width: 34rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; color: var(--muted); font-size: var(--fs-sm); }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .bi { color: var(--accent); }
.hero-device { justify-self: center; perspective: 1400px; }
@media (min-width: 960px) {
  .hero { padding: 48px 0 96px; }
  .hero-in { grid-template-columns: minmax(0, 1fr) auto; gap: 64px; }
}
@media (max-width: 959.98px) { .cta-row .btn { flex: 1 1 auto; } }

/* 5. Teléfono y piezas de la app -------------------------------------- */
.phone {
  position: relative; width: var(--pw); height: var(--ph); padding: 9px; border-radius: 46px;
  background: linear-gradient(160deg, #2A2E34, #15171A 40%, #0E1012); box-shadow: var(--shadow-3), inset 0 0 0 1px rgba(255, 255, 255, .06);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform 600ms var(--ease-out);
}
.phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 38px; background: var(--ground); }
.phone-light { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--lo, 0); transition: opacity 400ms ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .07), transparent 60%); mix-blend-mode: screen; }
.p-status { display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 0 26px; font-size: var(--fs-2xs); font-weight: 600; color: var(--text); }
.p-status span:last-child { display: inline-flex; gap: 5px; font-size: .8rem; }
.p-top { display: flex; justify-content: space-between; align-items: center; padding: 4px 16px 10px; }
.p-scope { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--raised); font-size: var(--fs-xs); font-weight: 600; }
.p-scope .bi { font-size: .65rem; color: var(--muted); }
.p-icons { display: inline-flex; align-items: center; gap: 14px; color: var(--muted); font-size: 1rem; }
.p-bell { position: relative; }
.p-bell::after { content: ""; position: absolute; top: -1px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--negative); box-shadow: 0 0 0 2px var(--ground); }
.p-avatar, .s-av, .s-avs span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 24%, var(--raised)); color: var(--text); font-size: .625rem; font-weight: 700; }
.p-body { padding: 0 14px; }
.p-hero { padding: 16px 16px 14px; border-radius: var(--r-xl); border: 1px solid var(--border);
  background: radial-gradient(120% 90% at 0% 0%, var(--accent-glow), transparent 60%), radial-gradient(80% 70% at 100% 100%, color-mix(in srgb, var(--info) 7%, transparent), transparent 70%), var(--surface); }
.p-label, .s-total small { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
.p-figure { margin: 2px 0 10px; font-size: 2.125rem; font-weight: 700; letter-spacing: -.045em; line-height: 1.04; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Odómetro (landing.js): una columna 0–9 por dígito, se desliza con transform */
.odo { display: inline-flex; }
.odo-s { white-space: pre; }
.odo-d { display: inline-block; height: 1.04em; overflow: hidden; }
.odo-c { display: block; transition: transform 760ms var(--ease-expo); }
.odo-c > span { display: block; height: 1.04em; line-height: 1.04; }
.p-meter, .bar { position: relative; display: block; height: 6px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.p-meter > span, .bar > span { position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform var(--dur-draw) var(--ease-expo); }
.bar.is-warn > span { background: var(--warning); }
.bar.is-neg > span { background: var(--negative); }
.p-sub { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: var(--fs-2xs); color: var(--muted); }
.p-sub b { color: var(--text); font-weight: 600; }
.p-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.p-split > div { min-width: 0; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--raised) 80%, transparent); }
.p-split small { display: flex; align-items: center; gap: 3px; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.3; }
.p-split strong { display: block; font-size: .9375rem; letter-spacing: -.02em; }
.is-in { color: var(--positive); }
.is-neg { color: var(--negative); }
.p-day { display: flex; justify-content: space-between; padding: 14px 2px 2px; font-size: var(--fs-2xs); font-weight: 600; color: var(--muted); }

/* Fila de movimiento (= .tx-item de la app) */
.tx { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.tx:last-child { border-bottom: 0; }
.tx-ic { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; font-size: .95rem;
  background: color-mix(in srgb, var(--cat, var(--muted)) 17%, var(--surface)); color: color-mix(in srgb, var(--cat, var(--muted)) 70%, white); }
.tx-main { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.tx-main b, .tx-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-main b { font-size: var(--fs-sm); font-weight: 600; }
.tx-main small, .tx-end small { font-size: var(--fs-2xs); color: var(--muted); }
.tx-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.tx-amt { font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.015em; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--r-pill); font-size: .6875rem; font-weight: 600; line-height: 1.6; background: var(--raised); color: var(--muted); white-space: nowrap; }
.pill.is-pos { background: var(--positive-soft); color: var(--positive); }
.pill.is-neg { background: var(--negative-soft); color: var(--negative); }
.pill.is-warn { background: var(--warning-soft); color: var(--warning); }
.pill .bi { font-size: .65rem; }

/* Notificación dentro del teléfono */
.p-toast { position: absolute; left: 10px; right: 10px; top: 44px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px;
  background: color-mix(in srgb, var(--overlay) 92%, transparent); border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); line-height: 1.3; }
.p-toast b { display: block; font-size: var(--fs-xs); }
.p-toast small { display: block; font-size: var(--fs-2xs); color: var(--muted); }
.p-toast-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; background: var(--warning-soft); color: var(--warning); }

/* Barra inferior (= .bottom-nav de la app) */
.p-nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: 68px; padding: 0 6px 8px;
  background: color-mix(in srgb, var(--ground) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--rule); }
.p-link { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .625rem; font-weight: 600; color: var(--muted); letter-spacing: -.01em; transition: color var(--dur-ui) ease; }
.p-link .bi { font-size: 1.1rem; transition: color var(--dur-ui) ease; }
.p-link.is-on { color: var(--text); }
.p-link.is-on .bi { color: var(--accent); }
.p-nav-pill { position: absolute; top: 9px; left: 6px; width: calc((100% - 12px) / 5); height: 26px; display: flex; justify-content: center; pointer-events: none;
  transform: translateX(calc(var(--tab, 0) * 100%)); transition: transform 420ms var(--ease-spring), opacity var(--dur-ui) ease; }
.p-nav-pill::before { content: ""; width: 48px; border-radius: 99px; background: var(--accent-soft); }
.p-nav[data-tab="0"] { --tab: 0; } .p-nav[data-tab="1"] { --tab: 1; } .p-nav[data-tab="3"] { --tab: 3; } .p-nav[data-tab="4"] { --tab: 4; }
.p-nav[data-tab="2"] .p-nav-pill { opacity: 0; --tab: 2; }
.p-add { justify-self: center; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: var(--accent); color: var(--on-accent); font-size: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent); transition: transform 320ms var(--ease-spring); }
.p-add .bi { transition: transform 320ms var(--ease-spring); }
.p-nav[data-tab="2"] .p-add .bi { transform: rotate(45deg); }

/* 6. Secciones: encabezado común ------------------------------------- */
.sec-head { max-width: 40rem; }
.sec-head h2 { font-size: var(--fs-h2); letter-spacing: -.035em; }
.sec-head p { margin-top: 12px; color: var(--muted); font-size: var(--fs-lede); }

/* 7. Recorrido --------------------------------------------------------- */
.tour { padding: 72px 0; border-top: 1px solid var(--rule); }
.tour-grid { margin-top: 40px; display: grid; gap: 56px; }
.tour-shell, .tour-rail { display: none; }
.step { display: grid; gap: 20px; }
.step-copy h3 { font-size: var(--fs-h3); letter-spacing: -.025em; }
.step-copy p { margin-top: 10px; color: var(--muted); max-width: 30rem; }
.step-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.step-facts li { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--raised); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.btn-try { margin-top: 18px; align-self: flex-start; }

/* Pantalla (hoja en celular, contenido del teléfono en escritorio) */
.screen { width: 100%; max-width: 420px; padding: 6px 16px 18px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); }
.s-head { display: grid; grid-template-columns: 24px 1fr 24px; align-items: center; height: 48px; font-size: var(--fs-sm); color: var(--muted); }
.s-head b { color: var(--text); text-align: center; font-weight: 600; }
.s-head.is-scope { display: flex; justify-content: space-between; }
.s-avs { display: flex; }
.s-avs span { width: 26px; height: 26px; box-shadow: 0 0 0 2px var(--surface); }
.s-avs span + span { margin-left: -7px; }
.s-avs span:nth-child(2) { background: color-mix(in srgb, var(--info) 30%, var(--raised)); }
.s-avs span:nth-child(3) { background: color-mix(in srgb, #F472B6 30%, var(--raised)); }
.s-eye { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.s-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 12px; background: var(--raised); font-size: var(--fs-xs); font-weight: 600; text-align: center; color: var(--muted); }
.s-seg span { padding: 6px 0; border-radius: 9px; }
.s-seg .is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.s-amount { margin: 18px 0 14px; text-align: center; }
.s-amount small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.s-amount-v { display: block; font-size: 2.5rem; font-weight: 700; letter-spacing: -.045em; line-height: 1.1; color: var(--negative); }
.s-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.s-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--raised); font-size: var(--fs-xs); font-weight: 600; }
.s-chip .bi { color: var(--muted); }
.s-chip.is-on { background: var(--text); color: var(--surface); }
.s-chip.is-on .bi { color: inherit; }
.s-fields { margin-top: 16px; border-radius: var(--r-lg); background: var(--raised); }
.s-fields div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: var(--fs-sm); border-bottom: 1px solid color-mix(in srgb, var(--ground) 50%, transparent); }
.s-fields div:last-child { border-bottom: 0; }
.s-fields dt { color: var(--muted); }
.s-fields dd { font-weight: 600; text-align: right; }
.s-faint { color: var(--faint); font-weight: 500; }
.s-btn { display: grid; place-items: center; height: 46px; margin-top: 16px; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: var(--fs-sm); }
.s-total { padding: 8px 0 12px; }
.s-total small { display: block; }
.s-total strong { display: block; font-size: 1.875rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.15; }
.s-total.is-big strong { font-size: 2.125rem; }
.s-total > span { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); }
.screen > .bar { margin-bottom: 6px; }
.s-list { margin-top: 4px; }
.s-bud { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.s-bud:last-child { border-bottom: 0; }
.s-bud-main { flex: 1; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.s-bud-top { display: flex; justify-content: space-between; gap: 8px; width: 100%; font-size: var(--fs-sm); }
.s-bud-top b { font-weight: 600; }
.s-bud-top > span { font-size: var(--fs-xs); font-weight: 600; }
.s-bud .bar { width: 100%; }
.s-cap { font-size: var(--fs-2xs); color: var(--faint); }
.s-av { width: 36px; height: 36px; border-radius: 12px; font-size: var(--fs-2xs); flex-shrink: 0; }
.s-balances { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.s-balances div { padding: 10px 12px; border-radius: 14px; background: var(--raised); }
.s-balances small { display: block; font-size: var(--fs-2xs); color: var(--muted); }
.s-balances strong { font-size: var(--fs-sm); }

/* Modo privado (= .is-private [data-amt] de la app) */
.screen.is-private [data-amt], html.is-private [data-amt] { filter: blur(max(6px, .42em)); user-select: none; -webkit-user-select: none; }
[data-amt] { transition: filter var(--dur-ui) ease; }

/* Escritorio con JS: teléfono fijo, pantallas superpuestas que cambian por paso */
@media (min-width: 960px) {
  .tour { padding: 112px 0 72px; }
  .js .tour-grid { --top: max(calc(var(--top-h) + 16px), calc(50vh - var(--ph) / 2 + 24px));
    grid-template-columns: 28px minmax(0, 1fr) var(--pw); column-gap: 32px; row-gap: 0; margin-top: 8px; }
  .js .step { display: contents; }
  .js .step-copy { grid-column: 2; grid-row: var(--row); min-height: 86vh; display: flex; flex-direction: column; justify-content: center; max-width: 30rem;
    transition: opacity var(--dur-enter) var(--ease-out); opacity: .42; }
  .js .step.is-active .step-copy { opacity: 1; }
  .js .step-copy h3 { font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.125rem); letter-spacing: -.03em; }
  .js .step-copy p { font-size: var(--fs-lede); }
  .js .tour-shell, .js .screen { grid-column: 3; grid-row: 1 / span 5; position: sticky; top: var(--top); align-self: start; }
  .js .tour-shell { display: block; }
  .js .tour-shell .phone { --ph: min(640px, calc(100vh - var(--top-h) - 48px)); }
  .js .screen { --ph: min(640px, calc(100vh - var(--top-h) - 48px)); z-index: 1; width: var(--pw); max-width: none; height: var(--ph); overflow: hidden;
    padding: 50px 23px 80px; border: 0; border-radius: 46px; background: none; pointer-events: none;
    opacity: 0; transform: translateY(18px) scale(.985); transition: opacity 360ms var(--ease-out), transform 520ms var(--ease-out); }
  .js .step.is-past .screen { transform: translateY(-18px) scale(.985); }
  .js .step.is-active .screen { opacity: 1; transform: none; transition-delay: 80ms; }
  .js .screen .r { opacity: 0; transform: translateY(10px); transition: opacity 320ms var(--ease-out), transform 480ms var(--ease-out); }
  .js .step.is-active .screen .r { opacity: 1; transform: none; transition-delay: calc(140ms + var(--i, 0) * var(--stagger) * 1.5); }
  .js .screen .bar > span { transform: scaleX(0); }
  .js .step.is-active .screen .bar > span { transform: scaleX(var(--p, 0)); transition-delay: 320ms; }
  .js .tour-shell .phone-screen { background: var(--surface); }
  .js .tour-shell .p-nav { background: color-mix(in srgb, var(--surface) 88%, transparent); }
  .tour-rail { grid-column: 1; grid-row: 1 / span 5; position: relative; justify-self: center; width: 2px; border-radius: 2px; background: var(--rule); }
  .js .tour-rail { display: block; }
  .tour-rail span { position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform-origin: top; transform: scaleY(var(--rail, 0)); }
}

/* 8. Menú: lo demás ---------------------------------------------------- */
.menu { padding: 72px 0; border-top: 1px solid var(--rule); }
.menu-in { display: grid; gap: 32px; }
.menu-sheet { display: grid; gap: 8px; padding: 8px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); }
.menu-group { padding: 8px 8px 4px; }
.menu-label { padding: 6px 8px 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--faint); letter-spacing: 0; line-height: 1.4; }
.menu-row { display: flex; align-items: flex-start; gap: 12px; min-height: 56px; padding: 10px 8px; border-radius: var(--r-md); transition: background-color var(--dur-hover) ease; }
.menu-row:hover { background: var(--raised); }
.menu-row b, .settings li b { display: block; font-size: var(--fs-body); font-weight: 600; line-height: 1.35; }
.menu-row b + span, .settings li b + span { display: block; font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; margin-top: 1px; }
.m-ic { --tone: var(--muted); display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 12px; font-size: 1rem;
  background: color-mix(in srgb, var(--tone) 15%, transparent); color: var(--tone); }
.ic-accent { --tone: var(--accent); } .ic-pos { --tone: var(--positive); } .ic-neg { --tone: var(--negative); } .ic-warn { --tone: var(--warning); }
.ic-info { --tone: var(--info); } .ic-violet { --tone: #A78BFA; } .ic-teal { --tone: #2DD4BF; } .ic-pink { --tone: #F472B6; } .ic-mute { --tone: var(--muted); }
@media (min-width: 768px) { .menu-sheet { grid-template-columns: 1fr 1fr; padding: 12px; } }
@media (min-width: 960px) {
  .menu { padding: 112px 0; }
  .menu-in { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 64px; align-items: start; }
  .menu .sec-head { position: sticky; top: calc(var(--top-h) + 32px); }
}

/* 9. Privacidad -------------------------------------------------------- */
.trust { padding: 72px 0; border-top: 1px solid var(--rule); }
.trust-in { display: grid; gap: 32px; align-items: center; }
.trust-copy h2 { font-size: var(--fs-h2); letter-spacing: -.035em; }
.trust-copy p { margin-top: 12px; color: var(--muted); font-size: var(--fs-lede); max-width: 32rem; }
.trust-copy a { color: var(--accent); text-underline-offset: 3px; }
.settings { padding: 8px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--surface); }
.settings-crumb { display: flex; align-items: center; gap: 6px; padding: 8px 10px 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.settings-crumb .bi { font-size: .75rem; }
.settings li { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px; border-top: 1px solid var(--rule); }
.settings li > span:nth-child(2) { flex: 1; min-width: 0; }
.settings li.is-danger b { color: var(--negative); }
.settings .chev { color: var(--faint); }
.switch { position: relative; flex-shrink: 0; width: 40px; height: 24px; border-radius: 99px; background: var(--control); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform var(--dur-ui) var(--ease-spring); }
.switch.is-on { background: var(--accent); }
.switch.is-on::after { transform: translateX(16px); background: var(--on-accent); }
html.is-private .settings li:nth-child(2) .switch { background: var(--accent); }
html.is-private .settings li:nth-child(2) .switch::after { transform: translateX(16px); background: var(--on-accent); }
@media (min-width: 960px) {
  .trust { padding: 112px 0; }
  .trust-in { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 64px; }
}

/* 10. Preguntas -------------------------------------------------------- */
.faq { padding: 72px 0; border-top: 1px solid var(--rule); }
.faq-in { display: grid; gap: 32px; }
.faq-list { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.0625rem; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .bi { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--raised); color: var(--muted); font-size: .8rem;
  transition: transform var(--dur-ui) var(--ease-out), background-color var(--dur-hover) ease; }
.faq summary:hover .bi { background: color-mix(in srgb, var(--raised) 80%, var(--text)); color: var(--text); }
.faq details[open] summary .bi { transform: rotate(180deg); }
.faq details p { padding: 0 48px 20px 0; color: var(--muted); max-width: 44rem; }
@media (min-width: 960px) {
  .faq { padding: 112px 0; }
  .faq-in { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 64px; align-items: start; }
  .faq .sec-head { position: sticky; top: calc(var(--top-h) + 32px); }
}

/* 11. Cierre ----------------------------------------------------------- */
.closing { padding: 0 0 96px; }
.closing-in { display: grid; gap: 20px; justify-items: start; padding: 28px 24px; border-radius: var(--r-xl); border: 1px solid var(--border);
  background: radial-gradient(90% 120% at 0% 0%, var(--accent-glow), transparent 60%), var(--surface); }
.closing-add { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--accent); color: var(--on-accent); font-size: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.closing h2 { font-size: var(--fs-h2); letter-spacing: -.035em; }
.closing p { margin-top: 8px; color: var(--muted); }
@media (min-width: 768px) {
  .closing-in { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 36px 40px; }
}

/* 12. Pie -------------------------------------------------------------- */
.foot { border-top: 1px solid var(--rule); padding: 40px 0 calc(32px + env(safe-area-inset-bottom)); color: var(--muted); font-size: var(--fs-sm); }
.foot-in { display: grid; gap: 24px; }
.foot-brand .brand { color: var(--text); }
.foot-brand p { margin-top: 4px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -10px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm); text-decoration: none; }
.foot-links a:hover { color: var(--text); background: var(--raised); }
.foot-copy { color: var(--faint); font-size: var(--fs-xs); }
@media (min-width: 768px) {
  .foot-in { grid-template-columns: 1fr auto; align-items: center; }
  .foot-copy { grid-column: 1 / -1; }
}

/* 13. Movimiento ------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: la pantalla se arma (landing.js añade .is-shown fila por fila).
     Seguro: si el JS no llega, a los 4 s todo queda en su estado final. */
  .js-motion [data-assemble] .tx { opacity: 0; transform: translateY(-10px) scale(.98); animation: lp-safe 0s 4s forwards;
    transition: opacity 360ms var(--ease-out), transform 520ms var(--ease-spring); }
  .js-motion [data-assemble] .tx.is-shown { opacity: 1; transform: none; }
  .js-motion [data-assemble].is-running .tx { animation: none; }
  .js-motion .p-toast { opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity 320ms var(--ease-out), transform 560ms var(--ease-spring); }
  .js-motion .p-toast.is-in { opacity: 1; transform: none; }
  .js-motion .hero-copy > * { animation: lp-rise var(--dur-enter) var(--ease-out) both; animation-delay: calc(var(--d, 0) * 70ms); }
  .js-motion .hero-copy > :nth-child(2) { --d: 1; } .js-motion .hero-copy > :nth-child(3) { --d: 2; } .js-motion .hero-copy > :nth-child(4) { --d: 3; }
  .js-motion .hero-device { animation: lp-rise 700ms var(--ease-out) 120ms both; }

  /* Entradas ligadas al scroll (CSS puro). Sin soporte: IntersectionObserver añade .is-in */
  @supports (animation-timeline: view()) {
    .rv { animation: lp-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .menu-row { animation: lp-rise linear both; animation-timeline: view(); animation-range: entry 10% entry 90%; }
    .hero-device .phone-screen > .p-body { animation: lp-drift linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    .tour-rail span { animation: lp-fill linear both; animation-timeline: view(); animation-range: contain 0% contain 100%; }
  }
  @supports not (animation-timeline: view()) {
    .js-motion .rv { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); }
    .js-motion .rv.is-in { opacity: 1; transform: none; }
  }
  @media (hover: hover) and (min-width: 960px) {
    .hero-device:hover .phone { --lo: 1; }
  }
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lp-drift { to { transform: translateY(-36px); } }
@keyframes lp-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lp-safe { to { opacity: 1; transform: none; } }

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