/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Raw palette */
  --near-black: #0E0A08;
  --dark-warm: #1A1412;
  --elevated: #2A1F18;
  --caramel: #C9956B;
  --caramel-deep: #B07D52;
  --caramel-light: #D4A882;
  --warm-cream: #F5EFE9;
  --white: #FFFFFF;
  --muted-brown: #6B5443;
  --amber-gold: #D4A24E;

  /* Semantic tokens — dark mode (default) */
  --bg-primary: #0E0A08;
  --bg-surface: #1A1412;
  --bg-elevated: #2A1F18;
  --text-primary: #F5EFE9;
  --text-secondary: #999999;
  --text-muted: #6B5443;
  --accent: #C9956B;
  --accent-hover: #B07D52;
  --accent-light: #D4A882;
  --border: #2A1F18;
  --card-bg: #1A1412;
  --score-item-bg: #0E0A08;
  --option-selected-bg: rgba(201, 149, 107, 0.1);
  --waitlist-gradient-start: #1A1412;
  --waitlist-gradient-end: #2A1F18;
  --btn-primary-text: #0E0A08;
  --form-error: #E07A5F;

  /* Typography */
  --font-headline: 'Fraunces', serif;
  --font-body: 'DM Sans', sans-serif;
}

/* Light mode overrides */
[data-theme="light"] {
  --bg-primary: #F5EFE9;
  --bg-surface: #FFFFFF;
  --bg-elevated: #EDE5DB;
  --text-primary: #1A1210;
  --text-secondary: #6B5443;
  --text-muted: #9A8575;
  --accent: #C9956B;
  --accent-hover: #B07D52;
  --accent-light: #D4A882;
  --border: #DDD3C7;
  --card-bg: #FFFFFF;
  --score-item-bg: #F5EFE9;
  --option-selected-bg: rgba(201, 149, 107, 0.12);
  --waitlist-gradient-start: #FFFFFF;
  --waitlist-gradient-end: #F5EFE9;
  --btn-primary-text: #FFFFFF;
  --form-error: #C0392B;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.theme-toggle-icon {
  font-size: 0.875rem;
  line-height: 1;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== NAV ===== */
.nav {
  padding: 32px 0 0;
  text-align: center;
}

.nav-brand {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ===== LANDING PAGE — SPLIT LAYOUT ===== */
#landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.landing-topbar {
  padding: 16px 32px;
  text-align: right;
}

.badge-top {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 0 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.landing-left {
  flex: 1;
  max-width: 540px;
}

.landing-left .nav-brand {
  display: block;
  margin-bottom: 40px;
}

.landing-headline {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.landing-headline .accent-italic {
  font-style: italic;
  color: var(--accent);
}

.landing-desc {
  font-size: 1.0625rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 460px;
}

.landing-proof {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-muted);
}

.landing-proof strong {
  font-weight: 500;
  color: var(--text-secondary);
}

.landing-right {
  flex: 0 0 auto;
  width: 400px;
}

/* Form card */
.form-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.form-card-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-card-sub {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-group-landing {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group-landing input {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, background 0.3s ease, color 0.3s ease;
}

.form-group-landing input::placeholder {
  color: var(--text-muted);
}

.form-group-landing input:focus {
  border-color: var(--accent);
}

.form-group-landing button {
  width: 100%;
  padding: 18px 24px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--btn-primary-text);
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.form-group-landing button:hover {
  background: var(--accent-hover);
}

.form-group-landing button:active {
  transform: scale(0.98);
}

.form-group-landing button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-note-card {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
}

.form-error {
  color: var(--form-error);
  font-size: 0.875rem;
  margin-top: 8px;
  text-align: center;
}

/* Landing footer */
.landing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  border-top: 1px solid var(--border);
}

.footer-brand {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-right {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Landing responsive */
@media (max-width: 860px) {
  .landing-hero {
    flex-direction: column;
    gap: 40px;
    padding: 40px 24px;
    text-align: center;
  }

  .landing-left {
    max-width: 100%;
  }

  .landing-left .nav-brand {
    margin-bottom: 24px;
  }

  .landing-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .landing-right {
    width: 100%;
    max-width: 440px;
  }

  .landing-footer {
    padding: 20px 24px;
  }
}

/* ===== LEGACY — keep for quiz pages ===== */

/* ===== FOOTER ===== */
.footer {
  padding: 24px 0;
  text-align: center;
}

.footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== QUIZ PAGE ===== */
.quiz-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.quiz-header {
  padding: 32px 0 0;
  text-align: center;
}

.quiz-header .nav-brand {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--accent);
}

/* Progress bar */
.progress-wrapper {
  padding: 32px 0 0;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-step {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
}

.progress-pct {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.4s ease;
  width: 0%;
}

/* Quiz question area */
.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
}

.question-slide {
  display: none;
  animation: fadeInUp 0.35s ease;
}

.question-slide.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.question-text {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(1.375rem, 3.5vw, 1.75rem);
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 32px;
}

/* Answer options */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.4;
}

.option:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.option.selected {
  border-color: var(--accent);
  background: var(--option-selected-bg);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--bg-elevated);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.option.selected .option-letter {
  background: var(--accent);
  color: var(--btn-primary-text);
}

/* Quiz navigation */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
}

.btn-back {
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-back:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-next {
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--btn-primary-text);
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.btn-next:hover {
  background: var(--accent-hover);
}

.btn-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== RESULTS PAGE ===== */
.results-wrapper {
  padding: 48px 0 80px;
  animation: fadeInUp 0.5s ease;
}

.results-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--btn-primary-text);
  background: var(--accent);
  padding: 5px 14px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.results-title {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.results-archetype {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--accent);
  margin-bottom: 20px;
}

.results-desc {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 40px;
}

/* Score card */
.score-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 32px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.score-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.score-value {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent);
}

.score-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 24px;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-hover), var(--accent), var(--accent-light));
  border-radius: 100px;
  transition: width 1s ease;
}

.score-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.score-item {
  padding: 16px;
  background: var(--score-item-bg);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.score-item-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.score-item-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Roadmap section */
.roadmap-section {
  margin-bottom: 32px;
}

.roadmap-title {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.375rem;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.roadmap-step {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.roadmap-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: var(--bg-elevated);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  transition: background 0.3s ease;
}

.roadmap-content h4 {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.roadmap-content p {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Waitlist CTA */
.waitlist-cta {
  background: linear-gradient(135deg, var(--waitlist-gradient-start), var(--waitlist-gradient-end));
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 36px 28px;
  text-align: center;
  margin-top: 40px;
  transition: background 0.3s ease;
}

.waitlist-cta h3 {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.waitlist-cta p {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.waitlist-cta .btn-waitlist {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--btn-primary-text);
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
}

.waitlist-cta .btn-waitlist:hover {
  background: var(--accent-hover);
}

.waitlist-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero {
    padding: 40px 0;
  }

  .form-group {
    gap: 10px;
  }

  .score-breakdown {
    grid-template-columns: 1fr;
  }

  .quiz-body {
    padding: 24px 0;
  }

  .waitlist-cta {
    padding: 28px 20px;
  }

  .theme-toggle {
    top: 16px;
    right: 16px;
    padding: 6px 12px;
  }
}
