/* =============================================================
   What Turns Me On — Design System (complete rewrite)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --p:    #7c3aed;
  --p2:   #db2777;
  --grad: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  --grad-alpha: linear-gradient(135deg, rgba(124,58,237,.12) 0%, rgba(219,39,119,.12) 100%);

  --r-sm:   0.5rem;
  --r-md:   0.75rem;
  --r-lg:   1.125rem;
  --r-xl:   1.75rem;
  --r-full: 9999px;

  /* Light */
  --bg:    #fefeff;
  --bg2:   #f5f4fe;
  --surf:  #ffffff;
  --bord:  rgba(0,0,0,.09);
  --text:  #0f0920;
  --text2: #4f4a6a;
  --text3: #9491a8;
  --sh:    0 2px 16px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.03);
  --sh-lg: 0 8px 48px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
}
[data-bs-theme="dark"] {
  --bg:    #0b0a17;
  --bg2:   #0f0e20;
  --surf:  #141228;
  --bord:  rgba(255,255,255,.07);
  --text:  #f0eeff;
  --text2: #a8a3c4;
  --text3: #5e5a7a;
  --sh:    0 2px 20px rgba(0,0,0,.4), 0 1px 6px rgba(0,0,0,.3);
  --sh-lg: 0 12px 60px rgba(0,0,0,.6), 0 4px 16px rgba(0,0,0,.4);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Layout ─────────────────────────────────────────────── */
.wrap    { max-width: 1100px; width: calc(100% - 2.5rem); margin-inline: auto; }
.wrap-sm { max-width: 660px;  width: calc(100% - 2rem);   margin-inline: auto; }

/* ── Gradient text ──────────────────────────────────────── */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section tag ────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--p);
  margin-bottom: 0.75rem;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.75rem 1.75rem;
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .16s, box-shadow .16s, opacity .16s, background .16s, border-color .16s, color .16s;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: scale(.98); }

.btn-grad {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,.28);
}
.btn-grad:hover { opacity: .9; box-shadow: 0 8px 28px rgba(124,58,237,.4); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--bord);
}
.btn-outline:hover { border-color: var(--p); color: var(--p); background: rgba(124,58,237,.06); }

/* ── Nav ────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--bord);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
}
.nav-logo img { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.nav-logo-text { display: none; }
@media (min-width: 480px) { .nav-logo-text { display: block; } }

.nav-end { display: flex; align-items: center; gap: 0.75rem; }

/* Theme toggle button */
.theme-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--bord);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: border-color .18s, color .18s, background .18s;
}
.theme-btn:hover { border-color: var(--p); color: var(--p); background: rgba(124,58,237,.06); }
.theme-btn svg { pointer-events: none; }
/* Show correct icon based on active theme */
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-bs-theme="dark"] .icon-sun  { display: block; }
[data-bs-theme="dark"] .icon-moon { display: none; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.25rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% -5%,  rgba(124,58,237,.22) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 90% 105%, rgba(219,39,119,.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 680px; }
.hero-eyebrow {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--p); margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 800; line-height: 1.1;
  color: var(--text); margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text2);
  max-width: 460px; margin-inline: auto;
  margin-bottom: 2.5rem;
}
.hero-btns { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  margin-top: 4rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text3); font-size: 0.75rem;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text3), transparent);
}

/* ── About ──────────────────────────────────────────────── */
.section-about { padding: 6rem 0; background: var(--bg2); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem; align-items: center;
}
@media (min-width: 768px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-heading { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; }
.about-body { color: var(--text2); font-size: 1.0625rem; line-height: 1.75; margin-bottom: 2rem; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card {
  background: var(--surf);
  border: 1px solid var(--bord);
  border-radius: var(--r-lg);
  padding: 1.5rem 0.75rem;
  text-align: center;
  box-shadow: var(--sh);
}
.stat-num { font-size: 2.25rem; font-weight: 800; line-height: 1; margin-bottom: 0.3rem; }
.stat-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); }

/* ── Values ─────────────────────────────────────────────── */
.section-values { padding: 6rem 0; }
.vals-header { text-align: center; margin-bottom: 3rem; }
.vals-heading { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 0.75rem; }
.vals-sub { color: var(--text2); font-size: 1.0625rem; }

.axis-list { display: flex; flex-direction: column; gap: 1rem; }
.axis-card {
  background: var(--surf);
  border: 1px solid var(--bord);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  gap: 1rem; align-items: center;
  box-shadow: var(--sh);
  transition: box-shadow .2s, transform .2s;
}
.axis-card:hover { box-shadow: var(--sh-lg); transform: translateY(-2px); }

.axis-pole { display: flex; align-items: center; gap: 0.875rem; }
.axis-pole.right { flex-direction: row-reverse; text-align: right; }
.pole-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: var(--grad-alpha);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  padding: 10px;
}
.pole-icon img { width: 100%; height: 100%; object-fit: contain; }
.pole-name  { font-size: 0.9375rem; font-weight: 700; margin-bottom: 0.2rem; }
.pole-desc  { font-size: 0.8125rem; color: var(--text3); line-height: 1.45; }

.axis-mid {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
}
.axis-mid-tag {
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--p);
}
.axis-mid-line { width: 1px; height: 32px; background: linear-gradient(to bottom, var(--p), var(--p2)); opacity: 0.4; }

@media (max-width: 600px) {
  .axis-card { grid-template-columns: 1fr; }
  .axis-pole.right { flex-direction: row; text-align: left; }
  .axis-mid { flex-direction: row; justify-content: center; padding: 0.5rem 0; border-top: 1px solid var(--bord); border-bottom: 1px solid var(--bord); }
  .axis-mid-line { width: 32px; height: 1px; }
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--bord);
  padding: 1.75rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text3);
}

/* ══════════════════════════════════════════════════════════
   QUIZ PAGE
   ══════════════════════════════════════════════════════════ */
.quiz-page { min-height: 100vh; display: flex; flex-direction: column; }

.quiz-prog-wrap { height: 4px; background: var(--bg2); flex-shrink: 0; }
.quiz-prog-fill { height: 100%; background: var(--grad); width: 0%; transition: width .4s ease; }

.quiz-main {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.25rem;
}
.quiz-card {
  background: var(--surf);
  border: 1px solid var(--bord);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: 2.5rem 2rem;
  width: 100%; max-width: 560px;
}
.quiz-qnum {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 1.25rem;
}
.quiz-qtext {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  font-weight: 600; line-height: 1.55;
  color: var(--text); margin-bottom: 2rem;
  min-height: 3.5em;
}
.quiz-answers { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }

.ans {
  width: 100%; padding: 0.825rem 1.125rem;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  font-size: 0.9375rem; font-weight: 500;
  cursor: pointer; text-align: center;
  transition: transform .13s, background .13s, border-color .13s;
}
.ans:hover  { transform: translateX(5px); }
.ans:active { transform: scale(.98); }

.ans-sa { background: rgba(34,197,94,.10);  border-color: rgba(34,197,94,.30);  color: #15803d; }
.ans-a  { background: rgba(74,222,128,.07); border-color: rgba(74,222,128,.30);  color: #16a34a; }
.ans-n  { background: var(--bg2);           border-color: var(--bord);           color: var(--text2); }
.ans-d  { background: rgba(251,146,60,.07); border-color: rgba(251,146,60,.30);  color: #c2410c; }
.ans-sd { background: rgba(239,68,68,.10);  border-color: rgba(239,68,68,.30);   color: #dc2626; }
.ans-sk { background: transparent;          border-color: var(--bord);           color: var(--text3); font-size: 0.85rem; }

.ans-sa:hover { background: rgba(34,197,94,.18); }
.ans-a:hover  { background: rgba(74,222,128,.14); }
.ans-n:hover  { border-color: var(--text3); }
.ans-d:hover  { background: rgba(251,146,60,.14); }
.ans-sd:hover { background: rgba(239,68,68,.18); }
.ans-sk:hover { border-color: var(--text3); color: var(--text2); }

[data-bs-theme="dark"] .ans-sa { color: #4ade80; }
[data-bs-theme="dark"] .ans-a  { color: #86efac; }
[data-bs-theme="dark"] .ans-d  { color: #fb923c; }
[data-bs-theme="dark"] .ans-sd { color: #f87171; }

.quiz-back-btn {
  display: inline-flex; align-items: center; gap: 0.35em;
  background: none; border: none;
  color: var(--text3); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; padding: 0.375rem 0;
  transition: color .16s;
}
.quiz-back-btn:hover { color: var(--text); }

@media (max-width: 480px) {
  .quiz-card { padding: 1.75rem 1.25rem; border-radius: var(--r-lg); }
}

/* ══════════════════════════════════════════════════════════
   RESULTS PAGE
   ══════════════════════════════════════════════════════════ */
.results-page { min-height: 100vh; background: var(--bg); padding: 2rem 0 4rem; }

.results-card {
  background: var(--surf);
  border: 1px solid var(--bord);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-lg);
  margin-bottom: 1.5rem;
}
.results-head {
  background: var(--grad);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center; color: #fff;
}
.results-head img { width: 60px; margin: 0 auto 1rem; }
.results-head h1  { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.25rem; }
.results-head p   { font-size: 0.85rem; opacity: 0.78; }
.results-body { padding: 1.75rem 1.5rem; }

.res-axis { margin-bottom: 1.25rem; }
.res-axis-title {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 0.6rem;
}
.res-axis-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 0.625rem; align-items: center;
}
.res-icon { width: 40px; height: 40px; object-fit: contain; }
.res-divider { height: 1px; background: var(--bord); margin: 1.25rem 0; }

/* Progress bar classes — must match what results.js expects */
.progress-stacked {
  display: flex;
  height: 30px;
  border-radius: var(--r-full);
  overflow: hidden;
  background: var(--bg2);
}
.progress { overflow: hidden; display: flex; transition: width .6s ease; }
.progress-bar {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700;
  color: rgba(255,255,255,.9);
}

.results-share { text-align: center; }
.results-share p { color: var(--text2); font-size: 0.875rem; margin-bottom: 1.25rem; }
.share-btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 480px) {
  .results-body { padding: 1.25rem 1rem; }
  .res-axis-row { grid-template-columns: 36px 1fr 36px; gap: 0.5rem; }
  .res-icon { width: 32px; height: 32px; }
  .progress-stacked { height: 24px; }
}