/* ==========================================================================
   Weinstein Legal Team Coverage Checkup
   Tokens ported from the WLT design system. Slate is #435464 per brand
   guidelines (PMS 7545c). Manrope only per DESIGN_SPEC.
   ========================================================================== */

:root {
  --orange: #FAAD62;
  --orange-deep: #E8913D;
  --orange-tint: #FDF0E2;
  --accent-deep: #B2600A;
  --slate: #435464;
  --slate-soft: #62778A;
  --ink: #1B242D;
  --stage: #232E38;
  --paper: #FFFFFF;
  --tint: #F2F5F7;
  --line: #E3E9ED;

  --good: #2E7D4F;
  --good-tint: #E8F4EC;
  --warn: #B2600A;
  --warn-tint: #FDF0E2;
  --bad: #B23A3A;
  --bad-tint: #FBECEC;

  --font-display: "Manrope", -apple-system, "Helvetica Neue", sans-serif;
  --font-body: "Manrope", -apple-system, "Helvetica Neue", sans-serif;

  --container: 1080px;
  --narrow: 640px;
  --radius: 18px;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow { max-width: var(--narrow); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- type ---------- */

h1, h2 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }

.eyebrow {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
}

.eyebrow-light { color: var(--accent-deep); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 17px 30px;
  min-height: 48px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--orange);
  color: var(--ink);
}
.btn-primary:hover { background: var(--orange-deep); transform: translateY(-1px); }
.btn-primary:disabled {
  background: var(--line);
  color: var(--slate-soft);
  cursor: not-allowed;
  transform: none;
}

.btn-slate {
  background: var(--slate);
  color: #fff;
}
.btn-slate:hover { background: var(--ink); transform: translateY(-1px); }

:is(a, button, summary):focus-visible {
  outline: 3px solid var(--orange-deep);
  outline-offset: 3px;
}

/* ---------- screens ---------- */

.screen { min-height: 60vh; }

.screen-light {
  background: var(--tint);
  padding: 56px 0 88px;
}

/* ---------- stage (dark hero treatment) ---------- */

.stage {
  position: relative;
  color: #fff;
  background:
    radial-gradient(1100px 700px at 10% -8%, rgba(250, 171, 100, 0.26), transparent 62%),
    radial-gradient(900px 600px at 95% 20%, rgba(98, 119, 138, 0.25), transparent 65%),
    linear-gradient(168deg, var(--stage) 0%, var(--ink) 78%);
  overflow: hidden;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.stage > * { position: relative; z-index: 1; }

/* ---------- hero ---------- */

section[data-screen="hero"] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.topbar {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-logo { width: 168px; height: auto; }

.ad-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 32px;
  padding-bottom: 32px;
  max-width: 760px;
}

.hero-title { margin-bottom: 18px; }

.hero-sub {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 34em;
  margin-bottom: 30px;
}

#hero-start { align-self: flex-start; }

.hero-privacy {
  margin-top: 16px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

.tagline {
  width: 100%;
  padding-bottom: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

.tag-hl { color: var(--orange); }

/* ---------- intro ---------- */

.screen-title { margin-bottom: 16px; }

.screen-body { color: var(--slate); margin-bottom: 20px; }

.whatis {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
}

.whatis summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--slate);
}

.whatis p { margin-top: 12px; color: var(--slate); }

/* ---------- quiz ---------- */

.quiz-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate);
  cursor: pointer;
  padding: 10px 12px 10px 0;
  min-height: 44px;
}
.back-btn:hover { color: var(--ink); }

.progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--orange);
  transition: width 0.35s ease;
}

.progress-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-soft);
  white-space: nowrap;
}

.q-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
}

.q-badge.required { background: var(--slate); color: #fff; }
.q-badge.optional { background: var(--orange-tint); color: var(--accent-deep); }

.q-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.q-oneliner {
  color: var(--slate);
  margin-bottom: 24px;
}

fieldset.q { border: 0; }

.opt { display: block; margin-bottom: 12px; position: relative; }

.opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.opt span {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 20px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.opt span:hover { border-color: var(--slate-soft); }

.opt input:checked + span {
  border-color: var(--orange-deep);
  background: var(--orange-tint);
}

.opt input:focus-visible + span {
  outline: 3px solid var(--orange-deep);
  outline-offset: 2px;
}

.followup {
  margin-top: 8px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.followup-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.followup-hint {
  font-size: 0.92rem;
  color: var(--slate-soft);
  margin-bottom: 14px;
}

.followup .opt span { min-height: 48px; font-size: 0.95rem; }

.quiz-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

/* ---------- calculating ---------- */

section[data-screen="calc"] {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
}

.calc-inner {
  width: 100%;
  text-align: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.calc-stamp {
  width: 84px;
  height: 84px;
  margin: 0 auto 24px;
  animation: calc-pulse 1.1s ease-in-out infinite;
}

@keyframes calc-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.calc-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- results: dial ---------- */

.dial-wrap {
  position: relative;
  width: min(240px, 64vw);
  margin: 8px auto 20px;
}

.dial { width: 100%; height: auto; display: block; }

.dial-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 10;
}

.dial-fill {
  fill: none;
  stroke: var(--orange-deep);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.4s ease;
}

.dial-fill.tone-good { stroke: var(--good); }
.dial-fill.tone-gold { stroke: var(--orange-deep); }
.dial-fill.tone-warn { stroke: var(--warn); }
.dial-fill.tone-bad { stroke: var(--bad); }

.dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  align-content: center;
  flex-wrap: wrap;
}

.dial-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.dial-denom {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--slate-soft);
  margin-left: 4px;
}

.band-label {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.band-label.tone-good { color: var(--good); }
.band-label.tone-gold { color: var(--accent-deep); }
.band-label.tone-warn { color: var(--warn); }
.band-label.tone-bad { color: var(--bad); }

.band-line {
  text-align: center;
  color: var(--slate);
  max-width: 34em;
  margin: 0 auto 14px;
}

.results-caption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--slate-soft);
  max-width: 36em;
  margin: 0 auto 26px;
}

.teaser {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 40px;
}

/* ---------- breakdown + gate ---------- */

.breakdown-title { margin-bottom: 20px; }

.gate-wrap { position: relative; }

.gate-wrap.is-locked .breakdown {
  filter: blur(9px);
  pointer-events: none;
  user-select: none;
}

.gate-card {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 16px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -18px rgba(27, 36, 45, 0.35);
  padding: 28px;
  text-align: center;
}

.gate-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.gate-body {
  font-size: 0.95rem;
  color: var(--slate);
  margin-bottom: 20px;
}

.gate-card .btn { width: 100%; }

.gate-form input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--tint);
  border: 2px solid var(--line);
  border-radius: 999px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gate-form input[type="email"]:focus {
  outline: none;
  border-color: var(--orange-deep);
  background: var(--paper);
}

.gate-error {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bad);
  margin-bottom: 12px;
}

.gate-consent {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--slate-soft);
}

.ig-card {
  margin-top: 24px;
  background: var(--orange-tint);
  border-color: var(--orange-tint);
}

.gate-thanks {
  text-align: center;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--orange-tint);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
}

/* ---------- breakdown cards ---------- */

.cov-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.cov-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cov-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

.status-chip.covered { background: var(--good-tint); color: var(--good); }
.status-chip.gap { background: var(--bad-tint); color: var(--bad); }
.status-chip.check { background: var(--warn-tint); color: var(--warn); }

.cov-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-soft);
  margin-bottom: 12px;
}

.cov-body { color: var(--slate); font-size: 0.97rem; }

.cov-body + .cov-body { margin-top: 10px; }

.cov-note {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--slate);
  background: var(--tint);
  border-radius: 12px;
  padding: 12px 16px;
}

.cov-toggle {
  margin-top: 12px;
  border: 0;
  background: none;
  padding: 0;
}

.cov-toggle summary {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent-deep);
  cursor: pointer;
  padding: 6px 0;
}

.cov-toggle p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--slate);
}

/* ---------- result CTAs ---------- */

.result-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

.cta-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.crash-card { background: var(--stage); border-color: var(--stage); }
.crash-card .cta-title { color: #fff; }
.crash-card .cta-body { color: rgba(255, 255, 255, 0.75); }
.crash-card .btn-slate { background: var(--orange); color: var(--ink); }
.crash-card .btn-slate:hover { background: var(--orange-deep); }

.cta-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.cta-body {
  font-size: 0.95rem;
  color: var(--slate);
  margin-bottom: 18px;
  flex: 1;
}

.retake-row {
  text-align: center;
  margin-top: 36px;
}

.retake-btn {
  background: none;
  border: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-soft);
  text-decoration: underline;
  cursor: pointer;
  padding: 10px;
  min-height: 44px;
}
.retake-btn:hover { color: var(--ink); }

/* ---------- footer ---------- */

.footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 56px 0 max(40px, env(safe-area-inset-bottom));
}

.footer-logo { width: 190px; margin-bottom: 20px; }

.footer-firm { margin-bottom: 2px; }

.footer-loc { color: var(--slate); font-size: 0.95rem; }

.footer-contact { margin-top: 10px; font-weight: 700; }

.footer-contact a { color: var(--accent-deep); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }

.footer-legal {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--slate-soft);
  max-width: 760px;
}

.footer-legal p { margin-bottom: 10px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 24px;
  z-index: 50;
  box-shadow: 0 12px 32px -8px rgba(27, 36, 45, 0.4);
}

/* ---------- reveal ---------- */

.reveal-group > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-group.in > * { opacity: 1; transform: none; }
.reveal-group.in > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-group.in > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-group.in > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-group.in > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-group.in > *:nth-child(6) { transition-delay: 0.4s; }
.reveal-group.in > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-group.in > *:nth-child(8) { transition-delay: 0.56s; }
.reveal-group.in > *:nth-child(9) { transition-delay: 0.64s; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .screen-light { padding: 40px 0 64px; }
  .topbar-logo { width: 136px; }
  .result-ctas { grid-template-columns: 1fr; }
  .quiz-actions .btn { width: 100%; }
  .gate-card {
    position: sticky;
    top: 12px;
    left: auto;
    transform: none;
    width: 100%;
    margin: 0 auto 16px;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-group > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .dial-fill { transition: none; }
  .progress-fill { transition: none; }
  .calc-stamp { animation: none; }
  .btn { transition: none; }
}
