/*
  The public site. Static, one page, no build. Its colours, type and states are the app's tokens
  (web/src/styles.css, docs/design/UI-DESIGN-SYSTEM.md §3–§5) so the site and the product look like
  one thing; its sizes are larger because it is read, not worked in. It follows the machine theme,
  like the app.
*/

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/IBMPlexSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/IBMPlexSans-Medium.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/IBMPlexSans-SemiBold.woff2') format('woff2'); }

:root {
  color-scheme: light dark;

  --bg: #f7f8fa;
  --rail: #f1f3f6;
  --surface: #ffffff;
  --line: #e3e7ed;
  --line-strong: #cfd5de;
  --ink: #161b26;
  --ink-2: #344054;
  --muted: #5f6b7d;
  --accent: #2e5bba;
  --accent-hover: #244a99;
  --accent-bg: #eaf0fb;
  --on-accent: #ffffff;

  --crit-solid: #d92d20;
  --risk-solid: #dc6803;
  --risk-text: #b54708;
  --risk-bg: #fffaeb;
  --block-solid: #7a5af8;
  --block-text: #5925dc;
  --block-bg: #f4f3ff;
  --ok-solid: #039855;
  --on-solid: #ffffff;

  --shadow: 0 12px 32px rgb(16 24 40 / 0.10), 0 2px 6px rgb(16 24 40 / 0.06);

  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --sp-2: 4px;
  --sp-3: 8px;
  --sp-4: 12px;
  --sp-5: 16px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 48px;
  --sp-9: 80px;

  --radius: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e13;
    --rail: #0e1116;
    --surface: #12161d;
    --line: #232a35;
    --line-strong: #2f3846;
    --ink: #e7ebf1;
    --ink-2: #c4cbd6;
    --muted: #8a94a6;
    --accent: #7aa2f7;
    --accent-hover: #9bbaf9;
    --accent-bg: #18243d;
    --on-accent: #0b0e13;
    --crit-solid: #d92d20;
    --risk-solid: #fdb022;
    --risk-text: #fec84b;
    --risk-bg: #3a2a0c;
    --block-solid: #9b8afb;
    --block-text: #bdb4fe;
    --block-bg: #251e46;
    --ok-solid: #32d583;
    --shadow: 0 12px 32px rgb(0 0 0 / 0.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }

h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin-bottom: var(--sp-6); }
h3 { font-size: 17px; line-height: 1.35; font-weight: 600; margin-bottom: var(--sp-3); }
p { margin: 0 0 var(--sp-4); color: var(--ink-2); }
p:last-child { margin-bottom: 0; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.muted { color: var(--muted); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-5); }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--sp-5); top: var(--sp-3); z-index: 10; background: var(--surface); padding: var(--sp-3) var(--sp-4); }

/* ── Top bar ── */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: var(--sp-6); height: 60px; }
.brand { display: flex; align-items: center; gap: var(--sp-3); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; }
.brand:hover { color: var(--ink); }
.mark { width: 28px; height: 28px; flex: none; }
.mark-tile { fill: var(--accent); }
.mark-line { fill: none; stroke: var(--on-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mark-dot { fill: var(--on-accent); }
.nav { display: flex; gap: var(--sp-6); margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--accent); }
@media (max-width: 760px) { .nav { display: none; } .top-inner .btn { margin-left: auto; } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 var(--sp-6);
  border-radius: var(--radius-md); border: 1px solid transparent;
  font: 500 16px/1 var(--font-sans); text-decoration: none; cursor: pointer;
}
.btn-sm { height: 36px; padding: 0 var(--sp-5); font-size: 15px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--surface); color: var(--ink); }

/* ── Hero ── */
.hero { padding: var(--sp-9) 0 var(--sp-8); }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--sp-8); align-items: center; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } .hero { padding-top: var(--sp-8); } }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: var(--sp-4); }
.lede { font-size: 19px; line-height: 1.55; margin: var(--sp-6) 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.proof { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); color: var(--muted); font-size: 14px; }
.proof li::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok-solid); margin-right: var(--sp-3); vertical-align: middle; }

/* The illustrated Exception Brief, drawn with the app's status badges (§ Status badge). */
.brief {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.brief-head { display: flex; justify-content: space-between; align-items: flex-start; padding: var(--sp-5) var(--sp-5) var(--sp-4); }
.brief-title { font-weight: 600; font-size: 16px; }
.brief-meta { color: var(--muted); font-size: 13px; }
.brief-sample { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 var(--sp-3); line-height: 20px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi { padding: var(--sp-4) var(--sp-5); display: flex; flex-direction: column; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi-n { font-size: 22px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: 12px; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); align-items: flex-start; }
.row + .row { border-top: 1px solid var(--line); }
.row-job { font-weight: 500; font-size: 14px; }
.row-why { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.badge { flex: none; width: 64px; text-align: center; height: 20px; line-height: 20px; border-radius: 999px; font-size: 11px; font-weight: 600; margin-top: 1px; }
.badge-crit { background: var(--crit-solid); color: var(--on-solid); }
.badge-block { background: var(--block-bg); color: var(--block-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--block-solid) 45%, transparent); }
.badge-risk { background: var(--risk-bg); color: var(--risk-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--risk-solid) 45%, transparent); }
.brief-cap { font-size: 12px; color: var(--muted); padding: var(--sp-3) var(--sp-5); background: var(--rail); border-top: 1px solid var(--line); }

/* ── Sections ── */
.section { padding: var(--sp-9) 0; }
.section-alt { background: var(--rail); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band { padding: var(--sp-8) 0 var(--sp-9); }
.read { font-size: 17px; max-width: 60ch; }

.grid { display: grid; gap: var(--sp-5); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4, .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-6); }
.card p { font-size: 15px; }
.card-lg { padding: var(--sp-7); }
.card-lg .btn { margin-top: var(--sp-4); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: var(--sp-6); } }
.step-n { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent); font-weight: 600; margin-bottom: var(--sp-4); }
.steps p { font-size: 15px; }

.roles { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.roles div { padding: var(--sp-4) var(--sp-5); }
.roles div + div { border-top: 1px solid var(--line); }
.roles dt { font-weight: 600; font-size: 15px; }
.roles dd { margin: 0; color: var(--ink-2); font-size: 15px; }

.ticks { list-style: none; padding: 0; margin: var(--sp-5) 0 0; }
.ticks li { padding-left: 28px; position: relative; margin-bottom: var(--sp-3); color: var(--ink-2); }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 10px; height: 6px; border-left: 2px solid var(--ok-solid); border-bottom: 2px solid var(--ok-solid); transform: rotate(-45deg); }

details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0 var(--sp-5); margin-bottom: var(--sp-3); }
summary { cursor: pointer; padding: var(--sp-4) 0; font-weight: 500; color: var(--ink); }
details p { padding-bottom: var(--sp-4); font-size: 15px; }

/* ── Contact ── */
.form { display: flex; flex-direction: column; gap: var(--sp-4); }
.form label { display: flex; flex-direction: column; gap: var(--sp-2); font-size: 14px; font-weight: 500; color: var(--ink); }
.form input, .form textarea {
  font: 400 16px/1.4 var(--font-sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4);
}
.form input { height: 44px; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-note { font-size: 13px; color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding: var(--sp-6) 0; color: var(--muted); font-size: 14px; }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-4); }
