/* ===== EQ Test — Design System ===== */
:root {
  --purple: #7C3AED;
  --purple-dark: #6D28D9;
  --purple-tint: #EDE9FE;
  --blue: #3B82F6;
  --blue-tint: #DBEAFE;
  --teal: #14B8A6;
  --teal-tint: #CCFBF1;
  --amber: #F59E0B;
  --amber-tint: #FEF3C7;

  --bg: #FFFFFF;
  --card: #F3F4F6;
  --card-alt: #FFFFFF;
  --text: #0F172A;
  --text-muted: #5B6472;
  --border: #E5E7EB;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(124, 58, 237, 0.12);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F172A;
    --card: #1E293B;
    --card-alt: #16213A;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --border: #2D3B52;
    --purple-tint: #2E1F55;
    --blue-tint: #1E3A5F;
    --teal-tint: #113D38;
    --amber-tint: #4A3510;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(124, 58, 237, 0.25);
  }
}

:root[data-theme="dark"] {
  --bg: #0F172A;
  --card: #1E293B;
  --card-alt: #16213A;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --border: #2D3B52;
  --purple-tint: #2E1F55;
  --blue-tint: #1E3A5F;
  --teal-tint: #113D38;
  --amber-tint: #4A3510;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(124, 58, 237, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--purple); text-decoration: none; }
img, svg { max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem; color: var(--text); display: flex; gap: 8px; align-items: center; }
.brand span { background: linear-gradient(135deg, var(--purple), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--text-muted); font-weight: 600; font-size: .95rem; transition: color .2s; }
.site-nav a:hover, .site-nav a.active { color: var(--purple); }
.btn-nav-cta { background: var(--purple); color: #fff !important; padding: 8px 16px; border-radius: 999px; }
.btn-nav-cta:hover { background: var(--purple-dark); }
.theme-toggle { background: var(--card); border: 1px solid var(--border); border-radius: 999px; width: 38px; height: 38px; cursor: pointer; font-size: 1rem; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .2s;
  font-family: var(--font-body);
}
.btn-primary { background: linear-gradient(135deg, var(--purple), var(--blue)); color: #fff; box-shadow: var(--shadow-lg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(124,58,237,.28); }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--purple); color: var(--purple); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ===== Hero ===== */
.hero { padding: 90px 0 70px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 480px;
  background: radial-gradient(60% 60% at 50% 0%, var(--purple-tint), transparent 70%);
  z-index: -1;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  background: linear-gradient(135deg, var(--purple), var(--blue) 60%, var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fadeUp .7s ease both;
}
.hero .subtitle { font-size: 1.15rem; max-width: 620px; margin: 0 auto 32px; animation: fadeUp .7s .1s ease both; }
.hero .btn-primary { animation: fadeUp .7s .2s ease both; }
.hero-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 40px; animation: fadeUp .7s .3s ease both; }
.hero-badge { background: var(--card); border: 1px solid var(--border); padding: 8px 16px; border-radius: 999px; font-size: .85rem; font-weight: 600; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }

/* ===== Sections / Cards ===== */
.section { padding: 70px 0; }
.section-title { text-align: center; font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 12px; }
.section-subtitle { text-align: center; max-width: 560px; margin: 0 auto 48px; }

.card {
  background: var(--card-alt); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature-card { text-align: center; transition: transform .2s ease; animation: fadeUp .6s ease both; }
.feature-card:hover { transform: translateY(-4px); }
.feature-card .icon { font-size: 2.2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { font-size: .92rem; margin: 0; }

/* ===== Forms ===== */
.form-card { max-width: 440px; margin: 60px auto; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.form-group input, .form-group select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1rem;
}
.form-group input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-tint); }
.form-error { background: #FEE2E2; color: #B91C1C; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 16px; }
:root[data-theme="dark"] .form-error { background: #4C1D1D; color: #FCA5A5; }
.form-foot { text-align: center; margin-top: 18px; font-size: .92rem; }

/* ===== Quiz ===== */
.quiz-wrap { max-width: 680px; margin: 40px auto 80px; }
.progress-track { height: 10px; background: var(--card); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--blue)); border-radius: 999px; transition: width .35s ease; width: 5%; }
.progress-label { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 600; color: var(--text-muted); margin: 10px 0 26px; }
.category-chip { display: inline-block; background: var(--purple-tint); color: var(--purple); font-weight: 700; font-size: .78rem; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.question-text { font-size: 1.35rem; margin-bottom: 26px; animation: fadeIn .35s ease; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); cursor: pointer; background: var(--card-alt); transition: all .15s ease;
  font-weight: 600; font-size: .98rem;
}
.option:hover { border-color: var(--purple); }
.option.selected { border-color: var(--purple); background: var(--purple-tint); color: var(--purple); }
.option .bullet { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; position: relative; }
.option.selected .bullet { border-color: var(--purple); }
.option.selected .bullet::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--purple); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 32px; gap: 12px; }
.quiz-guest-note { text-align: center; font-size: .85rem; margin-top: 20px; }

/* ===== Results ===== */
.results-hero { text-align: center; padding: 50px 0 20px; }
.score-ring-wrap { display: flex; justify-content: center; margin: 20px 0 10px; }
.score-ring {
  width: 200px; height: 200px; border-radius: 50%;
  background: conic-gradient(var(--purple) calc(var(--score, 0) * 1%), var(--card) 0);
  display: flex; align-items: center; justify-content: center; animation: popIn .5s ease both;
}
.score-ring-inner {
  width: 160px; height: 160px; border-radius: 50%; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-ring-inner .big { font-size: 2.6rem; font-weight: 800; font-family: var(--font-heading); }
.score-ring-inner .small { font-size: .8rem; color: var(--text-muted); }
.results-summary { max-width: 560px; margin: 12px auto 0; }

.category-scores { display: flex; flex-direction: column; gap: 18px; margin: 40px 0; }
.category-score-row .top { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; }
.bar-track { height: 12px; background: var(--card); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; border-radius: 999px; transition: width .8s ease; }
.bar-fill.strength { background: var(--teal); }
.bar-fill.good { background: var(--blue); }
.bar-fill.growth { background: var(--amber); }

.feedback-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 40px 0; }
.feedback-col h3 { font-size: 1.05rem; }
.feedback-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.feedback-col li { background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .92rem; }
.feedback-col.strengths li { border-left: 4px solid var(--teal); }
.feedback-col.improvements li { border-left: 4px solid var(--amber); }

.results-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.disclaimer { font-size: .82rem; color: var(--text-muted); text-align: center; margin-top: 30px; }

/* ===== History ===== */
.history-list { display: flex; flex-direction: column; gap: 16px; }
.history-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.history-item .date { color: var(--text-muted); font-size: .85rem; }
.history-score { font-family: var(--font-heading); font-weight: 800; font-size: 1.4rem; color: var(--purple); }
.mini-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-cat { font-size: .72rem; background: var(--card); padding: 4px 9px; border-radius: 999px; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 60px; }
.footer-inner { text-align: center; font-size: .88rem; color: var(--text-muted); }
.footer-disclaimer { font-size: .78rem; margin-top: 6px; }

/* ===== Alerts ===== */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .92rem; }
.alert-success { background: var(--teal-tint); color: #0F766E; }
.alert-info { background: var(--blue-tint); color: #1D4ED8; }
:root[data-theme="dark"] .alert-success { color: #5EEAD4; }
:root[data-theme="dark"] .alert-info { color: #93C5FD; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .feedback-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--bg);
    flex-direction: column; align-items: flex-start; padding: 18px 24px; border-bottom: 1px solid var(--border);
    display: none; gap: 16px;
  }
  .site-nav.open { display: flex; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 40px; }
  .score-ring { width: 160px; height: 160px; }
  .score-ring-inner { width: 128px; height: 128px; }
  .history-item { flex-direction: column; align-items: flex-start; }
}
