/* ============================================================
   TOKENS
============================================================ */
:root{
  --bg:            #0D0F14;
  --bg-raised:     #12151C;
  --bg-card:       #171B24;
  --graphite:      #1E222C;
  --graphite-2:    #262B37;
  --border:        rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);
  --text:          #E9EBF1;
  --text-dim:      #9AA1B2;
  --text-faint:    #666E80;
  --blue:          #3B82F6;
  --blue-soft:     rgba(59,130,246,0.14);
  --blue-glow:     rgba(59,130,246,0.35);

  --radius-s:  10px;
  --radius-m:  16px;
  --radius-l:  24px;
  --radius-xl: 32px;

  --shadow-soft: 0 20px 60px -20px rgba(0,0,0,0.6);
  --shadow-card: 0 10px 40px -12px rgba(0,0,0,0.55);

  --ease: cubic-bezier(.22,.9,.32,1);
}

*{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  cursor: none;
}

@media (max-width: 860px){
  body{ cursor: auto; }
}

h1,h2,h3{ font-weight: 700; letter-spacing: -0.02em; }

.section{
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 96px 24px;
  z-index: 2;
}
.section.active{ display: flex; }

/* ============================================================
   AMBIENT BACKGROUND
============================================================ */
.bg-noise{
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.5;
}
.glow{
  position: fixed; z-index: 0; pointer-events: none;
  width: 640px; height: 640px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  background: var(--blue);
}
.glow-a{ top: -220px; left: -160px; }
.glow-b{ bottom: -260px; right: -180px; opacity: 0.10; }

/* ============================================================
   CUSTOM CURSOR
============================================================ */
.cursor-dot, .cursor-ring{
  position: fixed; top:0; left:0; pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  border-radius: 50%;
}
.cursor-dot{ width:6px; height:6px; background: var(--blue); }
.cursor-ring{
  width: 34px; height:34px; border: 1px solid var(--border-strong);
  transition: width .2s var(--ease), height .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.cursor-ring.hover{
  width: 54px; height: 54px;
  border-color: var(--blue);
  background: var(--blue-soft);
}
@media (max-width: 860px){
  .cursor-dot, .cursor-ring{ display:none; }
}

/* ============================================================
   HUD SCORE WIDGET (signature element)
============================================================ */
.hud{
  position: fixed;
  top: 24px; right: 24px;
  width: 76px; height: 76px;
  z-index: 500;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.hud.show{ opacity: 1; transform: translateY(0); }
.hud-ring{ width: 100%; height:100%; transform: rotate(-90deg); }
.hud-track{
  fill: none; stroke: var(--graphite); stroke-width: 6;
}
.hud-fill{
  fill: none; stroke: var(--blue); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 276.5; stroke-dashoffset: 276.5;
  transition: stroke-dashoffset .6s var(--ease);
  filter: drop-shadow(0 0 6px var(--blue-glow));
}
.hud-label{
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hud-value{ font-size: 15px; font-weight: 700; line-height: 1; }
.hud-unit{ font-size: 8px; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }

@media (max-width: 640px){
  .hud{ width: 56px; height: 56px; top: 14px; right: 14px; }
  .hud-value{ font-size: 12px; }
}

/* ============================================================
   REUSABLE
============================================================ */
.eyebrow{
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  border: 1px solid rgba(59,130,246,0.25);
}
.eyebrow.center{ align-self: center; }

.accent{ color: var(--blue); }

.checklist{ list-style:none; display:flex; flex-direction:column; gap:10px; margin: 26px 0 34px; }
.checklist li{ display:flex; align-items:center; gap:10px; color: var(--text-dim); font-size:15px; }
.check{
  display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:20px; border-radius:50%;
  background: var(--blue-soft); color: var(--blue);
  font-size: 11px; flex-shrink:0;
}

.btn{
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.btn svg{ transition: transform .25s var(--ease); }
.btn:hover svg{ transform: translateX(3px); }

.btn-primary{
  background: var(--blue);
  color: #fff;
  padding: 16px 30px;
  box-shadow: 0 8px 30px -8px var(--blue-glow);
}
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(59,130,246,0.55);
}
.btn-primary:active{ transform: translateY(0px) scale(0.98); }

.btn-lg{ font-size: 16px; padding: 18px 34px; }

.btn-ghost{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 12px 22px;
}
.btn-ghost:hover{ border-color: var(--border-strong); color: var(--text); }

.micro-trust{ margin-top: 18px; font-size: 12.5px; color: var(--text-faint); }

.progress-track{
  width: 100%; height: 8px;
  background: var(--graphite);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563EB, var(--blue));
  border-radius: 100px;
  transition: width .6s var(--ease);
  box-shadow: 0 0 12px var(--blue-glow);
}

/* scroll reveal */
.reveal{ opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in{ opacity: 1; transform: translateY(0); }

/* ============================================================
   HERO
============================================================ */
.hero-inner{
  max-width: 980px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 56px;
}
.avatar-wrap{
  position: relative;
  width: 168px; height: 168px;
  flex-shrink: 0;
}
.avatar-ring{
  position: absolute; inset: -10px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  animation: spin 18s linear infinite;
}
.avatar-ring::before{
  content:'';
  position:absolute; top:-1px; left: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 14px var(--blue-glow);
  transform: translateX(-50%);
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.avatar-circle{
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--graphite-2), var(--bg-raised));
  border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), var(--shadow-soft);
}
.avatar-circle svg{ width: 40%; height: 40%; }

.hero-copy h1{
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 18px;
}
.hero-text{
  color: var(--text-dim);
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 520px;
}

.scroll-hint{
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:10px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint);
}
.scroll-line{
  width:1px; height: 34px;
  background: linear-gradient(var(--blue), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after{
  content:'';
  position:absolute; top:-34px; left:0; width:100%; height: 34px;
  background: linear-gradient(var(--blue), transparent);
  animation: scrollDown 1.8s ease-in-out infinite;
}
@keyframes scrollDown{
  0%{ top: -34px; } 100%{ top: 34px; }
}

@media (max-width: 860px){
  .hero-inner{ flex-direction: column; text-align:center; gap: 32px; }
  .hero-text{ margin: 0 auto; }
  .checklist{ align-items: center; }
  .hero-copy h1{ font-size: 2rem; }
}

/* ============================================================
   QUIZ
============================================================ */
.quiz-shell{
  width: 100%;
  max-width: 640px;
}
.quiz-progress-wrap{ margin-bottom: 44px; }
.quiz-progress-text{
  display:flex; justify-content: space-between;
  font-size: 13px; color: var(--text-dim); margin-bottom: 10px;
  font-weight: 500;
}
.quiz-progress-pct{ color: var(--blue); font-weight:600; }

.quiz-stage{ position: relative; min-height: 320px; }

.question{
  position: absolute; inset: 0;
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.question.active{
  position: relative;
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.question.leaving{
  opacity: 0;
  transform: translateX(-24px) scale(0.98);
}

.question h3{
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin-bottom: 28px;
  line-height: 1.35;
}

.options{ display:flex; flex-direction:column; gap: 12px; }

.option{
  display:flex; align-items:center; gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .2s var(--ease);
  font-size: 15px;
  color: var(--text);
}
.option:hover{
  border-color: rgba(59,130,246,0.4);
  background: var(--graphite);
  transform: translateY(-2px);
}
.option.selected{
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 1px var(--blue) inset, 0 8px 24px -10px var(--blue-glow);
}
.option-bullet{
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  position: relative;
  transition: border-color .2s var(--ease);
}
.option.selected .option-bullet{ border-color: var(--blue); }
.option.selected .option-bullet::after{
  content:'';
  position:absolute; inset: 3px;
  border-radius: 50%;
  background: var(--blue);
}

.quiz-nav{ margin-top: 32px; }
#backBtn{ opacity: 0; pointer-events: none; transition: opacity .3s; }
#backBtn.show{ opacity: 1; pointer-events: auto; }

@media (max-width: 640px){
  .quiz-stage{ min-height: 380px; }
}

/* ============================================================
   PROCESSING
============================================================ */
.processing-inner{
  display:flex; flex-direction:column; align-items:center;
  max-width: 460px; width: 100%; text-align:center;
}
.loader-ring{
  position: relative;
  width: 120px; height: 120px;
  margin-bottom: 36px;
}
.loader-ring svg{ width:100%; height:100%; transform: rotate(-90deg); }
.loader-track{ fill:none; stroke: var(--graphite); stroke-width: 4; }
.loader-arc{
  fill:none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 90 235;
  filter: drop-shadow(0 0 8px var(--blue-glow));
  animation: rotateArc 1.3s linear infinite;
}
@keyframes rotateArc{ to{ transform: rotate(270deg); } }
.loader-core{
  position:absolute; inset: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.28), transparent 70%);
  animation: pulseCore 1.6s ease-in-out infinite;
}
@keyframes pulseCore{ 0%,100%{ opacity:.5; transform:scale(0.9);} 50%{ opacity:1; transform:scale(1.05);} }

.processing-title{ font-size: 1.5rem; margin-bottom: 32px; }
.dots span{ animation: blink 1.4s infinite; opacity:0; }
.dots span:nth-child(2){ animation-delay: .2s; }
.dots span:nth-child(3){ animation-delay: .4s; }
@keyframes blink{ 0%,100%{opacity:0;} 50%{opacity:1;} }

.proc-steps{
  list-style:none; width:100%;
  display:flex; flex-direction:column; gap: 14px;
  margin-bottom: 34px; text-align:left;
}
.proc-steps li{
  display:flex; align-items:center; gap: 12px;
  color: var(--text-faint); font-size: 14.5px;
  transition: color .4s;
}
.proc-steps li.active{ color: var(--text); }
.step-icon{
  width: 20px; height:20px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  font-size: 12px;
  border: 1.5px solid var(--border-strong);
  color: var(--text-faint);
  transition: all .4s;
  flex-shrink: 0;
}
.proc-steps li.active .step-icon{
  border-color: var(--blue); color: var(--blue);
  box-shadow: 0 0 10px var(--blue-glow);
}
.proc-steps li.done .step-icon{
  background: var(--blue); border-color: var(--blue); color:#fff;
}

.proc-bar{ width:100%; }

/* ============================================================
   RESULT
============================================================ */
.result-card{
  max-width: 620px; width:100%;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-raised));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 52px 44px;
  box-shadow: var(--shadow-card);
  display:flex; flex-direction:column; align-items:center; text-align:center;
  backdrop-filter: blur(20px);
}
.result-title{ font-size: clamp(1.5rem,3vw,2rem); margin-bottom: 14px; max-width: 480px; }
.result-sub{ color: var(--text-dim); font-size: 15px; margin-bottom: 36px; max-width: 460px; line-height:1.6; }

.factor-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap: 14px;
  width:100%; margin-bottom: 40px;
}
.factor-card{
  display:flex; align-items:center; gap: 10px;
  background: var(--graphite);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 16px;
  font-size: 13.5px;
  color: var(--text-dim);
  text-align:left;
}
.factor-icon{ font-size: 16px; }

.potential-block{ width:100%; margin-bottom: 26px; }
.potential-label{ display:block; font-size: 13px; color: var(--text-dim); margin-bottom:12px; }
.potential-bar{ margin-bottom: 10px; }
.potential-value{ font-size: 28px; font-weight: 800; color: var(--blue); }

.result-note{ color: var(--text-dim); font-size: 14.5px; margin-bottom: 30px; }

@media (max-width: 560px){
  .result-card{ padding: 40px 24px; }
  .factor-grid{ grid-template-columns: 1fr; }
}

/* ============================================================
   OFFER
============================================================ */
.offer-inner{
  max-width: 1080px; width:100%;
  display:flex; align-items:center; gap: 70px;
}
.offer-copy{ flex: 1; }
.offer-copy h2{ font-size: clamp(1.7rem,3.2vw,2.4rem); line-height:1.25; margin-bottom: 28px; }
.offer-list{ list-style:none; display:flex; flex-direction:column; gap: 14px; margin-bottom: 36px; }
.offer-list li{ display:flex; align-items:center; gap:12px; font-size:15.5px; color: var(--text); }

.offer-visual{
  flex: 1; display:flex; justify-content:center; position:relative;
}
.ebook-glow{
  position:absolute; width: 320px; height: 320px;
  background: var(--blue); filter: blur(100px); opacity: 0.22;
  border-radius: 50%;
}
.ebook-mock{
  position: relative;
  width: 260px; height: 340px;
  perspective: 800px;
  animation: floatBook 5s ease-in-out infinite;
}
@keyframes floatBook{ 0%,100%{ transform: translateY(0) rotateY(-8deg);} 50%{ transform: translateY(-16px) rotateY(-8deg);} }
.ebook-spine{
  position:absolute; left: -8px; top:6px; bottom:6px; width: 10px;
  background: linear-gradient(180deg, #1c2028, #0c0e13);
  border-radius: 4px 0 0 4px;
}
.ebook-face{
  width:100%; height:100%;
  background: linear-gradient(155deg, var(--graphite-2), var(--bg-raised));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  display:flex; flex-direction:column; justify-content:space-between;
  padding: 30px 26px;
}
.ebook-kicker{ font-size: 11px; letter-spacing: 0.14em; color: var(--blue); font-weight:700; }
.ebook-title{ font-size: 1.5rem; font-weight: 800; line-height:1.25; }
.ebook-foot{ font-size: 11.5px; color: var(--text-faint); }

@media (max-width: 900px){
  .offer-inner{ flex-direction:column; text-align:center; gap: 40px; }
  .offer-list{ align-items:center; text-align:left; }
}
