:root {
    /* graphite base */
    --bg: oklch(0.175 0.006 60);
    --panel: oklch(0.215 0.007 60);
    --panel-deep: oklch(0.145 0.005 60);
    --ink: oklch(0.95 0.008 80);
    --muted: oklch(0.74 0.012 80);
    --line: oklch(0.95 0.008 80 / 0.13);
    --line-strong: oklch(0.95 0.008 80 / 0.34);

    /* bone (buttons, like 8090's cream CTA) */
    --bone: oklch(0.955 0.01 85);
    --bone-hot: oklch(1 0 0);
    --on-bone: oklch(0.20 0.007 60);

    /* brass accent (labels, emphasis — warm, never red) */
    --brass: oklch(0.80 0.09 80);
    --brass-dim: oklch(0.68 0.06 75);

    /* paper sections (light interludes) */
    --paper: oklch(0.965 0.006 85);
    --paper-ink: oklch(0.235 0.01 60);
    --paper-muted: oklch(0.45 0.012 60);
    --paper-line: oklch(0.235 0.01 60 / 0.16);
    --paper-blue: oklch(0.45 0.07 250);
    --paper-umber: oklch(0.52 0.09 65);

    --font-display: "Archivo", system-ui, sans-serif;
    --font-body: "Source Serif 4", Georgia, serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    --space-section: clamp(5rem, 12vw, 9rem);
    --measure: 66ch;
    --z-nav: 100;
  }

  * { box-sizing: border-box; margin: 0; }

  html { scroll-behavior: smooth; overflow-x: clip; }
  body { overflow-x: clip; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
  }
  section, main { scroll-margin-top: 4.5rem; }
  ::selection { background: var(--brass); color: var(--on-bone); }
  :focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    font-variation-settings: "wdth" 112;
    line-height: 1.05;
    letter-spacing: -0.025em;
    text-wrap: balance;
  }

  p { text-wrap: pretty; }
  strong { font-weight: 560; }

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

  .wrap {
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
  }

  /* ---------- Nav ---------- */
  header.nav {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    background: oklch(0.145 0.005 60 / 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 0.9rem;
  }
  .wordmark {
    font-family: var(--font-display);
    font-weight: 750;
    font-variation-settings: "wdth" 118;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    white-space: nowrap;
  }
  .wordmark .num {
    border-bottom: 3px solid var(--brass);
    padding-bottom: 1px;
  }
  .wordmark .sys {
    font-weight: 500;
    color: var(--muted);
    font-size: 1.05rem;
  }
  .wordmark small {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.05em;
  }
  .nav-links { display: flex; align-items: center; gap: 1.75rem; }
  .nav-links a {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
  }
  .nav-links a:hover { color: var(--brass); }
  .nav-links a.btn, .nav-links a.btn:hover { color: var(--on-bone); }
  @media (max-width: 40rem) {
    .nav-links a:not(.btn) { display: none; }
    .wordmark small { display: none; }
    .wordmark { font-size: 1.1rem; }
    .nav-inner { gap: 0.75rem; }
    .nav-links .btn { font-size: 0.8rem; padding: 0.5rem 0.75rem; }
  }

  .btn {
    display: inline-block;
    white-space: nowrap;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--on-bone);
    background: var(--bone);
    padding: 0.65rem 1.3rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .btn:hover { background: var(--bone-hot); color: var(--on-bone); transform: translateY(-1px); }
  .btn.big { font-size: 1.05rem; padding: 0.85rem 1.7rem; }

  /* ---------- Hero ---------- */
  .hero {
    padding-block: clamp(4rem, 9vw, 7.5rem) clamp(3rem, 6vw, 5rem);
    position: relative;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: -6rem -20vw 0 0;
    background: radial-gradient(52rem 34rem at 82% 22%, oklch(0.30 0.045 55 / 0.5), transparent 68%);
    pointer-events: none;
  }
  .hero > * { position: relative; }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
  }
  @media (max-width: 56rem) {
    .hero-grid { grid-template-columns: 1fr; }
  }
  .hero h1 {
    font-size: clamp(2.1rem, 0.9rem + 3.7vw, 3.25rem);
    font-weight: 720;
    max-width: 24ch;
  }
  .hero h1 em {
    font-style: normal;
    color: var(--brass);
    display: block;
  }
  .hero .lede {
    margin-top: 1.7rem;
    font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
    max-width: 52ch;
    color: var(--muted);
  }
  .hero .lede strong { color: var(--ink); font-weight: 560; }
  .hero .lede a { color: var(--brass); }
  .hero-cta { margin-top: 2.3rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
  .hero-cta .alt {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--ink);
  }
  .hero-cta .alt:hover { color: var(--brass); }

  .clients {
    margin-top: clamp(3rem, 7vw, 5rem);
    border-top: 1px solid var(--line);
    padding-top: 1.3rem;
    display: flex;
    align-items: baseline;
    gap: 1rem 2.5rem;
    flex-wrap: wrap;
  }
  .clients .label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
  }
  .clients .names {
    display: flex;
    align-items: baseline;
    gap: 1rem 2.25rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
  }
  .clients .names li {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.06rem;
    letter-spacing: -0.005em;
    color: oklch(0.85 0.012 80);
    white-space: nowrap;
  }
  .clients .names li small {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 400;
    color: var(--muted);
  }

  /* ---------- Hero diagram plate ---------- */
  .plate {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: oklch(0.145 0.005 60 / 0.55);
    padding: 0.6rem;
  }
  .plate::after {
    content: "fig. 01 — raw workflows in, production systems out";
    display: block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--muted);
    padding: 0.5rem 0.4rem 0.2rem;
    border-top: 1px solid var(--line);
    margin-top: 0.4rem;
  }
  .plate img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
  }
  @media (prefers-reduced-motion: no-preference) {
    html.js .plate img {
      transform: scale(1.04);
      transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
    html.js .reveal.in .plate img, html.js .plate.in img { transform: scale(1); }
  }

  /* ---------- Sections ---------- */
  section { padding-block: var(--space-section); }

  .section-head h2 {
    font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
    font-weight: 700;
    max-width: 24ch;
  }
  .section-head .sub {
    margin-top: 1.2rem;
    max-width: var(--measure);
    color: var(--muted);
    font-size: 1.08em;
  }

  /* Insight: raised dark panel */
  .insight {
    background: var(--panel);
    border-block: 1px solid var(--line);
  }
  .insight .body {
    margin-top: 1.6rem;
    max-width: var(--measure);
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  }
  .insight .kicker-line {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--brass);
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
    margin-top: 1.6rem;
  }

  /* Alternatives: light interlude (spec sheet) */
  .spec {
    background: var(--paper);
    color: var(--paper-ink);
  }
  .spec .section-head h2 { color: var(--paper-ink); }
  .spec .section-head .sub { color: var(--paper-muted); }
  .spec-sheet-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--paper-muted);
    margin-bottom: 1.2rem;
  }
  .alts { margin-top: 3rem; border-top: 2px solid var(--paper-ink); }
  .alt-row {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 5fr);
    gap: 1.5rem;
    padding-block: 1.6rem;
    border-bottom: 1px solid var(--paper-line);
  }
  @media (max-width: 48rem) {
    .alt-row { grid-template-columns: 1fr; gap: 0.5rem; padding-block: 1.3rem; }
  }
  .alt-row h3 {
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.01em;
  }
  .alt-row .pro, .alt-row .con { font-size: 0.98rem; line-height: 1.55; }
  .alt-row .pro::before, .alt-row .con::before {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
  }
  .alt-row .pro::before { content: "works when"; color: var(--paper-blue); }
  .alt-row .con::before { content: "breaks when"; color: var(--paper-umber); }
  .alt-row .pro { color: var(--paper-ink); }
  .alt-row .con { color: var(--paper-muted); }
  .alt-verdict {
    padding-block: 1.8rem 0;
    max-width: var(--measure);
    font-size: 1.12em;
    color: var(--paper-ink);
  }
  .alt-verdict strong { color: var(--paper-blue); font-weight: 620; }

  /* What we build: dark */
  .build-list { margin-top: 3.5rem; display: flex; flex-direction: column; gap: clamp(2.5rem, 6vw, 4.5rem); }
  .build-item {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
  }
  .build-item:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .build-item:nth-child(even) .build-copy { order: -1; }
  @media (max-width: 48rem) {
    .build-item, .build-item:nth-child(even) { grid-template-columns: 1fr; }
    .build-item:nth-child(even) .build-copy { order: 0; }
  }
  .build-item h3 {
    font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
    font-weight: 680;
  }
  .build-item .tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--brass);
    display: block;
    margin-bottom: 0.6rem;
  }
  .build-item p { margin-top: 0.9rem; color: var(--muted); max-width: 58ch; }
  .build-item p strong { color: var(--ink); }
  .build-copy { padding-top: 0.2rem; }
  .build-example {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel-deep);
    padding: 1.4rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.85;
    color: var(--ink);
  }
  .build-example .c { color: oklch(0.62 0.012 80); }
  .build-example .r { color: var(--brass); }
  .build-example .b { color: oklch(0.78 0.05 230); }

  /* Current work: dark panel */
  .work {
    background: var(--panel);
    border-block: 1px solid var(--line);
  }
  .work-entries { margin-top: 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: clamp(1.5rem, 4vw, 2.75rem); }
  @media (max-width: 48rem) { .work-entries { grid-template-columns: 1fr; } }
  .work-entry { border-top: 2px solid var(--brass); padding-top: 1.4rem; }
  .work-entry .status {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
  }
  .work-entry h3 { margin-top: 0.7rem; font-size: 1.35rem; font-weight: 650; }
  .work-entry p { margin-top: 0.8rem; color: var(--muted); font-size: 1rem; }
  .work-note { margin-top: 2.5rem; font-size: 0.95rem; color: var(--muted); font-style: italic; }

  /* How we work: light interlude */
  .principles {
    background: var(--paper);
    color: var(--paper-ink);
  }
  .principles h2 {
    font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
    font-weight: 700;
    color: var(--paper-ink);
    max-width: 20ch;
  }
  .principle-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 2.5rem 2.5rem;
  }
  .principle { border-top: 2px solid var(--paper-ink); padding-top: 1rem; }
  .principle h3 {
    font-size: 1.2rem;
    font-weight: 650;
    color: var(--paper-ink);
  }
  .principle p { margin-top: 0.7rem; color: var(--paper-muted); font-size: 1rem; }

  /* CTA: dark with ember echo */
  .cta { position: relative; }
  .cta::before {
    content: "";
    position: absolute;
    inset: 0 0 -6rem -20vw;
    background: radial-gradient(46rem 30rem at 12% 78%, oklch(0.28 0.04 55 / 0.45), transparent 68%);
    pointer-events: none;
  }
  .cta > * { position: relative; }
  .cta h2 {
    font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.6rem);
    font-weight: 720;
    max-width: 18ch;
  }
  .cta .sub { margin-top: 1.3rem; max-width: 56ch; color: var(--muted); font-size: 1.12em; }
  .cta-actions { margin-top: 2.4rem; display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
  .cta-actions .mail { font-family: var(--font-mono); font-size: 0.9rem; }

  /* Footer: drawing title block */
  footer {
    border-top: 1px solid var(--line);
    padding-block: clamp(2rem, 5vw, 3.5rem);
    background: var(--panel-deep);
  }
  .titleblock {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
  }
  .titleblock > div {
    padding: 0.8rem 1rem 0.9rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ink);
  }
  .titleblock > div > span {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.25rem;
  }
  .titleblock a { color: var(--brass); text-decoration: none; }
  .titleblock a:hover { text-decoration: underline; }
  .copyright {
    margin-top: 1.2rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
  }

  /* ---------- Reveal motion (enhance-only; content visible without JS) ---------- */
  @media (prefers-reduced-motion: no-preference) {
    html.js .reveal {
      opacity: 0;
      transform: translateY(18px);
      transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    html.js .reveal.in { opacity: 1; transform: none; }
    html.js .hero .reveal { transition-duration: 0.9s; }
    html.js .hero .reveal:nth-child(2) { transition-delay: 0.08s; }
    html.js .hero .reveal:nth-child(3) { transition-delay: 0.16s; }
  }


/* ---------- Inner pages ---------- */
.crumbs {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brass); }
.crumbs span { color: var(--ink); }
.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem) 2rem; }
.page-hero h1 {
  font-size: clamp(2rem, 1rem + 3.2vw, 3.1rem);
  font-weight: 720;
  max-width: 22ch;
}
.page-hero .lede {
  margin-top: 1.4rem;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem);
}
.updated {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.prose { padding-block: 0  var(--space-section); }
.prose h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem);
  font-weight: 700;
  margin-top: 2.6rem;
  max-width: 28ch;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.2rem;
  font-weight: 650;
  margin-top: 1.8rem;
}
.prose p { margin-top: 1rem; max-width: var(--measure); color: var(--muted); }
.prose p strong { color: var(--ink); }
.prose ul, .prose ol {
  margin-top: 1rem;
  max-width: var(--measure);
  padding-left: 1.2rem;
  color: var(--muted);
}
.prose li { margin-top: 0.45rem; }
.prose li strong { color: var(--ink); }
.compare {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.4rem;
  font-size: 0.95rem;
}
.compare th, .compare td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.compare th {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--ink);
}
.compare td { color: var(--muted); }
.faq-list { margin-top: 1.6rem; max-width: 62ch; }
.faq-item {
  border-top: 1px solid var(--line);
  padding-block: 1.15rem;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 {
  font-size: 1.08rem;
  font-weight: 650;
  margin-top: 0;
}
.faq-item p { margin-top: 0.55rem; color: var(--muted); }
.related {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}
.related a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: var(--ink);
}
.related a:hover { border-color: var(--line-strong); color: var(--ink); }
.related a span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--brass);
  margin-bottom: 0.4rem;
}
.related a strong {
  font-family: var(--font-display);
  font-weight: 650;
}
.build-item h3 a, .work-entry h3 a, .section-head h2 a {
  color: inherit;
  text-decoration: none;
}
.build-item h3 a:hover, .work-entry h3 a:hover, .section-head h2 a:hover {
  color: var(--brass);
}
.spec .compare th { color: var(--paper-ink); }
.spec .compare td, .spec .prose p, .spec .prose li, .spec .faq-item p { color: var(--paper-muted); }
.spec .compare th, .spec .compare td { border-bottom-color: var(--paper-line); }
.spec .prose p strong, .spec .prose li strong, .spec .faq-item h3 { color: var(--paper-ink); }
.spec .faq-item { border-color: var(--paper-line); }
.spec .crumbs, .spec .updated { color: var(--paper-muted); }
.spec .crumbs span { color: var(--paper-ink); }

