/* ==========================================================
   Test digital · Networker con IA
   Archetype: Mouse-Reactive Gradient (navy + red neuronal)
   ========================================================== */
:root {
  --navy: #020B2B;
  --navy-2: #06143F;
  --blue: #087BFF;
  --green: #79FB25;
  --gold: #FFB629;
  --purple: #A020F0;
  --white: #FFFFFF;
  --muted: rgba(255,255,255,.72);
  --line: rgba(255,255,255,.12);
  --card: rgba(8, 26, 78, .55);
  --ease: cubic-bezier(.22,.8,.24,1);
  --mx: 50%; --my: 30%;
  --font-h: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-b: "Inter", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
strong { color: var(--white); font-weight: 700; }

/* ---------- Fondo: red neuronal + brillo que sigue el mouse ---------- */
.net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .55; }
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px circle at var(--mx) var(--my), rgba(8,123,255,.22), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(160,32,240,.10), transparent 70%),
    radial-gradient(800px 500px at 0% 100%, rgba(121,251,37,.07), transparent 70%),
    linear-gradient(180deg, transparent 0%, rgba(2,11,43,.6) 100%);
  transition: background-position .2s linear;
}

/* ---------- Barra superior ---------- */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-h); font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,182,41,.5), 0 0 18px rgba(8,123,255,.5); }
.brand b { color: var(--green); }

.steps { display: none; list-style: none; margin: 0; padding: 0; gap: 6px; align-items: center; }
.js .steps { display: flex; }
.steps li {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.steps li.is-done { color: var(--white); border-color: rgba(8,123,255,.5); background: rgba(8,123,255,.12); }
.steps li.is-current { color: var(--navy); background: var(--green); border-color: var(--green); }
@media (max-width: 720px) {
  .steps li span { font-size: 0; }
  .steps li { width: 10px; height: 10px; padding: 0; }
  .brand span { font-size: 14px; }
}

/* ---------- Escenario de slides ---------- */
.stage { position: relative; z-index: 2; overflow: hidden; overflow: clip; }
.slide { padding: 24px clamp(16px, 4vw, 40px) 48px; }

/* Con JS: modo slides (sin JS se ve todo como página normal) */
.js .stage { min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); display: grid; }
.js .slide {
  grid-area: 1 / 1;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transform: translateX(40px) scale(.985);
  transition: opacity .38s var(--ease), transform .38s var(--ease), visibility 0s linear .38s;
}
.js .slide.is-leaving-back { transform: translateX(40px) scale(.985); }
.js .slide.is-leaving { transform: translateX(-40px) scale(.985); }
.js .slide.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .38s var(--ease) .06s, transform .38s var(--ease) .06s, visibility 0s;
}
.js .slide.enter-from-left { transform: translateX(-40px) scale(.985); }
html:not(.js) [data-nojs="hide"] { display: none !important; }

/* ---------- Tipografía común ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow--gold { color: var(--gold); }
.title {
  font-family: var(--font-h); font-weight: 800; text-transform: uppercase;
  font-size: clamp(30px, 5.2vw, 58px); line-height: 1.02; letter-spacing: -.015em; margin: 0 0 18px;
  text-wrap: balance;
}
.hl-green { color: var(--green); text-shadow: 0 0 28px rgba(121,251,37,.35); }
.hl-gold { color: var(--gold); }
.lead { font-size: clamp(17px, 1.7vw, 20px); color: var(--muted); margin: 0 0 22px; max-width: 46ch; }
.lead strong { color: var(--gold); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 16px 30px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--font-h); font-weight: 800; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), filter .2s;
}
.btn svg { width: 22px; height: 22px; flex: none; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .opt:focus-visible, .back:focus-visible, .again:focus-visible, .brand:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.btn--start { background: var(--green); color: var(--navy); box-shadow: 0 10px 34px rgba(121,251,37,.35), inset 0 -3px 0 rgba(0,0,0,.12); }
.btn--start:hover { box-shadow: 0 14px 44px rgba(121,251,37,.5), inset 0 -3px 0 rgba(0,0,0,.12); transform: translateY(-2px); }
.btn--blue { background: var(--blue); color: var(--white); box-shadow: 0 10px 30px rgba(8,123,255,.4); }
.btn--blue:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(8,123,255,.55); }

/* Botón WhatsApp: verde exacto del logo #79FB25, texto navy negrita */
.btn--wa {
  background: #79FB25; color: #020B2B; font-weight: 800;
  width: 100%; max-width: 560px; min-height: 68px; font-size: clamp(15px, 1.8vw, 18px); line-height: 1.2; text-align: left;
  box-shadow: 0 0 0 0 rgba(121,251,37,.55), 0 12px 40px rgba(121,251,37,.35);
  animation: waPulse 2.4s var(--ease) infinite;
}
.btn--wa svg { width: 30px; height: 30px; }
.btn--wa:hover { transform: translateY(-2px); filter: brightness(1.04); }
@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(121,251,37,.55), 0 12px 40px rgba(121,251,37,.35); }
  70% { box-shadow: 0 0 0 16px rgba(121,251,37,0), 0 12px 40px rgba(121,251,37,.35); }
  100% { box-shadow: 0 0 0 0 rgba(121,251,37,0), 0 12px 40px rgba(121,251,37,.35); }
}

/* ---------- Bienvenida ---------- */
.welcome {
  width: 100%; max-width: 1120px;
  display: grid; grid-template-columns: minmax(240px, 400px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center;
}
.logo-orb { position: relative; aspect-ratio: 1; width: 100%; max-width: 400px; justify-self: center; }
.logo-orb img { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; filter: drop-shadow(0 0 40px rgba(8,123,255,.55)); animation: float 6s ease-in-out infinite; }
.orb-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(255,182,41,.9) 70%, transparent 78%, transparent 85%, rgba(8,123,255,.9) 95%, transparent);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }

.bubble {
  position: relative; margin: 0 0 22px; padding: 18px 20px; max-width: 56ch;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px 20px 20px 20px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.bubble p { margin: 0; color: var(--muted); font-size: 15.5px; }
.bubble p + p { margin-top: 10px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0 0 28px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 14px; font-weight: 600; }
.chips i { font-style: normal; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: var(--navy); font-size: 12px; font-weight: 800; }
.chips li:last-child i { background: var(--gold); }

/* Entrada escalonada de la bienvenida */
.js .is-active .welcome-copy > * { animation: rise .6s var(--ease) both; }
.js .is-active .welcome-copy > *:nth-child(2) { animation-delay: .08s; }
.js .is-active .welcome-copy > *:nth-child(3) { animation-delay: .16s; }
.js .is-active .welcome-copy > *:nth-child(4) { animation-delay: .24s; }
.js .is-active .welcome-copy > *:nth-child(5) { animation-delay: .32s; }
.js .is-active .welcome-copy > *:nth-child(6) { animation-delay: .40s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .welcome { grid-template-columns: 1fr; text-align: center; gap: 18px; }
  .logo-orb { max-width: 190px; }
  .welcome-copy { display: flex; flex-direction: column; align-items: center; }
  .bubble { text-align: left; }
  .chips { justify-content: center; }
  .btn--start { width: 100%; max-width: 420px; position: sticky; bottom: 14px; z-index: 3; }
  .js .slide { place-items: start center; }
}
@media (max-width: 560px) {
  .logo-orb { max-width: 124px; }
  .orb-ring { inset: -8px; }
  .title { font-size: 27px; margin-bottom: 12px; }
  .lead { font-size: 16px; margin-bottom: 16px; }
  .bubble { padding: 14px 16px; margin-bottom: 16px; }
  .bubble p { font-size: 14.5px; }
  .chips { gap: 6px; margin-bottom: 20px; }
  .chips li { font-size: 12.5px; padding: 6px 10px; }
  .eyebrow { font-size: 11px; margin-bottom: 10px; }
}

/* ---------- Preguntas ---------- */
.q { width: 100%; max-width: 760px; }
.q-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.back {
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s, border-color .2s;
}
.back:hover { color: var(--white); border-color: rgba(255,255,255,.35); }
.q-count { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.q-count b { color: var(--blue); font-size: 18px; }
.q-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 30px; }
.q-bar span {
  display: block; height: 100%; width: calc(var(--p) * 100%); border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  box-shadow: 0 0 16px rgba(8,123,255,.6);
  transform-origin: left; transform: scaleX(.6); transition: transform .6s var(--ease) .15s;
}
.is-active .q-bar span { transform: scaleX(1); }

.q-ask { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 26px; }
.q-avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,182,41,.55), 0 0 20px rgba(8,123,255,.45); }
.q-title {
  margin: 0; padding: 16px 20px; border-radius: 4px 22px 22px 22px;
  background: linear-gradient(135deg, rgba(8,123,255,.22), rgba(8,26,78,.6)); border: 1px solid rgba(8,123,255,.35);
  font-family: var(--font-h); font-weight: 700; font-size: clamp(20px, 2.6vw, 28px); line-height: 1.25; text-wrap: balance;
}

.options { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; cursor: pointer;
  padding: 16px 18px; min-height: 74px; border-radius: 18px;
  background: var(--card); border: 1.5px solid var(--line); color: var(--white);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease);
}
.js .is-active .opt { animation: rise .5s var(--ease) both; }
.js .is-active .opt:nth-child(2) { animation-delay: .07s; }
.js .is-active .opt:nth-child(3) { animation-delay: .14s; }
@media (hover: hover) { .opt:hover { border-color: rgba(8,123,255,.7); background: rgba(8,123,255,.14); transform: translateX(4px); } }
.opt-l {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  font-family: var(--font-h); font-weight: 800; font-size: 17px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--blue);
  transition: background .2s, color .2s, border-color .2s;
}
.opt-t { font-size: 16px; line-height: 1.45; }
.opt[aria-checked="true"] { border-color: var(--green); background: rgba(121,251,37,.1); box-shadow: 0 0 0 4px rgba(121,251,37,.12), 0 10px 30px rgba(121,251,37,.12); transform: none; }
.opt[aria-checked="true"] .opt-l { background: var(--green); color: var(--navy); border-color: var(--green); }
.options.is-locked { pointer-events: none; }

/* ---------- Calculando ---------- */
.calc { text-align: center; }
.calc-orbit { position: relative; width: 150px; height: 150px; margin: 0 auto 28px; }
.calc-orbit span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.calc-orbit span:nth-child(1) { border-top-color: var(--blue); animation: spin 1.1s linear infinite; }
.calc-orbit span:nth-child(2) { inset: 18px; border-right-color: var(--green); animation: spin 1.5s linear infinite reverse; }
.calc-orbit span:nth-child(3) { inset: 36px; border-bottom-color: var(--gold); animation: spin 2s linear infinite; }
.calc-orbit b { position: absolute; inset: 62px; border-radius: 50%; background: var(--green); box-shadow: 0 0 24px var(--green); animation: beat 1s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(.7); opacity: .7; } }
.calc-title { font-family: var(--font-h); font-weight: 800; font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px; }
.calc-sub { margin: 0; color: var(--muted); min-height: 1.5em; }

/* ---------- Resultado ---------- */
.result { width: 100%; max-width: 720px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.gauge { position: relative; width: 132px; height: 132px; margin-bottom: 20px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 9; }
.gauge-track { stroke: rgba(255,255,255,.08); }
.gauge-fill { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.2s var(--ease) .2s; filter: drop-shadow(0 0 6px rgba(121,251,37,.6)); }
.gauge-num { position: absolute; inset: 0; display: grid; place-content: center; line-height: 1; }
.gauge-num b { font-family: var(--font-h); font-weight: 800; font-size: 44px; }
.gauge-num span { font-size: 13px; color: var(--muted); margin-top: 4px; }
.r { display: block; }
.r[hidden] { display: none; }
.r-title { font-family: var(--font-h); font-weight: 800; text-transform: uppercase; font-size: clamp(24px, 3.6vw, 40px); line-height: 1.08; margin: 0 0 18px; text-wrap: balance; }
.r p { color: var(--muted); font-size: 17px; margin: 0 auto 14px; max-width: 58ch; }
.r .r-need {
  text-align: left; margin: 20px auto 30px; padding: 16px 20px; border-radius: 16px;
  background: rgba(255,182,41,.07); border: 1px solid rgba(255,182,41,.35); border-left: 4px solid var(--gold); color: var(--white);
}
.r .r-need b { color: var(--gold); }
.js .is-active .result > * { animation: rise .55s var(--ease) both; }
.js .is-active .result > *:nth-child(2) { animation-delay: .1s; }
.js .is-active .result > .r { animation-delay: .2s; }
.js .is-active .result > .btn { animation-delay: .35s; }

/* ---------- Final ---------- */
.final { width: 100%; max-width: 700px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.title--final { font-size: clamp(28px, 4.6vw, 50px); }
.final .lead { margin-left: auto; margin-right: auto; color: var(--white); font-weight: 600; }
.final-text { color: var(--muted); font-size: 17px; margin: 0 0 18px; max-width: 56ch; }
.classes {
  display: flex; align-items: center; gap: 18px; text-align: left; margin: 6px 0 22px; padding: 18px 22px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(160,32,240,.16), rgba(8,123,255,.14)); border: 1px solid rgba(255,182,41,.35);
}
.classes-n {
  flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
  font-family: var(--font-h); font-weight: 800; font-size: 36px; color: var(--navy); background: var(--gold);
  box-shadow: 0 8px 26px rgba(255,182,41,.4);
}
.classes p { margin: 0; font-size: 16px; color: var(--muted); }
.classes strong { color: var(--gold); text-transform: uppercase; }
.again { margin-top: 18px; background: none; border: 0; color: var(--muted); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.again:hover { color: var(--white); }
.js .is-active .final > * { animation: rise .55s var(--ease) both; }
.js .is-active .final > *:nth-child(2) { animation-delay: .06s; }
.js .is-active .final > *:nth-child(3) { animation-delay: .12s; }
.js .is-active .final > *:nth-child(4) { animation-delay: .18s; }
.js .is-active .final > *:nth-child(5) { animation-delay: .24s; }
.js .is-active .final > *:nth-child(6) { animation-delay: .30s; }
.js .is-active .final > *:nth-child(7) { animation-delay: .36s; }

/* ---------- Footer ---------- */
.foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 18px 16px 24px; font-size: 12.5px; color: rgba(255,255,255,.45); }
.foot a { color: rgba(255,255,255,.7); }
.foot a:hover { color: var(--green); }

@media (max-width: 560px) {
  .slide { padding-top: 8px; }
  .opt { padding: 14px; gap: 12px; min-height: 68px; }
  .opt-l { width: 36px; height: 36px; font-size: 15px; }
  .opt-t { font-size: 15px; }
  .q-avatar { display: none; }
  .q-title { border-radius: 20px; }
  .classes { flex-direction: column; text-align: center; }
  .btn--wa { text-align: center; padding: 14px 20px; }
}

/* Solo efectos intrusivos se desactivan con reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .orb-ring { animation: none; }
  .logo-orb img { animation: none; }
  .btn--wa { animation: none; }
}
