/* ===========================================================
   ByeBye Nopor — Landing / Quiz interactivo
   Estética: clara, limpia, esperanzadora
   =========================================================== */

:root {
  --teal:        #0f9e8e;
  --teal-dark:   #0c7d70;
  --sky:         #4aa9e0;
  --sky-soft:    #d9eefb;
  --mint:        #e6f7f3;
  --ink:         #15303a;
  --ink-soft:    #4a6670;
  --line:        #e3eef0;
  --white:       #ffffff;
  --bg:          #f5fbfb;

  --radius:      18px;
  --radius-lg:   26px;
  --shadow:      0 10px 30px rgba(15, 158, 142, 0.10);
  --shadow-hover:0 16px 40px rgba(15, 158, 142, 0.18);
  --grad:        linear-gradient(120deg, var(--teal) 0%, var(--sky) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  line-height: 1.55;
}

h1, h2, .brand-name { font-family: 'Poppins', system-ui, sans-serif; }

/* ---------- Fondo decorativo ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}
.blob-1 { width: 460px; height: 460px; background: #c8ecf6; top: -140px; right: -120px; }
.blob-2 { width: 420px; height: 420px; background: #d6f3ea; bottom: -160px; left: -120px; }
.blob-3 { width: 320px; height: 320px; background: #eaf6ff; top: 40%; left: 55%; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 40px); }
.narrow { max-width: 720px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 48px);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 251, 251, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow);
}
.brand-name { font-weight: 700; font-size: 1.18rem; letter-spacing: -.3px; }
.brand-accent { color: var(--teal); }

/* ---------- Navegación ---------- */
.nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 30px); }
.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .96rem;
  padding: 6px 2px;
  position: relative;
  transition: color .15s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; border-radius: 2px;
  background: var(--teal);
  transition: width .2s ease;
}
.nav-link:hover { color: var(--teal-dark); }
.nav-link:hover::after { width: 100%; }

/* Botón hamburguesa (oculto en escritorio) */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block; height: 2.5px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(15, 158, 142, 0.10);
    padding: 14px clamp(18px, 5vw, 40px) 22px;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: transform .25s ease, opacity .25s ease, visibility .25s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-link::after { display: none; }
  .nav .btn { margin-top: 12px; justify-content: center; }
}
.safe-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 500;
  color: var(--teal-dark);
  background: var(--mint);
  border: 1px solid var(--line);
  padding: 7px 13px;
  border-radius: 999px;
}

/* ---------- Stage / screens ---------- */
/* ===========================================================
   LANDING
   =========================================================== */

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(30px, 5vw, 60px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-visual { display: flex; justify-content: center; }
.hero-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 34px 30px;
  text-align: center;
  max-width: 320px;
}
.hero-emoji { font-size: 3.4rem; }
.hero-card-title { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.3rem; margin-top: 10px; }
.hero-card-text { color: var(--ink-soft); margin-top: 8px; font-size: .98rem; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
}

/* Ocultar la tarjeta "Libertad real" solo en móvil */
@media (max-width: 760px) {
  .hero-visual { display: none; }
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: clamp(10px, 3vw, 30px) auto;
}
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { display: block; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--teal); }
.stat-label { display: block; color: var(--ink-soft); font-size: .92rem; margin-top: 6px; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Secciones genéricas ---------- */
.section { padding: clamp(40px, 7vw, 80px) 0; scroll-margin-top: 80px; }
#top { scroll-margin-top: 80px; }
.center-eyebrow { text-align: center; }
.section-title { font-family: 'Poppins', sans-serif; font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 700; line-height: 1.18; letter-spacing: -.5px; }
.section-text { color: var(--ink-soft); font-size: 1.08rem; margin-top: 16px; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 42px;
}
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 2.2rem; }
.feature h3 { font-family: 'Poppins', sans-serif; font-size: 1.2rem; margin: 12px 0 8px; }
.feature p { color: var(--ink-soft); font-size: .96rem; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

/* ---------- Charlas ---------- */
.talks { }
.talks-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.talks-visual {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--mint);
}
.talks-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.check-list { list-style: none; margin: 20px 0 26px; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; color: var(--ink); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--mint); color: var(--teal-dark);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
@media (max-width: 820px) {
  .talks-grid { grid-template-columns: 1fr; text-align: center; }
  .talks-visual { max-width: 260px; margin: 0 auto; }
  .check-list { text-align: left; max-width: 360px; margin-inline: auto; }
}

/* ---------- Zona inferior (CTA final + footer) ---------- */
.footer-zone {
  margin-top: 40px;
  background: var(--grad);
  color: #ffffff;
}
.cta-final { color: #ffffff; }
.cta-final .section-title { color: #ffffff; }
.cta-final .section-text { color: rgba(255, 255, 255, 0.9); margin-bottom: 6px; }

/* Botón blanco para destacar sobre el fondo de color */
.btn-white { background: #ffffff; color: var(--teal-dark); box-shadow: var(--shadow); }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); }
.btn-white svg { transition: transform .2s ease; }
.btn-white:hover svg { transform: translateX(4px); }

/* ===========================================================
   MODAL / POPUP
   =========================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 60, 60, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(14px, 4vw, 40px);
  overflow-y: auto;
}
.modal-overlay.is-open { display: flex; animation: overlayIn .25s ease both; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px rgba(13, 60, 60, 0.35);
  animation: modalIn .3s ease both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: var(--mint); color: var(--teal-dark);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.modal-close:hover { background: var(--sky-soft); transform: rotate(90deg); }
.modal-body { padding: clamp(28px, 5vw, 44px); }
.modal-badge { margin-bottom: 16px; }

/* ---------- Screens dentro del modal ---------- */
.screen { display: none; }
.screen.is-active { display: block; animation: fadeUp .4s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.screen-inner { text-align: center; }

/* ---------- Tipografía hero ---------- */
.hero-inner { text-align: center; }

/* ---------- Tipografía de pantallas ---------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 14px;
}
.hero-title { font-size: clamp(1.9rem, 5.5vw, 3rem); line-height: 1.12; font-weight: 700; letter-spacing: -1px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--ink-soft); margin-top: 16px; }
.hero-note {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 22px;
  font-size: .9rem; color: var(--teal-dark);
  background: var(--mint);
  padding: 9px 16px; border-radius: 999px;
}
.screen-title { font-size: clamp(1.45rem, 4vw, 2.1rem); line-height: 1.2; font-weight: 600; letter-spacing: -.5px; }
.screen-help { color: var(--ink-soft); margin-top: 12px; font-size: 1rem; }
.emoji-hero { font-size: 3.2rem; margin-bottom: 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: 1.02rem;
  border: none; border-radius: 999px;
  padding: 15px 30px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-lg { font-size: 1.1rem; padding: 17px 38px; }
.btn-sm { font-size: .92rem; padding: 11px 20px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-primary svg { transition: transform .2s ease; }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost {
  background: transparent; color: var(--teal-dark);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--mint); transform: translateY(-1px); }
.btn-back {
  margin-top: 24px;
  background: none; border: none;
  color: var(--ink-soft); font-size: .92rem; font-weight: 500;
  cursor: pointer; padding: 6px 10px; border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.btn-back:hover { color: var(--teal-dark); background: var(--mint); }

/* ---------- Opciones (tarjetas) ---------- */
.options { display: grid; gap: 12px; margin-top: 26px; }
.options-stack { grid-template-columns: 1fr; }
.option-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem; font-weight: 500; color: var(--ink);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.option-card:hover {
  border-color: var(--teal);
  background: var(--mint);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.option-card.selected { border-color: var(--teal); background: var(--mint); }
.option-emoji { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.option-text { line-height: 1.35; }

/* Likert */
.likert-options { gap: 10px; }
.option-card.likert { justify-content: flex-start; gap: 14px; }
.likert-num {
  display: grid; place-items: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 9px;
  background: var(--sky-soft);
  color: var(--teal-dark); font-weight: 700;
}
.option-card.likert:hover .likert-num,
.option-card.likert.selected .likert-num { background: var(--teal); color: #fff; }

/* Reason grid */
.reason-grid { grid-template-columns: 1fr 1fr; }
.option-card.reason { flex-direction: column; align-items: flex-start; gap: 8px; }
@media (max-width: 460px) { .reason-grid { grid-template-columns: 1fr; } }

/* ---------- Link cards (recursos) ---------- */
.link-cards { display: grid; gap: 14px; margin-top: 26px; text-align: left; }
.link-card {
  display: block;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none; color: var(--ink);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.link-card:hover { border-color: var(--sky); transform: translateY(-2px); box-shadow: var(--shadow); }
.link-card-title { display: block; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.1rem; }
.link-card-sub { display: block; color: var(--ink-soft); font-size: .92rem; margin-top: 5px; }
.link-card-go { display: inline-block; color: var(--teal); font-weight: 600; margin-top: 10px; font-size: .9rem; }

/* ---------- Test ---------- */
.test-progress { margin-bottom: 26px; }
.test-progress-bar {
  height: 8px; width: 100%;
  background: var(--sky-soft);
  border-radius: 999px; overflow: hidden;
}
.test-progress-bar span {
  display: block; height: 100%; width: 10%;
  background: var(--grad);
  border-radius: 999px;
  transition: width .35s ease;
}
.test-progress-label { display: block; margin-top: 10px; font-size: .85rem; color: var(--ink-soft); font-weight: 500; }
.test-question { min-height: 2.4em; display: flex; align-items: center; justify-content: center; }

/* ---------- Resultado ---------- */
.result-badge {
  display: inline-block;
  font-weight: 600; font-size: .85rem;
  padding: 8px 18px; border-radius: 999px;
  margin-bottom: 14px;
}
.result-badge.low  { background: #e3f7ea; color: #1f8a4c; }
.result-badge.mid  { background: #fff3da; color: #b5790a; }
.result-badge.high { background: #fde6e2; color: #c14a35; }
.result-score {
  margin-top: 18px;
  font-size: .9rem; color: var(--ink-soft);
  background: var(--mint); border-radius: 12px;
  padding: 12px 16px; display: inline-block;
}
.result-disclaimer { margin-top: 20px; font-size: .8rem; color: var(--ink-soft); opacity: .85; }

/* ---------- Perks ---------- */
.perks {
  list-style: none; text-align: left;
  display: inline-block; margin: 24px auto 0;
}
.perks li { padding: 7px 0; font-size: 1rem; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 24px 18px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: .9rem;
}
.site-footer p { opacity: .9; }

/* ---------- Espaciado de botones dentro del modal ---------- */
.modal-body .screen-inner .btn { margin-top: 26px; }

/* ===========================================================
   AJUSTES MÓVILES PEQUEÑOS (≤ 480px)
   =========================================================== */
@media (max-width: 480px) {
  .hero { padding-top: 30px; }
  .hero-title { letter-spacing: -.5px; }

  /* Botones de acción a ancho completo y bien tocables */
  .hero-actions { width: 100%; }
  .hero-actions .btn,
  .cta-final .btn { width: 100%; }
  .btn-lg { padding: 16px 24px; font-size: 1.05rem; }

  /* Tarjeta del hero un poco más estrecha */
  .hero-card { padding: 28px 22px; }

  /* Blobs decorativos más contenidos */
  .blob-1 { width: 320px; height: 320px; }
  .blob-2 { width: 300px; height: 300px; }
  .blob-3 { display: none; }

  /* Modal a casi pantalla completa */
  .modal-overlay { padding: 10px; }
  .modal-body { padding: 30px 20px; }
  .modal-close { top: 10px; right: 10px; }

  /* Opciones del cuestionario más compactas */
  .option-card { padding: 15px 16px; font-size: .98rem; }
  .option-emoji { font-size: 1.35rem; }
}

/* Evita desbordes por palabras largas en pantallas mínimas */
.section-title, .hero-title, .screen-title { overflow-wrap: break-word; }

/* ---------- Accesibilidad ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  .screen.is-active { animation: none; }
  * { transition: none !important; }
}
