/* Sam Jenkins · Deliverability Engineer
   Tokens mirror BRAND.md and reports/template/report.typ: change them together. */

@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #101828;
  --muted: #667085;
  --accent: #0e7490;
  --accent-dark: #155e75;
  --accent-light: #ecfeff;
  --surface: #ffffff;
  --stripe: #f2f4f7;
  --rule: #d0d5dd;

  --good: #067647;
  --warn: #a15c07;
  --bad: #b42318;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 6px;
  --width: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

code, .mono { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--stripe); padding: 0.1em 0.35em; border-radius: 3px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--width); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.rule { width: 40px; height: 2px; background: var(--accent); border: 0; margin: 18px 0 24px; }

.lede { font-size: 1.2rem; color: #344054; max-width: 36em; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { color: var(--ink); border-color: var(--rule); }
.btn-secondary:hover { color: var(--ink); border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--stripe); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); line-height: 1.2; }
.wordmark img { display: block; border-radius: 7px; }
.wordmark strong { display: block; font-size: 17px; letter-spacing: -0.01em; }
.wordmark span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--accent); }
.site-nav .btn { padding: 8px 14px; font-size: 15px; }

@media (max-width: 720px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ---------- Sections ---------- */

section { padding: clamp(56px, 9vw, 96px) 0; }
section + section { border-top: 1px solid var(--stripe); }
.section-head { max-width: 40em; margin-bottom: 40px; }

/* ---------- Hero ---------- */

.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero .lede { margin-top: 20px; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}

.terminal {
  background: var(--ink);
  color: #e4e7ec;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  overflow: hidden;
  min-width: 0;
}
.terminal-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid #1d2939; }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: #344054; }
.terminal pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; font: inherit; }
.terminal .prompt { color: #98a2b3; }
.terminal .ok { color: #47cd89; }
.terminal .warn { color: #fdb022; }
.terminal .bad { color: #f97066; }
.terminal .dim { color: #667085; }
.terminal-caption { font-size: 14px; color: var(--muted); margin-top: 12px; }

/* ---------- Problems ---------- */

.problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.problem { padding: 20px 22px; border: 1px solid var(--rule); border-radius: var(--radius); }
.problem h3 { font-size: 1.05rem; margin-bottom: 6px; }
.problem p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Services ---------- */

.audience { margin-top: 48px; }
.audience:first-of-type { margin-top: 0; }
.audience > h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.service {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.service-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price { font-weight: 600; white-space: nowrap; }
.price small { font-weight: 400; color: var(--muted); font-size: 14px; }
.service > p { color: #344054; margin: 10px 0 14px; font-size: 16px; }
.service ul { margin: 0; padding: 0; list-style: none; font-size: 15px; color: #344054; }
.service li { padding-left: 22px; position: relative; margin-bottom: 6px; }
.service li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 8px; height: 2px; background: var(--accent); }
.service .meta { margin-top: auto; padding-top: 16px; font-size: 14px; color: var(--muted); }
.service.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.retainer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding: 22px 26px;
  background: var(--stripe);
  border-radius: var(--radius);
}
.retainer > div { flex: 1 1 380px; }
.retainer p { margin: 4px 0 0; color: #344054; font-size: 16px; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; counter-reset: step; }
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  color: var(--accent);
  border-top: 2px solid var(--accent);
  padding-top: 12px;
  margin-bottom: 10px;
  width: 40px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: #344054; font-size: 16px; margin: 0; }

/* ---------- Sample report ---------- */

.sample { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.sample-figure {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  font-size: 14px;
  background: var(--surface);
}
.sample-figure .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--stripe); }
.sample-figure .row:last-child { border-bottom: 0; }
.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid currentColor;
  white-space: nowrap;
  align-self: center;
}
.badge.bad { color: var(--bad); background: #fef3f2; }
.badge.warn { color: var(--warn); background: #fffaeb; }
.badge.good { color: var(--good); background: #ecfdf3; }
@media (max-width: 900px) {
  .sample { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */

.about { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; align-items: start; }
.headshot { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.facts { margin: 24px 0 0; max-width: 320px; }
.facts div { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--stripe); }
.facts dt { font-family: var(--mono); font-weight: 500; font-size: 1.25rem; color: var(--accent); min-width: 4.2em; }
.facts dd { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .headshot { max-width: 220px; }
}

/* ---------- FAQ ---------- */

.faq { max-width: 46em; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  font-family: var(--mono);
  color: var(--accent);
  font-size: 18px;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { color: #344054; margin: 0 0 18px; }

/* ---------- CTA + footer ---------- */

.cta { background: var(--ink); color: #fff; }
.cta h2 { color: #fff; }
.cta p { color: #d0d5dd; max-width: 34em; }
.cta .rule { background: #22d3ee; }
.cta .btn-primary { background: #fff; color: var(--ink); }
.cta .btn-primary:hover { background: var(--accent-light); color: var(--ink); }
.cta .btn-secondary { color: #fff; border-color: #475467; }
.cta .btn-secondary:hover { border-color: #fff; color: #fff; }

.site-footer { padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--muted); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
