/* ============================================================
   Test de Madurez en IA — estilos (consistentes con la web)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
  --bg: #05060d;
  --bg-alt: #0a0c18;
  --surface: #10121f;
  --surface-2: #161932;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eef0ff;
  --text-muted: #9ea3c9;
  --text-soft: #c5c9e8;

  --purple: #7c3aed;
  --blue: #3b82f6;
  --teal: #14e0d1;

  --gradient: linear-gradient(135deg, #7c3aed 0%, #5b2fe0 35%, #3b82f6 70%, #14e0d1 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(20,224,209,0.18));

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-glow: 0 20px 60px -20px rgba(124, 58, 237, 0.45);
  --shadow-card: 0 8px 30px -12px rgba(0, 0, 0, 0.6);

  --container: 860px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124,58,237,0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(20,224,209,0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(5, 6, 13, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1180px; margin-inline: auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { font-weight: 700; letter-spacing: -0.01em; }
.nav__back { color: var(--text-muted); font-size: 0.9rem; }
.nav__back:hover { color: var(--text); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.96rem;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 16px 40px -14px rgba(124, 58, 237, 0.7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 22px 48px -14px rgba(124, 58, 237, 0.85); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost { background: rgba(255,255,255,0.04); border: 1px solid var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.28); }
.btn--ghost:disabled { opacity: 0.35; cursor: not-allowed; }
.btn--full { width: 100%; }

/* ---------- Screens ---------- */
.screen { display: none; padding: 56px 0 80px; }
.screen--active { display: block; animation: fade 0.4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Intro ---------- */
.kicker {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 16px;
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--gradient-soft);
}
.intro h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 18px; }
.intro__lead { color: var(--text-soft); font-size: 1.12rem; max-width: 620px; margin-bottom: 28px; }
.intro__meta { display: flex; flex-wrap: wrap; gap: 22px; margin: 26px 0 32px; }
.intro__meta div { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.95rem; }
.intro__meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.intro__author {
  margin-top: 40px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); display: flex; gap: 16px; align-items: center;
}
.intro__author strong { color: var(--text); }
.intro__author p { color: var(--text-muted); font-size: 0.92rem; }
.intro__avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--gradient); display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 1.1rem;
}

/* ---------- Quiz ---------- */
.q-progress { height: 6px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; margin-bottom: 28px; }
.q-progress__bar { height: 100%; width: 0; background: var(--gradient); border-radius: 999px; transition: width 0.4s var(--ease); }
.q-counter { color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.q-dim { display: inline-block; margin: 8px 0 18px; font-size: 0.92rem; color: var(--teal); font-weight: 600; }
.q-text { font-size: clamp(1.3rem, 3.5vw, 1.8rem); line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 28px; }

.q-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.option {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text-soft); font-size: 1.02rem; width: 100%;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}
.option:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateX(3px); }
.option__radio {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--border-strong); position: relative; transition: all 0.2s var(--ease);
}
.option--selected { border-color: var(--purple); background: var(--gradient-soft); color: var(--text); }
.option--selected .option__radio { border-color: var(--teal); background: var(--teal); box-shadow: 0 0 12px rgba(20,224,209,0.6); }
.option--selected .option__radio::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg);
}

.q-nav { display: flex; justify-content: space-between; gap: 12px; }

/* ---------- Report ---------- */
.r-hero {
  text-align: center; padding: 36px 28px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-card); position: relative; overflow: hidden;
}
.r-hero::before {
  content: ""; position: absolute; inset: 0; background: var(--gradient-soft); opacity: 0.5; z-index: 0;
}
.r-hero > * { position: relative; z-index: 1; }
.r-level-tag {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 12px; padding: 5px 14px; border: 1px solid var(--border); border-radius: 999px;
}
.r-level-name { font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1.05; margin-bottom: 8px; }
.r-level-score { font-size: 1.1rem; color: var(--text-soft); font-weight: 600; margin-bottom: 18px; }
.r-gauge { height: 10px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; max-width: 420px; margin: 0 auto 20px; }
.r-gauge__fill { height: 100%; width: 0; background: var(--gradient); border-radius: 999px; transition: width 0.8s var(--ease); }
.r-level-desc { color: var(--text-soft); max-width: 560px; margin: 0 auto; }

.r-section-title { font-size: 1.4rem; margin: 48px 0 20px; letter-spacing: -0.01em; }

/* Dimensiones */
.dim-row { padding: 20px 0; border-bottom: 1px solid var(--border); }
.dim-row:last-child { border-bottom: none; }
.dim-row__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.dim-row__name { font-weight: 600; }
.dim-row__score { font-weight: 700; color: var(--teal); font-size: 1.05rem; }
.dim-row__rec { color: var(--text-muted); font-size: 0.95rem; margin-top: 12px; }
.bars { display: flex; gap: 6px; }
.bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); transition: background 0.4s var(--ease); }
.bar--on { background: var(--gradient); }

/* Prioridades */
.priorities { display: flex; flex-direction: column; gap: 14px; }
.priority {
  display: flex; gap: 16px; padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.priority__num {
  width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--gradient);
  display: grid; place-items: center; font-weight: 700; color: #fff;
}
.priority h4 { font-size: 1.05rem; margin-bottom: 6px; }
.priority p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 10px; }
.priority__formacion { font-size: 0.88rem; color: var(--text-soft); }
.priority__formacion strong { color: var(--teal); }

/* CTA + Form */
.r-cta {
  margin-top: 48px; padding: 36px 32px; border-radius: var(--radius-lg); text-align: center;
  border: 1px solid var(--border-strong);
  background: var(--gradient-soft);
}
.r-cta h3 { font-size: 1.6rem; margin-bottom: 10px; letter-spacing: -0.01em; }
.r-cta p { color: var(--text-soft); max-width: 520px; margin: 0 auto 24px; }
.r-cta__buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.lead {
  margin-top: 36px; padding: 32px; border: 1px solid rgba(124,58,237,0.45); border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124,58,237,0.12) 0%, transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(20,224,209,0.10) 0%, transparent 55%),
    var(--surface);
}
.lead__badge {
  display: inline-block; margin-bottom: 14px; padding: 5px 13px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  background: rgba(124,58,237,0.16); border: 1px solid rgba(124,58,237,0.4); color: var(--text-soft);
}
.lead h3 { font-size: 1.3rem; margin-bottom: 6px; }
.lead p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 22px; }
.lead__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; color: var(--text-muted); }
.field input, .field textarea {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px; color: var(--text); font-size: 0.98rem; font-family: inherit; transition: border-color 0.2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--purple); }
.lead__consent { font-size: 0.8rem; color: var(--text-muted); margin-top: 14px; text-align: center; }
.lead__consent a { color: var(--text-soft); text-decoration: underline; }
.hidden-field { position: absolute; left: -9999px; }
.lead-ok {
  display: none; padding: 8px 4px; color: var(--text); text-align: center;
}
.lead-ok__check {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700;
  color: #05060d; background: linear-gradient(135deg, #14e0d1, #3b82f6);
}
.lead-ok h4 { font-size: 1.25rem; margin-bottom: 6px; }
.lead-ok p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 14px; }
.lead-ok__pass {
  display: inline-block; margin: 0 auto 22px; padding: 12px 26px; border-radius: var(--radius-sm);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.3rem; font-weight: 700;
  letter-spacing: 0.12em; color: var(--text);
  background: var(--bg-alt); border: 1px dashed rgba(20,224,209,0.55);
}
.lead-ok__hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 14px; margin-bottom: 0; }

/* Footer */
.foot { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 0.88rem; border-top: 1px solid var(--border); }
.foot a { color: var(--text-soft); }

@media (max-width: 640px) {
  .lead__grid { grid-template-columns: 1fr; }
  .q-nav .btn { flex: 1; padding: 12px 18px; }
  .intro__author { flex-direction: column; text-align: center; }
}
