:root {
  --red: #E34A3B;
  --red-dark: #c63a2c;
  --ink: #1c1d20;
  --ink-2: #26282c;
  --ink-3: #3f444b;
  --paper: #ffffff;
  --mist: #f1f2f3;
  --line: #dee1e7;
  --muted: #707070;
  --azul: #1E5BB8;
  --amarillo: #F2A900;
  --verde: #2E9E48;
  --rojo: #D7263D;
  --gold: #C9A227;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #33363c 0%, var(--ink) 55%) fixed, var(--ink);
  color: #fff;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 16px 0;
}
.logo { width: 70px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); background: #fff; border-radius: 12px; padding: 4px 6px; }
.spectrum { display: flex; width: min(240px, 60vw); height: 4px; border-radius: 4px; overflow: hidden; }
.spectrum span { flex: 1; }
.spectrum span:nth-child(1) { background: var(--azul); }
.spectrum span:nth-child(2) { background: var(--amarillo); }
.spectrum span:nth-child(3) { background: var(--verde); }
.spectrum span:nth-child(4) { background: var(--rojo); }

main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px 16px 40px; }

.screen { display: none; animation: fade .35s ease both; }
.screen[data-active] { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Type ---------- */
h1 { font-size: clamp(2rem, 6.5vw, 3.4rem); line-height: 1.08; margin: 0 0 16px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.25rem, 4.2vw, 1.7rem); line-height: 1.25; margin: 0 0 12px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 0 0 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--red); margin: 0 0 12px; }
.lead { font-size: 1.08rem; color: #d7d9dd; margin: 0 0 20px; }
.muted { color: var(--muted); }
.micro { font-size: .8rem; color: #9aa0a8; margin: 12px 0 0; }
.rainbow {
  background: linear-gradient(90deg, var(--azul), var(--amarillo), var(--verde), var(--rojo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Hero ---------- */
.hero { display: grid; gap: 28px; align-items: center; }
.hero-photo { margin: 0; position: relative; justify-self: center; max-width: 320px; }
.hero-photo img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 353 / 460; object-fit: cover; object-position: top; width: 100%; height: auto; }
.hero-photo figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: rgba(28, 29, 32, .88); backdrop-filter: blur(6px);
  border-left: 4px solid var(--red); border-radius: 10px; padding: 10px 12px; font-size: .85rem;
}
.hero-photo figcaption span { display: block; color: #c7cad0; font-size: .78rem; }
@media (min-width: 820px) {
  .hero { grid-template-columns: 1.25fr 1fr; gap: 48px; }
  .hero-photo { max-width: 360px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.chip { font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; color: #fff; }
.c-azul { background: var(--azul); }
.c-amarillo { background: var(--amarillo); color: #2a2100; }
.c-verde { background: var(--verde); }
.c-rojo { background: var(--rojo); }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  border-radius: 999px; padding: 14px 24px; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(227, 74, 59, .35); }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary[disabled] { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { font-size: 1.05rem; padding: 16px 28px; }
.btn-block { width: 100%; }
.link-btn { appearance: none; background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; padding: 4px 0; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }
.link-btn[disabled] { visibility: hidden; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper); color: var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 20px; max-width: 640px; margin: 0 auto;
}
@media (min-width: 600px) { .card { padding: 36px 40px; } }
.card.center { text-align: center; }

/* ---------- Quiz ---------- */
.progress { height: 6px; background: var(--mist); border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--azul), var(--amarillo), var(--verde), var(--rojo)); background-size: 640px 100%; transition: width .35s ease; }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.options { display: grid; gap: 10px; }
.option {
  appearance: none; text-align: left; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 15px 16px;
  cursor: pointer; display: flex; gap: 12px; align-items: center; transition: border-color .15s, background .15s, transform .1s;
}
.option:hover { border-color: var(--ink-3); }
.option:active { transform: scale(.99); }
.option .key {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--mist);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--ink-3);
}
.option.picked { border-color: var(--red); background: #fff4f2; }
.option.picked .key { background: var(--red); color: #fff; }

/* ---------- Loader ---------- */
.loader { display: flex; justify-content: center; gap: 10px; margin: 8px 0 24px; }
.loader span { width: 16px; height: 16px; border-radius: 50%; animation: bounce 1s infinite ease-in-out; }
.loader span:nth-child(1) { background: var(--azul); }
.loader span:nth-child(2) { background: var(--amarillo); animation-delay: .12s; }
.loader span:nth-child(3) { background: var(--verde); animation-delay: .24s; }
.loader span:nth-child(4) { background: var(--rojo); animation-delay: .36s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- Gate ---------- */
.gate h2 { margin-top: 4px; }
.teaser-badge {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; margin-bottom: 18px;
}
.teaser-badge .dot { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.teaser-badge strong { display: block; font-size: 1.15rem; }
.teaser-badge small { color: var(--ink-3); }
.blurred { filter: blur(5px); user-select: none; pointer-events: none; opacity: .7; }
.field { display: block; margin: 14px 0; }
.field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; font-size: 16px; padding: 14px 16px; border: 2px solid var(--line);
  border-radius: 12px; color: var(--ink); background: #fff; outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--red); }
.check { display: flex; gap: 10px; font-size: .82rem; color: var(--ink-3); margin: 14px 0; align-items: flex-start; }
.check input { margin-top: 3px; accent-color: var(--red); width: 16px; height: 16px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { color: var(--red-dark); font-size: .88rem; min-height: 1.2em; margin: 0 0 8px; }
.skip { display: block; margin: 12px auto 0; font-size: .85rem; }
.gate .micro { color: var(--muted); text-align: center; }

/* ---------- Result ---------- */
.result-hero {
  border-radius: var(--radius); padding: 28px 20px; color: #fff; text-align: center;
  box-shadow: var(--shadow); max-width: 760px; margin: 0 auto 20px; position: relative; overflow: hidden;
}
.result-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(500px 220px at 50% 0%, rgba(255,255,255,.28), transparent 70%); pointer-events: none;
}
.result-hero .eyebrow { color: rgba(255,255,255,.85); }
.result-hero h1 { margin-bottom: 6px; }
.result-hero .tagline { font-size: 1.1rem; font-weight: 600; opacity: .95; margin: 0; }
.result-hero.amarillo { color: #2a2100; }
.result-hero.amarillo .eyebrow { color: rgba(42,33,0,.75); }

.result-grid { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.result-grid .card { max-width: none; margin: 0; padding: 24px 20px; }
@media (min-width: 600px) { .result-grid .card { padding: 28px 32px; } }

.bars { display: grid; gap: 12px; margin-top: 6px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 44px; gap: 10px; align-items: center; font-size: .9rem; font-weight: 600; }
.bar-track { height: 12px; background: var(--mist); border-radius: 12px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 12px; width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.bar-row .pct { text-align: right; color: var(--ink-3); }
@media (max-width: 380px) { .bar-row { grid-template-columns: 92px 1fr 40px; font-size: .82rem; } }

.trait-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.trait-list li { font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.checklist { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: #fff; background: var(--verde); }
.callout { border-left: 4px solid var(--red); background: #fff4f2; padding: 14px 16px; border-radius: 0 12px 12px 0; margin-top: 12px; }
.callout.tip { border-color: var(--verde); background: #eef8f0; }
.split { display: grid; gap: 16px; }
@media (min-width: 640px) { .split { grid-template-columns: 1fr 1fr; } }
.second { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.second .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; }

.locked { position: relative; }
.locked-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 20px; background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,.96) 40%);
  border-radius: var(--radius); color: var(--ink);
}

/* ---------- Offer ---------- */
.offer {
  background: linear-gradient(160deg, #0f1f3d 0%, #0b1730 60%, #08101f 100%); color: #fff;
  border: 1px solid rgba(201, 162, 39, .45);
}
.offer .eyebrow { color: var(--gold); }
.offer h2 { color: #fff; }
.offer p { color: #cfd6e4; }
.offer-grid { display: grid; gap: 20px; align-items: center; }
@media (min-width: 640px) { .offer-grid { grid-template-columns: 220px 1fr; } }
.offer img { border-radius: 12px; width: 100%; max-width: 260px; margin: 0 auto; }
.offer ul { margin: 12px 0 18px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .92rem; color: #e6eaf2; }
.offer ul li::before { content: "◆"; color: var(--gold); margin-right: 8px; font-size: .7rem; }
.price { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.price strong { font-size: 1.8rem; color: #fff; }
.price span { color: #9fb0cc; font-size: .9rem; }
.modules-for-you { background: rgba(201,162,39,.12); border: 1px dashed rgba(201,162,39,.55); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; font-size: .9rem; color: #f3e7bf; }
.modules-for-you strong { color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.countdown { text-align: center; font-size: .92rem; color: var(--ink-3); margin-top: 12px; }

/* ---------- Footer ---------- */
.footer { text-align: center; font-size: .82rem; color: #9aa0a8; padding: 20px 16px 32px; border-top: 1px solid #2c2e33; }
.footer p { margin: 4px 0; }
.footer a { color: #cfd2d7; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
