@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f7f5ef;
  --surface: #fffefb;
  --ink: #16211e;
  --muted: #55615c;
  --line: #d8d5ca;
  --accent: #0b5d4e;
  --on-accent: #ffffff;
  --signal: #c2410c;
  --band: #0d3b32;
  --on-band: #f3f5ef;
  --on-band-muted: #b9cbc4;
  --on-band-line: #2c5b50;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101715;
    --surface: #172120;
    --ink: #edf0ea;
    --muted: #a3aea8;
    --line: #2c3834;
    --accent: #6fd3bb;
    --on-accent: #0a1f1a;
    --signal: #f08a5d;
    --band: #0b2a24;
    --on-band: #edf0ea;
    --on-band-muted: #a9bdb6;
    --on-band-line: #24483f;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
}

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); line-height: 1.12; }

.wrap { width: min(100% - 32px, 1160px); margin-inline: auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 14px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
}
.wordmark__box { fill: var(--accent); }
.wordmark__glyph { fill: none; stroke: var(--on-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 22px; font-size: 0.9375rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav a[aria-current] { color: var(--accent); font-weight: 600; }

/* Hero */
.hero { padding-block: clamp(48px, 7vw, 96px); }
.hero__grid, .pagehead__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.eyebrow, .service__index, .map__label, .contact-band__label, .stage h2 span, .steps li::before {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}
.eyebrow { color: var(--accent); margin-bottom: 20px; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.5rem); line-height: 1.04; }
.pagehead h1 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem); line-height: 1.06; max-width: 20em; }
.lede { max-width: 56ch; margin-top: 24px; color: var(--muted); font-size: 1.1875rem; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-block;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.button:hover { background: var(--ink); color: var(--bg); }
.button--solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.more { display: inline-block; margin-top: 24px; color: var(--accent); font-weight: 600; text-underline-offset: 4px; }
.more:hover { color: var(--ink); }
.more--spaced { margin-top: 36px; }

/* Page heads */
.pagehead { padding-block: clamp(48px, 6vw, 80px); }

/* Diagrams */
.map svg { display: block; width: 100%; max-width: 480px; height: auto; margin-inline: auto; }
.map__label { fill: var(--muted); font-size: 13px; }
.map__lines path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  animation: flow 1.6s linear infinite;
}
.map__node rect { fill: var(--surface); stroke: var(--ink); stroke-width: 1.25; }
.map__node text { fill: var(--ink); font: 400 14.5px var(--sans); text-anchor: middle; }
.map__node--quiet rect { fill: transparent; stroke: var(--muted); stroke-dasharray: 3 3; }
.map__node--core rect { fill: var(--accent); stroke: var(--accent); }
.map__node--core text { fill: var(--on-accent); font: 400 25px var(--serif); }
.map__guides path { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.map__guides--solid path { stroke: var(--ink); stroke-dasharray: none; }
.map__side text { fill: var(--ink); font: 400 14.5px var(--sans); }
.plate path { fill: var(--surface); stroke: var(--ink); stroke-width: 1.25; stroke-linejoin: round; }
.plate--quiet path { fill: transparent; stroke: var(--muted); stroke-dasharray: 3 3; }
.plate--core .plate__top { fill: var(--accent); stroke: var(--accent); }
@keyframes flow { to { stroke-dashoffset: -20; } }

/* Bands and sections */
.services, .band { border-block: 1px solid var(--line); background: var(--surface); }
.band { padding-block: clamp(48px, 6vw, 80px); }
.section { padding-block: clamp(56px, 7vw, 96px); }
.section--ruled { border-top: 1px solid var(--line); }

/* Services */
.services__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service { padding-block: clamp(48px, 6vw, 80px); }
.service:first-child { padding-right: clamp(32px, 5vw, 72px); border-right: 1px solid var(--line); }
.service:last-child { padding-left: clamp(32px, 5vw, 72px); }
.service__index { color: var(--signal); margin-bottom: 12px; }
.service__lede { margin-top: 14px; max-width: 44ch; color: var(--muted); font-size: 1.125rem; }
.service__short { margin-top: 28px; }
.service__short li { padding-block: 11px; border-top: 1px solid var(--line); font-weight: 600; }

/* Rows */
.rows { margin-top: 32px; }
.rows > div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4px clamp(24px, 4vw, 56px);
  padding-block: 20px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.rows dt { font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.625rem); line-height: 1.2; }
.rows dd { color: var(--muted); font-size: 1rem; }

/* Two and three columns */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(32px, 5vw, 72px); margin-top: 40px; }
.two h3 { margin-bottom: 14px; font-size: 1.125rem; font-weight: 600; }
.lines li { padding-block: 12px; border-top: 1px solid var(--line); }
.lines li:last-child { border-bottom: 1px solid var(--line); }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.three a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.three a:hover { border-color: var(--accent); }
.three strong { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.three span { color: var(--muted); font-size: 1rem; }

/* Where we can help */
.fit { padding-block: clamp(56px, 7vw, 96px); }
.fit__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px clamp(32px, 5vw, 72px); }
.fit__list li {
  padding-block: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem);
  line-height: 1.25;
}
.fit__list li:last-child { border-bottom: 1px solid var(--line); }

/* Steps */
.approach { padding-bottom: clamp(56px, 7vw, 96px); }
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: 36px;
}
.steps--five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.steps li { counter-increment: step; padding-top: 16px; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(step, decimal-leading-zero); color: var(--signal); }
.steps h3 { margin-top: 10px; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.steps p { margin-top: 6px; color: var(--muted); font-size: 1rem; }

/* Stages */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px clamp(24px, 4vw, 56px);
  padding-block: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--line);
}
.stage:first-child { border-top: 0; padding-top: 0; }
.stage:last-child { padding-bottom: 0; }
.stage h2 span { display: block; margin-bottom: 8px; color: var(--signal); letter-spacing: 0.02em; }
.stage dl { display: grid; gap: 10px; }
.stage dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.stage dt { color: var(--accent); font-weight: 600; font-size: 0.9375rem; }
.stage dd { color: var(--muted); }

/* FAQ */
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding-block: 16px; font-weight: 600; cursor: pointer; }
details p { max-width: 60ch; padding-bottom: 18px; color: var(--muted); }

/* Contact band */
.contact-band { background: var(--band); color: var(--on-band); padding-block: clamp(56px, 7vw, 96px); }
.contact-band__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(32px, 5vw, 72px); align-items: end; }
.contact-band__label { color: var(--on-band-muted); margin-bottom: 6px; }
.contact-band__email { font-family: var(--serif); font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); line-height: 1.2; text-underline-offset: 5px; overflow-wrap: anywhere; }

/* Contact page */
.contact-email { margin-top: 24px; font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem); line-height: 1.2; overflow-wrap: anywhere; }
.contact-email a { color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 1px; }
.brief { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(32px, 5vw, 72px); align-items: start; }
.brief fieldset { margin-top: 28px; }
legend, .field > span { display: block; margin-bottom: 10px; padding: 0; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); line-height: 1.3; font-size: 0.9375rem; cursor: pointer; }
.chips span:hover { border-color: var(--accent); }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chips input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.field { display: block; margin-top: 24px; }
.field input, .field textarea { display: block; width: 100%; padding: 11px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; font-size: 1rem; }
.brief__sheet { position: sticky; top: 80px; padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.brief__sheet .contact-band__label { color: var(--muted); font-family: var(--mono); font-size: 0.8125rem; overflow-wrap: anywhere; }
.brief__sheet pre { min-height: 190px; margin-block: 12px 18px; padding-top: 14px; border-top: 1px solid var(--line); font: 400 0.875rem/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Footer */
.site-footer { padding-block: 24px; color: var(--muted); font-size: 0.9375rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.site-footer a { text-underline-offset: 3px; }

@media (max-width: 900px) {
  .hero__grid, .pagehead__grid, .fit__grid, .contact-band__grid, .brief { grid-template-columns: minmax(0, 1fr); }
  .services__grid { grid-template-columns: minmax(0, 1fr); }
  .service:first-child { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .service:last-child { padding-left: 0; }
  .steps, .steps--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief__sheet { position: static; }
  .stage { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .site-header { position: static; }
  .steps, .steps--five { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .nav { gap: 2px 16px; font-size: 0.875rem; }
  .rows > div, .two, .three { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map__lines path { animation: none; }
  .button, .three a { transition: none; }
}
