/* Keystone AI — site stylesheet
   Brand: palette "Slate & Signal", Red Hat Display / Text / Mono, arch mark A.
   Colours live only in :root tokens. Signal yellow is used on slate, or as a
   fill behind slate text — never as text on the light concrete ground. */

@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/red-hat-display-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/red-hat-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/red-hat-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/red-hat-text-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/red-hat-text-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/red-hat-text-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/red-hat-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/red-hat-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  /* Brand tokens — Slate & Signal */
  --slate: #2a2f33;      /* primary 1 */
  --concrete: #e4e4df;   /* primary 2 */
  --signal: #f0c21b;     /* accent */

  /* Derived */
  --slate-deep: #1f2326;
  --concrete-2: #d9d9d3;
  --field: #f2f2ee;
  --text: var(--slate);
  --muted: #53595f;
  --rule: #c2c2bb;
  --on-ink: #e4e4df;
  --on-ink-muted: #a4a9ae;
  --rule-on-ink: #40464b;

  --display: "Red Hat Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --space: clamp(64px, 10vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--concrete); color: var(--text);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--slate); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
p { margin: 0 0 1.1em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--signal); color: var(--slate); padding: 8px 12px; z-index: 10; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Dark zones: header, hero, inner-page intros, bands, footer */
.site-header, .hero, .page-intro, .band, .site-footer { background: var(--slate); color: var(--on-ink); }
.site-footer { background: var(--slate-deep); }
:is(.site-header, .hero, .page-intro, .band, .site-footer) a { color: var(--on-ink); text-decoration-color: var(--signal); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.15; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: normal; background: linear-gradient(transparent 64%, var(--signal) 64%, var(--signal) 92%, transparent 92%); }
:is(.hero, .page-intro, .band) :is(h1, h2) em { background: none; color: var(--signal); }
.lede { font-size: clamp(1.12rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 38em; }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 12px; margin: 0 0 26px;
}
.eyebrow::before { content: ""; width: 12px; height: 12px; background: var(--slate); flex: none; }
:is(.hero, .page-intro, .band) .eyebrow { color: var(--on-ink-muted); }
:is(.hero, .page-intro, .band) .eyebrow::before { background: var(--signal); }
.mono { font-family: var(--mono); font-size: 0.85rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule-on-ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 46px; height: 25px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1; letter-spacing: -0.01em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 26px; font-size: 0.97rem; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--signal); }

/* Sections */
section { padding: var(--space) 0; }
section + section { border-top: 1px solid var(--rule); }
.hero + section, .page-intro + section, .band + section, section + .band { border-top: 0; }
.section-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head > * { grid-column: 1 / span 7; }
.section-head .aside { grid-column: 9 / span 4; align-self: end; color: var(--muted); margin: 0; }

/* Hero */
.hero { padding-top: clamp(56px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.hero-copy { grid-column: 1 / span 8; }
.hero-copy .lede { margin-top: 32px; color: var(--on-ink); }
.ledger { grid-column: 10 / span 3; border-top: 3px solid var(--signal); font-size: 0.95rem; }
.ledger-title { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-muted); padding: 12px 0; margin: 0; }
.ledger ol { list-style: none; margin: 0; padding: 0; }
.ledger li { border-top: 1px solid var(--rule-on-ink); padding: 14px 0; }
.ledger .status { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); }
.ledger strong { font-weight: 700; }
.ledger small { display: block; color: var(--on-ink-muted); font-size: 0.875rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 40px; }
.btn {
  display: inline-block; background: var(--slate); color: var(--concrete); text-decoration: none;
  font-weight: 700; font-size: 0.97rem; padding: 15px 24px; border: 2px solid var(--slate);
}
.btn:hover { background: transparent; color: var(--slate); }
:is(.hero, .page-intro, .band) .btn { background: var(--signal); border-color: var(--signal); color: var(--slate); }
:is(.hero, .page-intro, .band) .btn:hover { background: transparent; color: var(--signal); }
.btn-arrow::after { content: " →"; }
.link-quiet { font-weight: 700; font-size: 0.97rem; text-decoration-thickness: 2px; }

/* Cases */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 5vw, 72px); }
.case { border-top: 3px solid var(--slate); padding-top: 22px; }
.case-num { display: inline-block; font-family: var(--mono); font-weight: 500; font-size: 0.85rem; background: var(--signal); color: var(--slate); padding: 3px 9px; margin-bottom: 18px; }
.case h3 { margin-bottom: 8px; }
.case .sector { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin-bottom: 20px; }
.case p { max-width: 34em; }
.in-build { margin-top: clamp(48px, 7vw, 88px); display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; background: var(--concrete-2); padding: clamp(24px, 4vw, 44px); }
.in-build .label { grid-column: 1 / span 3; }
.in-build .body { grid-column: 4 / span 9; }
.in-build .body p:last-child { margin-bottom: 0; }

/* Method rows */
.method { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.method li { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; border-top: 1px solid var(--rule); padding: clamp(24px, 3.5vw, 40px) 0; }
.method li:last-child { border-bottom: 1px solid var(--rule); }
.method .step { grid-column: 1 / span 4; font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1; display: flex; gap: 16px; align-items: center; }
.method .step::before { counter-increment: m; content: "0" counter(m); font-family: var(--mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.06em; background: var(--signal); color: var(--slate); padding: 2px 7px; }
.method p { grid-column: 6 / span 7; margin: 0; }

/* Dark band */
.band-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.band-grid > :first-child { grid-column: 1 / span 5; }
.band-grid .body { grid-column: 7 / span 6; }
.orgs { display: flex; flex-wrap: wrap; column-gap: 0.5em; font-family: var(--mono); font-size: 0.85rem; color: var(--on-ink-muted); border-top: 1px solid var(--rule-on-ink); border-bottom: 1px solid var(--rule-on-ink); padding: 16px 0; margin: 28px 0; line-height: 2; }
.orgs span { color: var(--on-ink); white-space: nowrap; }
.orgs span + span::before { content: "/"; color: var(--signal); margin-right: 0.5em; }

/* CTA */
.cta-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.cta-grid > :first-child { grid-column: 1 / span 7; }
.cta-grid .body { grid-column: 9 / span 4; }

/* Page intro (inner pages) */
.page-intro { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 7vw, 96px); }
.page-intro h1 { font-size: clamp(2.4rem, 5.6vw, 4.8rem); max-width: 15em; }
.page-intro .lede { margin-top: 30px; }

/* Services */
.service { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; border-top: 3px solid var(--slate); padding: 26px 0 clamp(48px, 6vw, 72px); }
.service .meta { grid-column: 1 / span 4; }
.service .meta h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 18px; }
.service .body { grid-column: 6 / span 7; }
.tag { display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; background: var(--signal); color: var(--slate); padding: 5px 9px; }
.plain-list { list-style: none; margin: 8px 0 0; padding: 0; }
.plain-list li { border-top: 1px solid var(--rule); padding: 11px 0; }
.plain-list li:last-child { border-bottom: 1px solid var(--rule); }

/* Case study detail */
.case-detail { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; border-top: 3px solid var(--slate); padding: 26px 0 clamp(56px, 7vw, 88px); }
.case-detail .meta { grid-column: 1 / span 4; }
.case-detail .meta h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin: 6px 0 18px; }
.case-detail .body { grid-column: 6 / span 7; }
.facts { margin: 0; font-size: 0.95rem; }
.facts dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.facts dd { margin: 4px 0 0; }
.band .facts dt { color: var(--on-ink-muted); }

/* Prose pages */
.prose { max-width: 44em; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2em 0 0.6em; }
.prose h3 { font-family: var(--sans); font-size: 1.0625rem; font-weight: 700; margin: 1.6em 0 0.4em; letter-spacing: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose .updated { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }

.principles { list-style: none; padding: 0; margin: 0; }
.principles li { border-top: 1px solid var(--rule); padding: 18px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; }
.principles li:last-child { border-bottom: 1px solid var(--rule); }
.principles strong { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; }
.principles span { color: var(--muted); }

/* Contact form */
.contact-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.contact-grid form { grid-column: 1 / span 7; }
.contact-grid aside { grid-column: 9 / span 4; }
.field { margin-bottom: 22px; }
.field label { display: block; font-family: var(--mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.field label small { text-transform: none; letter-spacing: 0; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--slate); background: var(--field);
  border: 1px solid var(--rule); border-bottom: 2px solid var(--slate); border-radius: 0; padding: 13px 14px;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--signal); outline-offset: 0; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 0.9rem; color: var(--muted); margin-top: 14px; }
button.btn { cursor: pointer; font-family: inherit; }
.direct { border-top: 3px solid var(--slate); padding-top: 18px; }
.direct .big { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.1vw, 1.7rem); display: block; margin: 6px 0 20px; word-break: break-word; }

/* Footer */
.site-footer { color: var(--on-ink-muted); font-size: 0.9rem; padding: 56px 0 40px; }
.site-footer a { text-decoration-color: var(--rule-on-ink); }
.foot-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.foot-brand { grid-column: 1 / span 5; }
.foot-brand .brand-name { color: var(--on-ink); font-size: 1.6rem; }
.foot-brand p { margin-top: 16px; max-width: 26em; }
.foot-nav { grid-column: 7 / span 3; list-style: none; margin: 0; padding: 0; line-height: 2; }
.foot-contact { grid-column: 10 / span 3; }
.legal { grid-column: 1 / -1; border-top: 1px solid var(--rule-on-ink); margin-top: 32px; padding-top: 20px; font-size: 0.82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-copy, .ledger, .section-head > *, .section-head .aside,
  .in-build .label, .in-build .body, .method .step, .method p,
  .band-grid > :first-child, .band-grid .body, .cta-grid > :first-child, .cta-grid .body,
  .service .meta, .service .body, .case-detail .meta, .case-detail .body,
  .contact-grid form, .contact-grid aside,
  .foot-brand, .foot-nav, .foot-contact { grid-column: 1 / -1; }
  .ledger { margin-top: 48px; }
  .cases { grid-template-columns: 1fr; gap: 48px; }
  .method li { gap: 12px; }
  .principles li { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav { gap: 2px 18px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-header .nav, .site-footer, .actions { display: none; } body { background: #fff; } }

/* ------------------------------------------------------------------
   Additions, 28 Sep 2026 — header button, footer "Who we help",
   audience pages and the direct-response sections. Existing tokens only.
   ------------------------------------------------------------------ */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Header "Book a call" button */
.nav { align-items: center; }
.nav .nav-cta { background: var(--signal); color: var(--slate); border: 2px solid var(--signal); padding: 7px 14px; font-weight: 700; margin-left: 4px; }
.nav .nav-cta:hover { background: transparent; color: var(--signal); border-bottom-color: var(--signal); }

/* Line under hero / intro buttons */
.offer-note { margin: 18px 0 0; font-size: 0.95rem; max-width: 36em; color: var(--muted); }
:is(.hero, .page-intro, .band) .offer-note { color: var(--on-ink-muted); }

/* "Where the week goes" */
.pains { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 72px); }
.pains li { border-top: 1px solid var(--rule); padding: 20px 0 22px; font-family: var(--display); font-weight: 500; font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.3; letter-spacing: -0.01em; }
.pains-close { margin: clamp(32px, 4vw, 48px) 0 0; max-width: 40em; font-size: 1.1rem; }
.stat { margin: 28px 0 0; max-width: 44em; border-left: 3px solid var(--slate); padding-left: 18px; }
.source-note { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; padding-left: 21px; }

/* "Who we work with" */
.audiences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.audience { display: block; text-decoration: none; border-top: 3px solid var(--slate); background: var(--concrete-2); padding: 24px clamp(20px, 3vw, 32px) 28px; }
.audience:hover { background: var(--field); }
.audience .who { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 10px; }
.audience .desc { display: block; color: var(--muted); }
.audience .go { display: inline-block; margin-top: 18px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }

/* Commitments */
.commit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 72px); }
.commit li { border-top: 1px solid var(--rule); padding: 16px 0 18px; font-size: 1.08rem; display: flex; gap: 14px; }
.commit li::before { content: ""; width: 10px; height: 10px; background: var(--slate); flex: none; margin-top: 0.6em; }

/* What we'd build (audience pages) */
.builds { row-gap: clamp(40px, 5vw, 56px); }
.builds .case p:last-child { margin-bottom: 0; }

/* Services: links to audience pages */
.also { font-size: 0.97rem; }

/* Contact: what happens next */
.steps { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: s; }
.steps li { border-top: 1px solid var(--rule); padding: 12px 0 12px 46px; position: relative; }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before { counter-increment: s; content: "0" counter(s); position: absolute; left: 0; top: 14px; font-family: var(--mono); font-size: 0.76rem; font-weight: 500; background: var(--signal); color: var(--slate); padding: 1px 6px; }

/* Case-study screenshot */
.shot { margin: 32px 0 0; }
.shot img { width: 100%; height: auto; }

/* Footer: four columns */
.foot-brand { grid-column: 1 / span 4; }
.foot-nav { grid-column: 6 / span 2; }
.foot-help { grid-column: 8 / span 3; list-style: none; margin: 0; padding: 0; line-height: 2; }
.foot-contact { grid-column: 11 / span 2; overflow-wrap: anywhere; }
.foot-head { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-muted); margin: 0 0 6px; line-height: 1.6; }

@media (max-width: 900px) {
  .pains, .audiences, .commit { grid-template-columns: 1fr; }
  .foot-brand, .foot-nav, .foot-help, .foot-contact { grid-column: 1 / -1; }
}

/* Focus rings: Signal on slate, Slate on concrete (WCAG 2.2 non-text contrast) */
main section:not(.hero):not(.page-intro):not(.band) :focus-visible,
.field input:focus, .field select:focus, .field textarea:focus { outline-color: var(--slate); }
.builds .case h3 { margin-bottom: 12px; }
