/*
 * Our Belonging Signature — Styles
 * Mobile-first. Earthy palette. Clean and quiet.
 */

:root {
  --color-bg: #FAF7F1;
  --color-surface: #FFFFFF;
  --color-surface-warm: #F5F1E8;
  --color-text: #2C2C2A;
  --color-text-muted: #5F5E5A;
  --color-text-faint: #888780;
  --color-border: rgba(120, 117, 107, 0.18);
  --color-border-strong: rgba(120, 117, 107, 0.32);
  --color-mastery: #EF9F27;
  --color-mastery-dark: #BA7517;
  --color-belonging: #1D9E75;
  --color-belonging-dark: #0F6E56;
  --color-best: #0F6E56;
  --color-least: #993C1D;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
}

.wordmark {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem;
  text-align: center;
}

/* ===== START SCREEN ===== */
.start-screen {
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  margin: 2rem auto;
}

.start-screen h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--color-text);
}

.start-screen .lede {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0 0 1.5rem;
  font-style: italic;
}

.start-screen .description {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0 0 2rem;
}

.start-screen .meta {
  font-size: 13px;
  color: var(--color-text-faint);
  margin: 1rem 0 2rem;
}

/* ===== QUESTION SCREEN ===== */
.question-screen {
  max-width: 420px;
  width: 100%;
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  margin: 1.5rem auto;
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
}

.progress-bar {
  background: var(--color-border);
  height: 4px;
  border-radius: 2px;
  margin-bottom: 1.75rem;
  overflow: hidden;
}

.progress-fill {
  background: var(--color-belonging);
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.question-prompt {
  font-family: var(--font-serif);
  font-size: 19px;
  text-align: center;
  margin: 0 0 6px;
  line-height: 1.45;
  color: var(--color-text);
}

.question-subtitle {
  text-align: center;
  font-size: 12px;
  font-style: italic;
  color: var(--color-text-muted);
  margin: 0 0 1.75rem;
}

.option {
  background: var(--color-surface-warm);
  border: 0.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.option:hover, .option:focus {
  background: #EFE9DA;
  border-color: rgba(120, 117, 107, 0.5);
  outline: none;
}

.option:active {
  transform: scale(0.99);
}

.option-divider {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  margin: 8px 0;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: 4rem 1rem;
}

.loading-screen p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--color-text-muted);
}

/* ===== RESULT SCREEN ===== */
.result-screen {
  max-width: 720px;
  width: 100%;
  margin: 1rem auto;
}

.result-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.result-header h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  margin: 0;
}

.personal-headline {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.5;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2rem;
  color: var(--color-text);
}

.chart-card {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-svg {
  width: 100%;
  max-width: 560px;
  display: block;
  margin: 0 auto;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 0.75rem;
  font-size: 13px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.legend-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch span:first-child {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  display: inline-block;
  opacity: 0.7;
}

.insight-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 1.25rem;
}

@media (min-width: 700px) {
  .insight-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.insight-card {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem;
}

.insight-eyebrow {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  margin: 0 0 8px;
}

.insight-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--color-text);
}

.insight-body {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.55;
}

.belonging-gap {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.35rem;
  margin-bottom: 1.25rem;
}

.belonging-gap .eyebrow {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  text-align: center;
}

.gap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 600px) {
  .gap-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.gap-title-best {
  font-size: 14px;
  color: var(--color-best);
  font-weight: 500;
  margin: 0 0 6px;
}

.gap-title-least {
  font-size: 14px;
  color: var(--color-least);
  font-weight: 500;
  margin: 0 0 6px;
}

.gap-body {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.55;
}

.conversion {
  background: var(--color-surface);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.conversion-lead {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.55;
  max-width: 540px;
  margin: 0 auto 14px;
}

.conversion-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.5rem;
  font-size: 14px;
  color: var(--color-text-muted);
  max-width: 540px;
  text-align: left;
}

.conversion-list li {
  padding: 5px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.conversion-list .check {
  color: var(--color-belonging);
  flex-shrink: 0;
  margin-top: 3px;
}

.cta-button {
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cta-button:hover {
  opacity: 0.9;
}

.cta-button:active {
  transform: scale(0.98);
}

.start-button {
  background: var(--color-belonging);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.start-button:hover {
  opacity: 0.92;
}

.start-button:active {
  transform: scale(0.98);
}

/* ===== EMAIL CAPTURE ===== */
.email-capture {
  background: var(--color-surface-warm);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.email-capture p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 12px;
  text-align: center;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
}

@media (min-width: 500px) {
  .email-form {
    flex-direction: row;
  }
}

.email-input {
  flex: 1;
  padding: 10px 14px;
  border: 0.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--color-surface);
}

.email-input:focus {
  outline: none;
  border-color: var(--color-belonging);
}

.email-submit {
  background: var(--color-belonging-dark);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
}

.email-submit:hover {
  opacity: 0.92;
}

/* ===== UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--color-text-faint);
  margin-top: 2rem;
  letter-spacing: 0.06em;
}

/* ===== DARK MODE (auto-detected from system preference) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1E1B17;
    --color-surface: #28241F;
    --color-surface-warm: #2F2B25;
    --color-text: #F0EDE6;
    --color-text-muted: #B8B4AB;
    --color-text-faint: #888780;
    --color-border: rgba(245, 240, 230, 0.10);
    --color-border-strong: rgba(245, 240, 230, 0.22);
    --color-mastery: #EF9F27;
    --color-mastery-dark: #FAC775;
    --color-belonging: #1D9E75;
    --color-belonging-dark: #5DCAA5;
    --color-best: #5DCAA5;
    --color-least: #F0997B;
  }

  .option:hover, .option:focus {
    background: #36322B;
    border-color: rgba(245, 240, 230, 0.35);
  }

  .cta-button {
    background: var(--color-text);
    color: var(--color-bg);
  }

  .start-button {
    background: var(--color-belonging);
    color: #0A0A0A;
  }

  .email-submit {
    background: var(--color-belonging-dark);
    color: #0A0A0A;
  }

  .email-input {
    background: var(--color-surface);
    color: var(--color-text);
  }
}
