/* Salix Engineering
   Shell: cool willow paper and green-black ink. Each tool page and tile switches to that tool's own tokens. */

:root {
  --paper: #f2f4f1;
  --paper-2: #e7ebe5;
  --ink: #1b2420;
  --ink-2: #4f5d55;
  --line: #cfd6cc;
  --willow: #5f7656;
  --willow-deep: #3f5238;

  /* tool tokens, taken from each app's stylesheet */
  --hamr-navy: #0b1628;
  --hamr-canvas: #0d1420;
  --hamr-line: #272e3a;
  --hamr-text: #e7ebf1;
  --hamr-dim: #a3adbb;
  --hamr-accent: #98a8ff;

  --saga-bg: #f5f6f8;
  --saga-panel: #ffffff;
  --saga-text: #1c2430;
  --saga-muted: #6a7585;
  --saga-line: #e1e5ea;
  --saga-accent: #2f6fdf;

  --ppmx-red: #d21e1e;
  --ppmx-light: #d9d9d9;
  --ppmx-mid: #a6a6a6;
  --ppmx-dark: #404040;
  --ppmx-chrome: #2b2f35;
  --ppmx-rule: #3a3f46;

  --con-canvas: #eef1f5;
  --con-dot: #c5ccd7;
  --con-ink: #0f1724;
  --con-dim: #475467;
  --con-line: #dce1e8;
  --con-accent: #2f45b5;

  --font: "Archivo", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --nav-h: 60px;

  /* type scale: ~1.25 from a 17px body */
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-h3: 1.25rem;
  --t-h2: clamp(1.5rem, 2.4vw, 2rem);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { text-wrap: balance; }
code { font-family: var(--mono); font-size: .9em; white-space: nowrap; }

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

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------------- Nav: takes the colours of the tool you're reading about ---------------- */
body { --nav-bg: rgba(242, 244, 241, .88); --nav-fg: var(--ink); --nav-dim: var(--ink-2); --nav-mark: var(--willow); }
body[data-tone="hamr"]      { --nav-bg: rgba(11, 22, 40, .94);  --nav-fg: var(--hamr-text); --nav-dim: var(--hamr-dim); --nav-mark: var(--hamr-accent); }
body[data-tone="saga"]      { --nav-bg: rgba(255, 255, 255, .94); --nav-fg: var(--saga-text); --nav-dim: var(--saga-muted); --nav-mark: var(--saga-accent); }
body[data-tone="ppmx"]      { --nav-bg: rgba(43, 47, 53, .96);  --nav-fg: #f1f2f3; --nav-dim: var(--ppmx-mid); --nav-mark: var(--ppmx-red); }
body[data-tone="construct"] { --nav-bg: rgba(238, 241, 245, .94); --nav-fg: var(--con-ink); --nav-dim: var(--con-dim); --nav-mark: var(--con-accent); }

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  color: var(--nav-fg);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--nav-fg) 12%, transparent);
  transition: background-color .5s ease, color .5s ease, border-color .5s ease;
}
.nav__inner {
  max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: .875rem; text-transform: uppercase; letter-spacing: .12em; }
.brand__mark { width: 26px; height: 26px; flex: none; }
/* lighter leaves where the nav goes dark */
body[data-tone="hamr"] .nav, body[data-tone="ppmx"] .nav { --leaf-a: #b9cfa9; --leaf-b: #e7efe0; --leaf-c: #8fae7c; }
.nav__crumb { font-size: var(--t-small); color: var(--nav-dim); text-decoration: none; }
.nav__crumb:hover { color: var(--nav-fg); }
.nav nav { margin-left: auto; }
.nav__links { display: flex; gap: clamp(14px, 3vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-size: .9375rem; color: var(--nav-dim); padding: 8px 0; transition: color .2s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--nav-fg); }
.nav__links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--nav-mark); }
@media (max-width: 640px) {
  .brand__name { display: none; }
  .nav__crumb { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* ---------------- Shared type ---------------- */
.display {
  margin: 0;
  font-weight: 300;
  font-variation-settings: "wdth" 118;
  letter-spacing: -.02em;
  line-height: 1.02;
}
.section-title {
  margin: 0;
  font-size: var(--t-h2);
  line-height: 1;
  font-weight: 300;
  font-variation-settings: "wdth" 125;
  letter-spacing: -.02em;
}
.lede { font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.5; max-width: 58ch; }

.button {
  display: inline-block; text-decoration: none;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: 13px 22px; border: 1px solid transparent; border-radius: 4px; cursor: pointer;
  background: var(--willow-deep); color: #fff;
  transition: background-color .15s, color .15s, border-color .15s;
}
.button:hover { background: var(--ink); }
.button--quiet { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.button--quiet:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.button[disabled] { opacity: .6; cursor: progress; }

/* ---------------- Home: a full-bleed photo with a way into each page ---------------- */
.landing {
  --focus: #fff;
  position: relative; overflow: hidden;
  min-height: calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h));
  display: flex; align-items: center;
  background: #1c1f1e;
  color: #fff;
}
.landing__backdrop {
  position: absolute; inset: 0;
  background: url("assets/backdrop.webp") center 62% / cover no-repeat;
  background-image: image-set(url("assets/backdrop-1200.webp") 1x, url("assets/backdrop.webp") 2x);
}
@media (min-width: 1000px) { .landing__backdrop { background-image: url("assets/backdrop.webp"); } }
/* darken the left side so the text reads, and let the photo show on the right */
.landing::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(12, 15, 14, .82) 0%, rgba(12, 15, 14, .62) 38%, rgba(12, 15, 14, .12) 72%, rgba(12, 15, 14, 0) 100%);
}
.landing__inner { position: relative; z-index: 1; width: 100%; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.landing h1 { font-size: clamp(2rem, 4.4vw, 3.5rem); color: #fff; }
.landing .lede { margin: clamp(16px, 2vw, 24px) 0 0; color: rgba(255, 255, 255, .84); max-width: 40ch; }
.landing__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4vw, 40px); }
.button--light { background: #fff; color: var(--ink); }
.button--light:hover { background: var(--paper-2); }
.button--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.button--outline:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
@media (max-width: 860px) {
  .landing { align-items: flex-end; }
  .landing__backdrop { background-position: 62% center; }
  .landing::after { background: linear-gradient(180deg, rgba(12, 15, 14, .35) 0%, rgba(12, 15, 14, .6) 40%, rgba(12, 15, 14, .85) 100%); }
}

/* ---------------- Project tiles ---------------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin: 0; padding: 0; list-style: none; }
.tiles--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile a {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; color: var(--t-fg);
  background: var(--t-bg);
  border-radius: 6px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--t-line, transparent);
  transition: transform .25s ease;
}
.tile a:hover { transform: translateY(-3px); }
.tile a:focus-visible { outline-color: var(--t-accent); outline-offset: 3px; }
.tile__text { padding: clamp(18px, 2.4vw, 28px); display: grid; gap: 8px; }
.tile__name { font-size: clamp(1.5rem, 2.2vw, 1.875rem); line-height: 1; }
.tile__role { font-size: 1.0625rem; font-weight: 500; }
.tile__desc { margin: 0; font-size: .9375rem; color: var(--t-dim); max-width: 48ch; }
.tile__more { margin-top: 6px; font-size: .9375rem; font-weight: 600; color: var(--t-accent); }
.tile__shot { margin-top: auto; padding: 0 clamp(18px, 2.4vw, 28px); }
.tile__shot img { border-radius: 4px 4px 0 0; box-shadow: 0 0 0 1px var(--t-line, rgba(0,0,0,.12)); aspect-ratio: 5 / 3; object-fit: cover; object-position: left top; width: 100%; }
.tiles--compact .tile__name { font-size: 1.25rem; }
.tiles--compact .tile__role { font-size: .9375rem; font-weight: 400; color: var(--t-dim); }
.tiles--compact .tile__desc { display: none; }
.tiles--compact .tile__more { display: none; }
.tiles--compact .tile__text { padding: 18px; }
.tiles--compact .tile__shot { padding: 0 18px; }

.tile--hamr { --t-bg: var(--hamr-navy); --t-fg: var(--hamr-text); --t-dim: var(--hamr-dim); --t-accent: var(--hamr-accent); --t-line: var(--hamr-line); }
.tile--hamr .tile__name { font-weight: 700; letter-spacing: .16em; font-variation-settings: "wdth" 112; }
.tile--saga { --t-bg: var(--saga-panel); --t-fg: var(--saga-text); --t-dim: var(--saga-muted); --t-accent: var(--saga-accent); --t-line: var(--saga-line); }
.tile--saga .tile__name { font-weight: 700; letter-spacing: -.01em; }
.tile--saga a { box-shadow: inset 0 0 0 1px var(--saga-line), inset 0 -4px 0 var(--saga-accent); }
.tile--ppmx { --t-bg: var(--ppmx-chrome); --t-fg: #f1f2f3; --t-dim: var(--ppmx-mid); --t-accent: #ff7a7a; --t-line: #15171a; }
.tile--ppmx a { background: linear-gradient(176deg, var(--ppmx-red) 0 7%, var(--ppmx-mid) 7% 8%, var(--ppmx-chrome) 8%); }
.tile--ppmx .tile__text { padding-top: clamp(30px, 3.6vw, 44px); }
.tile--ppmx .tile__name { font-weight: 900; font-variation-settings: "wdth" 108; color: var(--ppmx-light); }
.tile--construct { --t-bg: var(--con-canvas); --t-fg: var(--con-ink); --t-dim: var(--con-dim); --t-accent: var(--con-accent); --t-line: var(--con-line); }
.tile--construct a { background-image: radial-gradient(var(--con-dot) 1px, transparent 1.3px); background-size: 16px 16px; }
.tile--construct .tile__name { font-weight: 700; letter-spacing: .1em; }
@media (max-width: 1080px) { .tiles--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .tiles { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .tile a { transition: none; } .tile a:hover { transform: none; } }

/* ---------------- Plain page header (projects, principles, contact) ---------------- */
.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
.page-head .lede { margin-top: 18px; color: var(--ink-2); }

.projects-tiles { padding-bottom: clamp(64px, 9vw, 120px); }

/* ---------------- Tool pages (shared) ---------------- */
.tool { position: relative; overflow: hidden; }
.tool__head { padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 5vw, 64px); }
.tool__grid {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px);
  align-items: start;
}
.tool__intro { grid-column: span 5; min-width: 0; }
.tool__intro > p { max-width: 60ch; }
.tool__hero-shot { grid-column: 6 / -1; margin-right: calc(-1 * var(--gutter)); }
@media (min-width: 1440px) { .tool__hero-shot { margin-right: calc((100vw - var(--max)) / -2 - var(--gutter) + 24px); } }
.wordmark { margin: 0 0 16px; line-height: 1; }
.tool__tagline { margin: 0 0 14px; font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.05; font-weight: 300; font-variation-settings: "wdth" 118; letter-spacing: -.02em; }
.kicker { font-size: 1.125rem; line-height: 1.3; margin: 0 0 1.1em; font-weight: 450; }
.status { font-size: var(--t-small); margin-top: 1.25em; color: var(--t-dim, var(--ink-2)); }

.tool__section { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--t-rule, var(--line)); }
.tool__section h2 { margin: 0 0 12px; font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.1; font-weight: 400; font-variation-settings: "wdth" 112; letter-spacing: -.01em; }
.tool__section h3 { margin: 0 0 8px; font-size: 1.125rem; font-weight: 600; }
.col-text { grid-column: span 4; min-width: 0; }
.col-text p { color: var(--t-dim, var(--ink-2)); max-width: 60ch; }
.col-wide { grid-column: 5 / -1; min-width: 0; }
.col-full { grid-column: 1 / -1; min-width: 0; }
.col-half { grid-column: span 6; min-width: 0; }
@media (max-width: 960px) {
  .tool__intro, .tool__hero-shot, .col-text, .col-wide, .col-half { grid-column: 1 / -1; }
  .tool__hero-shot { margin-right: 0; }
}

.facts { margin: 24px 0 0; padding: 0; display: grid; }
.facts > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--t-rule, var(--line)); }
.facts > div:last-child { border-bottom: 1px solid var(--t-rule, var(--line)); }
.facts dt { font-weight: 600; font-size: .9375rem; }
.facts dd { margin: 0; font-size: .9375rem; color: var(--t-dim, var(--ink-2)); }
.facts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); }
.facts--two > div:nth-last-child(2) { border-bottom: 1px solid var(--t-rule, var(--line)); }
@media (max-width: 720px) {
  .facts--two { grid-template-columns: 1fr; }
  .facts--two > div:nth-last-child(2) { border-bottom: 0; }
}

.shot { margin: 0; }
.shot img { width: 100%; border: 1px solid var(--t-line, var(--line)); border-radius: var(--t-radius, 4px); }
.shot figcaption { margin-top: 10px; font-size: var(--t-small); color: var(--t-dim, var(--ink-2)); max-width: 70ch; }
.shot-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.shot-row--3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 640px) { .shot-row, .shot-row--3-2 { grid-template-columns: 1fr; } }

/* other tools, at the foot of each tool page */
.others { padding: clamp(48px, 7vw, 88px) 0; background: var(--paper); color: var(--ink); }
.others h2 { margin: 0 0 24px; font-size: 1.25rem; font-weight: 500; }

/* ---------------- HAMR ---------------- */
.tool--hamr {
  --t-dim: var(--hamr-dim); --t-rule: var(--hamr-line); --t-line: var(--hamr-line); --focus: var(--hamr-accent);
  background: linear-gradient(var(--hamr-navy), var(--hamr-canvas) 900px);
  color: var(--hamr-text);
}
.tool--hamr::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(152, 168, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(152, 168, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
}
.tool--hamr > * { position: relative; }
.tool--hamr a { color: var(--hamr-accent); }
.wordmark--hamr { font-size: clamp(2.25rem, 4.4vw, 3.5rem); font-weight: 700; letter-spacing: .16em; font-variation-settings: "wdth" 112; }
.tool--hamr .tool__intro > p { color: var(--hamr-dim); }

/* ---------------- Saga ---------------- */
.tool--saga { --t-dim: var(--saga-muted); --t-rule: var(--saga-line); --t-line: var(--saga-line); --t-radius: 8px; --focus: var(--saga-accent); background: var(--saga-bg); color: var(--saga-text); }
.tool--saga a { color: var(--saga-accent); }
.tool--saga .shot img { background: #fff; box-shadow: 0 1px 2px rgba(28, 36, 48, .06), 0 12px 32px -12px rgba(28, 36, 48, .18); }
.wordmark--saga { font-size: clamp(2.25rem, 4.4vw, 3.5rem); font-weight: 700; letter-spacing: -.01em; }
.tool--saga .tool__intro > p { color: #3b4655; }

/* ---------------- PPMX ---------------- */
.tool--ppmx { --t-dim: #c3c7cc; --t-rule: var(--ppmx-rule); --t-line: #15171a; --focus: var(--ppmx-red); background: var(--ppmx-chrome); color: #eceeef; }
.tool--ppmx a { color: #ff8a8a; }
.ppmx__sweep { display: block; width: 100%; height: clamp(80px, 11vw, 160px); }
.tool--ppmx .tool__head { padding-top: clamp(8px, 1.5vw, 24px); }
.wordmark--ppmx { font-size: clamp(2.5rem, 5.4vw, 4.25rem); font-weight: 900; font-variation-settings: "wdth" 108; letter-spacing: -.01em; color: var(--ppmx-light); }
.tool--ppmx .tool__intro > p { color: #d5d8dc; }

.credit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.credit__col { padding: 22px 24px 8px; border-radius: 6px; min-width: 0; }
.credit__col--upstream { background: #24282d; box-shadow: inset 0 0 0 1px var(--ppmx-rule); }
.credit__col--fork { background: #33373d; box-shadow: inset 4px 0 0 var(--ppmx-red), inset 0 0 0 1px var(--ppmx-rule); }
.credit__col h3 { margin: 0 0 4px; font-size: 1.125rem; }
.credit__col > p { color: var(--ppmx-mid); font-size: var(--t-small); margin-bottom: 8px; }
.credit__col ul { margin: 0; padding: 0; list-style: none; }
.credit__col li { padding: 11px 0; border-top: 1px solid var(--ppmx-rule); font-size: .9375rem; color: #d5d8dc; }
.credit__col li strong { color: #fff; font-weight: 600; }
@media (max-width: 860px) { .credit { grid-template-columns: 1fr; } }

.worksheet-wrap { overflow-x: auto; }
.worksheet { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .875rem; background: #f7f8f9; color: #24282e; border: 1px solid #15171a; }
.worksheet caption { caption-side: bottom; text-align: left; padding-top: 10px; color: var(--ppmx-mid); font-size: var(--t-small); }
.worksheet th, .worksheet td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #d5d9de; }
.worksheet th { background: #e6e8eb; font-weight: 600; font-size: .8125rem; }
.worksheet td:first-child { font-weight: 600; }
.worksheet td.num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .8125rem; }

/* ---------------- Construct ---------------- */
.tool--construct {
  --t-dim: var(--con-dim); --t-rule: var(--con-line); --t-line: var(--con-line); --t-radius: 6px; --focus: var(--con-accent);
  --c-bg: var(--con-canvas);
  background-color: var(--con-canvas);
  background-image: radial-gradient(var(--con-dot) 1px, transparent 1.3px);
  background-size: 20px 20px;
  color: var(--con-ink);
}
.tool--construct a { color: var(--con-accent); }
.tool--construct .shot img { background: #fff; }
.wordmark--construct { display: flex; align-items: center; gap: .35em; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: .1em; }
.wordmark--construct svg { width: 1em; height: 1em; flex: none; }
.tool--construct .tool__intro > p { color: var(--con-dim); }
.tool--construct .facts { background: color-mix(in srgb, var(--con-canvas) 88%, transparent); }
.roles { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.roles li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 8px; font-size: .875rem; line-height: 1; background: #fff; border: 1px solid var(--con-line); border-radius: 6px; }
.roles li::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--role); }

/* ---------------- Principles (section on the Projects page) ---------------- */
.principles { padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
.principles__lede { margin: 12px 0 clamp(24px, 3vw, 40px); color: var(--ink-2); }
.principle, .service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 64px); padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--ink); }
.principle:last-child, .service:last-child { border-bottom: 1px solid var(--ink); }
.principle h3 { margin: 0; font-size: clamp(1.1875rem, 1.8vw, 1.4375rem); line-height: 1.12; font-weight: 400; font-variation-settings: "wdth" 112; letter-spacing: -.01em; max-width: 18ch; }
.principle__body p { max-width: 62ch; color: var(--ink-2); }
.principle__body p:first-child { color: var(--ink); }
.principle__body p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .principle, .service { grid-template-columns: 1fr; } }

/* ---------------- Contact page ---------------- */
.contact { padding-bottom: clamp(72px, 10vw, 128px); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 720px); }
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-size: .9375rem; font-weight: 600; padding: 0; }
.field__opt { font-weight: 400; color: var(--ink-2); }
.field__hint { margin: 0; font-size: var(--t-small); color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: #fbfcfa; border: 1px solid #b9c2b6; border-radius: 4px; padding: 11px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--willow-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--willow) 30%, transparent); }
.field [aria-invalid="true"] { border-color: #a3312a; }
.field__error { margin: 0; font-size: var(--t-small); color: #a3312a; }
.field__error:empty { display: none; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.topics label { position: relative; font-weight: 400; cursor: pointer; }
.topics input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.topics span { display: inline-block; padding: 8px 13px; font-size: .9375rem; line-height: 1.2; border: 1px solid #b9c2b6; border-radius: 999px; background: #fbfcfa; transition: background-color .15s, color .15s, border-color .15s; }
.topics label:hover span { border-color: var(--ink-2); }
.topics input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.topics input:focus-visible + span { outline: 2px solid var(--willow); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.form__status { margin: 0; font-size: .9375rem; }
.form__status[data-state="ok"] { color: var(--willow-deep); font-weight: 600; }
.form__status[data-state="error"] { color: #a3312a; }

/* ---------------- Footer ---------------- */
.footer { padding: 36px 0 44px; border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--ink-2); background: var(--paper); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.footer p { margin: 0; }
.footer__inner p:last-child { margin-left: auto; }
.brand--footer { color: var(--ink); }
@media (max-width: 640px) { .footer__inner p:last-child { margin-left: 0; } }
.tiles--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .tiles--three { grid-template-columns: 1fr; } }

/* ---------------- Services page ---------------- */
.services { padding-bottom: clamp(48px, 7vw, 88px); }
.service h2 { margin: 0; font-size: clamp(1.1875rem, 1.8vw, 1.4375rem); line-height: 1.15; font-weight: 400; font-variation-settings: "wdth" 112; letter-spacing: -.01em; max-width: 20ch; }
.service__body p { max-width: 62ch; color: var(--ink-2); }
.service__body p:first-child { color: var(--ink); }
.service__body ul { margin: 0 0 1em; padding-left: 1.1em; color: var(--ink-2); max-width: 62ch; }
.service__body li { margin: 0 0 .35em; }
.service__body > :last-child { margin-bottom: 0; }
.services-cta { padding: clamp(40px, 6vw, 72px) 0; background: var(--paper-2); }
.services-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.services-cta p { margin: 0; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); max-width: 44ch; }

/* ---------------- About page ---------------- */
.about { padding-bottom: clamp(64px, 9vw, 120px); }
.about__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about__photos { display: grid; gap: 16px; max-width: 360px; }
.about__photo { margin: 0; }
.about__photo img { width: 100%; border-radius: 4px; }
.about__text { min-width: 0; max-width: 62ch; }
.about__text h2 { margin: 0; font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.1; font-weight: 400; font-variation-settings: "wdth" 112; }
.about__role { margin: 6px 0 20px; color: var(--ink-2); }
.about__text h3 { margin: 28px 0 8px; font-size: 1rem; font-weight: 600; }
.about__jobs { list-style: none; margin: 0 0 20px; padding: 0; }
.about__jobs li { display: grid; grid-template-columns: 12em 1fr auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9375rem; }
.about__jobs li:last-child { border-bottom: 1px solid var(--line); }
.about__jobs span { color: var(--ink-2); }
.about__years { font-variant-numeric: tabular-nums; white-space: nowrap; }
.about__more { color: var(--ink-2); }
@media (max-width: 760px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__photos { max-width: 280px; }
  .about__jobs li { grid-template-columns: 1fr auto; gap: 2px 12px; }
  .about__jobs li > span:not(.about__years) { grid-column: 1 / -1; grid-row: 2; }
}
/* four nav items: tighten on the narrowest phones */
@media (max-width: 420px) {
  .nav__links { gap: 14px; }
  .nav__opt { display: none; }
}

/* headline figures (HAMR continuous improvement) */
.stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
.stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding-top: 14px; border-top: 1px solid var(--t-rule, var(--line)); min-width: 0; }
.stats dd { margin: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; font-weight: 300; font-variation-settings: "wdth" 118; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats dt { font-size: .875rem; color: var(--t-dim, var(--ink-2)); }
.stats__note { margin: 16px 0 0; font-size: var(--t-small); color: var(--t-dim, var(--ink-2)); }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
