/* ==========================================================================
   HKM Labs
   Breakpoints: desktop >=1200px · tablet 810–1199px · phone <810px
   ========================================================================== */

/* Registered so the hairline colour can transition on hover */
@property --bc {
  syntax: "<color>";
  inherits: true;
  initial-value: #d7d7d2;
}

:root {
  color-scheme: light;

  --bg: #f4f4f2;
  --surface: #f6f6f4;
  --raise: #fafaf9;
  --line: #d7d7d2;
  --line-strong: #b9b9b3;
  --hatch: #d4d4d0;
  --chip: #efefed;
  --btn-line: #8c8c88;
  --cream: #faf7ef;

  --ink: #080808;
  --ink-2: #222;
  --ink-3: #333;
  --muted: #555;
  --label: #666;

  --blue: #153bff;
  --blue-hover: #0c2bd6;
  --blue-tint: rgba(21, 59, 255, 0.13);
  --err: #b3261e;

  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Instrument Sans", "Space Grotesk", system-ui, sans-serif;
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-display: clamp(2.75rem, 1.5rem + 4.6vw, 5.125rem);
  --fs-h2: clamp(2.25rem, 1.2rem + 3.4vw, 3.625rem);
  --fs-card: clamp(1.75rem, 1.55rem + 0.8vw, 2rem);
  --fs-sub: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);

  --pad: 24px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  overflow-x: clip;
}

html.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 400; overflow-wrap: break-word; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  font: 500 0.8125rem/1 var(--mono);
  text-transform: uppercase;
}
.skip:focus { top: 12px; outline-color: #fff; }

/* --------------------------------------------------------------------------
   Hairline borders drawn as an inset overlay (never changes box size)
   -------------------------------------------------------------------------- */
.bd {
  position: relative;
  /* custom properties inherit, so reset the sides for every nested .bd */
  --bt: 0;
  --br: 0;
  --bb: 0;
  --bl: 0;
}

.bd::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid var(--bc, var(--line));
  border-width: var(--bt, 0) var(--br, 0) var(--bb, 0) var(--bl, 0);
  pointer-events: none;
}

.bd-all { --bt: 1px; --br: 1px; --bb: 1px; --bl: 1px; }
.bd-lr  { --br: 1px; --bl: 1px; }
.bd-tb  { --bt: 1px; --bb: 1px; }
.bd-rb  { --br: 1px; --bb: 1px; }
.bd-t   { --bt: 1px; }
.bd-r   { --br: 1px; }
.bd-b   { --bb: 1px; }

/* --------------------------------------------------------------------------
   Page stack: a bordered column with 4px gaps between blocks
   -------------------------------------------------------------------------- */
.stack {
  --sec-w: min(1120px, 100% - 90px);
  --gap: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
}

.stack > * { width: var(--sec-w); }
.stack > .page { width: 100%; }

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  counter-reset: sec;
}
.page > * { width: var(--sec-w); }

/* --------------------------------------------------------------------------
   Shared type
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 400 0.8125rem/1 var(--mono);
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow__mark { width: 8px; height: 8px; background: var(--blue); flex: none; }

.kicker {
  font: 400 0.8125rem/1 var(--mono);
  text-transform: uppercase;
  color: var(--label);
}
.kicker::before {
  counter-increment: sec;
  content: "[ 0" counter(sec) " ] · ";
}

.label { font: 400 0.75rem/1 var(--mono); text-transform: uppercase; color: var(--label); }

.num {
  font: 500 0.8125rem/1 var(--mono);
  text-transform: uppercase;
  color: var(--blue);
}

.h2 {
  font: 400 var(--fs-h2)/1.02 var(--sans);
  letter-spacing: -0.055em;
  color: var(--ink);
  text-wrap: balance;
}

.lead {
  font: 400 1.0625rem/1.5 var(--sans);
  color: var(--muted);
  text-wrap: pretty;
}

.accent { color: var(--blue); }

.dot { display: block; flex: none; width: 10px; height: 10px; background: var(--blue); }

.arrow { width: 18px; height: 18px; flex: none; color: var(--blue); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  padding: 6px 8px;
  background: var(--chip);
  font: 400 0.75rem/16px var(--mono);
  text-transform: uppercase;
  color: var(--ink-3);
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 0.875rem/1.3 var(--mono);
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.linkbtn {
  padding: 8px 0;
  border: 0;
  background: none;
  font: 500 0.75rem/1 var(--mono);
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.linkbtn:hover { color: var(--blue-hover); }

/* 3×3 pixel glyph, same vocabulary as the logo */
.glyph { display: grid; grid-template-columns: repeat(3, 6px); gap: 3px; flex: none; }
.glyph i { width: 6px; height: 6px; background: var(--line); transition: background-color 0.2s ease; }
.glyph i.on { background: var(--blue); }

/* --------------------------------------------------------------------------
   Logo: the 2×2 blue-square mark whose fourth pixel "resolves" into finer pixels.
   Markup: <span class="mark"><i></i><span class="sub"><i></i>×4</span><i></i><i></i></span>
   (grid order: top-left, top-right [the resolving cell], bottom-left, bottom-right)
   -------------------------------------------------------------------------- */
.mark {
  --c: 12px;   /* one square */
  --g: 4px;    /* gap between squares */
  --mg: 2px;   /* gap between the four fine pixels */
  display: grid;
  grid-template-columns: repeat(2, var(--c));
  gap: var(--g);
  flex: none;
}
.mark > i { display: block; width: var(--c); height: var(--c); background: var(--blue); }
.mark .sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--mg);
  width: var(--c);
  height: var(--c);
}
.mark .sub i { display: block; background: var(--blue); }
.mark .sub i:last-child { background: var(--ink); }

.mark--nav { --c: 12px; --g: 4px; --mg: 2px; }   /* 28px */
.mark--sm  { --c: 10px; --g: 3px; --mg: 2px; }   /* 23px */
.mark--lg  { --c: 15px; --g: 5px; --mg: 3px; }   /* 35px */
.mark--xs  { --c: 6px;  --g: 2px; --mg: 2px; }   /* 14px */

/* On load the three squares appear, then the fourth splits into four fine pixels and one turns ink.
   script.js toggles .is-pre / .is-collapse (with .is-reset to skip the transition). */
@media (prefers-reduced-motion: no-preference) {
  .mark > i,
  .mark .sub { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), gap 0.9s var(--ease) var(--gd, 0.5s); }
  .mark > i:nth-child(3) { transition-delay: 70ms; }
  .mark > i:nth-child(4) { transition-delay: 140ms; }
  .mark .sub { transition-delay: 210ms, 210ms, var(--gd, 0.55s); }
  .mark .sub i:last-child { transition: background-color 0.7s var(--ease) var(--id, 1.1s); }

  .mark.is-pre > i,
  .mark.is-pre .sub { opacity: 0; transform: scale(0.55); }
  .mark.is-pre .sub { gap: 0; }
  .mark.is-pre .sub i:last-child,
  .mark.is-collapse .sub i:last-child { background: var(--blue); }
  .mark.is-collapse .sub { gap: 0; }

  .mark.quick { --gd: 0s; --id: 0.25s; }
  .mark.is-reset,
  .mark.is-reset * { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav.bd {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--nav-h);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(244, 244, 242, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__name {
  font: 700 1.5rem/1.2 var(--sans);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.nav__links { display: flex; gap: 28px; }
.nav__links a {
  position: relative;
  padding: 12px 0;
  font: 400 1rem/1.2 var(--sans);
  color: var(--ink-2);
  transition: color 0.15s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.2s ease;
}
.nav__links a:hover::after,
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__links a[aria-current="true"] { color: var(--blue); }

.nav__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 22px;
  background: var(--blue);
  color: #fff;
  font: 500 0.875rem/1 var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
  --bc: var(--blue);
}

/* Progressive scroll-progress hairline along the bottom of the sticky bars */
@supports (animation-timeline: scroll()) {
  .nav.bd::before,
  .mnav.bd::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 2px;
    z-index: 1;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: 0 50%;
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes progress { to { transform: scaleX(1); } }

/* Phone navigation (hidden until <810px) */
.mnav { display: none; }

.mnav__top {
  height: 64px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mbrand { display: flex; align-items: center; gap: 8px; }
.mbrand__name { font: 700 1.125rem/1 var(--sans); letter-spacing: -0.03em; color: var(--ink); }

.mnav__actions { display: flex; gap: 8px; }

.mbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  font: 500 0.75rem/1 var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.mbtn--blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.mbtn--menu { background: var(--bg); border-color: var(--btn-line); color: var(--ink); }

.mnav__menu { background: var(--cream); }
.mnav__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font: 400 0.875rem/1 var(--mono);
  text-transform: uppercase;
  color: var(--ink);
}
.mnav__menu a[aria-current="true"] { color: var(--blue); }

/* --------------------------------------------------------------------------
   Hatch strips (pure CSS: 2px strokes, 18px apart, 45°)
   -------------------------------------------------------------------------- */
.hatch { position: relative; height: 70px; overflow: hidden; background: var(--bg); }
.hatch::before {
  content: "";
  position: absolute;
  inset: 10px 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg stroke='%23d4d4d0' stroke-width='2'%3E%3Cpath d='M-1 19L19-1'/%3E%3Cpath d='M-1 1L1-1'/%3E%3Cpath d='M17 19L19 17'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 18px 18px;
}
.hatch--footer { width: 100%; height: 69px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 14px 20px;
  border: 0;
  font: 500 0.875rem/1 var(--mono);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s var(--ease), --bc 0.3s var(--ease), transform 0.12s ease;
}
.btn--lg { min-height: 50px; }

.btn--primary { background: var(--blue); color: #fff; --bc: var(--blue); --fill: var(--blue-hover); }
.btn--secondary { background: var(--surface); color: var(--ink); letter-spacing: -0.01em; --bc: var(--btn-line); --fill: #fff; }

/* a second colour sweeps across the button from the left on hover and focus */
.btn,
.nav__cta { isolation: isolate; }
.btn::before,
.nav__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill, var(--blue-hover));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.5s var(--ease);
}
.nav__cta { --fill: var(--blue-hover); }

.ico { width: 15px; height: 15px; flex: none; transition: transform 0.4s var(--ease); }
.ico--lg { width: 16px; height: 16px; }

@media (hover: hover) {
  .btn:hover::before,
  .nav__cta:hover::before { transform: scaleX(1); }
  .btn--primary:hover,
  .nav__cta:hover { --bc: var(--blue-hover); }
  .btn--secondary:hover { --bc: var(--ink); }
  .btn:hover .ico { transform: translate(2px, -2px); }
  .mbtn--blue:hover { background: var(--blue-hover); }
  .mbtn--menu:hover { border-color: var(--ink); }
}
.btn:focus-visible::before,
.nav__cta:focus-visible::before { transform: scaleX(1); }
.btn:active,
.nav__cta:active,
.mbtn:active { transform: translateY(1px); }

.btn--primary:focus-visible,
.nav__cta:focus-visible { outline-color: var(--ink); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.opening {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 96px 40px 64px;
  background: var(--bg);
  text-align: center;
}

.intro { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; }

.hero-title {
  max-width: 880px;
  font: 400 var(--fs-display)/0.98 var(--display);
  letter-spacing: -0.06em;
  color: var(--ink);
  text-wrap: balance;
}

.hero-copy {
  max-width: 640px;
  font: 400 clamp(1rem, 0.9rem + 0.3vw, 1.1875rem)/1.45 var(--sans);
  letter-spacing: -0.02em;
  color: var(--muted);
  text-wrap: balance;
}

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Illustrative agent-run panel */
.trace {
  width: 100%;
  max-width: 640px;
  margin-top: 8px;
  background: var(--surface);
  text-align: left;
}
.trace__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--label);
}
.trace__body { display: grid; gap: 10px; padding: 18px 16px 20px; }
.trace__body li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  font: 400 0.8125rem/20px var(--mono);
  color: var(--ink-2);
}
.trace__body b { font-weight: 500; text-transform: uppercase; color: var(--blue); }
.caret { display: inline-block; width: 8px; height: 14px; margin-left: 6px; background: var(--blue); vertical-align: -2px; }

@media (prefers-reduced-motion: no-preference) {
  .trace__body li { animation: rise 0.4s ease backwards; animation-delay: calc(var(--i) * 0.28s + 0.3s); }
  /* blinks four times (under 5s) and then rests, so nothing flashes indefinitely */
  .caret,
  .eyebrow__mark { animation: blink 1.2s steps(2, start) 4; }
}
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
@keyframes blink { 50% { opacity: 0; } }

/* Service index ribbon */
.index {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}
.index__cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 96px;
  padding: 16px 18px;
  background: var(--bg);
  transition: background-color 0.15s ease;
}
.index__name {
  font: 400 0.75rem/1.25 var(--mono);
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
  transition: color 0.15s ease;
}
.index__cell:focus-visible { outline-offset: -4px; }
@media (hover: hover) {
  .index__cell:hover { background: var(--blue); }
  .index__cell:hover .num,
  .index__cell:hover .index__name { color: #fff; }
}

/* --------------------------------------------------------------------------
   Section header (one pattern for every content section)
   -------------------------------------------------------------------------- */
.services,
.examples,
.principles,
.process,
.faq,
.contact { background: var(--bg); }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  align-items: end;
  gap: 32px;
  padding: 64px var(--pad) 40px;
}
.sec-head__title { display: flex; flex-direction: column; gap: 12px; }
.sec-head__note {
  font: 400 1rem/1.45 var(--sans);
  color: var(--muted);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Cards (services + example patterns)
   -------------------------------------------------------------------------- */
.service-list,
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: clip;
}

.s-card,
.p-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  transition: background-color 0.2s ease, --bc 0.2s ease;
}
.s-card { min-height: 288px; background: var(--raise); box-shadow: 0 18px 48px -32px rgba(21, 59, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.78); --bc: var(--blue-tint); }
.p-card { min-height: 300px; background: var(--surface); }

.s-card__top,
.p-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
}
.s-card__top { background: #fcfcfb; --bc: rgba(21, 59, 255, 0.14); }
.p-card__top { --bc: var(--line); }

.s-card__copy,
.p-card__copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px var(--pad);
  min-width: 0;
}

.s-card__title,
.p-card__title {
  font: 500 var(--fs-card)/1.1 var(--sans);
  letter-spacing: -0.045em;
  color: var(--ink);
  text-wrap: balance;
}

.s-card__desc,
.p-card__desc {
  font: 400 1rem/1.45 var(--sans);
  color: var(--muted);
  text-wrap: pretty;
}

.s-card__foot,
.p-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--pad);
}
.s-card__foot { background: #fcfcfb; --bc: rgba(21, 59, 255, 0.14); }
.p-card__foot { --bc: var(--line); }

/* the whole card is the link; only the title text is the accessible name */
.stretched { outline: none; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.s-card:has(.stretched:focus-visible),
.p-card:has(.stretched:focus-visible) { outline: 2px solid var(--blue); outline-offset: -4px; z-index: 3; }

.arrow { transition: transform 0.2s ease; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .s-card:hover,
  .p-card:hover { --bc: var(--blue); z-index: 2; background: #fff; }
  .s-card:hover .s-card__top,
  .p-card:hover .p-card__top {
    background-image: repeating-linear-gradient(135deg, rgba(21, 59, 255, 0.1) 0 1px, transparent 1px 8px);
  }
  .s-card:hover .arrow,
  .p-card:hover .arrow,
  .textlink:hover .arrow { transform: translate(3px, -3px); }
  .s-card:hover .dot,
  .p-card:hover .dot { box-shadow: 0 0 0 4px rgba(21, 59, 255, 0.16); }
  .s-card:hover .glyph i.on { background: var(--blue-hover); }
}
.s-card:active,
.p-card:active { background: #fff; }

/* --------------------------------------------------------------------------
   Principles
   -------------------------------------------------------------------------- */
.principles { display: grid; grid-template-columns: 5fr 7fr; }

.principles__head {
  position: sticky;
  top: 108px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 64px var(--pad);
}

.pr {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 16px;
  align-items: baseline;
  min-height: 128px;
  padding: 32px var(--pad);
  transition: background-color 0.2s ease;
}
.pr__word {
  font: 400 clamp(2.125rem, 1.4rem + 2vw, 3rem)/1 var(--sans);
  letter-spacing: -0.055em;
  color: var(--ink);
}
.pr__desc {
  grid-column: 2;
  margin-top: 12px;
  max-width: 44ch;
  font: 400 1rem/1.45 var(--sans);
  color: var(--muted);
  text-wrap: pretty;
}
@media (hover: hover) {
  .pr:hover { background: var(--surface); }
}

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */
.process__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 240px;
  padding: 36px var(--pad) 24px;
}
.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) calc(var(--p, 1) * 25%), var(--line) 0);
}
.step:nth-child(2) { --p: 2; }
.step:nth-child(3) { --p: 3; }
.step:nth-child(4) { --p: 4; }

.step__body { display: flex; flex-direction: column; gap: 14px; }
.step__title {
  font: 500 var(--fs-sub)/1.15 var(--sans);
  letter-spacing: -0.035em;
  color: var(--ink);
}
.step__desc { font: 400 1rem/1.45 var(--sans); color: var(--muted); text-wrap: pretty; }
.step__out { font: 400 0.75rem/1.4 var(--mono); text-transform: uppercase; color: var(--label); }

.process__foot,
.faq__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding: 24px var(--pad);
  font: 400 1rem/1.45 var(--sans);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   FAQ (native accordion)
   -------------------------------------------------------------------------- */
:root { interpolate-size: allow-keywords; }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding: 24px var(--pad);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(var(--blue), var(--blue)) center / 16px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) center / 2px 16px no-repeat;
  transition: background-size 0.2s ease;
}
.faq__item[open] summary::after { background-size: 16px 2px, 2px 0; }
.faq__item[open] { box-shadow: inset 2px 0 0 var(--blue); }
.faq__item summary:focus-visible { outline-offset: -4px; }

.faq__q {
  font: 500 var(--fs-sub)/1.15 var(--sans);
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.faq__a {
  max-width: 64ch;
  padding: 0 var(--pad) 28px;
  font: 400 1rem/1.5 var(--sans);
  color: var(--muted);
  text-wrap: pretty;
}

.faq__item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
}
.faq__item[open]::details-content { block-size: auto; }

@media (hover: hover) {
  .faq__item summary:hover { background: var(--surface); }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; }

.contact__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 64px var(--pad);
}

.contact__mailrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.contact__mail {
  font: 500 clamp(1rem, 0.8rem + 0.7vw, 1.25rem)/1.2 var(--mono);
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

.contact__help { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.ticks { display: grid; gap: 10px; }
.ticks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 400 0.8125rem/1.4 var(--mono);
  color: var(--ink-2);
}
.ticks li::before { content: ""; width: 8px; height: 8px; background: var(--blue); flex: none; }

.contact__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
  padding: 64px var(--pad);
}
.contact__nojs { padding: 64px var(--pad); font: 400 1rem/1.5 var(--sans); color: var(--muted); }
.contact__nojs a { color: var(--blue); text-decoration: underline; }

.field { position: relative; display: grid; gap: 8px; align-content: start; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field > span { font: 400 0.75rem/1 var(--mono); text-transform: uppercase; color: var(--label); }
.field > span em { font-style: normal; text-transform: none; }

.field :is(input, select, textarea) {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: 400 1rem/1.5 var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23153bff' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder { color: #8a8a86; }
.field :is(input, select, textarea):hover { border-color: var(--line-strong); }
.field :is(input, select, textarea):focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.field :is(input, textarea):user-invalid { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.field__count { justify-self: end; font: 400 0.75rem/1 var(--mono); color: var(--label); }

.form__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 20px; }
.form__note { flex: 1 1 260px; max-width: 46ch; font: 400 0.8125rem/1.45 var(--sans); color: var(--muted); }

.form__status { display: grid; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); }
.form__status[hidden] { display: none; }
.form__status p { font: 400 0.875rem/1.45 var(--sans); color: var(--ink-2); }
.form__draft {
  width: 100%;
  padding: 12px 14px;
  font: 400 0.8125rem/1.5 var(--mono);
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0;
  resize: vertical;
}
.form__statusbtns { display: flex; gap: 20px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.stack > .footer { width: var(--sec-w); }
.footer { display: flex; flex-direction: column; background: var(--bg); }

.band {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 160px;
  overflow: hidden;
  background: var(--blue);
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}
.band__main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 22px;
  padding: 28px var(--pad);
  font: 500 clamp(1rem, 0.7rem + 1.3vw, 1.5rem)/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.band__main i { width: 8px; height: 8px; border: 1px solid rgba(255, 255, 255, 0.7); flex: none; }
.band__sub {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 20px var(--pad);
  font: 400 0.75rem/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.band__sub::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  transform-origin: 0 50%;
}

.footer__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.footer__col { display: flex; flex-direction: column; padding: 34px var(--pad); min-width: 0; }

.footer__brand { gap: 24px; }
.footer__name { display: flex; align-items: center; gap: 12px; font: 700 1.75rem/1 var(--sans); letter-spacing: -0.03em; color: var(--ink); }
.footer__blurb { font: 400 1rem/1.45 var(--sans); color: var(--muted); text-wrap: pretty; }

.footer__links { gap: 22px; }
.footer__links--dense { gap: 22px; }
.footer__links ul { display: grid; gap: 10px; }
.footer__head { font: 400 0.8125rem/1 var(--mono); text-transform: uppercase; color: var(--ink); }
.footer__links a {
  display: inline-block;
  padding: 2px 0;
  font: 400 1rem/1.3 var(--sans);
  color: var(--muted);
  transition: color 0.15s ease;
}
.footer__links a:hover { color: var(--blue); }

.footer__cta { gap: 18px; align-items: flex-start; }
.footer__pitch { font: 500 1.375rem/1.15 var(--sans); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.footer__mail {
  font: 500 0.875rem/1.2 var(--mono);
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 24px;
  min-height: 56px;
  padding: 16px var(--pad);
  text-align: center;
  font: 400 0.75rem/1.2 var(--mono);
  text-transform: uppercase;
  color: var(--muted);
}
/* --------------------------------------------------------------------------
   Motion: one easing curve, calm timings, nothing hidden without JS
   -------------------------------------------------------------------------- */
@keyframes rv-in { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: no-preference) {
  /* sections fade up once, and the items inside them follow one after another */
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .reveal.is-in :is(.index__cell, .s-card, .p-card, .pr, .step, .faq__item, .footer__col) {
    animation: rv-in 0.9s var(--ease) backwards;
    animation-delay: calc(var(--k, 0) * 70ms + 120ms);
  }
  :is(.s-card, .p-card, .step, .pr, .faq__item):nth-child(2) { --k: 1; }
  :is(.s-card, .p-card, .step, .pr, .faq__item):nth-child(3) { --k: 2; }
  :is(.s-card, .p-card, .step, .pr, .faq__item):nth-child(4) { --k: 3; }
  :is(.s-card, .faq__item):nth-child(5) { --k: 4; }
  :is(.s-card, .faq__item):nth-child(6) { --k: 5; }

  /* hero: a short, staggered load-in */
  .opening .intro > .eyebrow,
  .opening .hero-copy,
  .opening .actions,
  .opening .trace { animation: rv-in 1s var(--ease) backwards; animation-delay: var(--hd, 0ms); }
  .opening .intro > .eyebrow { --hd: 60ms; }
  .opening .hero-copy { --hd: 650ms; }
  .opening .actions { --hd: 780ms; }
  .opening .trace { --hd: 900ms; }

  /* headlines rise line by line (words are wrapped by script.js) */
  .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.05em 0.08em 0.18em; margin: -0.05em -0.08em -0.18em; }
  .w > span { display: inline-block; transform: translateY(112%); transition: transform 1s var(--ease); transition-delay: calc(var(--l, 0) * 110ms + var(--d, 0ms)); }
  .split.is-in .w > span { transform: none; }

  /* until the words are split (fonts ready) the title waits; this guard shows it anyway */
  .js .hero-title:not(.is-split) { visibility: hidden; animation: unhide 0s 1.6s forwards; }

  /* a short blue tab draws in above every section heading */
  .sec-head::before {
    content: "";
    position: absolute;
    left: var(--pad);
    top: -1px;
    z-index: 1;
    width: 56px;
    height: 2px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.9s var(--ease) 0.25s;
  }
  .reveal.is-in .sec-head::before { transform: scaleX(1); }
  html:not(.js) .sec-head::before { transform: scaleX(1); }

  /* the closing band: words rise, the hairline draws */
  .js .band:not(.is-in) .band__main > span { transform: translateY(60%); opacity: 0; }
  .js .band:not(.is-in) .band__main > i { transform: scale(0); }
  .js .band:not(.is-in) .band__sub > span { opacity: 0; }
  .js .band:not(.is-in) .band__sub::before { transform: scaleX(0); }
  .band__main > span { transition: transform 0.9s var(--ease), opacity 0.9s var(--ease); transition-delay: calc(var(--n, 0) * 90ms); }
  .band__main > i { transition: transform 0.7s var(--ease); transition-delay: calc(var(--n, 0) * 90ms + 60ms); }
  .band__main > :nth-child(2) { --n: 1; }
  .band__main > :nth-child(3) { --n: 2; }
  .band__main > :nth-child(4) { --n: 3; }
  .band__main > :nth-child(5) { --n: 4; }
  .band__main > :nth-child(6) { --n: 5; }
  .band__main > :nth-child(7) { --n: 6; }
  .band__sub > span { transition: opacity 1s var(--ease); transition-delay: calc(var(--n, 0) * 70ms + 500ms); }
  .band__sub > :nth-child(2) { --n: 1; }
  .band__sub > :nth-child(3) { --n: 2; }
  .band__sub > :nth-child(4) { --n: 3; }
  .band__sub > :nth-child(5) { --n: 4; }
  .band__sub > :nth-child(6) { --n: 5; }
  .band__sub::before { transition: transform 1.2s var(--ease) 0.2s; }

  /* sticky bars get a soft shadow once the page has scrolled */
  .nav.bd,
  .mnav.bd { transition: box-shadow 0.4s var(--ease); }
}
@keyframes unhide { to { visibility: visible; } }

.nav.bd.is-stuck,
.mnav.bd.is-stuck { box-shadow: 0 14px 28px -24px rgba(8, 8, 8, 0.5); }

/* ==========================================================================
   Tablet  810 – 1199px
   ========================================================================== */
@media (max-width: 1199.98px) {
  :root { --pad: 22px; }

  .opening { padding: 80px 32px 56px; }

  .sec-head { padding: 56px var(--pad) 32px; }
  .sec-head__note { max-width: 260px; }

  .index { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .principles { grid-template-columns: 1fr; }
  .principles__side { --br: 0; }
  .principles__head { position: static; padding: 56px var(--pad) 40px; }
  .principles__list { border-top: 1px solid var(--line); }

  .process__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2) { --br: 1px; }

  .contact { grid-template-columns: 1fr; }
  .contact__copy { --br: 0; padding: 56px var(--pad) 8px; }
  .contact__form,
  .contact__nojs { padding: 32px var(--pad) 56px; }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__col:nth-child(-n + 2) { --bb: 1px; }
}

/* ==========================================================================
   Phone  < 810px
   ========================================================================== */
@media (max-width: 809.98px) {
  :root { --pad: 20px; }

  .stack { --sec-w: 100%; --gap: 12px; }
  html { scroll-padding-top: 76px; }

  .nav.bd { display: none; }
  .mnav.bd { display: block; position: sticky; top: 0; z-index: 30; background: var(--cream); }

  .js .mnav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1;
    border-bottom: 1px solid var(--line);
  }
  .js .mnav.is-open .mnav__menu { display: block; }
  .js .mnav.is-open::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    bottom: 0;
    z-index: -1;
    background: rgba(8, 8, 8, 0.32);
    transform: none;
    animation: none;
    height: auto;
  }
  html:not(.js) .mbtn--menu { display: none; }

  .hatch { height: 66px; }
  .hatch--footer { height: 58px; }

  .opening { gap: 22px; padding: 64px var(--pad) 48px; }
  .actions { width: 100%; flex-direction: column; gap: 10px; }
  .actions .btn { width: 100%; }
  .trace__body li { grid-template-columns: 76px 1fr; font-size: 0.75rem; line-height: 18px; }

  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index__cell { padding: 14px var(--pad); }

  .sec-head { grid-template-columns: 1fr; gap: 16px; padding: 48px var(--pad) 28px; }
  .sec-head__note { max-width: none; }

  .service-list,
  .project-grid,
  .process__grid { grid-template-columns: minmax(0, 1fr); }
  .s-card,
  .p-card { min-height: 0; }

  .principles__head { padding: 48px var(--pad) 32px; }
  .pr { grid-template-columns: 32px 1fr; padding: 24px var(--pad); min-height: 0; }

  .step { min-height: 0; gap: 20px; }
  .step:nth-child(2) { --br: 1px; }

  .faq__item summary { min-height: 76px; padding: 20px var(--pad); }

  .contact__copy { padding: 48px var(--pad) 8px; }
  .contact__form,
  .contact__nojs { grid-template-columns: minmax(0, 1fr); padding: 28px var(--pad) 44px; }
  .form__actions .btn { width: 100%; }

  .band { min-height: 0; }
  .band__main { padding: 24px var(--pad); gap: 4px 8px; letter-spacing: 0.04em; }
  .band__main i { width: 6px; height: 6px; }
  .band__sub { padding: 18px var(--pad); gap: 6px 16px; }

  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__col { --br: 0; --bb: 0; --bt: 1px; padding: 28px var(--pad); }
  .footer__brand { --bt: 0; padding-top: 34px; }
}

/* ==========================================================================
   Accessibility and print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  /* nothing moves: the scroll-progress line is the only remaining motion, so it goes too */
  .nav.bd::before,
  .mnav.bd::before { display: none; }
}

@media (forced-colors: active) {
  .mark > i,
  .mark .sub i,
  .glyph i,
  .dot,
  .eyebrow__mark,
  .caret,
  .ticks li::before { forced-color-adjust: none; background: CanvasText; }
  .glyph i:not(.on) { background: GrayText; }
  .arrow,
  .ico { color: LinkText; }
  .btn,
  .nav__cta,
  .mbtn { border: 1px solid ButtonText; }
  .accent { color: LinkText; }
  .band { forced-color-adjust: none; background: Canvas; color: CanvasText; }
  .band__main > i { border-color: CanvasText; }
}

@media print {
  .stack { --sec-w: 100%; --gap: 8px; }
  .nav, .mnav, .hatch, .band, #menuToggle, .skip, .trace { display: none !important; }
  .reveal,
  .reveal * ,
  .w > span,
  .band__main > *,
  .band__sub > * { opacity: 1 !important; transform: none !important; animation: none !important; visibility: visible !important; }
  .band__sub::before { transform: none !important; }
  .btn--primary, .nav__cta, .mbtn--blue { background: none; color: #000; --bc: #000; }
  * { box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .principles__head { position: static; }
  a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 0.75em; }
  .faq__item::details-content { block-size: auto; }
}
