:root {
  /* Colores de marca Modo Isapre */
  --navy: #0a2a5e;
  --blue: #2f65a3;
  --sky: #74b0d0;
  --sky-light: #d9eefa;
  --cream: #f5f2e6;

  --bg: #fdfcf8;
  --bg-alt: var(--cream);
  --text: var(--navy);
  --muted: #4a5d78;
  --primary: var(--blue);
  --primary-soft: var(--sky-light);
  --wa: #25d366;
  --wa-dark: #128c4b;
  --card: #ffffff;
  --border: #e3e0d3;
  --shadow: 0 12px 32px rgba(10, 42, 94, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #071a3a; --bg-alt: #0b2349; --text: #f5f2e6; --muted: #a9bdd6;
    --primary: #8cc3e0; --primary-soft: #133463; --card: #0e2852; --border: #1d3c6d;
    --shadow: 0 12px 32px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --bg: #071a3a; --bg-alt: #0b2349; --text: #f5f2e6; --muted: #a9bdd6;
  --primary: #8cc3e0; --primary-soft: #133463; --card: #0e2852; --border: #1d3c6d;
  --shadow: 0 12px 32px rgba(0,0,0,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Inter", system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; border-radius: 12px; padding: 12px 22px; border: 2px solid transparent; transition: transform .15s, box-shadow .2s, background .2s; font-size: 1rem; }
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: 8px 14px; font-size: .9rem; }
.btn--lg { padding: 16px 26px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 8px 22px rgba(37, 211, 102, .35); }
.btn--wa:hover { background: var(--wa-dark); }
.btn--ghost { border-color: var(--border); background: var(--card); }
.wa-icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav__logo { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 1.2rem; letter-spacing: .04em; }
.logo__img { width: 44px; height: 44px; border-radius: 50%; margin-right: 6px; box-shadow: 0 2px 8px rgba(10,42,94,.15); }
.footer__logo { width: 96px; height: 96px; border-radius: 50%; display: block; }
.logo__modo { color: var(--text); }
.logo__isapre { color: var(--sky); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.ig-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--primary); border: 1px solid var(--border); background: var(--card); transition: color .2s, background .2s; }
.ig-link:hover { background: var(--primary); color: #fff; }
.ig-icon { width: 20px; height: 20px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--muted); font-weight: 500; }
.nav__links a:hover { color: var(--primary); }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: min(88vh, 760px); display: flex; align-items: center; padding: 80px 0; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% center; z-index: -2; transform: scaleX(-1); }
.hero__overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 32%, color-mix(in srgb, var(--bg) 40%, transparent) 50%, transparent 62%); }
.hero > .container { position: relative; }
.hero { isolation: isolate; }
.hero__content { max-width: 580px; }
.eyebrow { display: inline-block; background: var(--primary-soft); color: var(--text); font-weight: 700; font-size: .85rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero__title { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; font-weight: 800; margin-bottom: 20px; }
.highlight { color: var(--primary); }
.hero__text { color: var(--muted); font-size: 1.15rem; margin-bottom: 30px; max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; color: var(--muted); font-weight: 500; font-size: .95rem; }


/* Secciones */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__title { font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1.2; margin-bottom: 14px; }
.section__lead { color: var(--muted); font-size: 1.1rem; max-width: 720px; margin-bottom: 40px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.card__icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }

/* Calculadora */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.calc__disclaimer { font-size: .9rem; color: var(--muted); }
.calc__box { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.calc__box label { font-weight: 600; }
.calc__input { display: flex; align-items: center; border: 2px solid var(--border); border-radius: 12px; padding: 0 16px; background: var(--bg); }
.calc__input:focus-within { border-color: var(--primary); }
.calc__input span { color: var(--muted); font-weight: 700; font-size: 1.2rem; }
.calc__input input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 700 1.3rem "Inter", sans-serif; padding: 14px 8px; }
.calc__results { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc__results div { background: var(--primary-soft); border-radius: 14px; padding: 16px; }
.calc__results span { display: block; font-size: .85rem; color: var(--muted); }
.calc__results strong { font-size: 1.4rem; color: var(--primary); }

/* Formulario */
.lead { background: linear-gradient(180deg, var(--bg) 0%, var(--sky-light) 100%); }
.lead__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.lead__intro { position: sticky; top: 100px; }
.lead__list { list-style: none; display: grid; gap: 10px; }
.lead__list li { padding-left: 30px; position: relative; font-weight: 500; }
.lead__list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .75rem; display: grid; place-items: center; }
section[id] { scroll-margin-top: 72px; }

/* Formulario paso a paso */
.wizard { position: relative; background: var(--card); border: 1px solid var(--border); border-top: 6px solid var(--navy); border-radius: 20px; padding: 24px 32px 36px; box-shadow: var(--shadow); min-height: 440px; display: flex; flex-direction: column; scroll-margin-top: 90px; }
.wizard__top { display: flex; align-items: center; gap: 14px; min-height: 32px; margin-bottom: 18px; visibility: hidden; }
.wizard--started .wizard__top { visibility: visible; }
.wizard__back { background: none; border: 0; color: var(--muted); font: 600 .9rem "Inter", sans-serif; cursor: pointer; padding: 4px 0; white-space: nowrap; }
.wizard__back:hover { color: var(--primary); }
.wizard__back[hidden] { display: inline-block; visibility: hidden; }
.wizard__progress { flex: 1; height: 8px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; }
.wizard__progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--navy), var(--sky)); border-radius: inherit; transition: width .4s ease; }
.wizard__count { font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }

.step { display: none; flex-direction: column; align-items: flex-start; gap: 14px; flex: 1; justify-content: center; }
.step:focus { outline: none; }
.step.is-active { display: flex; animation: stepIn .35s ease both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.step[data-step="welcome"], .step[data-step="gracias"] { align-items: center; text-align: center; }
.step__avatar { width: 72px; height: 72px; border-radius: 50%; box-shadow: 0 4px 14px rgba(10,42,94,.18); }
.step__title { font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.25; }
.step__text { color: var(--muted); }
.step__input { width: 100%; font: 500 1.25rem "Inter", sans-serif; color: var(--text); background: transparent; border: 0; border-bottom: 2px solid var(--border); padding: 10px 2px; border-radius: 0; resize: vertical; }
textarea.step__input { font-size: 1.05rem; border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.step__input:focus { outline: none; border-color: var(--primary); }
.step__input.invalid { border-color: #d64545; }
.step__error { color: #d64545; font-weight: 600; font-size: .92rem; }
.step__error:empty { display: none; }
.step__hint { font-size: .85rem; color: var(--muted); }
kbd { font: 600 .8rem "Inter", sans-serif; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
.step__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: var(--primary); font: 600 .95rem "Inter", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(10,42,94,.25); cursor: pointer; }
.btn--primary:hover { background: var(--blue); }

/* Botón Comenzar: color llamativo + latido */
.btn--start {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 10px 0 6px; padding: 18px 44px; font-size: 1.2rem; letter-spacing: .02em; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #ff8a00 0%, #ff4f6d 55%, #e0218a 100%);
  box-shadow: 0 10px 28px rgba(255, 79, 109, .45);
  animation: latido 1.6s ease-in-out infinite;
}
.btn--start::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); animation: brillo 2.8s ease-in-out infinite;
}
.btn--start:hover { animation-play-state: paused; transform: scale(1.06); filter: brightness(1.05); }
.btn--start__arrow { display: inline-block; transition: transform .2s; }
.btn--start:hover .btn--start__arrow { transform: translateX(5px); }
@keyframes latido {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 28px rgba(255,79,109,.45), 0 0 0 0 rgba(255,79,109,.55); }
  15% { transform: scale(1.08); }
  30% { transform: scale(1); }
  45% { transform: scale(1.05); box-shadow: 0 10px 28px rgba(255,79,109,.45), 0 0 0 18px rgba(255,79,109,0); }
  60% { transform: scale(1); }
}
@keyframes brillo { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

.choices { display: grid; gap: 10px; width: 100%; }
.choices--grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: 500 1rem "Inter", sans-serif; color: var(--text); background: var(--bg); border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.choice:hover { border-color: var(--primary); }
.choice:active { transform: scale(.98); }
.choice.is-selected { border-color: var(--navy); background: var(--primary-soft); }
.choice__key { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--card); font-size: .8rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.choice.is-selected .choice__key { background: var(--navy); color: #fff; border-color: var(--navy); }

.summary { width: 100%; display: grid; gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.summary div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: .95rem; }
.summary div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); }
.summary dd { font-weight: 600; word-break: break-word; }
.summary .link-btn { font-size: .82rem; padding: 0 0 0 6px; }
.step__done { width: 72px; height: 72px; border-radius: 50%; background: var(--wa); color: #fff; font-size: 2.2rem; display: grid; place-items: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); cursor: pointer; text-align: left; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy); flex-shrink: 0; }

/* Pasos */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-top: 32px; }
.steps li { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.steps span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; font-weight: 800; margin-bottom: 14px; }
.steps p { color: var(--muted); }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 10px; }

/* CTA final */
.cta { padding: 80px 0; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; text-align: center; }
.cta h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.2; margin-bottom: 28px; }

.footer { background: var(--navy); color: #c9d6e8; padding: 48px 0 24px; font-size: .95rem; }
.footer .logo__modo { color: #fff; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer__inner p { margin-top: 6px; }
.footer__info { text-align: right; }
.footer__links a { color: var(--sky); font-weight: 600; }
.footer__copy { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px; font-size: .85rem; color: #8ea3c0; }

/* Banda de Instagram */
.ig-band { padding: 56px 0; background: var(--sky-light); }
.ig-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.ig-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 6px; color: var(--navy); }
.ig-band p { color: #3c5070; max-width: 560px; }
.btn--ig { background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af); color: #fff; box-shadow: 0 8px 22px rgba(221, 42, 123, .3); }
.btn--ig .ig-icon, .btn--fb .ig-icon { width: 22px; height: 22px; }
.btn--fb { background: #1877f2; color: #fff; box-shadow: 0 8px 22px rgba(24, 119, 242, .3); }
.social-btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Botón flotante */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(37, 211, 102, .45); animation: pulse 2.4s infinite; }
.wa-float svg { width: 32px; height: 32px; fill: currentColor; }
.wa-float:hover { background: var(--wa-dark); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 50% { box-shadow: 0 0 0 14px rgba(37,211,102,0); } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .step.is-active, .btn--start, .btn--start::before { animation: none; } .reveal { opacity: 1; transform: none; } .wa-float { animation: none; } html { scroll-behavior: auto; } }

/* Móvil */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .footer__info { text-align: left; }
  .social-btns .btn { flex: 1 1 200px; }
  .hero { display: block; min-height: 0; padding: 300px 0 56px; }
  .hero__bg { height: 380px; object-position: 62% center; transform: none; }
  .hero__overlay { background: linear-gradient(180deg, transparent 0, transparent 200px, var(--bg) 360px); }
  .calc, .lead__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .lead__intro { position: static; }
  .wizard { padding: 20px 20px 28px; min-height: 420px; }
  .hero__actions .btn { width: 100%; }
        .section { padding: 64px 0; }
}
@media (max-width: 420px) {
  .btn--sm span { display: none; }
  .footer__info { text-align: left; }
  .calc__results { grid-template-columns: 1fr; }
  .summary div { grid-template-columns: 1fr; gap: 2px; }
  .choices--grid { grid-template-columns: 1fr 1fr; }
}

/* Pop-up para completar el formulario */
.nudge { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.nudge[hidden] { display: none; }
.nudge__backdrop { position: absolute; inset: 0; background: rgba(7, 26, 58, .6); backdrop-filter: blur(3px); animation: fadeIn .25s ease both; }
.nudge__card { position: relative; width: min(440px, 100%); background: var(--card); border-radius: 24px; padding: 36px 28px 22px; text-align: center; box-shadow: 0 30px 80px rgba(7, 26, 58, .45); border-top: 6px solid transparent; background-image: linear-gradient(var(--card), var(--card)), linear-gradient(90deg, #ff8a00, #ff4f6d, #e0218a); background-origin: border-box; background-clip: padding-box, border-box; animation: popIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.nudge__close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-alt); color: var(--muted); font-size: .95rem; cursor: pointer; }
.nudge__close:hover { background: var(--border); color: var(--text); }
.nudge__emoji { font-size: 3.2rem; line-height: 1; margin-bottom: 10px; display: inline-block; animation: wiggle 1.8s ease-in-out .5s infinite; transform-origin: 50% 80%; }
.nudge__title { font-size: clamp(1.35rem, 4vw, 1.65rem); line-height: 1.2; margin-bottom: 10px; }
.nudge__text { color: var(--muted); margin-bottom: 18px; }
.nudge__progress { margin: 0 auto 20px; max-width: 320px; }
.nudge__progress[hidden] { display: none; }
.nudge__track { height: 12px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; }
.nudge__track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ff8a00, #ff4f6d, #e0218a); transition: width 1.1s cubic-bezier(.2, .8, .2, 1) .3s; }
.nudge__progress p { font-size: .85rem; font-weight: 700; color: #e0218a; margin-top: 6px; }
.nudge__cta { width: 100%; margin: 0 0 14px; }
.nudge__perks { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.nudge__later { font-size: .88rem; color: var(--muted); }
body.nudge-open { overflow: hidden; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(40px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes wiggle { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg) scale(1.1); } 20%, 40% { transform: rotate(14deg) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .nudge__card, .nudge__backdrop, .nudge__emoji { animation: none; } .nudge__track span { transition: none; } }
.nudge__cta:focus:not(:focus-visible) { outline: none; }
