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

:root {
  --bg:      #07101a;
  --bg-2:    #0c1a28;
  --bg-card: #0f2035;
  --navy:    #1A2E4A;
  --gold:    #C9A84C;
  --gold-dk: #a8872e;
  --gold-lt: #e8c870;
  --teal:    #2A7D6F;
  --danger:  #C0392B;
  --cream:   #F5F1EA;
  --text:    #e8e2d9;
  --muted:   rgba(232, 226, 217, 0.72);
  --border:  rgba(255, 255, 255, 0.1);
  --white:   #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  /* Prevent iOS font-size inflation */
  -webkit-text-size-adjust: 100%;
}

/* Remove tap highlight on mobile */
* { -webkit-tap-highlight-color: transparent; }

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  /* Safe area for notched phones */
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

/* ── Type ─────────────────────────────────────────────────── */
h1 {
  font-family: 'Lora', serif;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -0.02em;
}
h1 em { font-style: italic; color: var(--gold); }

h2 {
  font-family: 'Lora', serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
}
h2 em { font-style: italic; color: var(--gold); }

h3 {
  font-family: 'Lora', serif;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}

h4 { font-size: 1rem; font-weight: 700; color: var(--white); }
p  { color: var(--muted); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, box-shadow .18s ease, transform .12s ease;
  border: none;
  font-family: inherit;
  letter-spacing: 0.01em;
  /* Touch: no text select, no callout */
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.btn-sm { padding: 10px 18px; font-size: 0.82rem; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-lt));
  color: #0d0a04;
  font-weight: 800;
  box-shadow: 0 4px 24px rgba(201,168,76,.3);
}
.btn-gold:hover   { background: linear-gradient(135deg, var(--gold-lt), var(--gold)); box-shadow: 0 6px 32px rgba(201,168,76,.45); transform: translateY(-1px); }
.btn-gold:active  { transform: scale(0.97); box-shadow: 0 2px 12px rgba(201,168,76,.3); }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.6);
  border: 1px solid var(--border);
  font-weight: 600;
}
.btn-ghost:hover  { color: var(--gold); border-color: rgba(201,168,76,.4); }
.btn-ghost:active { opacity: 0.7; }

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 16, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: 'Lora', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
}
.logo span { color: var(--gold); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  padding: 80px 0 96px;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(201,168,76,.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201,168,76,.85);
}
.eyebrow-line {
  display: block;
  width: 28px;
  height: 1px;
  background: rgba(201,168,76,.4);
  flex-shrink: 0;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  max-width: 500px;
  line-height: 1.75;
}

.hero-cta {
  font-size: 1rem;
  padding: 17px 32px;
  border-radius: 10px;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

.hero-note {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(201,168,76,.7);
}

/* ── Quiz ─────────────────────────────────────────────────── */
.quiz {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 88px;
}

.quiz-wrap { max-width: 620px; }

.quiz-header { margin-bottom: 36px; }
.quiz-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

/* Progress bar row */
.quiz-progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}
.quiz-back {
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
  transition: color .15s;
  display: none; /* shown by JS when currentQ > 0 */
  touch-action: manipulation;
}
.quiz-back:hover  { color: var(--gold); }
.quiz-back:active { opacity: 0.6; }
.quiz-back.visible { display: block; }

.quiz-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  border-radius: 2px;
  transition: width .4s ease;
  width: 20%; /* starts at 1/5 */
}
.quiz-progress-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  white-space: nowrap;
}

/* Quiz card */
.quiz-card { display: none; flex-direction: column; gap: 24px; }
.quiz-card.active { display: flex; animation: fadeUp .32s ease both; }

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

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

.q-opt {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  padding: 14px 48px 14px 20px; /* right padding for checkmark space */
  min-height: 52px;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1.4;
  width: 100%;
  position: relative;
  touch-action: manipulation;
}
/* Checkmark slot */
.q-opt::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  transition: all .15s;
}
.q-opt.selected::after {
  background: var(--teal);
  border-color: var(--teal);
  content: '✓';
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 20px;
  text-align: center;
}
@media (hover: hover) {
  .q-opt:hover { background: rgba(201,168,76,.09); border-color: rgba(201,168,76,.4); color: var(--white); }
  .q-opt:hover::after { border-color: rgba(201,168,76,.5); }
}
.q-opt:active  { transform: scale(0.99); }
.q-opt.selected { background: rgba(42,125,111,.1); border-color: rgba(42,125,111,.5); color: var(--white); }

/* Loading state */
.quiz-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 48px 0;
}
.quiz-loading.visible { display: flex; animation: fadeUp .3s ease both; }
.quiz-loading p { font-size: 0.9rem; color: rgba(255,255,255,.5); letter-spacing: 0.03em; }

.loading-ring {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,.08);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Quiz Result */
.quiz-result { display: none; flex-direction: column; gap: 32px; }
.quiz-result.visible { display: flex; animation: fadeUp .4s ease both; }

.result-profile {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.result-profile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt), transparent);
}

.result-label {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201,168,76,.7);
}
.result-profile-name {
  font-family: 'Lora', serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  color: var(--gold);
  line-height: 1.15;
  margin: 0;
}
.result-tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
  font-style: italic;
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding-bottom: 14px;
}
.result-insight {
  font-size: 0.95rem;
  color: rgba(255,255,255,.82);
  line-height: 1.75;
}
.result-plan {
  background: rgba(42,125,111,.1);
  border: 1px solid rgba(42,125,111,.3);
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 0.88rem;
  color: rgba(255,255,255,.85);
  line-height: 1.8;
}
.plan-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}

.result-cta { display: flex; flex-direction: column; gap: 14px; }
.result-cta-head {
  font-family: 'Lora', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.35;
}
.result-note  { font-size: 0.78rem; color: rgba(255,255,255,.5); }
.result-proof { font-size: 0.82rem; color: rgba(255,255,255,.65); }
.result-proof strong { color: var(--gold); }

/* Capture form */
.capture-form { display: flex; gap: 10px; flex-wrap: wrap; }
.capture-form input {
  flex: 1;
  min-width: 200px;
  padding: 15px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  /* 16px prevents iOS auto-zoom */
  font-size: 16px;
  font-family: inherit;
  background: rgba(255,255,255,.06);
  color: var(--white);
  outline: none;
  transition: border-color .18s;
  -webkit-appearance: none;
  appearance: none;
}
.capture-form input::placeholder { color: rgba(255,255,255,.4); }
.capture-form input:focus { border-color: rgba(201,168,76,.7); }

/* ── Features strip ───────────────────────────────────────── */
.features {
  background: var(--bg);
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.feat {
  background: var(--bg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--border);
}
.feat:last-child { border-right: none; }
.feat-mid { background: #0a0604; }

.feat-num {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--teal);
  text-transform: uppercase;
}
.feat-num.red  { color: var(--danger); }
.feat-num.gold { color: var(--gold); }
.feat p { font-size: 0.9rem; line-height: 1.7; }

/* ── Armor ────────────────────────────────────────────────── */
.armor {
  background: var(--bg-2);
  padding: 80px 0;
}
.armor-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.armor-left { display: flex; flex-direction: column; gap: 16px; }
.armor-left p { font-size: 0.95rem; line-height: 1.8; }

.armor-right { display: flex; flex-direction: column; gap: 12px; }
.armor-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.armorpiece {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  opacity: 0.3;
  filter: grayscale(1);
  transition: all .2s;
}
.armorpiece.unlocked {
  background: rgba(201,168,76,.07);
  border-color: rgba(201,168,76,.3);
  opacity: 1;
  filter: none;
  box-shadow: 0 0 24px rgba(201,168,76,.08);
}
.armorpiece span { font-size: 1.4rem; }
.armorpiece small {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255,255,255,.65);
  line-height: 1.3;
}
.armorpiece.unlocked small { color: rgba(255,255,255,.92); }
.armorpiece em {
  font-style: normal;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--gold);
}
.armorpiece:not(.unlocked) em { color: rgba(255,255,255,.28); }

/* ── Quote ────────────────────────────────────────────────── */
.quote-section {
  background: var(--bg);
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.quote-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.quote-mark {
  font-family: 'Lora', serif;
  font-size: 5rem;
  line-height: 0.4;
  color: var(--gold);
  opacity: 0.4;
  user-select: none;
}
.quote-inner blockquote {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: rgba(255,255,255,.92);
  line-height: 1.75;
}
.quote-inner blockquote em { color: var(--gold); }
.quote-inner cite {
  font-size: 0.82rem;
  color: rgba(255,255,255,.5);
  font-style: normal;
  font-weight: 500;
}

/* ── Final CTA ────────────────────────────────────────────── */
.final-cta {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 80px 0;
}
.final-cta-inner {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.final-cta-inner p { max-width: 400px; }
.final-note { font-size: 0.78rem; color: rgba(255,255,255,.5); }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: #040a10;
  border-top: 1px solid var(--border);
  padding: 36px 0;
  /* Safe area bottom for home-bar phones */
  padding-bottom: max(36px, env(safe-area-inset-bottom));
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer .logo { color: var(--white); font-size: 1.1rem; }
.footer .logo span { color: var(--gold); }
.footer-tag  { font-size: 0.7rem; color: rgba(255,255,255,.4); font-style: italic; margin-top: 3px; }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,.38); }
.footer-links { display: flex; gap: 18px; align-items: center; }
.footer-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .18s;
  /* Minimum touch target */
  padding: 6px 0;
}
.footer-links a:hover { color: var(--gold); }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom, 28px));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--teal);
  color: var(--white);
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  opacity: 0;
  transition: opacity .28s, transform .28s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  max-width: calc(100vw - 48px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — tablet down (≤ 820px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 820px) {
  .armor-inner   { grid-template-columns: 1fr; gap: 44px; }
  .features-grid { grid-template-columns: 1fr; }
  .feat          { border-right: none; border-bottom: 1px solid var(--border); }
  .feat:last-child { border-bottom: none; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — large phone (≤ 640px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero     { min-height: 80vh; padding: 64px 0 80px; }
  .quiz     { padding: 56px 0 72px; }
  .features { padding: 60px 0; }
  .armor    { padding: 60px 0; }
  .quote-section { padding: 60px 0; }
  .final-cta { padding: 60px 0; }

  .hero-inner { gap: 22px; }
  .quiz-header { margin-bottom: 36px; }

  /* Full-width primary CTA in hero */
  .hero-cta { width: 100%; max-width: 420px; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — standard phone (≤ 480px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .hero      { min-height: auto; padding: 52px 0 64px; }
  .quiz      { padding: 48px 0 60px; }
  .features  { padding: 52px 0; }
  .armor     { padding: 52px 0; }
  .quote-section { padding: 52px 0; }
  .final-cta { padding: 52px 0; }

  /* Stack email form */
  .capture-form          { flex-direction: column; }
  .capture-form input    { min-width: 0; width: 100%; }
  .capture-form .btn     { width: 100%; }

  /* Armor: 2 columns on phone */
  .armor-row { grid-template-columns: repeat(2, 1fr); }

  /* Result profile padding */
  .result-profile { padding: 20px 16px; }
  .result-profile-name { font-size: 1.5rem; }

  /* Nav button compact */
  .btn-ghost.btn-sm { padding: 9px 14px; font-size: 0.78rem; }

  /* Footer stack */
  .footer-inner  { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-links  { gap: 24px; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — small phone (≤ 380px)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .container { padding: 0 16px; }

  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.55rem; }

  .hero-eyebrow { font-size: 0.65rem; gap: 10px; }
  .eyebrow-line { width: 20px; }

  .q-opt { font-size: 0.92rem; padding: 13px 16px; }

  .result-cta-head { font-size: 1.2rem; }

  /* Single column armor on tiny phones */
  .armor-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .armorpiece { padding: 12px 6px; }
  .armorpiece span { font-size: 1.2rem; }

  .feat { padding: 24px 18px; }
}
