/* ---------- Tokens ---------- */
:root {
  --bg: #0b0a0d;
  --bg-elevated: #15131a;
  --line: #2a2620;
  --gold: #c7a24c;
  --gold-bright: #e8cd8a;
  --text: #f3eee4;
  --text-muted: #9c9488;
  --text-faint: #6b6459;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Poppins', -apple-system, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(ellipse 900px 600px at 50% -10%, rgba(199, 162, 76, 0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 100%, rgba(199, 162, 76, 0.05), transparent 60%);
}

/* ---------- Signature element: the breathing orb ---------- */
.breath-orb {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  border: 1px solid rgba(199, 162, 76, 0.35);
  pointer-events: none;
  z-index: 0;
  animation: breathe 11s ease-in-out infinite;
}
.breath-orb::before {
  content: '';
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  border: 1px solid rgba(199, 162, 76, 0.18);
}
.breath-orb::after {
  content: '';
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 162, 76, 0.10), transparent 70%);
}

@keyframes breathe {
  0%   { transform: scale(0.72); opacity: 0.35; }
  36%  { transform: scale(1);    opacity: 0.75; } /* inhale ~4s */
  55%  { transform: scale(1);    opacity: 0.75; } /* hold ~2s */
  91%  { transform: scale(0.72); opacity: 0.35; } /* exhale ~4s */
  100% { transform: scale(0.72); opacity: 0.35; }
}

/* ---------- Progress rail ---------- */
.progress-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.06);
  z-index: 10;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 0.5s var(--ease);
}

/* ---------- Layout ---------- */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vh 6vw;
}

.screen {
  display: none;
  width: 100%;
  max-width: 620px;
  text-align: center;
  animation: rise 0.6s var(--ease);
}
.screen.is-active { display: block; }

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

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 22px;
}

/* ---------- Intro ---------- */
.screen--intro { padding-top: 0; }
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 40px;
  font-weight: 300;
}
.hero-foot {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #16140f;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border: none;
  padding: 16px 38px;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(199, 162, 76, 0.25);
}
.btn-primary:focus-visible, .btn-ghost:focus-visible, .opt-btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.btn-ghost {
  display: inline-block;
  margin-top: 18px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: color 0.2s var(--ease);
}
.btn-ghost:hover { color: var(--text-muted); }

/* ---------- Question screen ---------- */
.q-section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 10px;
}
.q-count {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 26px;
  font-variant-numeric: tabular-nums;
}
.q-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  line-height: 1.4;
  margin-bottom: 36px;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.opt-btn {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: left;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.15s var(--ease);
}
.opt-btn:hover {
  border-color: var(--gold);
  background: #1a1720;
  transform: translateX(2px);
}
.opt-btn.is-selected {
  border-color: var(--gold);
  background: rgba(199, 162, 76, 0.1);
  color: var(--gold-bright);
}

/* scale input for stress question */
.q-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
.scale-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.scale-btn:hover { border-color: var(--gold); color: var(--text); }
.scale-btn.is-selected {
  border-color: var(--gold);
  background: var(--gold);
  color: #16140f;
  font-weight: 600;
}
.q-scale-labels {
  display: flex;
  justify-content: space-between;
  max-width: 460px;
  margin: 0 auto 30px;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.q-nav { min-height: 20px; margin-top: 18px; }

/* ---------- Loading ---------- */
.screen--loading { }
.loading-text {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.loading-sub {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Results ---------- */
.result-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  line-height: 1.2;
  margin-bottom: 14px;
}
.result-tagline {
  color: var(--text-muted);
  font-weight: 300;
  max-width: 460px;
  margin: 0 auto 34px;
  line-height: 1.6;
}

.result-flag {
  background: rgba(199, 162, 76, 0.08);
  border: 1px solid rgba(199, 162, 76, 0.3);
  border-radius: 4px;
  padding: 18px 22px;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 34px;
}
.result-flag strong { color: var(--gold-bright); }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 30px;
}
.result-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
  text-align: left;
}
.result-card-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.result-card-body {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  font-weight: 300;
}

.result-block {
  text-align: left;
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.result-block-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--gold-bright);
  margin-bottom: 12px;
}
.result-block-body {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-muted);
  font-weight: 300;
}
.result-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-list li {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-muted);
  font-weight: 300;
  padding-left: 20px;
  position: relative;
}
.result-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.result-caution .result-block-body { color: var(--text-faint); font-size: 0.86rem; }

.result-cta {
  border-top: 1px solid var(--line);
  padding-top: 34px;
  margin-top: 6px;
}
.result-cta-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.disclaimer {
  margin-top: 40px;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--text-faint);
}

/* ---------- Qualify screen ---------- */
.qualify-sub {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto 30px;
}

.qualify-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.qualify-field {
  text-align: left;
  margin-bottom: 18px;
}
.qualify-field label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.qualify-field input[type="text"],
.qualify-field input[type="email"],
.qualify-field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.2s var(--ease);
}
.qualify-field input:focus,
.qualify-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.gate-recaptcha {
  margin: 14px 0 6px;
  display: flex;
  justify-content: center;
}

.qualify-choice {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.qualify-choice .opt-btn {
  flex: 1 1 auto;
  text-align: center;
  padding: 11px 16px;
  font-size: 0.86rem;
}

#qualifySubmitBtn { margin-top: 10px; }
#safetyContinueBtn { margin-top: 10px; }
#handoffScheduleNote { margin: 4px 0 18px; color: var(--text-muted); font-size: 0.86rem; }

/* ---------- Handoff screen ---------- */
.handoff-alt {
  margin-top: 30px;
  font-size: 0.86rem;
  color: var(--text-faint);
}
#handoffAltBtn {
  margin-top: 6px;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
}
#handoffAltBtn:hover { color: var(--gold-bright); }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .breath-orb { width: 240px; height: 240px; margin: -120px 0 0 -120px; }
  .result-grid { grid-template-columns: 1fr; }
  .qualify-field-row { grid-template-columns: 1fr; }
  .qualify-choice { flex-direction: column; }
  .app { padding: 7vh 6vw 10vh; }
}
