/* ==========================================================================
   miAhorro · página de inicio «La conversación»
   Mundo de marca fijado: medianoche + turquesa, Manrope, un color por texto.
   Principio: la conversación de WhatsApp es el producto y lleva la página;
   menos cajas, tipografía grande, un solo momento de movimiento (la historia).
   ========================================================================== */

@font-face { font-family: Manrope; src: url(fonts/Manrope-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url(fonts/Manrope-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Manrope; src: url(fonts/Manrope-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url(fonts/Manrope-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --night: #050B1F;
  --night-2: #0A1430;
  --slate: #141F42;
  --teal: #2DD4D9;
  --teal-dark: #086A70;
  --mist: #BFEFF1;
  --white: #F2F8FF;
  --g700: #2A3658;
  --g500: #5B6785;
  --g400: #8E9BB8;
  --g200: #D5DCEA;
  --amber: #F5B547;

  --font: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.6;
  color: var(--white); background: var(--night);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  scrollbar-color: var(--g700) var(--night);
  caret-color: var(--teal);
}
::selection { background: var(--teal); color: var(--night); }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
b, .num { font-variant-numeric: tabular-nums; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.ic { width: 20px; height: 20px; flex: none; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--teal); color: var(--night); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.light :focus-visible { outline-color: var(--teal-dark); }

/* ---------- Acciones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 0;
  background: var(--teal); color: var(--night); text-decoration: none;
  font: 600 16px/1.2 var(--font); letter-spacing: -0.01em; cursor: pointer;
  box-shadow: 0 8px 24px -10px rgb(45 212 217 / .55);
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.btn:hover { background: #5ADFE3; }
.btn:active { transform: scale(0.96); }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn--lg { min-height: 58px; padding: 16px 28px; font-size: 17px; }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--mist); font-weight: 600; text-decoration: none; }
.link .ic { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease-out); }
.link:hover .ic { transform: translateX(3px); }
.link--dark { color: var(--teal-dark); }

/* ---------- Navegación ---------- */
.nav { position: sticky; top: 0; z-index: 50; transition: background-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.nav.is-scrolled { background: rgb(5 11 31 / .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgb(242 248 255 / .06); }
.nav__in { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: inline-flex; color: var(--white); }
.logo svg { height: 36px; width: auto; }
.logo .sym { color: var(--teal); }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { padding: 10px 14px; border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; color: rgb(242 248 255 / .76); transition: color var(--t-fast) var(--ease-out); }
.nav__links a:hover { color: var(--white); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 120px); isolation: isolate; }
/* Una sola luz: sale de detrás del móvil, que es la fuente del mensaje */
.hero::before { content: ""; position: absolute; z-index: -1; right: 6%; top: 8%; width: min(620px, 70vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(45 212 217 / .18), transparent); pointer-events: none; }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero__title { font-size: clamp(44px, 6.2vw, 88px); line-height: 1; }
.hero__title .w { display: inline-block; }
.hero__lead { margin-top: 28px; max-width: 36em; font-size: clamp(18px, 1.5vw, 21px); color: rgb(242 248 255 / .8); }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 36px; }
.hero__note { margin-top: 16px; max-width: 34em; font-size: 14px; color: var(--g400); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 26px; font-size: 15px; font-weight: 600; color: var(--mist); }
.facts li { display: inline-flex; align-items: center; gap: 9px; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* ---------- Teléfono (componente compartido) ---------- */
.phone { position: relative; margin: 0; width: min(380px, 100%); justify-self: center; border-radius: 42px; padding: 10px;
  background: linear-gradient(165deg, #1A2752, var(--night-2));
  box-shadow: 0 0 0 1px rgb(242 248 255 / .08), 0 50px 90px -40px rgb(0 0 0 / .85); }
.phone__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 32px 32px 0 0; background: var(--slate); }
.phone__head strong { display: block; font-size: 16px; }
.phone__head small { display: block; font-size: 12px; color: var(--g400); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; flex: none; }
.avatar svg { width: 62%; height: 62%; color: var(--night); }
.phone__screen { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 420px; padding: 16px 14px 18px;
  border-radius: 0 0 32px 32px; background: var(--night-2); overflow: hidden; }
.phone figcaption, .phone__cap { position: absolute; left: 0; right: 0; bottom: -30px; text-align: center; font-size: 12px; color: var(--g400); }
.msg { position: relative; max-width: 86%; padding: 9px 12px 20px; border-radius: 16px; font-size: 14.5px; line-height: 1.42; }
.msg time { position: absolute; right: 10px; bottom: 4px; font-size: 10.5px; opacity: .55; font-variant-numeric: tabular-nums; }
.msg.bot { align-self: flex-start; background: var(--slate); border-top-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--mist); color: var(--night); border-top-right-radius: 6px; }
.msg.alert { display: flex; gap: 10px; align-items: flex-start; box-shadow: inset 0 0 0 1px rgb(45 212 217 / .4); }
.bill { display: grid; gap: 6px; width: 160px; padding: 12px; border-radius: 10px; background: #fff; }
.bill i { height: 6px; border-radius: 3px; background: var(--g200); }
.bill i:first-child { width: 60%; background: var(--g400); }
.bill i.s { width: 40%; background: var(--teal-dark); }
.bill em { font-style: normal; font-size: 11px; color: var(--g500); margin-top: 4px; }
.typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: 12px 14px; border-radius: 16px; border-top-left-radius: 6px; background: var(--slate); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); opacity: .35; animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 30% { opacity: 1; transform: translateY(-3px); } }
.sys { align-self: center; padding: 4px 10px; border-radius: 8px; background: rgb(242 248 255 / .06); font-size: 12px; color: var(--g400); }
.call { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgb(242 248 255 / .04); }
.call .ic { color: #FF8A80; width: 18px; height: 18px; }
.call strong { display: block; font-size: 14px; }
.call small { display: block; font-size: 12px; color: var(--g400); }
.pulse { position: relative; width: 10px; height: 10px; margin-top: 6px; flex: none; }
.pulse i { position: absolute; inset: 0; border-radius: 50%; background: var(--teal); }
.pulse i:last-child { animation: pulse 1.8s var(--ease-out) infinite; }
@keyframes pulse { to { transform: scale(2.6); opacity: 0; } }

/* ---------- La historia (firma) ---------- */
.story { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 120px); border-top: 1px solid rgb(242 248 255 / .06); }
.story__in { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(40px, 7vw, 110px); }
.chapter { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; max-width: 34em; }
.chapter h2 { font-size: clamp(34px, 4.2vw, 58px); }
.chapter > p:not(.chapter__n):not(.chapter__close):not(.chapter__meta) { margin-top: 22px; font-size: clamp(18px, 1.4vw, 20px); color: rgb(242 248 255 / .78); }
.chapter__n { font-size: 15px; font-weight: 800; color: var(--teal); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.chapter__n::before { content: "Paso "; font-weight: 600; color: var(--g400); }
.chapter__close { margin-top: 26px; font-size: 19px; font-weight: 600; color: var(--mist); }
.chapter__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 26px; }
.pains { margin-top: 28px; display: grid; gap: 22px; }
.pains li { padding-left: 22px; position: relative; font-size: clamp(17px, 1.3vw, 19px); color: rgb(242 248 255 / .72); }
.pains li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.pains strong { display: block; color: var(--white); font-size: clamp(19px, 1.6vw, 22px); letter-spacing: -0.01em; margin-bottom: 2px; }
.tag { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; background: rgb(45 212 217 / .14); color: var(--teal); font-size: 13px; font-weight: 700; }
.story__stage { position: relative; }
.phone--story { position: sticky; top: calc(50vh - 260px); }
.phone--story .phone__screen { min-height: 440px; }
.scene { position: absolute; inset: 16px 14px 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; opacity: 0; visibility: hidden; }
.scene.is-on { opacity: 1; visibility: visible; }
/* Copia de la escena dentro de cada capítulo (móvil) */
.chapter__phone { display: none; }

/* ---------- Sección clara ---------- */
.light { background: var(--white); color: var(--night); padding: clamp(72px, 9vw, 128px) 0; }
.light p { color: #3A4566; }
.light a:not(.link):not(.btn) { color: var(--teal-dark); font-weight: 600; text-underline-offset: 3px; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.split h2, .light__h { font-size: clamp(34px, 4.2vw, 58px); }
.split__text p { margin-top: 20px; font-size: 19px; max-width: 34em; }
.ledger { margin: 0; border-top: 2px solid var(--night); }
.ledger div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--g200); }
.ledger dt { font-weight: 600; color: var(--g500); }
.ledger dd { margin: 0; font-weight: 800; font-size: 20px; text-align: right; letter-spacing: -0.01em; }
.ledger dd.num { font-size: clamp(36px, 4vw, 52px); color: var(--teal-dark); line-height: 1; }
.light__h { margin-top: clamp(80px, 10vw, 140px); margin-bottom: 32px; }
.table { border-top: 2px solid var(--night); }
.tr { display: grid; grid-template-columns: .7fr 1fr 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--g200); font-size: 17px; }
.tr [role="rowheader"] { font-weight: 600; color: var(--g500); }
.tr [role="cell"]:nth-child(2) { color: var(--g500); }
.tr [role="cell"]:nth-child(3) { font-weight: 700; color: var(--night); }
.tr.th { padding: 0 0 14px; font-size: 14px; font-weight: 800; color: var(--g500); }
.tr.th span:last-child { color: var(--teal-dark); }
.who__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); border-top: 2px solid var(--night); padding-top: 28px; }
.who__cols h3 { font-size: 24px; }
.who__cols > div { display: flex; flex-direction: column; align-items: flex-start; }
.who__cols p { margin: 10px 0 14px; font-size: 17px; flex: 1; }

/* ---------- Confianza + preguntas ---------- */
.faq { padding: clamp(72px, 9vw, 128px) 0; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-bottom: clamp(56px, 7vw, 96px); margin-bottom: clamp(56px, 7vw, 96px); border-bottom: 1px solid rgb(242 248 255 / .08); }
.trust strong { display: block; font-size: 22px; letter-spacing: -0.02em; }
.trust span { display: block; margin-top: 6px; font-size: 15px; color: var(--g400); }
.faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__intro { position: sticky; top: 112px; }
.faq__intro h2 { font-size: clamp(34px, 4.2vw, 58px); }
.faq__intro p { margin: 18px 0 8px; font-size: 18px; color: rgb(242 248 255 / .76); }
.faq__list { border-top: 1px solid rgb(242 248 255 / .12); }
details { border-bottom: 1px solid rgb(242 248 255 / .12); }
summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; min-height: 44px; font-size: 19px; font-weight: 600; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--mist); }
summary .ic { color: var(--teal); transition: transform 200ms var(--ease-out); }
details[open] summary .ic { transform: rotate(45deg); }
details p { padding: 0 40px 24px 0; font-size: 17px; color: rgb(242 248 255 / .76); }

/* ---------- Cierre ---------- */
.final { position: relative; padding: clamp(96px, 12vw, 180px) 0; text-align: center; border-top: 1px solid rgb(242 248 255 / .06); isolation: isolate; }
.final::before { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -30%; width: min(900px, 120vw); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgb(45 212 217 / .14), transparent); }
.final__in { display: grid; justify-items: center; }
.final__title { font-size: clamp(48px, 8vw, 96px); }
.final__in > p { margin: 24px 0 36px; max-width: 32em; font-size: 19px; color: rgb(242 248 255 / .78); }
.final__apps { display: inline-flex !important; align-items: center; gap: 8px; margin-top: 28px !important; font-size: 14px !important; color: var(--g400) !important; }
.final__apps .ic { color: var(--teal); width: 18px; height: 18px; }

/* ---------- Pie ---------- */
.foot { padding: 56px 0 28px; border-top: 1px solid rgb(242 248 255 / .08); }
.foot__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; }
.foot__brand p { margin-top: 14px; max-width: 26em; font-size: 15px; color: var(--g400); }
.foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot__cols nav { display: grid; align-content: start; gap: 2px; }
.foot__cols h3 { margin-bottom: 10px; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--white); }
.foot__cols a { padding: 7px 0; font-size: 15px; text-decoration: none; color: var(--g400); transition: color var(--t-fast) var(--ease-out); }
.foot__cols a:hover { color: var(--teal); }
.foot__bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgb(242 248 255 / .08); font-size: 13px; color: var(--g500); }
.foot__note { max-width: 520px; text-align: right; }
[data-cookies-config][hidden] { display: none !important; }

.sticky-cta { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav__links { display: none; }
  .nav .btn--sm { margin-left: auto; }
  .hero__in, .split, .faq__grid, .foot__in { grid-template-columns: 1fr; }
  .phone--hero { margin-top: 12px; }
  .story__in { grid-template-columns: 1fr; }
  .story__stage { display: none; }
  .chapter { min-height: 0; padding: 48px 0; }
  .chapter__phone { display: block; margin-top: 28px; }
  .chapter__phone .phone { justify-self: start; width: min(360px, 100%); }
  .chapter__phone .phone__screen { min-height: 0; }
  .chapter__phone .scene { position: static; opacity: 1; visibility: visible; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .faq__intro { position: static; }
  .who__cols { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav .btn--sm { display: none; }
  .hero__ctas .btn { width: 100%; }
  .tr { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
  .tr [role="rowheader"] { grid-column: 1 / -1; }
  .tr.th span:first-child { display: none; }
  .trust { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .foot__bottom { flex-direction: column; }
  .foot__note { text-align: left; }
  .sticky-cta { display: block; position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 60; transform: translateY(140%); transition: transform 260ms var(--ease-out); }
  .sticky-cta.on { transform: none; }
  .sticky-cta .btn { width: 100%; }
  .foot { padding-bottom: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .typing i, .pulse i:last-child { animation: none; }
  .btn, .link .ic, summary .ic, .sticky-cta { transition: none; }
}

/* Los halos de luz no deben crear scroll horizontal */
.hero, .final { overflow-x: clip; }

/* Iconos de confianza: trazo de la casa, sin contenedor */
.trust .ic { width: 26px; height: 26px; margin-bottom: 14px; color: var(--teal); }
