:root {
  --bg: #050507;
  --surface: #121216;
  --surface-2: #1c1c1e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --quiet: #6e6e73;
  --teal: #2fb7b7;
  --teal-bright: #51cccc;
  --teal-soft: rgba(47, 183, 183, 0.16);
  --violet: #8b7cf6;
  --rose: #ff375f;
  --radius: 20px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 10% 0%, rgba(32, 127, 128, 0.28), transparent 60%),
    radial-gradient(90% 50% at 100% 30%, rgba(139, 124, 246, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px 48px;
}

.screen { display: none; animation: aparecer 0.35s ease; }
.screen.is-active { display: block; }

@keyframes aparecer {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.brand {
  font-weight: 800;
  letter-spacing: 0.28em;
  font-size: 14px;
  text-align: center;
  margin: 8px 0 40px;
}

.eyebrow, .label {
  display: block;
  color: var(--teal-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.label { margin-top: 4px; }

h1 { font-size: clamp(32px, 8vw, 44px); line-height: 1.08; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 12px; font-weight: 800; }
p { margin: 0 0 16px; }

.lead { color: var(--muted); font-size: 17px; }
.muted { color: var(--muted); font-size: 14px; }
.fine { color: var(--quiet); font-size: 12px; text-align: center; margin-top: 20px; }

.bullets { list-style: none; padding: 0; margin: 0 0 28px; }
.bullets li { padding: 6px 0 6px 28px; position: relative; color: var(--text); }
.bullets li::before {
  content: ""; position: absolute; left: 4px; top: 13px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}

.check { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; color: var(--muted); font-size: 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--teal); flex: none; }

.btn {
  display: block; width: 100%; text-align: center; text-decoration: none;
  border: 0; border-radius: 16px; padding: 17px 20px;
  background: var(--teal); color: #041414;
  font: 700 17px "Inter", system-ui, sans-serif; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--teal-bright); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); margin-top: 10px; }
.btn-ghost:hover { background: var(--surface-2); }

.link { background: none; border: 0; color: var(--muted); font: 500 14px "Inter", sans-serif; text-decoration: underline; cursor: pointer; padding: 8px; }

/* Preguntas */
.topbar { display: flex; align-items: center; gap: 12px; margin: 4px 0 36px; }
.back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; flex: none; }
.back:disabled { opacity: 0.3; cursor: default; }
.progress { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--teal-bright)); transition: width 0.3s ease; }
.count { color: var(--muted); font-size: 13px; min-width: 42px; text-align: right; }

.question { font-size: clamp(24px, 6vw, 30px); line-height: 1.2; margin-bottom: 24px; }

.options { display: grid; gap: 12px; }
.option {
  text-align: left; width: 100%; padding: 18px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font: 500 16px/1.4 "Inter", system-ui, sans-serif; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.option:hover { border-color: rgba(81, 204, 204, 0.5); }
.option:active { transform: scale(0.99); }
.option.is-selected { border-color: var(--teal); background: var(--teal-soft); }

/* Email */
.email-form { display: grid; gap: 12px; margin-bottom: 8px; }
.email-form input:not([type="checkbox"]) {
  width: 100%; padding: 17px 18px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: 16px "Inter", sans-serif;
}
.email-form input:not([type="checkbox"]):focus { outline: 2px solid var(--teal); outline-offset: 1px; }

/* Resultado */
.pattern { margin-bottom: 8px; background: linear-gradient(90deg, #fff, var(--teal-bright)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pattern-line { font-size: 19px; color: var(--text); font-weight: 600; margin-bottom: 24px; }

.card { background: rgba(28, 28, 30, 0.82); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; margin-bottom: 16px; }
.card p:last-child { margin-bottom: 0; }

.score-card { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.score { font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.score small { font-size: 20px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.level { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--teal-soft); color: var(--teal-bright); }
.level.alta { background: rgba(255, 55, 95, 0.15); color: #ff6b87; }
.level.moderada { background: rgba(255, 214, 10, 0.12); color: #ffd60a; }
.score-note { flex: 1 1 200px; color: var(--muted); font-size: 14px; margin: 0; }

.radar { width: 100%; max-width: 380px; margin: 8px auto 4px; }
.radar svg { width: 100%; height: auto; display: block; overflow: visible; }
.radar text { fill: var(--muted); font: 600 12px "Inter", sans-serif; }

.zones { display: grid; gap: 10px; margin-top: 16px; }
.zone { display: grid; grid-template-columns: 130px 1fr 36px; gap: 10px; align-items: center; font-size: 14px; }
.zone-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.zone-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--violet)); }
.zone.is-top .zone-fill { background: linear-gradient(90deg, var(--violet), var(--rose)); }
.zone-value { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 8px 0 8px 30px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 7px; color: var(--teal-bright); font-weight: 800; }

.offer { background: linear-gradient(160deg, rgba(20, 66, 69, 0.95), rgba(25, 30, 60, 0.95)); border-color: rgba(81, 204, 204, 0.25); }
.offer h2 { font-size: 24px; }
.days { padding-left: 22px; margin: 0 0 22px; }
.days li { padding: 4px 0; }

/* Lista de espera */
.waitlist .check { align-items: flex-start; margin: 4px 0 4px; font-size: 13px; }
.waitlist .check input { margin-top: 1px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist-status { font-size: 14px; color: var(--muted); margin: 10px 0 0; min-height: 1em; }
.waitlist-status.is-error { color: #ff6b87; }
.waitlist-done { padding: 16px 18px; border-radius: 16px; background: var(--teal-soft); color: var(--text); font-weight: 600; }

.actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

@media (min-width: 720px) {
  .app { padding-top: 48px; }
  .brand { margin-bottom: 56px; }
  .card { padding: 26px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  * { transition: none !important; }
}
