/* ============================================================
   /score/ — Front Desk Score quiz
   Self-contained per-page stylesheet, same shape as roi.css.
   Weights never exceed 600: DM Sans is loaded at 300/400/500/600
   only, and the browser fakes anything heavier (see tokens.css).
   ============================================================ */

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

:root {
  --ink: #1A1A1A;
  --ink-soft: #3a3d42;
  --ink-muted: #7a7e87;
  --surface: #F8F7F4;
  --white: #ffffff;
  --accent: #E8A435;
  --accent-light: #fdf3e0;
  --accent-dark: #c98a1a;
  --navy: #0F2540;
  --border: #e2e3e6;
  --border-strong: #c8cad0;
  --success: #0ea86b;
  --danger: #c0392b;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --fw-medium: 500;
  --fw-bold: 600;
}

html { scroll-behavior: smooth; }

body {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER BAND ── */
.header-band {
  background: var(--navy);
  padding: 130px 40px 130px;
  text-align: center;
  position: relative; overflow: hidden;
}
.header-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(232,164,53,0.14) 0%, transparent 55%);
}
.header-eyebrow {
  position: relative; display: inline-block;
  font-size: 12px; font-weight: var(--fw-bold); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.header-band h1 {
  position: relative; font-family: 'DM Serif Display', serif;
  font-size: clamp(34px, 5vw, 52px); color: #fff;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.header-band h1 em { color: var(--accent); }
.header-band p { position: relative; color: rgba(255,255,255,0.62); font-size: 16px; max-width: 540px; margin: 0 auto; }

.wrap { max-width: 760px; margin: -72px auto 0; padding: 0 24px 24px; position: relative; }

/* ── QUIZ SHELL ── */
.quiz {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(15, 37, 64, 0.14);
  padding: 32px 30px;
}

/* Progress */
.quiz-progress { margin-bottom: 26px; }
.progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; font-weight: var(--fw-bold); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px;
}
.progress-track { height: 6px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0; background: var(--accent);
  border-radius: 999px; transition: width 0.35s ease;
}

/* Questions — all visible until JS switches on .stepped */
.q { border: none; margin-bottom: 34px; }
.q:last-of-type { margin-bottom: 0; }
.quiz.stepped .q { display: none; margin-bottom: 0; }
.quiz.stepped .q.active { display: block; }

.q legend {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(20px, 2.8vw, 25px);
  color: var(--navy); line-height: 1.35;
  margin-bottom: 18px; padding: 0;
}
.q legend:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-xs); }
.q-num {
  display: inline-block; font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: var(--fw-bold); letter-spacing: 0.1em;
  color: var(--accent-dark); background: var(--accent-light);
  padding: 3px 8px; border-radius: var(--radius-xs);
  margin-right: 10px; vertical-align: middle;
}

.opt {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  font-size: 15px; color: var(--ink-soft);
  transition: border-color 0.16s, background 0.16s;
}
.opt:last-child { margin-bottom: 0; }
.opt:hover { border-color: var(--accent); background: var(--accent-light); }
.opt input { accent-color: var(--accent-dark); width: 18px; height: 18px; flex: 0 0 auto; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent-dark); background: var(--accent-light); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.opt span { line-height: 1.45; }

/* Nav */
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.btn-primary {
  display: inline-block; background: var(--accent); color: var(--navy);
  font-family: inherit; font-weight: var(--fw-bold); font-size: 15px;
  text-decoration: none; border: none; cursor: pointer;
  padding: 14px 28px; border-radius: 10px; transition: background 0.2s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-back {
  background: none; border: 1px solid var(--border-strong); color: var(--ink-muted);
  font-family: inherit; font-weight: var(--fw-medium); font-size: 15px;
  padding: 14px 24px; border-radius: 10px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-back:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.btn-back:disabled { opacity: 0.35; cursor: not-allowed; }

.quiz-submit { margin-top: 26px; text-align: center; }
.quiz-submit-note { font-size: 13px; color: var(--ink-muted); margin-top: 10px; }

/* ── RESULT ── */
.result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(15, 37, 64, 0.14);
  overflow: hidden;
}
.result-card:focus { outline: none; }

.result-head {
  background: var(--navy); color: #fff; text-align: center;
  padding: 44px 30px 38px; position: relative; overflow: hidden;
}
.result-head::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(232,164,53,0.18) 0%, transparent 60%);
}
.result-label {
  position: relative; font-size: 12px; font-weight: var(--fw-bold);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.result-score {
  position: relative; font-family: 'DM Serif Display', serif;
  font-size: clamp(52px, 9vw, 76px); line-height: 1; color: #fff;
}
.result-outof { font-size: 22px; color: rgba(255,255,255,0.5); margin-left: 2px; }
.result-grade {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; margin-top: 16px; padding: 0 12px;
  border-radius: var(--radius-sm); font-size: 24px; font-weight: var(--fw-bold);
  background: var(--accent); color: var(--navy);
}
.result-grade[data-grade="A"] { background: var(--success); color: #fff; }
.result-grade[data-grade="B"] { background: #7fc242; color: var(--navy); }
.result-grade[data-grade="D"] { background: #e07a2f; color: #fff; }
.result-grade[data-grade="F"] { background: var(--danger); color: #fff; }
.result-tier {
  position: relative; font-family: 'DM Serif Display', serif;
  font-size: clamp(22px, 3.4vw, 30px); color: #fff; margin-top: 16px;
}
.result-verdict {
  position: relative; max-width: 480px; margin: 12px auto 0;
  font-size: 15px; color: rgba(255,255,255,0.72); line-height: 1.6;
}

.result-body { padding: 32px 30px 28px; }
.leak-title {
  font-family: 'DM Serif Display', serif; font-size: 22px;
  color: var(--navy); margin-bottom: 16px;
}
.leak-list { list-style: none; counter-reset: leak; }
.leak-list li {
  counter-increment: leak; position: relative;
  padding: 14px 16px 14px 52px; margin-bottom: 10px;
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 14.5px; color: var(--ink-soft); line-height: 1.6;
}
.leak-list li::before {
  content: counter(leak); position: absolute; left: 16px; top: 14px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--navy);
  font-size: 13px; font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
}
.result-honesty {
  font-size: 13px; color: var(--ink-muted);
  line-height: 1.6; margin-top: 18px;
}

.result-cta { border-top: 1px solid var(--border); background: var(--surface); padding: 30px; }
/* The primary ask sits on white so it reads as the page's one action; the
   scorecard offer below it is deliberately quieter (see score.njk comment). */
.result-cta-content {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px;
}
.btn-cta { margin-top: 6px; }
.cta-microtrust { font-size: 13px; color: var(--ink-muted); margin: 10px 0 0; }

.result-secondary { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.result-secondary h4 {
  font-family: 'DM Serif Display', serif; font-size: 19px;
  color: var(--navy); margin-bottom: 8px;
}
.result-secondary p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 16px; }
.result-secondary p em { color: var(--navy); font-style: italic; }
.section-label {
  font-size: 12px; font-weight: var(--fw-bold); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: 10px;
}
.result-cta h3 {
  font-family: 'DM Serif Display', serif; font-size: clamp(21px, 3vw, 27px);
  color: var(--navy); margin-bottom: 10px;
}
.result-cta p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.65; margin-bottom: 18px; }
.result-cta p strong { color: var(--navy); font-weight: var(--fw-bold); }
.result-alt { font-size: 13.5px; color: var(--ink-muted); margin-top: 16px; margin-bottom: 0; }
.result-alt a { color: var(--accent-dark); }

.btn-retake {
  display: block; width: 100%; background: none; border: none;
  border-top: 1px solid var(--border);
  font-family: inherit; font-size: 13.5px; font-weight: var(--fw-medium);
  color: var(--ink-muted); padding: 16px; cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.btn-retake:hover { color: var(--navy); background: var(--surface); }

/* Fallback shown until the GHL form id is set. Public-facing — styled as a
   real CTA, not as a staging notice. */
.form-fallback {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
  font-size: 14px; color: var(--ink-soft); line-height: 1.55;
}
.form-fallback .btn-primary { text-align: center; }
.form-fallback-note { font-size: 12.5px; color: var(--ink-muted); text-align: center; }

/* noscript notice — also public-facing, and deliberately plain-language */
.form-staging {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.55;
}
.form-staging strong { color: var(--navy); font-weight: var(--fw-bold); font-size: 14.5px; }
.form-staging code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; background: var(--surface);
  padding: 1px 5px; border-radius: var(--radius-xs);
}
.form-staging .btn-primary { margin-top: 6px; }

/* ── CONTEXT ── */
.context { padding: 72px 24px 80px; }
.section-inner { max-width: 960px; margin: 0 auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .section-label { margin-bottom: 10px; }
.section-title {
  font-family: 'DM Serif Display', serif; font-size: clamp(26px, 3.6vw, 36px);
  color: var(--navy); letter-spacing: -0.01em; margin-bottom: 12px;
}
.section-sub { color: var(--ink-soft); font-size: 15.5px; }
.ctx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ctx-cell {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px;
}
.ctx-cell h3 { font-size: 16px; color: var(--navy); margin-bottom: 6px; }
.ctx-cell p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ── FADE-IN ── */
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .progress-fill { transition: none; }
}

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  .header-band { padding: 110px 24px 110px; }
  .wrap { padding: 0 16px 24px; }
  .quiz { padding: 24px 20px; }
  .result-head { padding: 36px 22px 30px; }
  .result-body { padding: 26px 22px 24px; }
  .result-cta { padding: 24px 22px; }
  .ctx-grid { grid-template-columns: 1fr; }
  .quiz-nav { gap: 10px; }
  .btn-primary, .btn-back { padding: 13px 20px; font-size: 14.5px; }
}
