/* ─── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0d1b3e;
  --navy-mid:    #142050;
  --navy-light:  #1a2a6b;
  --navy-border: rgba(255,255,255,0.08);
  --navy-border-mid: rgba(255,255,255,0.16);
  --blue:        #5bb8f5;
  --blue-light:  #8fd0f9;
  --blue-dark:   #3a9ee0;
  --orange:      #f47b20;
  --orange-light:#f9a05c;
  --white:       #ffffff;
  --text-primary: #ffffff;
  --text-mid:    #b8d4ee;
  --text-muted:  #7aa8cc;
  --text-faint:  #4a7099;
  --text-ghost:  #2a4a69;
  --surface:     #111e3a;
  --surface-mid: #162240;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', Arial, sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
}

.screen { display: none; }
.screen.active { display: flex; flex-direction: column; min-height: 100vh; }

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; }

.brand-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 2.5rem;
}

.orange-line {
  width: 60px; height: 3px;
  background: var(--orange);
  margin: 0 0 2rem;
}

.btn-gold {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--orange); color: var(--white); border: none;
  padding: 1rem 2.2rem;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; transition: background 0.18s; border-radius: 2px;
}
.btn-gold:hover { background: var(--orange-light); }
.btn-gold:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-ghost {
  background: none; border: none; color: var(--text-faint);
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  cursor: pointer; letter-spacing: 0.03em;
  transition: color 0.15s; padding: 0.5rem 0;
}
.btn-ghost:hover { color: var(--text-muted); }

/* LANDING */
#screen-landing {
  justify-content: center;
  background:
    radial-gradient(ellipse at 75% 0%, rgba(244,123,32,0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 100%, rgba(91,184,245,0.06) 0%, transparent 50%),
    var(--navy);
  position: relative; overflow: hidden;
}
#screen-landing::before {
  content: ''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 79px, rgba(255,255,255,0.018) 79px, rgba(255,255,255,0.018) 80px),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(255,255,255,0.018) 79px, rgba(255,255,255,0.018) 80px);
  pointer-events: none;
}

.landing-inner {
  max-width: 820px; margin: 0 auto;
  padding: 5rem 2.5rem; width: 100%;
  position: relative; z-index: 1;
}

.logo-wrap { margin-bottom: 2.5rem; }
.logo-wrap img { height: 72px; width: auto; }

.landing-headline {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900; line-height: 1.05;
  color: var(--text-primary); margin-bottom: 1.5rem; max-width: 700px;
}
.landing-headline em { font-style: italic; color: var(--orange); }

.landing-sub {
  font-size: 1.1rem; color: var(--text-muted);
  line-height: 1.7; font-weight: 300; margin-bottom: 2.5rem;
}

.meta-row { display: flex; gap: 2.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.meta-item { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-ghost); }
.meta-item span {
  display: block; font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; color: var(--blue);
  letter-spacing: 0; text-transform: none; margin-bottom: 2px;
}

.honesty-note { font-size: 12px; color: var(--text-faint); letter-spacing: 0.05em; margin-bottom: 1.5rem; }

.landing-quote {
  font-family: 'Playfair Display', serif; font-size: 0.9rem;
  font-style: italic; color: var(--text-ghost); line-height: 1.7;
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--navy-border); max-width: 420px;
}

/* QUIZ */
#screen-quiz {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(91,184,245,0.04) 0%, transparent 50%),
    var(--navy);
}

.quiz-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--navy-border); flex-shrink: 0;
}

.quiz-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint);
}
.quiz-brand img { height: 28px; width: auto; opacity: 0.9; }

.progress-wrap { display: flex; align-items: center; gap: 14px; }
.progress-track { width: 180px; height: 3px; background: var(--navy-border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue-dark), var(--orange)); transition: width 0.4s ease; width: 0%; }
.progress-label { font-size: 12px; color: var(--text-faint); min-width: 44px; text-align: right; }

.question-wrap {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  max-width: 720px; margin: 0 auto; padding: 3rem 2.5rem; width: 100%;
}

.q-num { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--orange); margin-bottom: 1.5rem; }
.q-text { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 700; line-height: 1.3; color: var(--text-primary); margin-bottom: 0.75rem; }
.q-signal { font-size: 12px; color: var(--text-ghost); font-style: italic; margin-bottom: 2.5rem; }

.options-list { display: flex; flex-direction: column; gap: 10px; }

.option-btn {
  display: flex; align-items: flex-start; gap: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--navy-border);
  padding: 1.1rem 1.3rem; cursor: pointer; text-align: left; width: 100%;
  transition: border-color 0.15s, background 0.15s;
  color: var(--text-primary); font-family: 'DM Sans', sans-serif; border-radius: 3px;
}
.option-btn:hover { border-color: var(--blue); background: rgba(91,184,245,0.06); }
.option-btn.selected { border-color: var(--orange); background: rgba(244,123,32,0.08); }

.opt-letter { font-size: 11px; letter-spacing: 0.08em; color: var(--text-faint); font-weight: 500; min-width: 16px; margin-top: 3px; transition: color 0.15s; }
.option-btn.selected .opt-letter { color: var(--orange); }
.option-btn:hover:not(.selected) .opt-letter { color: var(--blue); }

.opt-text { font-size: 14px; line-height: 1.55; color: var(--text-mid); font-weight: 300; }
.option-btn.selected .opt-text { color: var(--text-primary); font-weight: 400; }

.quiz-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2.5rem;
  border-top: 1px solid var(--navy-border); flex-shrink: 0;
}

/* CAPTURE */
#screen-capture { justify-content: center; background: var(--navy); }
.capture-inner { max-width: 520px; margin: 0 auto; padding: 5rem 2.5rem; width: 100%; }
.capture-headline { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; line-height: 1.2; }
.capture-sub { font-size: 15px; color: var(--text-muted); line-height: 1.7; font-weight: 300; margin-bottom: 2.5rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.form-group input {
  width: 100%; background: var(--surface); border: 1px solid var(--navy-border);
  color: var(--text-primary); font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 300; padding: 0.9rem 1.1rem;
  outline: none; transition: border-color 0.15s; border-radius: 3px;
}
.form-group input:focus { border-color: var(--blue); }
.form-group input::placeholder { color: var(--text-faint); }
.form-note { font-size: 12px; color: var(--text-ghost); line-height: 1.6; margin-bottom: 1.5rem; }
.form-error { font-size: 13px; color: #f87171; margin-top: 1rem; min-height: 20px; }

/* RESULTS */
#screen-results {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(244,123,32,0.07) 0%, transparent 50%),
    var(--navy);
}

.results-hero { padding: 4rem 2.5rem 3rem; border-bottom: 1px solid var(--navy-border); max-width: 820px; margin: 0 auto; width: 100%; }
.results-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 1rem; }
.profile-badge { display: inline-block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; padding: 5px 16px; border: 1px solid rgba(244,123,32,0.4); background: rgba(244,123,32,0.1); color: var(--orange); margin-bottom: 1.5rem; border-radius: 2px; }
.results-headline { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; line-height: 1.1; color: var(--text-primary); margin-bottom: 1rem; }
.results-sub { font-size: 1rem; color: var(--text-muted); line-height: 1.75; font-weight: 300; max-width: 580px; }

.results-body { max-width: 820px; margin: 0 auto; padding: 3rem 2.5rem 5rem; width: 100%; }

.score-panel {
  display: flex; gap: 2rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--navy-border);
  padding: 2rem; margin-bottom: 3rem; border-radius: 4px;
  position: relative; overflow: hidden;
}
.score-panel::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(180deg, var(--orange), var(--blue-dark)); }

.score-panel-left { flex: 1; }
.panel-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.big-score { font-family: 'Playfair Display', serif; font-size: 4rem; font-weight: 700; color: var(--orange); line-height: 1; margin-bottom: 12px; }
.big-score span { font-size: 1.5rem; color: var(--text-faint); font-family: 'DM Sans', sans-serif; }
.score-track { height: 4px; background: var(--navy-border); width: 100%; border-radius: 2px; overflow: hidden; }
.score-fill { height: 100%; background: linear-gradient(90deg, var(--blue-dark), var(--orange)); width: 0%; transition: width 1.2s cubic-bezier(0.4,0,0.2,1); border-radius: 2px; }
.score-panel-right { text-align: right; padding-top: 4px; }
.raw-score { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; color: var(--text-mid); }

.section-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 1.25rem; }
.dimensions-section { margin-bottom: 3rem; }

.dim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.dim-card { background: var(--surface); border: 1px solid var(--navy-border); padding: 1.25rem 1.4rem; border-radius: 4px; transition: border-color 0.2s; }
.dim-card:hover { border-color: var(--navy-border-mid); }
.dim-name { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.dim-bar-wrap { height: 3px; background: var(--navy-border); margin-bottom: 8px; border-radius: 2px; overflow: hidden; }
.dim-bar { height: 100%; background: linear-gradient(90deg, var(--blue-dark), var(--blue)); transition: width 1s ease; width: 0%; }
.dim-val { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--blue-light); }
.dim-val span { font-size: 0.75rem; color: var(--text-faint); font-family: 'DM Sans', sans-serif; }

.meaning-section { margin-bottom: 2.5rem; }
.meaning-text { font-size: 15px; color: var(--text-muted); line-height: 1.8; font-weight: 300; max-width: 640px; }

.cta-panel {
  border: 1px solid rgba(244,123,32,0.22); padding: 2rem;
  background: rgba(244,123,32,0.04); margin-bottom: 2.5rem;
  border-radius: 4px; position: relative; overflow: hidden;
}
.cta-panel::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--orange), transparent); }
.cta-heading { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.75rem; }
.cta-body { font-size: 14px; color: var(--text-muted); line-height: 1.7; font-weight: 300; margin-bottom: 1.5rem; max-width: 560px; }
.cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-cta-primary { background: var(--orange); color: var(--white); border: none; padding: 0.9rem 1.8rem; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 0.18s; border-radius: 2px; }
.btn-cta-primary:hover { background: var(--orange-light); }
.btn-cta-secondary { background: none; color: var(--blue); border: 1px solid rgba(91,184,245,0.3); padding: 0.9rem 1.8rem; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: border-color 0.18s, color 0.18s; border-radius: 2px; }
.btn-cta-secondary:hover { border-color: var(--blue); color: var(--blue-light); }

.share-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.btn-share { background: none; border: 1px solid var(--navy-border); color: var(--text-faint); font-family: 'DM Sans', sans-serif; font-size: 12px; letter-spacing: 0.06em; padding: 0.6rem 1.1rem; cursor: pointer; transition: border-color 0.15s, color 0.15s; border-radius: 2px; }
.btn-share:hover { border-color: var(--blue); color: var(--blue); }
.btn-restart { background: none; border: none; color: var(--text-ghost); font-family: 'DM Sans', sans-serif; font-size: 12px; cursor: pointer; margin-left: auto; transition: color 0.15s; letter-spacing: 0.04em; }
.btn-restart:hover { color: var(--text-faint); }
.submission-status { font-size: 12px; color: var(--text-faint); min-height: 18px; letter-spacing: 0.04em; }

/* PRINT */
.print-only { display: none; }
@media print {
  .screen { display: none !important; }
  .print-only { display: block !important; font-family: Georgia, serif; color: #0d1b3e; padding: 40px; max-width: 720px; margin: 0 auto; }
  .print-header { border-bottom: 3px solid #f47b20; padding-bottom: 16px; margin-bottom: 24px; }
  .print-brand { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #4a7099; margin-bottom: 8px; }
  .print-title { font-size: 28px; font-weight: 700; color: #0d1b3e; }
  .print-body { font-size: 14px; line-height: 1.7; }
  .print-footer { margin-top: 40px; font-size: 11px; color: #4a7099; border-top: 1px solid #ddd; padding-top: 12px; }
}

@media (max-width: 600px) {
  .quiz-header, .quiz-footer, .question-wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
  .progress-track { width: 110px; }
  .landing-inner, .capture-inner, .results-hero, .results-body { padding-left: 1.25rem; padding-right: 1.25rem; }
  .score-panel { flex-direction: column; gap: 1rem; }
  .score-panel-right { text-align: left; }
  .dim-grid { grid-template-columns: 1fr 1fr; }
  .btn-restart { margin-left: 0; }
}
