/* =============================================================
   Health Intelligence Assessment — styles
   ============================================================= */

:root {
  --c-navy:    #1f5778;
  --c-deep:    #1a4865;
  --c-orange:  #f5a361;
  --c-red:     #ef5b53;
  --c-teal:    #2db1c9;
  --c-purple:  #9c5ba3;
  --c-text:    #1f2937;
  --c-muted:   #5b6776;
  --c-line:    #e4e7eb;
  --c-bg:      #f5f6f8;
  --c-card:    #ffffff;

  --radius-card: 18px;
  --radius-btn:  999px;
  --shadow-card: 0 12px 36px rgba(31, 87, 120, 0.08), 0 2px 6px rgba(31, 87, 120, 0.06);

  --font: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button { font-family: inherit; }

/* ----- BRAND STRIPE ----- */
.brand-stripe {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.brand-stripe .stripe { width: 100%; }
.stripe-navy   { background: var(--c-navy);   height: 18px; }
.stripe-orange { background: var(--c-orange); height: 6px; }
.stripe-red    { background: var(--c-red);    height: 6px; }
.stripe-teal   { background: var(--c-teal);   height: 6px; }
.stripe-purple { background: var(--c-purple); height: 6px; }

/* ----- BRAND HEADER ----- */
.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
}
.brand-logo {
  display: block;
  height: auto;
  width: 180px;
  max-width: 100%;
}

/* Welcome screen illustration (replaces the old inline SVG art). */
.welcome-art {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin: 0 auto;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--c-navy);
}
.brand-wordmark sup { font-size: 0.6em; vertical-align: super; }

/* =============================================================
   WELCOME SCREEN
   ============================================================= */
.screen-welcome {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 88%, #ffffff 0, transparent 38%),
    radial-gradient(circle at 80% 20%, #ffffff 0, transparent 32%),
    linear-gradient(180deg, #f5f6f8 0%, #eef1f4 100%);
}
.welcome-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 48px 60px;
}
.welcome-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 56px;
  align-items: start;
}
.welcome-side {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.welcome-side .brand-header { padding: 0; }
.art-bulb-brain {
  margin-top: 24px;
  opacity: 0.85;
}
.tagline {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 18px;
  color: #2a2a2a;
}
.tagline strong { font-weight: 800; line-height: 1.25; }

.welcome-main { padding-top: 24px; }
.welcome-title {
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 900;
  color: #111;
  margin: 0 0 22px 0;
}
.dot-row { display: flex; gap: 14px; margin: 0 0 32px 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.dot-teal   { background: var(--c-teal); }
.dot-orange { background: var(--c-orange); }
.dot-red    { background: var(--c-red); }
.dot-purple { background: var(--c-purple); }

.welcome-hook {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  margin: 0 0 14px 0;
}
.welcome-body {
  font-size: 18px;
  line-height: 1.55;
  max-width: 620px;
  color: #2a2a2a;
  margin: 0 0 18px 0;
  text-wrap: pretty;
}
.welcome-cta { margin-top: 32px; }

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  padding: 16px 30px;
  border-radius: var(--radius-btn);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:focus-visible { outline: 3px solid rgba(31, 87, 120, 0.35); outline-offset: 2px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--c-navy);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 87, 120, 0.28);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); background: var(--c-deep); }
.btn-secondary {
  background: #fff;
  color: var(--c-navy);
  border: 2px solid var(--c-navy);
}
.btn-link {
  background: transparent;
  border: 0;
  color: var(--c-navy);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  padding: 8px 4px;
}
.btn-link:hover { color: var(--c-deep); text-decoration: underline; }

/* =============================================================
   USER INFO SCREEN
   ============================================================= */
.screen-info { min-height: 100vh; }
.card-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 32px 80px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: stretch;
}
.card {
  background: var(--c-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 40px 44px;
}
.eyebrow {
  color: var(--c-red);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 8px 0;
}
.card-title {
  font-size: 32px;
  margin: 0 0 8px 0;
  color: var(--c-navy);
  letter-spacing: -0.01em;
  font-weight: 800;
}
.card-sub {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.5;
  margin: 0 0 28px 0;
}
.field { display: flex; flex-direction: column; margin: 0 0 18px 0; }
.field-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--c-navy);
  margin: 0 0 6px 4px;
  letter-spacing: 0.02em;
}
.input {
  font-family: inherit;
  font-size: 16px;
  color: var(--c-text);
  background: #f8fafc;
  border: 2px solid var(--c-line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--c-navy);
  background: #fff;
}
.field-error {
  color: var(--c-red);
  font-size: 13px;
  margin-top: 6px;
}
.actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.info-side {
  background: linear-gradient(140deg, var(--c-navy) 0%, var(--c-deep) 100%);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  box-shadow: var(--shadow-card);
}
.info-stat { display: flex; flex-direction: column; gap: 4px; }
.info-stat-num {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}
.info-stat-lbl {
  font-size: 14px;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

/* =============================================================
   QUESTION SCREEN
   ============================================================= */
.screen-q { min-height: 100vh; }
.q-topbar {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 32px 0;
  display: flex;
  align-items: center;
  gap: 24px;
}
.q-topbar .brand-header { padding: 12px 0; flex: 0 0 auto; }
.q-progress { flex: 1; }
.q-progress-meta {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  font-weight: 800;
  font-size: 13px;
  color: var(--c-muted);
  margin: 0 0 6px 0;
}
.q-progress-num { color: var(--c-navy); font-size: 16px; }
.progress {
  width: 100%;
  height: 8px;
  background: var(--c-line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(.2,.8,.2,1);
}

.q-body {
  max-width: 760px;
  margin: 24px auto 64px;
  padding: 0 32px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.q-body.is-out  { opacity: 0; transform: translateY(12px); }
.q-body.is-in   { opacity: 1; transform: translateY(0); }

.q-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  margin: 0 0 22px 0;
}
.section-badge {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.q-section-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.q-section-name {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.q-section-sub {
  font-size: 12px;
  opacity: 0.75;
}

.q-text {
  font-size: 32px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--c-navy);
  letter-spacing: -0.005em;
  margin: 0 0 32px 0;
  text-wrap: pretty;
}

.answer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.answer {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 2px solid var(--c-line);
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: var(--c-text);
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.answer:hover {
  border-color: #b8c0c8;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31,87,120,0.06);
}
.answer.is-selected {
  box-shadow: 0 10px 24px rgba(31,87,120,0.12);
}
.answer-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #b8c0c8;
  background: #fff;
  flex: 0 0 auto;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.answer.is-selected .answer-dot { transform: scale(1.1); }
.answer-label { flex: 1; }

.q-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.q-helper {
  font-size: 13px;
  color: var(--c-muted);
}

/* =============================================================
   RESULTS SCREEN
   ============================================================= */
.screen-results { min-height: 100vh; padding-bottom: 80px; }

.results-hero {
  max-width: 1080px;
  margin: 12px auto 24px;
  padding: 24px 32px 8px;
}
.results-eyebrow {
  color: var(--c-red);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 6px 0;
}
.results-title {
  font-size: 42px;
  margin: 0 0 30px 0;
  color: var(--c-navy);
  letter-spacing: -0.01em;
  font-weight: 900;
}

.results-overall {
  background: linear-gradient(140deg, #ffffff 0%, #f4f7fa 100%);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.results-overall-eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 0 0 8px 0;
  font-weight: 700;
}
.results-overall-level {
  margin: 0 0 6px 0;
  font-size: 30px;
  font-weight: 900;
  color: var(--c-navy);
  line-height: 1.15;
}
.results-overall-desc {
  color: var(--c-muted);
  margin: 0 auto;
  max-width: 540px;
  line-height: 1.55;
}
.results-overall-blurb {
  color: var(--c-muted);
  margin: 18px auto 0;
  max-width: 540px;
  line-height: 1.55;
}

/* Horizontal 3-step level indicator (replaces the percentage ring). */
.level-track {
  position: relative;
  max-width: 360px;
  margin: 22px auto 8px;
  height: 56px;
}
.level-track-line {
  position: absolute;
  top: 50%;
  left: 26px;
  right: 26px;
  height: 6px;
  background: #e4e7eb;
  border-radius: 999px;
  transform: translateY(-50%);
  overflow: hidden;
}
.level-track-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-navy), var(--c-orange));
  border-radius: 999px;
  transition: width 700ms cubic-bezier(.2,.7,.2,1);
}
.level-track-dots {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  z-index: 1;
}
.level-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cbd5db;
  color: #98a5b0;
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.level-dot.is-past {
  background: var(--c-navy);
  border-color: var(--c-navy);
  color: #fff;
}
.level-dot.is-current {
  width: 52px; height: 52px;
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 0 0 6px rgba(245, 163, 97, 0.22);
}

.results-grid {
  max-width: 1080px;
  margin: 24px auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.result-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 24px 24px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.result-card-head { display: flex; align-items: center; gap: 14px; }
.result-card-name {
  font-weight: 800;
  color: var(--c-navy);
  font-size: 18px;
}
.result-card-sub {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 2px;
}
.result-card-meter { display: flex; flex-direction: column; gap: 8px; }
.meter {
  width: 100%;
  height: 12px;
  background: var(--c-line);
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 1.1s cubic-bezier(.2,.8,.2,1);
}
.result-card-stats {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.result-card-pct { font-weight: 900; font-size: 22px; }
.result-card-raw { font-size: 13px; color: var(--c-muted); font-weight: 600; }
.result-card-level {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.results-cta {
  max-width: 1080px;
  margin: 24px auto 0;
  padding: 28px 32px;
  background: linear-gradient(140deg, var(--c-navy) 0%, var(--c-deep) 100%);
  color: #fff;
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow-card);
}
.results-cta-copy h3 {
  margin: 0 0 6px 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.results-cta-copy p { margin: 0; opacity: 0.9; }
.results-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.results-cta-actions .btn {
  background: #fff;
  color: var(--c-navy);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}
.results-cta-actions .btn:hover { transform: translateY(-2px); }
.results-cta-actions .btn-link { color: #fff; opacity: 0.85; }
.results-cta-actions .btn-link:hover { opacity: 1; }

/* =============================================================
   SCREEN TRANSITIONS
   ============================================================= */
.screen { animation: screen-in 0.4s ease both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 880px) {
  .welcome-grid { grid-template-columns: 1fr; gap: 24px; }
  .welcome-title { font-size: 44px; }
  .welcome-side .art-bulb-brain { display: none; }
  .card-wrap { grid-template-columns: 1fr; }
  .info-side { order: -1; padding: 24px; }
  .info-side { flex-direction: row; flex-wrap: wrap; }
  .info-stat { min-width: 30%; }
  .results-overall-level { font-size: 24px; }
  .results-grid { grid-template-columns: 1fr; }
  .results-cta { grid-template-columns: 1fr; }
  .results-cta-actions { align-items: stretch; }
  .q-text { font-size: 24px; }
}
