/* Pattern Weaver Mind — Global Styles
   Brand: Dark academia · Mythic · Timeless
   Palette: Indigo-black · Warm parchment · Gold thread · Muted teal
*/

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:         #0e0c1a;
  --surface:    #18152b;
  --surface-2:  #211d38;
  --text:       #e8e0d0;
  --text-muted: #9a9080;
  --gold:       #c9a84c;
  --gold-dim:   rgba(201, 168, 76, 0.15);
  --gold-border:rgba(201, 168, 76, 0.25);
  --teal:       #4a7c6b;
  --teal-dim:   rgba(74, 124, 107, 0.15);
  --radius:     6px;
  --radius-lg:  12px;
  --transition: 200ms ease;
  --max-w:      720px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p  { margin-bottom: 1rem; color: var(--text); }

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.center { text-align: center; }

/* ── Decorative thread line ─────────────────────────────── */
.thread-line {
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1rem auto;
}
.thread-line--left { margin-left: 0; }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gold-border);
  position: sticky;
  top: 0;
  background: rgba(14, 12, 26, 0.96);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.nav-brand span { color: var(--gold); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--gold); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 0.3rem 1rem;
  margin-bottom: 1.75rem;
}
.hero-title { margin-bottom: 1.25rem; }
.hero-title em { font-style: normal; color: var(--gold); }
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}
.hero-loom {
  font-size: 3.5rem;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.3));
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: #0e0c1a;
}
.btn-primary:hover {
  background: #d4b255;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(201,168,76,0.35);
  text-decoration: none;
  color: #0e0c1a;
}
.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-border);
}
.btn-secondary:hover {
  background: var(--gold-dim);
  text-decoration: none;
}
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Archetype Cards (landing page) ─────────────────────── */
.archetypes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 3rem 0;
}
.archetype-card {
  background: var(--surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition);
}
.archetype-card:hover {
  border-color: var(--gold);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.archetype-card-emoji { font-size: 2rem; margin-bottom: 0.75rem; }
.archetype-card-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.archetype-card-tagline { font-size: 0.82rem; color: var(--text-muted); }

/* ── Section ─────────────────────────────────────────────── */
.section {
  padding: 5rem 1.5rem;
}
.section--dark {
  background: var(--surface);
  border-top: 1px solid var(--gold-border);
  border-bottom: 1px solid var(--gold-border);
}
.section-title { margin-bottom: 0.75rem; }
.section-intro {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

/* ── Quote ───────────────────────────────────────────────── */
.pull-quote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.05rem;
}
.pull-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--gold);
}

/* ── CTA Band ────────────────────────────────────────────── */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--gold-border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--gold); }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 1rem; }

/* ── Quiz Styles ─────────────────────────────────────────── */
.quiz-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.quiz-progress-bar-track {
  height: 3px;
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 50;
}
.quiz-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 400ms ease;
}

.quiz-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 680px;
  width: 100%;
  animation: cardIn 300ms ease;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quiz-counter {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.quiz-counter em { color: var(--gold); font-style: normal; }
.quiz-question {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  margin-bottom: 1.75rem;
  line-height: 1.4;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-option {
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.quiz-option::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transition: transform var(--transition);
}
.quiz-option:hover {
  border-color: var(--gold-border);
  background: rgba(201,168,76,0.05);
}
.quiz-option:hover::before { transform: scaleY(1); }
.quiz-option.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--text);
}
.quiz-option.selected::before { transform: scaleY(1); }

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}
.quiz-nav .btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.5rem;
  transition: color var(--transition);
}
.quiz-nav .btn-ghost:hover { color: var(--text); }

/* Email capture step */
.quiz-email-step {}
.quiz-email-step h2 { margin-bottom: 0.5rem; }
.quiz-email-step p  { color: var(--text-muted); margin-bottom: 1.75rem; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.form-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--gold); }
.form-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; }
.form-error { color: #e07070; font-size: 0.875rem; margin-top: 0.4rem; display: none; }

/* ── Result Page ─────────────────────────────────────────── */
.result-hero {
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}
.result-emoji { font-size: 4rem; margin: 1.5rem 0; }
.result-tagline {
  font-size: 1.15rem;
  color: var(--gold);
  font-style: italic;
  font-family: var(--font-serif);
  margin-top: 0.5rem;
}
.result-description {
  max-width: 620px;
  margin: 2.5rem auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-line;
}
.result-shadow {
  background: var(--surface);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  max-width: 580px;
  margin: 0 auto 2.5rem;
}
.result-shadow-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.result-shadow p { margin: 0; color: var(--text-muted); font-size: 0.95rem; white-space: pre-line; }
.result-famous {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.result-famous-chip {
  background: var(--surface-2);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.result-share {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(14,12,26,0.3);
  border-top-color: #0e0c1a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .quiz-card { padding: 1.5rem; }
  .hero { padding: 4rem 1rem 3rem; }
  .archetypes-grid { grid-template-columns: repeat(2, 1fr); }
}
