/*
 * Publisher Q4 Revenue Readiness Assessment 2026 — Lighthouse revision.
 * Bright diagnostic canvas (Core Web Vitals clarity), dark instrument dial
 * as the focal element, green unmistakably the destination.
 */

:root {
  --bg: #f6f7f9;
  --bg-card: #ffffff;
  --border: #e4e8ee;
  --border-strong: #c9d1dd;
  --text: #1c2330;
  --text-dim: #4d5a6e;
  --text-faint: #8492a6;

  /* status text colors (light background, WCAG-conscious darker tones) */
  --t-ready: #157a43;
  --t-strong: #5d8a1b;
  --t-review: #a47310;
  --t-priority: #bb4a38;

  /* gauge zone colors (on the dark dial face — brighter) */
  --zone-ready: #2fbf6b;
  --zone-strong: #9cc94f;
  --zone-review: #e6b13c;
  --zone-priority: #e2705c;

  --dial-face: #171d29;
  --arc-track: #e4e8ee;
  --focus: #2d6cdf;
  --radius: 14px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 880px; margin: 0 auto; padding: 52px 24px 72px; }
.container.narrow { max-width: 680px; }
.center { text-align: center; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Screens ---------- */
.screen { display: none; }
.screen.active { display: block; animation: screen-in .45s var(--ease); }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Landing ---------- */
.core-promise {
  color: var(--t-ready);
  font-size: 15px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 650;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(30px, 5.4vw, 46px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: clamp(19px, 2.8vw, 23px);
  font-weight: 600;
  margin-bottom: 26px;
}

.hero-body p { color: var(--text-dim); margin-bottom: 16px; max-width: 60ch; }
.hero-lesson { color: var(--text) !important; font-weight: 600; }

.attribution {
  margin-top: 26px;
  color: var(--text-faint);
  font-size: 14px;
  letter-spacing: .04em;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  margin-top: 18px;
  background: var(--text);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 18px 34px;
  font-size: 18px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.btn-primary:hover { background: #2b3547; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(28, 35, 48, .22); }
.btn-primary:active { transform: none; }
.btn-primary:disabled { opacity: .55; cursor: default; transform: none; }

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: color .15s var(--ease);
}
.btn-ghost:hover { color: var(--text-dim); }

button:focus-visible, input:focus-visible, .answer:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Driver intro splash ---------- */
#screen-driver-intro .container { padding-top: 22vh; }
.driver-intro-kicker {
  color: var(--text-faint);
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.driver-intro-name { font-size: clamp(28px, 5vw, 40px); font-weight: 700; letter-spacing: -0.01em; }
.driver-intro-supporting { color: var(--text-dim); font-size: 18px; margin-top: 14px; }

/* ---------- Question screen ---------- */
.progress-header { margin-bottom: 34px; }
.progress-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.progress-label { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); font-weight: 650; }

.question-dots { display: flex; gap: 7px; }
.question-dots .qdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-strong);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.question-dots .qdot.done { background: var(--zone-ready); }
.question-dots .qdot.current { background: var(--text); transform: scale(1.25); }

.progress-bar { display: flex; gap: 6px; }
.progress-bar .seg {
  height: 4px; flex: 1; border-radius: 2px;
  background: var(--border);
  transition: background .3s var(--ease);
}
.progress-bar .seg.done { background: var(--zone-ready); }
.progress-bar .seg.current { background: var(--text); }

.driver-context { margin-top: 16px; color: var(--text-faint); font-size: 15px; }
.driver-context #q-driver-name { color: var(--text-dim); font-weight: 600; }
.dot-sep { margin: 0 8px; }

.question-card { min-height: 120px; }
.question-text {
  font-size: clamp(23px, 3.6vw, 30px);
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin-bottom: 30px;
}
.question-card.final .question-text { font-size: clamp(25px, 4vw, 33px); }
.question-card.final { border-left: 3px solid var(--zone-ready); padding-left: 22px; }

.q-fade { animation: q-in .3s var(--ease); }
@keyframes q-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.answers { display: flex; flex-direction: column; gap: 12px; }

.answer {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 550;
  padding: 18px 22px;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.answer:hover { border-color: var(--text-dim); box-shadow: 0 2px 10px rgba(28, 35, 48, .07); }
.answer[aria-checked="true"] {
  border-color: var(--text);
  background: #f0f4f9;
  box-shadow: inset 0 0 0 1px var(--text);
}
.answer.flash { transform: scale(0.99); }

.q-nav { margin-top: 26px; }
.center-nav { text-align: center; }

/* ---------- Reveal ---------- */
#screen-reveal .container { padding-top: 20vh; }
.reveal-title { font-size: clamp(26px, 4.4vw, 36px); font-weight: 700; }
.reveal-note { color: var(--text-dim); margin-top: 12px; min-height: 1.4em; }

/* ---------- Analysis ---------- */
#screen-analysis .container { padding-top: 16vh; max-width: 460px; }
.analysis-title { font-size: 24px; font-weight: 650; margin-bottom: 30px; }
.analysis-list { list-style: none; text-align: left; }
.analysis-list li {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-dim);
  font-size: 17px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.analysis-list li.shown { opacity: 1; transform: none; }
.analysis-list li .check {
  color: var(--t-ready);
  font-weight: 700;
  opacity: 0;
  transition: opacity .3s var(--ease);
  font-size: 15px;
}
.analysis-list li.done .check { opacity: 1; }
.analysis-building { margin-top: 30px; color: var(--text); font-weight: 600; font-size: 18px; animation: q-in .4s var(--ease); }

/* ---------- Results ---------- */
.results-product-name {
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.shareable {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px 30px 30px;
  box-shadow: 0 10px 34px rgba(28, 35, 48, .06);
}

/* dark instrument face on the bright canvas */
.gauge-panel {
  background: var(--dial-face);
  border-radius: 18px;
  max-width: 620px;
  margin: 0 auto;
  padding: 26px 26px 22px;
}
.gauge-wrap { position: relative; max-width: 560px; margin: 0 auto; }
#gauge { display: block; width: 100%; height: auto; }

.gauge-readout {
  margin-top: 12px;
  text-align: center;
  animation: q-in .5s var(--ease);
}
.readout-status {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.readout-label { color: #8492a6; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-top: 6px; }
.readout-score { color: #ffffff; font-size: clamp(52px, 9vw, 76px); font-weight: 750; line-height: 1.05; letter-spacing: -0.02em; }
.readout-headline { color: #b7c0cf; font-size: 16px; margin-top: 6px; }

/* status color coordination (readout sits on the dark face → zone tones) */
.gauge-readout.s-ready .readout-status,
.gauge-readout.s-ready .readout-score { color: var(--zone-ready); }
.gauge-readout.s-strong .readout-status,
.gauge-readout.s-strong .readout-score { color: var(--zone-strong); }
.gauge-readout.s-review .readout-status,
.gauge-readout.s-review .readout-score { color: var(--zone-review); }
.gauge-readout.s-priority .readout-status,
.gauge-readout.s-priority .readout-score { color: var(--zone-priority); }

.zone-legend {
  display: flex;
  max-width: 620px;
  margin: 18px auto 0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 11px;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-align: center;
  font-weight: 650;
}
.zone-legend .zone { padding: 7px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* proportional to score ranges on the 20–100 scale */
.z-priority { flex: 40 0 0; background: var(--zone-priority); color: #fff; }
.z-review   { flex: 15 0 0; background: var(--zone-review); color: #3d2f08; }
.z-strong   { flex: 15 0 0; background: var(--zone-strong); color: #2c3a0d; }
.z-ready    { flex: 10 0 0; background: var(--zone-ready); color: #fff; }

/* Mobile fallback key — hidden on desktop where the band itself is labeled */
.zone-key { display: none; }

.status-supporting {
  max-width: 620px;
  margin: 26px auto 0;
  text-align: center;
  color: var(--text-dim);
}

.section-title {
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 650;
  margin: 38px 0 16px;
}

.driver-breakdown { display: flex; flex-direction: column; gap: 10px; }
.driver-row {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.driver-row .arc { width: 44px; height: 28px; }
.driver-row .d-name { font-weight: 600; font-size: 16.5px; }
.driver-row .d-score { font-weight: 700; font-size: 18px; text-align: right; min-width: 2ch; }
.driver-row .d-status {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  min-width: 84px;
  text-align: right;
}
.d-status.s-ready, .highlight-card .s-ready { color: var(--t-ready); }
.d-status.s-strong { color: var(--t-strong); }
.d-status.s-review { color: var(--t-review); }
.d-status.s-priority { color: var(--t-priority); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 22px;
}
.highlight-card .section-title { margin: 0 0 10px; }
.highlight-driver { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.highlight-copy { color: var(--text-dim); font-size: 15.5px; }

.story p { color: var(--text-dim); margin-bottom: 14px; max-width: 68ch; }
.story p:first-child { color: var(--text); font-weight: 550; }

.credibility {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 14.5px;
  max-width: 68ch;
}

/* ---------- CTA ---------- */
.cta-block {
  margin-top: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 34px 30px;
  text-align: center;
}
.cta-lead {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 56ch;
  margin: 0 auto 16px;
}
.cta-title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.cta-sub { color: var(--t-ready); font-weight: 650; margin-top: 6px; }
.cta-copy { color: var(--text-dim); max-width: 56ch; margin: 14px auto 0; }
.cta-noline { font-weight: 600; margin-top: 12px; }

.confirm-form { max-width: 420px; margin: 22px auto 0; text-align: left; }
.confirm-intro { color: var(--text-dim); font-size: 15px; margin-bottom: 14px; text-align: center; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; color: var(--text-dim); margin-bottom: 6px; letter-spacing: .03em; }
.field input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 16.5px;
  padding: 13px 14px;
}
.form-error { color: var(--t-priority); font-size: 14.5px; margin-bottom: 12px; }

.request-confirmed { margin-top: 22px; animation: q-in .4s var(--ease); }
.confirmed-title { font-size: 22px; font-weight: 700; color: var(--t-ready); }
.confirmed-copy { color: var(--text-dim); margin-top: 8px; }

.footer-attribution { text-align: center; margin-top: 34px; }

.reveal-late { opacity: 0; transition: opacity .6s var(--ease); }
.reveal-late.shown { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 32px 18px 56px; }
  .two-col { grid-template-columns: 1fr; }
  .driver-row { grid-template-columns: 36px 1fr auto; }
  .driver-row .d-status { display: none; }
  .driver-row .d-score::after { content: attr(data-status); display: block; font-size: 11.5px; color: var(--text-dim); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .btn-primary { width: 100%; padding: 17px 20px; }
  .answer { padding: 16px 18px; font-size: 17px; }
  .gauge-panel { padding: 18px 14px 16px; }
  #screen-driver-intro .container, #screen-reveal .container { padding-top: 16vh; }

  /* band stays proportional but unlabeled; key row carries the labels */
  .zone-legend .zone { font-size: 0; padding: 4px 0; height: 8px; }
  .zone-key {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-dim);
  }
  .zone-key .k {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 2px;
    margin-right: 6px;
  }
  .k1 { background: var(--zone-priority); }
  .k2 { background: var(--zone-review); }
  .k3 { background: var(--zone-strong); }
  .k4 { background: var(--zone-ready); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
