/* =============================================================
   1. Tokens — ISMA SEGUROS · Salud (azul oscuro / cyan / dorado)
   ============================================================= */
:root {
  --bg:        #061626;
  --bg-2:      #0b2036;
  --bg-3:      #0f2a44;
  --paper:     #ffffff;
  --paper-2:   #f4f7fa;
  --ink:       #ffffff;
  --ink-soft:  #dce6ef;
  --ink-mute:  rgba(255, 255, 255, 0.66);
  --navy:      #0a1f33;
  --navy-mute: rgba(10, 31, 51, 0.64);

  --cyan:        #22d3ee;
  --cyan-bright: #5eead4;
  --cyan-soft:   rgba(34, 211, 238, 0.14);
  --gold:        #d4af6a;
  --gold-hover:  #e2c488;
  --gold-soft:   rgba(212, 175, 106, 0.14);
  --danger:      #ff6b5e;
  --danger-soft: rgba(255, 107, 94, 0.12);
  --whatsapp:    #25d366;

  --line:      rgba(255, 255, 255, 0.12);
  --line-dark: rgba(10, 31, 51, 0.1);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  text-wrap: balance;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 800;
}
ul { list-style: none; padding: 0; }
input { font: inherit; color: inherit; }
::selection { background: var(--cyan); color: #06131f; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--cyan); color: #06131f;
  z-index: 9999; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 1.25rem; }
.container-narrow { max-width: 660px; }

.hl-cyan { color: var(--cyan); }
.hl-gold { color: var(--gold); }

/* =============================================================
   3. Reveal utility
   ============================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Topbar
   ============================================================= */
.topbar {
  background: #050f1a;
  color: var(--ink);
  padding-block: .6rem;
  font-size: .8rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.topbar-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; letter-spacing: .02em; font-size: .92rem; }
.topbar-shield { flex: none; color: var(--gold); }
.topbar-brand-name { color: var(--ink); }
.topbar-brand-role { font-weight: 400; opacity: .6; margin-left: .3rem; font-size: .78rem; }
.topbar-badge {
  background: var(--cyan-soft);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--cyan);
  padding: .28rem .7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .02em;
}

/* =============================================================
   5. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: 1rem 1.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: .01em;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), background .3s var(--ease-out), opacity .3s var(--ease-out);
  text-align: center;
}
.btn-lg { padding: 1.15rem 2.2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #0ea5c4 100%);
  color: #06131f;
  box-shadow: 0 10px 30px -8px rgba(34, 211, 238, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(34, 211, 238, 0.7); }
.btn-primary:active { transform: translateY(0); }

.btn-primary.is-locked {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-mute);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-primary.is-locked:hover { transform: none; box-shadow: none; }
.btn-icon-lock { flex: none; }
.btn-primary:not(.is-locked) .btn-icon-lock { display: none; }

.btn-whatsapp {
  background: linear-gradient(135deg, var(--whatsapp) 0%, #1da851 100%);
  color: #ffffff;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, 0.55);
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(37, 211, 102, 0.7); }

.btn-option {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-weight: 600;
  font-size: .98rem;
  text-align: left;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out), transform .2s var(--ease-out);
}
.btn-option:hover { border-color: var(--cyan); background: var(--cyan-soft); transform: translateX(2px); }
.btn-option:active { transform: scale(0.99); }
.btn-option-arrow { color: var(--cyan); opacity: 0; transition: opacity .2s var(--ease-out); flex: none; }
.btn-option:hover .btn-option-arrow { opacity: 1; }

/* =============================================================
   6. Sections — shared
   ============================================================= */
.section { padding-block: 4.5rem; position: relative; }
.kicker {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: .9rem;
}
.section-title { font-size: clamp(1.6rem, 5vw, 2.3rem); margin-bottom: 1rem; }
.section-intro { font-size: 1.05rem; color: var(--ink-mute); max-width: 52ch; margin-bottom: 1.75rem; }

/* Dark sections (default body bg) use --ink-soft text.
   Light sections override locally below. */

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  padding-block: 3.5rem 4rem;
  overflow: clip;
}
.hero-mesh {
  position: absolute; inset: -20% -10% -30% -10%;
  background:
    radial-gradient(45% 40% at 20% 15%, rgba(34, 211, 238, 0.22), transparent 70%),
    radial-gradient(40% 35% at 85% 25%, rgba(212, 175, 106, 0.16), transparent 70%),
    radial-gradient(60% 50% at 50% 100%, rgba(34, 211, 238, 0.1), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-title {
  font-size: clamp(2rem, 7vw, 3.4rem);
  max-width: 18ch;
  margin-inline: auto;
  margin-bottom: 1.1rem;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-mute);
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.hero-cta-wrap { margin-bottom: 1.75rem; }
.hero-cta-wrap .btn { width: 100%; }
@media (min-width: 540px) { .hero-cta-wrap .btn { width: auto; min-width: 320px; } }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem .9rem;
  font-size: .88rem;
  color: var(--ink-mute);
  font-weight: 500;
}
.hero-trust-check { color: var(--cyan); font-weight: 800; margin-right: .15rem; }

/* =============================================================
   8. Quiz
   ============================================================= */
.section-quiz { padding-top: 2rem; }
.quiz-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
@media (min-width: 540px) { .quiz-card { padding: 2.25rem 2.25rem 2.5rem; } }

.quiz-progress-wrap { margin-bottom: 1.75rem; }
.quiz-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: .55rem;
}
.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  border-radius: 999px;
  transition: width .5s var(--ease-out);
}
.quiz-progress-label { font-size: .8rem; color: var(--ink-mute); font-weight: 600; }

.quiz-step { }
.quiz-question {
  font-size: clamp(1.15rem, 3.4vw, 1.4rem);
  margin-bottom: 1.35rem;
  color: var(--ink);
}
.quiz-options { display: flex; flex-direction: column; gap: .7rem; }

.quiz-back {
  margin-top: 1.5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-mute);
  transition: color .2s var(--ease-out);
}
.quiz-back:hover { color: var(--cyan); }

/* =============================================================
   9. Result card
   ============================================================= */
.result-card {
  margin-top: 1.75rem;
  background: var(--danger-soft);
  border: 1.5px solid rgba(255, 107, 94, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.result-badge {
  display: inline-block;
  background: var(--danger);
  color: #1a0a08;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .06em;
  padding: .3rem .8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.result-text { font-size: 1.1rem; color: var(--ink); font-weight: 600; margin-bottom: 1.1rem; line-height: 1.5; }
.result-next { font-size: .95rem; color: var(--ink-mute); margin-bottom: 1.4rem; }

/* =============================================================
   10. Video section
   ============================================================= */
.section-video { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.video-block { margin-top: 1.5rem; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.6);
}
.video-frame iframe, .video-frame > div#yt-player { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-poster {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: top center;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .4s var(--ease-out);
  z-index: 2;
}
.video-poster.is-hidden { opacity: 0; pointer-events: none; }
.video-poster-tint { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,19,31,.35), rgba(6,19,31,.75)); }
.video-play {
  position: relative;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--cyan);
  color: #06131f;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5);
  animation: playPulse 2.4s infinite;
  transition: transform .25s var(--ease-out);
}
.video-play:hover { transform: scale(1.06); }
.video-play svg { margin-left: 4px; }
@keyframes playPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  70% { box-shadow: 0 0 0 22px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.video-progress-wrap { margin-top: 1.25rem; margin-bottom: 1.5rem; }
.video-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: .6rem;
}
.video-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  border-radius: 999px;
  transition: width .3s linear;
}
.video-progress-ticks {
  display: flex; justify-content: space-between;
  font-size: .74rem; font-weight: 700; color: var(--ink-mute);
  letter-spacing: .02em;
}
.video-progress-ticks span { transition: color .3s var(--ease-out); }
.video-progress-ticks span.is-reached { color: var(--cyan); }

/* =============================================================
   11. Capture form (light section)
   ============================================================= */
.section-capture { background: var(--paper); color: var(--navy); }
.section-capture .kicker { color: #0d7a90; }
.section-capture .section-title { color: var(--navy); }
.capture-form { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.form-field { display: flex; flex-direction: column; gap: .4rem; }
.form-field label { font-size: .85rem; font-weight: 700; color: var(--navy); }
.form-field input {
  padding: .95rem 1.1rem;
  border: 1.5px solid rgba(10, 31, 51, 0.16);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--navy);
  font-size: 1rem;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.form-field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); outline: none; }
.form-field input.is-invalid { border-color: var(--danger); }
.capture-form .btn { margin-top: .5rem; }

/* =============================================================
   12. Offer (light section)
   ============================================================= */
.section-offer { background: var(--paper-2); color: var(--navy); }
.section-offer .kicker { color: #0d7a90; }
.section-offer .section-title { color: var(--navy); }
.section-offer .section-intro { color: var(--navy-mute); }
.offer-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  margin-top: .5rem;
}
@media (min-width: 540px) { .offer-list { grid-template-columns: 1fr 1fr; } }
.offer-list li {
  display: flex; align-items: center; gap: .7rem;
  background: var(--paper);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  font-weight: 600;
  color: var(--navy);
  font-size: .95rem;
}
.offer-check {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-hover);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}

/* =============================================================
   13. Final CTA
   ============================================================= */
.section-final-cta {
  background: radial-gradient(80% 100% at 50% 0%, rgba(34, 211, 238, 0.14), transparent 60%), var(--bg);
  text-align: center;
  border-top: 1px solid var(--line);
}
.final-cta-title { font-size: clamp(1.5rem, 5vw, 2.1rem); max-width: 22ch; margin-inline: auto; margin-bottom: 1.6rem; }
.final-cta-note { margin-top: 1rem; font-size: .85rem; color: var(--ink-mute); }

/* =============================================================
   14. Authority (light section)
   ============================================================= */
.section-authority { background: var(--paper); color: var(--navy); }
.authority-inner {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
  text-align: center;
}
.authority-photo {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold-soft);
  box-shadow: 0 20px 40px -18px rgba(10, 31, 51, 0.35);
}
.authority-copy .kicker { color: #0d7a90; }
.authority-copy .section-title { color: var(--navy); }
.authority-copy p:last-child { color: var(--navy-mute); font-size: 1.02rem; max-width: 56ch; margin-inline: auto; }
@media (min-width: 720px) {
  .authority-inner { flex-direction: row; text-align: left; gap: 2.5rem; }
  .authority-copy p:last-child { margin-inline: 0; }
}

/* =============================================================
   15. FAQ (light section)
   ============================================================= */
.section-faq { background: var(--paper-2); color: var(--navy); }
.section-faq .kicker { color: #0d7a90; }
.section-faq .section-title { color: var(--navy); margin-bottom: 1.75rem; }
.faq-list { display: flex; flex-direction: column; gap: .7rem; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: .98rem;
  color: var(--navy);
  text-align: left;
}
.faq-q-icon { flex: none; font-size: 1.3rem; color: var(--gold-hover); transition: transform .3s var(--ease-out); font-weight: 400; }
.faq-item.is-open .faq-q-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease-out); }
.faq-a-inner { padding: 0 1.25rem 1.1rem; color: var(--navy-mute); font-size: .95rem; line-height: 1.6; }

/* =============================================================
   16. Footer CTA strip
   ============================================================= */
.footer-cta {
  background: #050f1a;
  padding-block: 2.25rem;
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer-cta-text { color: var(--ink-mute); margin-bottom: 1rem; font-size: .95rem; }

/* =============================================================
   17. Toast
   ============================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 12px);
  background: var(--navy);
  color: var(--ink);
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* =============================================================
   18. Responsive polish
   ============================================================= */
@media (min-width: 720px) {
  .section { padding-block: 6rem; }
}
@media (min-width: 1280px) {
  .section { padding-block: 7rem; }
}

/* =============================================================
   19. Reduced motion (only truly intrusive effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .video-play { animation: none; }
}
