@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  /* Marca */
  --blue: #367BF6;
  --blue-600: #2563E0;
  --blue-700: #1B4FC2;
  --blue-300: #8DB6FF;
  --sky: #EAF2FF;
  --sky-2: #D7E6FF;
  --ice: #F6F9FF;
  --ink: #0A1F4A;
  --ink-2: #3B4B6E;
  --ink-3: #5E6C8A;
  --line: #DCE5F5;
  --white: #FFFFFF;
  /* Solo para el dinero ahorrado */
  --butter: #FFD45C;
  --butter-ink: #5A4300;
  /* Estados de la app */
  --green: #0B7A51;
  --green-bg: #DDF6EC;
  --amber-bg: #FFF1C9;
  --amber-ink: #7A5600;

  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(104px, 13vw, 184px);
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: clamp(24px, 3vw, 40px);
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(10, 31, 74, .06), 0 6px 18px -6px rgba(10, 31, 74, .14);
  --shadow-2: 0 2px 4px rgba(10, 31, 74, .06), 0 24px 48px -16px rgba(10, 31, 74, .28);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  scrollbar-color: var(--blue-300) var(--ice);
  caret-color: var(--blue);
}
::selection { background: var(--blue); color: var(--white); }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .2em; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; }
.skip:focus { top: 16px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  border-radius: var(--r-pill); border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease-out), background-color .2s, box-shadow .25s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn--sm { padding: .6em 1.1em; font-size: .9375rem; }
.btn--lg { padding: 1em 1.6em; font-size: 1.0625rem; }
.btn--lg .ico { width: 1.4em; height: 1.4em; }
.btn--primary { background: var(--blue-600); color: var(--white); box-shadow: 0 8px 20px -8px rgba(37, 99, 224, .7); }
.btn--primary:hover { background: var(--blue-700); transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(37, 99, 224, .75); }
.btn--light { background: var(--white); color: var(--blue-700); box-shadow: 0 10px 30px -10px rgba(10, 31, 74, .45); }
.btn--light:hover { background: var(--sky); transform: translateY(-2px); }

.link-call { display: inline-flex; align-items: center; gap: .5em; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.link-call strong { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--blue-300); text-decoration-thickness: 2px; }
.link-call:hover strong { text-decoration-color: var(--blue); }
.link-call .ico { color: var(--blue); }
.link-call--light, .link-call--light strong { color: var(--white); }
.link-call--light .ico { color: var(--white); }
.link-call--light strong { text-decoration-color: rgba(255, 255, 255, .5); }
.link-call--light:hover strong { text-decoration-color: var(--white); }

/* ---------- Navegación ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); transition: box-shadow .3s; }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 34px; height: 34px; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.035em; line-height: 1; }
.nav__inner > .btn { margin-left: auto; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 96px); }
.hero__copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 1.2rem + 6.4vw, 6rem);
  line-height: .98;
  letter-spacing: -.04em;
  max-width: 13ch;
  text-wrap: balance;
}
.hero__lead { margin-top: clamp(20px, 2.4vw, 28px); max-width: 38rem; font-size: clamp(1.0625rem, .95rem + .45vw, 1.3125rem); color: var(--ink-2); text-wrap: pretty; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 24px; }
.assure { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: .9375rem; color: var(--ink-2); font-weight: 500; }
.assure li { display: inline-flex; align-items: center; gap: 6px; }
.assure .ico { color: var(--green); width: 1.1em; height: 1.1em; }

/* Escenario: muchos recibos que se vuelven una cuota */
.stage { margin-top: clamp(40px, 6vw, 72px); }
.stage__field {
  position: relative;
  height: clamp(560px, 50vw, 620px);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 50% 110%, var(--blue-600) 0%, transparent 60%),
    var(--blue);
  overflow: hidden;
  isolation: isolate;
}
.stage__field::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .22) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%);
}
.receipt {
  position: absolute; left: var(--x); top: var(--y);
  width: clamp(150px, 17vw, 210px);
  display: grid; gap: 2px;
  padding: 14px 16px 14px;
  background: var(--white); color: var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  transform: rotate(var(--r));
  transition:
    left .9s var(--ease-in-out) calc(var(--i) * 70ms),
    top .9s var(--ease-in-out) calc(var(--i) * 70ms),
    transform .9s var(--ease-in-out) calc(var(--i) * 70ms),
    opacity .45s ease calc(var(--i) * 70ms + .5s);
}
.receipt::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -6px; height: 12px;
  background: radial-gradient(circle at 6px 0, transparent 5.5px, var(--white) 6px) 0 0 / 12px 12px repeat-x;
}
.receipt__kind { font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.receipt__amt { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.375rem, 1rem + 1vw, 1.75rem); letter-spacing: -.03em; line-height: 1.1; }
.receipt__amt small { font-family: var(--font-body); font-size: .8125rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.receipt__due { font-size: .75rem; font-weight: 600; color: var(--blue-600); }
.receipt--late .receipt__due { color: #B4262F; }

.stage.is-merged .receipt {
  left: calc(50% - clamp(150px, 17vw, 210px) / 2);
  top: 34%;
  transform: rotate(0deg) scale(.55);
  opacity: 0;
}

/* Teléfono */
.phone {
  position: relative;
  width: 270px;
  padding: 10px;
  border-radius: 44px;
  background: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(5, 17, 45, .65), inset 0 0 0 1.5px rgba(255, 255, 255, .12);
}
.phone__notch { position: absolute; top: 18px; left: 50%; translate: -50% 0; width: 76px; height: 22px; border-radius: 20px; background: var(--ink); z-index: 2; }
.phone__screen { position: relative; border-radius: 34px; background: var(--ice); overflow: hidden; padding: 48px 18px 20px; min-height: 520px; }
.phone--hero { position: absolute; left: 50%; top: 40px; translate: -50% 0; z-index: 3; }

.ps-top { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9375rem; }
.ps-logo { width: 26px; height: 26px; }
.ps-label { font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.ps-before, .ps-after { display: grid; gap: 2px; margin-top: 18px; padding: 18px; border-radius: 22px; background: var(--white); box-shadow: var(--shadow-1); transition: opacity .5s var(--ease-out), transform .6s var(--ease-out), filter .5s; }
.ps-count { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; letter-spacing: -.03em; line-height: 1.1; }
.ps-sum { font-size: .9375rem; font-weight: 600; color: #B4262F; }
.ps-after { position: absolute; left: 18px; right: 18px; top: 86px; margin-top: 0; opacity: 0; transform: translateY(14px) scale(.96); filter: blur(4px); }
.ps-big { font-family: var(--font-display); font-weight: 800; font-size: 3.25rem; letter-spacing: -.045em; line-height: 1; color: var(--blue-600); font-variant-numeric: tabular-nums; }
.ps-sub { font-size: .875rem; color: var(--ink-2); font-weight: 500; }
.ps-save { justify-self: start; margin-top: 10px; padding: 5px 10px; border-radius: var(--r-pill); background: var(--butter); color: var(--butter-ink); font-weight: 700; font-size: .8125rem; transform: scale(.6); opacity: 0; transition: transform .5s var(--ease-out) .9s, opacity .3s .9s; }
.stage.is-merged .ps-before { opacity: 0; transform: scale(.94); filter: blur(4px); }
.stage.is-merged .ps-after { opacity: 1; transform: none; filter: none; transition-delay: .75s; }
.stage.is-merged .ps-save { transform: none; opacity: 1; }

.ps-hucha { margin-top: 64px; padding: 16px 18px; border-radius: 22px; background: var(--white); box-shadow: var(--shadow-1); display: grid; gap: 10px; transition: margin-top .6s var(--ease-out) .6s; }
.stage.is-merged .ps-hucha { margin-top: 112px; }
.ps-hucha__row { display: flex; justify-content: space-between; align-items: baseline; font-size: .875rem; font-weight: 600; }
.ps-hucha__row strong { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ps-muted { color: var(--ink-3); font-weight: 500; font-size: .75rem; }

.bar { height: 8px; border-radius: var(--r-pill); background: var(--sky-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--p); border-radius: inherit; background: var(--blue); }
.bar--lg { height: 12px; margin-top: 14px; }

.stage__cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; font-size: .875rem; color: var(--ink-3); }
.replay { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); color: var(--ink-2); font-size: .875rem; font-weight: 600; cursor: pointer; transition: background-color .2s, border-color .2s; }
.replay:hover { background: var(--sky); border-color: var(--sky-2); }
.replay .ico { width: 1em; height: 1em; transition: transform .5s var(--ease-out); }
.replay:hover .ico { transform: rotate(-200deg); }

/* ---------- Tipos de deuda ---------- */
.kinds { padding-top: clamp(64px, 8vw, 112px); }
.kinds__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 24px; }
.kinds__title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--ink-3); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pills li { padding: 9px 16px; border-radius: var(--r-pill); background: var(--sky); color: var(--ink); font-weight: 600; font-size: .9375rem; }

/* ---------- Secciones ---------- */
.section { padding-top: var(--section); }
.section__head { max-width: 44rem; }
.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.125rem, 1.3rem + 3.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section__lead { margin-top: 18px; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--ink-2); max-width: 36rem; text-wrap: pretty; }

/* Cómo funciona */
.steps { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 40px); counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 28px; right: 28px; top: 27px; height: 2px; background: repeating-linear-gradient(90deg, var(--sky-2) 0 8px, transparent 8px 14px); z-index: -1; }
.step h3 { margin-top: 22px; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.025em; line-height: 1.15; }
.step p { margin-top: 10px; color: var(--ink-2); }
.step__n { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--sky); color: var(--blue-600); font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; border: 4px solid var(--white); }
.step:last-child .step__n { background: var(--blue-600); color: var(--white); }

/* La app */
.app__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.tabs { margin-top: 36px; display: grid; gap: 6px; }
.tab {
  display: grid; gap: 4px; text-align: left; padding: 18px 22px;
  border: 0; border-radius: var(--r-md); background: transparent; cursor: pointer;
  position: relative; transition: background-color .25s;
}
.tab::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.tab__t { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; letter-spacing: -.02em; color: var(--ink-3); transition: color .25s; }
.tab__d { color: var(--ink-3); font-size: 1rem; display: none; }
.tab:hover { background: var(--ice); }
.tab:hover .tab__t { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--sky); }
.tab[aria-selected="true"]::before { background: transparent; }
.tab[aria-selected="true"] .tab__t { color: var(--ink); }
.tab[aria-selected="true"] .tab__d { display: block; color: var(--ink-2); animation: tabIn .45s var(--ease-out); }
@keyframes tabIn { from { opacity: 0; transform: translateY(-4px); } }

.app__stage {
  position: relative; display: grid; place-items: center;
  padding: clamp(40px, 5vw, 64px) 16px;
  border-radius: var(--r-lg);
  background: var(--blue);
  overflow: hidden; isolation: isolate;
}
.app__stage::before {
  content: ""; position: absolute; inset: auto -20% -45% -20%; height: 80%; z-index: -1;
  background: radial-gradient(closest-side, var(--blue-300), transparent);
  opacity: .55;
}
.phone--app .phone__screen { min-height: 540px; }
.panel { animation: panelIn .5s var(--ease-out); }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }
.pn-title { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; letter-spacing: -.02em; }
.pn-big { margin-top: 8px; font-family: var(--font-display); font-weight: 800; font-size: 2.75rem; letter-spacing: -.045em; line-height: 1; color: var(--blue-600); font-variant-numeric: tabular-nums; }
.pn-muted { margin-top: 10px; font-size: .8125rem; color: var(--ink-3); }
.pn-list { margin-top: 18px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow-1); }
.pn-list li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; font-size: .8125rem; font-weight: 500; }
.pn-list li + li { border-top: 1px solid var(--line); }
.pn-list strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pn-list .pos { color: var(--green); }

.pn-debts { margin-top: 14px; display: grid; gap: 8px; }
.pn-debts li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-1); }
.pn-d { display: grid; font-weight: 700; font-size: .875rem; line-height: 1.3; }
.pn-d small { font-weight: 500; color: var(--ink-3); font-size: .75rem; }
.chip { flex: none; padding: 4px 9px; border-radius: var(--r-pill); font-size: .6875rem; font-weight: 700; background: var(--sky); color: var(--ink-2); }
.chip--paid { background: var(--green-bg); color: #0B6B49; }
.chip--agreed { background: var(--butter); color: var(--butter-ink); }
.chip--neg { background: var(--blue-600); color: var(--white); }

.pn-docs { margin-top: 14px; background: var(--white); border-radius: 18px; box-shadow: var(--shadow-1); }
.pn-docs li { display: flex; align-items: center; gap: 10px; padding: 13px 14px; font-size: .8125rem; font-weight: 700; line-height: 1.3; }
.pn-docs li + li { border-top: 1px solid var(--line); }
.pn-docs li > span { flex: 1; display: grid; }
.pn-docs small { font-weight: 500; color: var(--ink-3); font-size: .75rem; }
.pn-docs .ico { color: var(--ink-3); width: 1.15rem; height: 1.15rem; }
.pn-docs .ok { color: var(--green); }
.pn-sign { padding: 5px 11px; border-radius: var(--r-pill); background: var(--blue-600); color: var(--white); font-size: .75rem; }

.pn-person { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-1); font-weight: 700; font-size: .9375rem; }
.pn-person > span:last-child { display: grid; line-height: 1.3; }
.pn-person small { font-weight: 500; color: var(--ink-3); font-size: .75rem; }
.pn-msg { margin-top: 18px; padding: 14px; border-radius: 18px 18px 18px 6px; background: var(--white); box-shadow: var(--shadow-1); font-size: .8125rem; }
.pn-msg span { display: block; margin-top: 6px; color: var(--ink-3); font-size: .6875rem; font-weight: 600; }

.av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-family: var(--font-display); font-weight: 800; font-size: 1.0625rem; flex: none; }
.av--a { background: var(--blue-600); color: var(--white); }
.av--b { background: var(--butter); color: var(--butter-ink); }
.av--c { background: var(--ink); color: var(--white); }

/* No es un préstamo */
.diff__box { padding: clamp(32px, 5vw, 72px); border-radius: var(--r-lg); background: var(--sky); }
.compare { margin-top: clamp(32px, 4vw, 48px); }
.compare__row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; align-items: center; }
.compare__row > span { padding: 18px 20px; display: flex; align-items: center; gap: 8px; }
.compare__row + .compare__row { border-top: 1px solid var(--sky-2); }
.compare__row--head > span { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: -.02em; color: var(--ink-3); }
.compare__row--head .us { color: var(--white); background: var(--blue-600); border-radius: var(--r-md) var(--r-md) 0 0; }
.compare [role="rowheader"] { font-weight: 700; }
.compare [role="cell"] { color: var(--ink-2); }
.compare .us[role="cell"] { background: var(--white); color: var(--ink); font-weight: 700; }
.compare__row:last-child .us { border-radius: 0 0 var(--r-md) var(--r-md); }
.compare .us .ico { color: var(--blue-600); }

/* Opiniones */
.sample-note { margin-top: 14px; display: inline-block; padding: 4px 12px; border-radius: var(--r-pill); background: var(--amber-bg); color: var(--amber-ink); font-size: .8125rem; font-weight: 600; }
.quotes__grid { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.quote { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: var(--ice); border: 1px solid var(--line); }
.quote p { font-size: 1.1875rem; line-height: 1.5; text-wrap: pretty; }
.quote footer { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.quote footer > span:last-child { display: grid; line-height: 1.3; }
.quote footer small { font-weight: 500; color: var(--ink-3); }
.quote--feature { grid-row: span 2; background: var(--ink); border-color: var(--ink); color: var(--white); }
.quote--feature p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1.2; letter-spacing: -.025em; }
.quote--feature footer small { color: var(--blue-300); }

/* Preguntas */
.faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list details:first-child { border-top: 1px solid var(--line); }
.faq__list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 4px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1875rem, 1.05rem + .4vw, 1.375rem); letter-spacing: -.02em;
  transition: color .2s;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary:hover { color: var(--blue-600); }
.faq__list summary .ico { display: grid; width: 32px; height: 32px; padding: 6px; border-radius: 50%; background: var(--sky); color: var(--blue-600); transition: transform .35s var(--ease-out), background-color .2s; }
.faq__list details[open] summary .ico { transform: rotate(180deg); background: var(--blue); color: var(--white); }
.faq__list details p { padding: 0 48px 24px 4px; color: var(--ink-2); max-width: 60ch; }
.faq__list details[open] p { animation: tabIn .4s var(--ease-out); }

/* Cierre */
.close { padding-block: var(--section); }
.close__box {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(48px, 8vw, 112px) clamp(24px, 6vw, 96px);
  border-radius: var(--r-lg);
  background: var(--blue);
  color: var(--white);
}
.close__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.25rem, 1.2rem + 4vw, 4.75rem); line-height: 1; letter-spacing: -.04em; max-width: 14ch; text-wrap: balance; }
.close__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.close__mark { position: absolute; right: clamp(-60px, -2vw, 0px); bottom: -18%; height: 120%; width: auto; color: var(--white); opacity: .1; z-index: -1; }

/* Pie */
.foot { background: var(--ink); color: rgba(255, 255, 255, .78); padding-top: clamp(56px, 7vw, 88px); font-size: .9375rem; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.brand--light { color: var(--white); }
.foot__brand p { margin-top: 16px; max-width: 28ch; }
.foot__col { display: grid; align-content: start; gap: 10px; }
.foot__col h2 { font-family: var(--font-body); font-size: .9375rem; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.foot__col a { text-decoration: none; width: fit-content; }
.foot__col a:hover { color: var(--white); text-decoration: underline; }
.foot__addr { display: flex; gap: 8px; }
.foot__addr .ico { margin-top: 3px; color: var(--blue-300); }
.foot__base { margin-top: 56px; padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .8125rem; color: rgba(255, 255, 255, .6); }

/* Barra fija de WhatsApp en móvil */
.dock { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .steps::before { display: none; }
}
@media (max-width: 900px) {
  .app__grid, .faq__grid { grid-template-columns: 1fr; }
  .quotes__grid { grid-template-columns: 1fr; }
  .quote--feature { grid-row: auto; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero__actions { flex-direction: column; gap: 16px; }
  .hero__actions .btn { width: 100%; }
  .stage__field { height: 600px; }
  .receipt { width: 138px; padding: 10px 12px; }
  .receipt__kind { font-size: .75rem; }
  .receipt__due { display: none; }
  .receipt:nth-child(1) { --x: 3% !important; --y: 3% !important; }
  .receipt:nth-child(2) { --x: 55% !important; --y: 2% !important; }
  .receipt:nth-child(3) { --x: 4% !important; --y: 80% !important; }
  .receipt:nth-child(4) { --x: 53% !important; --y: 83% !important; }
  .receipt:nth-child(5) { --x: 30% !important; --y: 18% !important; }
  .stage.is-merged .receipt { left: calc(50% - 69px); }
  .phone--hero { top: 92px; scale: .86; transform-origin: top center; }
  .phone { width: 256px; }
  .steps { grid-template-columns: 1fr; row-gap: 36px; }
  .tab { padding: 14px 16px; }
  .tab__t { font-size: 1.1875rem; }
  .compare__row { grid-template-columns: 1fr 1fr; }
  .compare__row > [role="rowheader"] { grid-column: 1 / -1; padding-bottom: 0; }
  .compare__row--head > span:first-child { display: none; }
  .compare__row > span { padding: 12px 12px; font-size: .9375rem; }
  .compare__row--head > span { font-size: .9375rem; }
  .compare__row + .compare__row { border-top: 1px solid var(--sky-2); }
  .faq__list details p { padding-right: 4px; }
  .close__actions .btn { width: 100%; }
  .foot__grid { grid-template-columns: 1fr; }
  .dock {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(255, 255, 255, .96) 60%, rgba(255, 255, 255, 0));
    transform: translateY(110%); transition: transform .45s var(--ease-out);
  }
  .dock .btn { width: 100%; }
  .dock.is-on { transform: none; }
  .foot { padding-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

/* Antes / Ahora a los lados del móvil (escritorio) */
.ps-hucha__row > span { white-space: nowrap; }
.ps-next { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 18px; background: var(--white); box-shadow: var(--shadow-1); font-size: .75rem; font-weight: 700; line-height: 1.3; }
.ps-next .av { width: 30px; height: 30px; font-size: .8125rem; }
.ps-next > span:last-child { display: grid; }
.ps-next small { font-weight: 500; color: var(--ink-3); }
.stage__tag { position: absolute; top: 50%; display: none; gap: 2px; color: var(--white); opacity: 0; translate: 0 calc(-50% + 16px); transition: opacity .6s var(--ease-out), translate .8s var(--ease-out); }
.stage__tag span { font-weight: 700; font-size: 1.1875rem; }
.stage__tag strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 1rem + 3vw, 4rem); letter-spacing: -.04em; line-height: 1; }
.stage__tag em { font-style: normal; font-weight: 700; font-size: 1.1875rem; }
.stage__tag--before { left: clamp(32px, 6%, 88px); }
.stage__tag--before strong { text-decoration: line-through; text-decoration-thickness: 4px; text-decoration-color: rgba(255, 255, 255, .55); color: rgba(255, 255, 255, .82); }
.stage__tag--after { right: clamp(32px, 6%, 88px); text-align: right; }
.stage.is-merged .stage__tag { opacity: 1; translate: 0 -50%; }
.stage.is-merged .stage__tag--before { transition-delay: .9s; }
.stage.is-merged .stage__tag--after { transition-delay: 1.15s; }
@media (min-width: 1000px) { .stage__tag { display: grid; } }
.link-call--light { font-size: 1.1875rem; font-weight: 700; }

/* ---------- Hero: momento de entrada ---------- */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -72px 0 auto; height: 900px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 46% at 18% 22%, rgba(54, 123, 246, .16), transparent 70%),
    radial-gradient(34% 40% at 84% 30%, rgba(141, 182, 255, .26), transparent 70%);
}
.hero__title .w { display: inline-block; }
.js .hero__title .w { opacity: 0; translate: 0 .45em; filter: blur(10px); animation: wordIn 1s var(--ease-out) forwards; animation-delay: calc(var(--w) * 75ms + 120ms); }
@keyframes wordIn { to { opacity: 1; translate: 0 0; filter: blur(0); } }
.js .hero__lead, .js .hero__actions, .js .assure { opacity: 0; translate: 0 14px; animation: riseIn .9s var(--ease-out) forwards; }
.hero__lead { animation-delay: .55s; }
.hero__actions { animation-delay: .7s; }
.assure { animation-delay: .85s; }
.js .stage { opacity: 0; translate: 0 40px; animation: riseIn 1.1s var(--ease-out) .8s forwards; }
@keyframes riseIn { to { opacity: 1; translate: 0 0; } }
/* Red de seguridad: si la animación no corre, el contenido se ve igual */
.anim-done .hero__title .w, .anim-done .hero__lead, .anim-done .hero__actions, .anim-done .assure, .anim-done .stage { animation: none; opacity: 1; translate: none; filter: none; }

/* Recibos flotando hasta que se juntan */
.receipt { animation: bob calc(2.8s + var(--i) * .45s) ease-in-out calc(var(--i) * -.7s) infinite alternate; }
@keyframes bob { from { translate: 0 -7px; } to { translate: 0 7px; } }
.stage.is-merged .receipt { animation: none; translate: 0 0; transform: rotate(calc(var(--r) * -4)) scale(.3); }

/* El móvil sigue al ratón */
.phone--hero { transform: perspective(1400px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)); transition: transform .5s var(--ease-out); will-change: transform; }

/* Luz y ondas cuando todo se vuelve una cuota */
.stage__glow, .stage__pulse { position: absolute; left: 50%; top: 46%; translate: -50% -50%; border-radius: 50%; pointer-events: none; z-index: 2; }
.stage__glow { width: 640px; height: 640px; background: radial-gradient(closest-side, rgba(255, 255, 255, .5), rgba(255, 255, 255, .12) 55%, transparent); opacity: 0; scale: .5; transition: opacity 1s var(--ease-out) .55s, scale 1.4s var(--ease-out) .55s; }
.stage.is-merged .stage__glow { opacity: 1; scale: 1; }
.stage__pulse { width: 300px; height: 300px; border: 2px solid rgba(255, 255, 255, .7); opacity: 0; }
.stage.is-merged .stage__pulse { animation: pulse 1.6s var(--ease-out) .62s; }
.stage.is-merged .stage__pulse--2 { animation-delay: .9s; }
@keyframes pulse { from { opacity: .9; scale: .5; } to { opacity: 0; scale: 2.6; } }
.stage.is-merged .phone__screen { animation: bump .7s var(--ease-out) .6s; }
@keyframes bump { 40% { scale: 1.035; } }

/* ---------- Números ---------- */
.nums__box {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 72px) clamp(32px, 6vw, 96px);
  padding: clamp(36px, 6vw, 88px);
  border-radius: var(--r-lg);
  background: var(--ink); color: var(--white);
}
.nums__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.nums__lead p { margin-top: 22px; max-width: 34rem; color: rgba(255, 255, 255, .8); font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); text-wrap: pretty; }
.halves { align-self: center; display: grid; gap: 28px; }
.halves__row { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: end; }
.halves__label { font-weight: 600; color: rgba(255, 255, 255, .8); }
.halves__amt { grid-column: 2; grid-row: 1; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.halves__amt--save { color: var(--butter); }
.halves__bar { grid-column: 1 / -1; height: clamp(44px, 5vw, 64px); border-radius: 16px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.halves__fill { display: block; height: 100%; border-radius: inherit; }
.halves__fill--full { width: 100%; background: var(--blue); }
.halves__fill--half { width: 50%; background: var(--butter); transition: width 1.6s var(--ease-in-out) .3s; }
.js .nums__box:not(.is-in) .halves__fill--half { width: 100%; }
.facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.fact { padding: 28px 24px 0 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .14); }
.fact dt { font-weight: 600; color: rgba(255, 255, 255, .7); }
.fact dd { margin: 4px 0 0; color: rgba(255, 255, 255, .86); font-weight: 500; }
.fact__n { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 1.6rem + 2.4vw, 4rem); letter-spacing: -.045em; line-height: 1; color: var(--white); margin-bottom: 6px; }
.fact:first-child .fact__n { color: var(--butter); }
.nums__note { font-size: .9375rem; line-height: 1.5; color: rgba(255, 255, 255, .78); }

@media (max-width: 900px) {
  .nums__box { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title .w, .hero__lead, .hero__actions, .assure, .stage { opacity: 1; translate: none; filter: none; animation: none; }
  .receipt { animation: none; }
  .phone--hero { transform: none; }
}

/* ---------- Páginas legales ---------- */
.legal { padding-block: clamp(48px, 7vw, 96px) var(--section); }
.legal__wrap { max-width: calc(46rem + var(--gutter) * 2); }
.legal__back { display: inline-flex; font-weight: 600; color: var(--blue-600); text-decoration: none; font-size: .9375rem; }
.legal__back::before { content: ""; width: .5em; height: .5em; margin: .45em .6em 0 .15em; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; }
.legal__back:hover { text-decoration: underline; }
.legal__title { margin-top: 20px; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 1.6rem + 3.2vw, 4rem); line-height: 1; letter-spacing: -.04em; }
.legal__date { margin-top: 14px; color: var(--ink-3); font-size: .9375rem; }
.legal__body { margin-top: clamp(32px, 4vw, 48px); color: var(--ink-2); }
.legal__body h2 { margin-top: 44px; margin-bottom: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; color: var(--ink); }
.legal__body p + p, .legal__body ul + p, .legal__body p + ul { margin-top: 14px; }
.legal__body ul { display: grid; gap: 8px; padding-left: 1.2em; list-style: disc; }
.legal__body li::marker { color: var(--blue); }
.legal__body strong { color: var(--ink); }
.legal__body a { color: var(--blue-600); font-weight: 600; }
.todo { padding: 1px 6px; border-radius: 6px; background: var(--butter); color: var(--butter-ink); font-weight: 700; }

/* ---------- Cookies ---------- */
.foot__link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; width: fit-content; }
.foot__link:hover { color: var(--white); text-decoration: underline; }

.cookie-banner {
  position: fixed; left: 24px; bottom: 24px; z-index: 80;
  width: min(420px, calc(100vw - 32px));
  padding: 22px 22px 20px;
  border-radius: var(--r-md);
  background: var(--white); color: var(--ink);
  box-shadow: 0 2px 4px rgba(10, 31, 74, .06), 0 28px 60px -18px rgba(10, 31, 74, .4);
  border: 1px solid var(--line);
  animation: cookieIn .6s var(--ease-out) .8s both;
}
.cookie-banner[hidden] { display: none; }
@keyframes cookieIn { from { opacity: 0; translate: 0 24px; } }
.cookie-banner__title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.cookie-banner p { margin-top: 8px; font-size: .9375rem; color: var(--ink-2); line-height: 1.5; }
.cookie-banner a, .cookie-dialog a { color: var(--blue-600); font-weight: 600; }
.cookie-banner__actions, .cookie-dialog__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cookie-banner__actions .cbtn { flex: 1 1 auto; }

.cbtn {
  padding: .7em 1.1em; border-radius: var(--r-pill); cursor: pointer;
  border: 1.5px solid var(--sky-2); background: var(--white); color: var(--ink);
  font-weight: 700; font-size: .9375rem;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease-out);
}
.cbtn:hover { background: var(--sky); border-color: var(--blue-300); }
.cbtn:active { transform: scale(.97); }
.cbtn--main { background: var(--blue-600); border-color: var(--blue-600); color: var(--white); }
.cbtn--main:hover { background: var(--blue-700); border-color: var(--blue-700); }

.cookie-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--white); color: var(--ink);
  box-shadow: 0 40px 80px -24px rgba(5, 17, 45, .55);
}
.cookie-dialog[open] { animation: dialogIn .45s var(--ease-out); }
@keyframes dialogIn { from { opacity: 0; translate: 0 16px; scale: .98; } }
.cookie-dialog::backdrop { background: rgba(10, 31, 74, .45); backdrop-filter: blur(3px); }
.cookie-dialog__inner { padding: clamp(22px, 4vw, 32px); }
.cookie-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-dialog__head h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.625rem; letter-spacing: -.03em; }
.cookie-dialog__close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--sky); color: var(--ink); cursor: pointer; transition: background-color .2s; }
.cookie-dialog__close:hover { background: var(--sky-2); }
.cookie-dialog__close svg { width: 20px; height: 20px; }
.cookie-dialog__lead { margin-top: 8px; color: var(--ink-2); font-size: .9375rem; }
.cookie-opt { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 12px; padding: 16px 18px; border-radius: var(--r-md); background: var(--ice); border: 1px solid var(--line); }
label.cookie-opt { cursor: pointer; }
.cookie-opt h3 { font-size: 1rem; font-weight: 700; }
.cookie-opt p { margin-top: 2px; font-size: .875rem; color: var(--ink-2); line-height: 1.45; }
.cookie-opt__always { flex: none; font-size: .8125rem; font-weight: 700; color: var(--green); }
.cookie-dialog__actions { margin-top: 22px; justify-content: flex-end; }

.cswitch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative;
  width: 48px; height: 28px; margin: 0; border-radius: var(--r-pill);
  background: var(--sky-2); cursor: pointer; transition: background-color .25s;
}
.cswitch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(10, 31, 74, .3); transition: translate .3s var(--ease-out); }
.cswitch:checked { background: var(--blue-600); }
.cswitch:checked::after { translate: 20px 0; }

@media (max-width: 640px) {
  .cookie-banner { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .cookie-dialog__actions .cbtn { flex: 1 1 100%; }
}

.legal__body .cookie-table { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.legal__body table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .9375rem; }
.legal__body th, .legal__body td { padding: 12px 14px; text-align: left; vertical-align: top; }
.legal__body th { background: var(--sky); color: var(--ink); font-weight: 700; }
.legal__body tr + tr td { border-top: 1px solid var(--line); }
.legal__body code { font-size: .875em; padding: 1px 6px; border-radius: 6px; background: var(--ice); color: var(--ink); }
.ps-hucha__row { gap: 8px; }
@media (max-width: 640px) { .ps-hucha__row.ps-muted > span:last-child { display: none; } }

/* Aceptar y rechazar con el mismo peso (guía de cookies de la AEPD) */
.cookie-banner__actions { display: grid; grid-template-columns: 1fr 1fr; }
.cookie-banner__actions [data-act="settings"] { grid-column: 1 / -1; order: 3; border-color: transparent; background: none; text-decoration: underline; text-underline-offset: .2em; }
.cookie-banner__actions [data-act="settings"]:hover { background: var(--ice); }
.cookie-opt__label { display: grid; }
.cookie-opt__label h3 { cursor: default; }
/* 6. En móvil el banner va por encima de la barra de WhatsApp */
.has-cookie-banner .dock { transform: translateY(110%) !important; }

/* ---------- 404 ---------- */
.notfound { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 48px var(--gutter); max-width: calc(44rem + var(--gutter) * 2); margin-inline: auto; }
.notfound .brand { margin-bottom: 24px; }
.notfound__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.75rem, 1.6rem + 4.4vw, 5rem); line-height: 1; letter-spacing: -.04em; }
.notfound__lead { font-size: 1.1875rem; color: var(--ink-2); }
.notfound__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 8px; }
