/* ── Tokens ── */
:root {
  --bg: #16161e;
  --bg-2: #1c1c27;
  --bg-3: #22222e;
  --fg: #f0ede6;
  --fg-muted: #8a8a9a;
  --accent: #c9a84c;
  --accent-dim: #a8873c;
  --red-high: #e05c5c;
  --amber-med: #e0a84c;
  --green-low: #6ab87a;
  --border: #2a2a38;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'IBM Plex Sans', sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* ── Nav ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 22, 30, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.topbar-links {
  display: flex;
  gap: 2rem;
}
.topbar-links a {
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.topbar-links a:hover { color: var(--fg); }

/* ── Hero ── */
.hero { padding: 5rem 2rem 4rem; }
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero-headline {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.75;
  max-width: 480px;
}

/* Dashboard mockup */
.hero-dashboard {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.dashboard-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-low);
  box-shadow: 0 0 6px var(--green-low);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.dashboard-table {
  padding: 0.5rem 0;
}
.dt-row {
  display: grid;
  grid-template-columns: 60px 1fr 150px 72px;
  padding: 0.75rem 1.25rem;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid rgba(42,42,56,0.6);
}
.dt-row:last-child { border-bottom: none; }
.dt-header {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}
.dt-agency {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}
.dt-program {
  font-size: 0.82rem;
  color: var(--fg);
}
.dt-amount {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
}
.dt-risk {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}
.dt-high { background: rgba(224,92,92,0.15); color: var(--red-high); }
.dt-med  { background: rgba(224,168,76,0.15);  color: var(--amber-med); }
.dt-low  { background: rgba(106,184,122,0.15); color: var(--green-low); }
.dashboard-footnote {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* ── Section shared ── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

/* ── How It Works ── */
.how-it-works { background: var(--bg-2); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.step-card { padding: 2rem 0; }
.step-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}
.step-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.step-body {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ── Data Sources ── */
.ds-layout { display: grid; grid-template-columns: 1fr 1.8fr; gap: 4rem; align-items: start; }
.ds-sub { font-size: 1rem; color: var(--fg-muted); line-height: 1.75; max-width: 400px; }
.ds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.ds-source {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.ds-source:hover { border-color: var(--accent-dim); }
.ds-source-icon {
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.ds-source-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.ds-source-desc {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ── Case Formats ── */
.case-formats { background: var(--bg-2); }
.cf-layout { display: grid; grid-template-columns: 1fr 320px; gap: 4rem; align-items: start; }
.cf-stages { display: flex; flex-direction: column; gap: 0; }
.cf-stage {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.cf-stage:last-child { border-bottom: none; }
.cf-stage-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.35rem;
  opacity: 0.7;
}
.cf-stage-body { flex: 1; }
.cf-stage-title {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.4rem;
}
.cf-stage-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.65;
}
/* Sample case card */
.cf-sample {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.cf-sample-header {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-3);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cf-sample-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cf-field { display: flex; flex-direction: column; gap: 0.2rem; }
.cf-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cf-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg);
}
.cf-disclaimer {
  font-size: 0.72rem;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ── Closing ── */
.closing { background: var(--bg-3); }
.closing-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.closing-stripe {
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  border-radius: 2px;
  width: 160px;
}
.closing-headline {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--fg);
  max-width: 760px;
}
.closing-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.8;
  max-width: 640px;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}
.footer-wordmark {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.footer-tagline {
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.footer-legal {
  font-size: 0.78rem;
  color: var(--fg-muted);
  line-height: 1.6;
  text-align: right;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-dashboard { display: none; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .ds-layout { grid-template-columns: 1fr; gap: 2rem; }
  .cf-layout { grid-template-columns: 1fr; }
  .cf-sample { position: static; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-legal { text-align: left; }
  .topbar-links { display: none; }
}
@media (max-width: 600px) {
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .section-inner { padding: 3.5rem 1.25rem; }
  .steps-grid { grid-template-columns: 1fr; }
  .ds-grid { grid-template-columns: 1fr; }
}