*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c1222;
  --bg-alt: #111827;
  --surface: #1a2332;
  --surface-hover: #222d3f;
  --border: #2a3548;
  --text: #f0f2f5;
  --text-muted: #8b95a8;
  --text-dim: #5c6678;
  --accent: #818cf8;
  --accent-dark: #6366f1;
  --accent-glow: rgba(129, 140, 248, 0.15);
  --teal: #2dd4bf;
  --success: #34d399;
  --danger: #f87171;
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Instrument Sans', system-ui, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --max: 1140px;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 720px; }

.view { display: none; }
.view.active { display: block; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-family: var(--serif); font-size: clamp(2.5rem, 5.5vw, 3.75rem); font-weight: 500; }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-family: var(--serif); font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 500; margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 600; }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s, border-color 0.3s;
}

.nav.scrolled {
  background: rgba(12, 18, 34, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

.logo small { font-weight: 500; color: var(--text-muted); font-size: 0.85rem; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent) !important;
  color: #0c1222 !important;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-weight: 600 !important;
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:hover { opacity: 0.9; }
.btn-primary { background: var(--accent); color: #0c1222; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-full { width: 100%; }
.btn-lg { padding: 1rem 1.5rem; font-size: 1rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); }
.hero-orb-1 { width: 500px; height: 500px; background: rgba(129, 140, 248, 0.1); top: -100px; right: -100px; }
.hero-orb-2 { width: 400px; height: 400px; background: rgba(45, 212, 191, 0.06); bottom: -50px; left: -100px; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-sub { font-size: 1.15rem; color: var(--text-muted); margin: 1.5rem 0 2rem; max-width: 480px; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; align-items: center; gap: 1.5rem; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--text-dim); }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

/* Hero visual */
.hero-visual { position: relative; padding-right: 20px; padding-bottom: 20px; }

.visual-card { border-radius: var(--radius-lg); border: 1px solid var(--border); }

.visual-card-back {
  position: absolute;
  top: 0; left: 0; right: 20px; bottom: 20px;
  transform: translate(20px, 20px);
  background: var(--bg-alt);
  opacity: 0.5;
  z-index: 0;
}

.visual-card-main {
  position: relative;
  z-index: 1;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
}

.visual-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #f87171; }
.dot-yellow { background: #fbbf24; }
.dot-green { background: #34d399; }
.visual-title { margin-left: 0.5rem; font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }
.radar-preview { padding: 1rem; display: flex; justify-content: center; }

/* Sections */
.section { padding: 6rem 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

.trust-bar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2rem 0; background: var(--bg-alt); }
.trust-inner { text-align: center; }
.trust-inner > p { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }

.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.step { text-align: center; padding: 1.5rem; }
.step-num { font-size: 0.8rem; font-weight: 700; color: var(--accent); margin-bottom: 0.75rem; }
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--text-muted); font-size: 0.9rem; }
.step-connector { width: 40px; height: 1px; background: var(--border); margin-top: 2.5rem; }

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.dimension-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.dimension-card:hover { border-color: var(--accent); }
.dimension-icon { font-size: 1.75rem; display: block; margin-bottom: 0.75rem; }
.dimension-card p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.35rem; }

/* Start form */
.start-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}

.start-card h2 { margin-bottom: 0.5rem; }
.start-card > p { color: var(--text-muted); margin-bottom: 1.5rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; text-align: left; }
.form-group { margin-bottom: 1.25rem; text-align: left; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-muted); }
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
}

.form-group input:focus { outline: none; border-color: var(--accent); }
.start-error { color: var(--danger); font-size: 0.9rem; margin-bottom: 1rem; text-align: center; }

/* Quiz */
.quiz-section { padding: calc(var(--nav-h) + 3rem) 0 4rem; min-height: 100vh; }
.quiz-progress { margin-bottom: 2rem; }
.progress-track { height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; margin-bottom: 0.75rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); border-radius: 3px; transition: width 0.3s; width: 0; }
.progress-text { font-size: 0.85rem; color: var(--text-muted); }

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.question-category {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}

.question-maturity { font-size: 0.8rem; color: var(--text-dim); }
.question-text { font-size: 1.2rem; margin-bottom: 1.5rem; line-height: 1.5; }

.question-options { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 2rem; }

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.option-btn:hover { border-color: var(--border-light, #354158); background: var(--surface-hover); }
.option-btn.selected { border-color: var(--accent); background: var(--accent-glow); }

.option-score {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.option-btn.selected .option-score {
  background: var(--accent);
  color: #0c1222;
  border-color: var(--accent);
}

.option-text { line-height: 1.45; }

.quiz-nav { display: flex; justify-content: space-between; gap: 1rem; }

/* Results */
.results-section { padding: calc(var(--nav-h) + 3rem) 0 4rem; }
.results-header { text-align: center; margin-bottom: 3rem; }
.results-sub { color: var(--text-muted); font-size: 1.05rem; }

.results-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.results-chart-card,
.results-scores-card,
.results-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.results-chart-card h3,
.results-scores-card h3,
.results-card h3 { margin-bottom: 1.25rem; }

.chart-wrap {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legend-item { display: flex; align-items: center; gap: 0.4rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-dot.current { background: #818cf8; }
.legend-dot.target { background: #2dd4bf; }

.gap-bars { display: flex; flex-direction: column; gap: 1rem; }

.gap-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.gap-value { font-weight: 600; color: var(--accent); }
.gap-value small { color: var(--text-dim); font-weight: 500; }

.gap-track {
  position: relative;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: visible;
}

.gap-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 4px;
  transition: width 0.6s ease;
}

.gap-target {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--teal);
  border-radius: 1px;
  transform: translateX(-50%);
}

.overall-score {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overall-label { color: var(--text-muted); font-size: 0.9rem; }
.overall-value { font-size: 2rem; font-weight: 700; color: var(--accent); font-family: var(--serif); }

.recommendations { list-style: none; display: flex; flex-direction: column; gap: 0.85rem; }
.recommendations li {
  padding: 1rem 1.15rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.recommendations strong { color: var(--text); display: block; margin-bottom: 0.25rem; }

.results-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.75rem; max-width: 280px; }
.footer-links h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 1rem; }
.footer-links a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 0.5rem; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-dim); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 960px) {
  .hero-content { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { max-width: 480px; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .step-connector { display: none; }
  .dimension-grid { grid-template-columns: 1fr 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(12, 18, 34, 0.98);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .dimension-grid { grid-template-columns: 1fr; }
}