/* === TOKENS === */
:root {
  --cream: #FFFBF5;
  --cream-dark: #FFF5E8;
  --coral: #E8613B;
  --coral-light: #FDF0EC;
  --navy: #1A1A2E;
  --navy-mid: #2D2D4A;
  --sage: #7A8B6E;
  --sage-light: #EFF3E8;
  --warm-gray: #8A8078;
  --warm-light: #F5F0E8;
  --white: #FFFFFF;
  --border: #EDE8E0;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --max-w: 1160px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;
}

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

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

body {
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* ── Layout ─────────────────────────────────────────────── */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--coral);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.logo-word {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

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

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--coral);
  color: white;
}

.btn-primary:hover { background: #d4552f; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--navy);
  color: white;
}

.btn-secondary:hover { background: var(--navy-mid); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--warm-gray);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }

.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

/* ── Step indicator ─────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step.active { color: var(--coral); }
.step.completed { color: var(--sage); }

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--warm-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.step.active .step-num { background: var(--coral); color: white; }
.step.completed .step-num { background: var(--sage); color: white; }

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 60px;
}

/* ── Form cards ─────────────────────────────────────────── */
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 480px;
  margin: 4rem auto;
  box-shadow: 0 4px 24px rgba(26,26,46,0.06);
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.auth-card p {
  color: var(--warm-gray);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--cream);
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(232,97,59,0.12);
}

.error-msg {
  background: #FEF2F0;
  border: 1px solid #f5c6c0;
  color: var(--coral);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

/* ── Identity verification ──────────────────────────────── */
.identity-hero {
  background: var(--navy);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
  border-radius: 16px 16px 0 0;
  margin: -2.5rem -2.5rem 2rem;
}

.identity-hero h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.identity-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.identity-trust {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.trust-badge svg { width: 14px; height: 14px; }

/* ── Quiz ─────────────────────────────────────────────────── */
.quiz-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

.quiz-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.quiz-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
  color: var(--navy);
}

.quiz-section p {
  color: var(--warm-gray);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.trait-row {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.trait-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.trait-desc {
  font-size: 0.75rem;
  color: var(--warm-gray);
}

.trait-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
}

.trait-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--coral);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(232,97,59,0.3);
}

.trait-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--coral);
  text-align: right;
  min-width: 28px;
}

/* Interest tags */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  background: var(--cream);
  color: var(--navy);
}

.tag-chip:hover { border-color: var(--coral); }

.tag-chip.selected {
  background: var(--coral-light);
  border-color: var(--coral);
  color: var(--coral);
}

.tag-chip input { display: none; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--warm-gray);
  font-size: 0.8rem;
}

/* ── Complete page ──────────────────────────────────────── */
.complete-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.complete-icon {
  width: 80px;
  height: 80px;
  background: var(--sage-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.complete-icon svg { width: 40px; height: 40px; color: var(--sage); }

.complete-page h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.complete-page p {
  color: var(--warm-gray);
  max-width: 400px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ── Alert banners ──────────────────────────────────────── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.alert-warning {
  background: #FEF3E2;
  border: 1px solid #f5d6a0;
  color: #92600a;
}

.alert-success {
  background: var(--sage-light);
  border: 1px solid #b8ccaf;
  color: var(--sage);
}

/* ── Utilities ───────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }