/* ==========================================================================
   Modern Agentic / site.css
   Design system derived from the approved reference (metacci.com):
   near-black ground, geometric sans, hairline-bordered grids, 128px rhythm.
   Silka is a licensed face; DM Sans is the closest free stand-in.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */

:root {
  /* Ground. White page, deep blue ink. */
  --bg:               #ffffff;
  --surface:          #f6f8fc;
  --surface-raised:   #eef2f9;
  --surface-hover:    #e6ecf6;

  /* Lines. Tinted with the ink colour rather than neutral grey, so the
     hairlines sit in the same family as the type. */
  --border-subtle:    rgba(10, 31, 68, 0.09);
  --border:           rgba(10, 31, 68, 0.16);
  --border-strong:    rgba(10, 31, 68, 0.32);

  /* Type. Contrast on white: 16.2:1, 8.6:1, 5.3:1. The muted tone also
     clears AA against --surface-raised, which the cards use. */
  --text:             #0a1f44;
  --text-secondary:   #3d4c6b;
  --text-muted:       #5e6b8b;
  --text-inverse:     #ffffff;

  /* Solid ink, for fills that need the full colour rather than a token. */
  --ink:              #0a1f44;
  --ink-hover:        #123058;

  /* Scale */
  --fs-display:  clamp(2.85rem, 7.1vw, 6.25rem);
  --fs-h1:       clamp(2.4rem,  5.6vw, 4.5rem);
  --fs-h2:       clamp(2rem,    4.4vw, 3.5rem);
  --fs-h3:       clamp(1.3rem,  1.9vw, 1.65rem);
  --fs-stat:     clamp(2.6rem,  5.2vw, 4rem);
  --fs-lead:     clamp(1.0625rem, 1.35vw, 1.3125rem);
  --fs-body:     1.0625rem;
  --fs-sm:       0.9375rem;
  --fs-xs:       0.8125rem;

  /* Rhythm */
  --section-y:   clamp(5rem, 11vw, 8rem);
  --gutter:      clamp(1.25rem, 5vw, 3rem);
  --max-w:       1240px;
  /* Measure. Measured empirically: an average character of running prose in
     DM Sans is ~0.45em, so 32em is ~71 characters at ANY font size. `ch` is
     the wrong unit here, since 1ch (the width of "0") is 0.685em, and a 62ch
     cap was rendering at ~92 characters. */
  --max-w-text:  32em;

  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   20px;

  /* Motion. One easing curve does almost all the work: a hard expo-out that
     starts fast and settles, which is what makes the reference feel calm
     rather than bouncy. */
  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --motion-fast:   0.15s;
  --motion-medium: 0.25s;
  --motion-slow:   0.4s;
  --motion-slower: 0.6s;
}

/* ---------- 2. Reset ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "system-ui",
               "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.018em; line-height: 1.2; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--text); color: var(--text-inverse); }

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

/* ---------- 3. Layout primitives ---------- */

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: var(--section-y); position: relative; }
section.tight { padding-block: clamp(3.5rem, 7vw, 5rem); }

.rule { height: 1px; background: var(--border-subtle); border: 0; margin: 0; }

.measure { max-width: var(--max-w-text); }
.center  { margin-inline: auto; text-align: center; }

/* Small numbered section label, e.g. "01 / Our work" */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.center .eyebrow { justify-content: center; }
.center .eyebrow::after { display: none; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 32em;
}

.muted { color: var(--text-muted); }
.bright { color: var(--text); }

/* ---------- 4. Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 56px;
  padding: 0 1.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-primary {
  background: var(--ink);
  color: var(--text-inverse);
}
.btn-primary:hover { background: var(--ink-hover); transform: translateY(-2px); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-raised); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  /* Centred by default, so a row added later is centred without anyone
     remembering to add a modifier. */
  justify-content: center;
  gap: 0.85rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

/* The hero is the single exception: its buttons sit directly under a
   left-aligned headline and belong on the same left edge. */
.hero .btn-row { justify-content: flex-start; }

/* Inline text link with an animated underline */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease);
}
.link:hover { background-size: 100% 1px; }
.link .arw { transition: transform 0.35s var(--ease); }
.link:hover .arw { transform: translateX(4px); }

/* ---------- 5. Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.stuck {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-subtle);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}
.brand img { width: 26px; height: 26px; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  /* Hit area padded to the 44px minimum without changing the visual position. */
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  padding-inline: 4px;
  color: var(--text-secondary);
  transition: color 0.25s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }

.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-cta .btn { min-height: 44px; padding: 0 1.15rem; font-size: var(--fs-sm); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links,
  .nav-cta .btn-ghost { display: none; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
  }
  .nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.35s var(--ease), opacity 0.2s linear;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .mobile-menu {
    position: fixed;
    inset: 76px 0 auto;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem var(--gutter) 2rem;
    display: grid;
    gap: 0.25rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
    z-index: 99;
  }
  .mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-menu a {
    padding: 0.85rem 0;
    font-size: 1.25rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-subtle);
  }
  .mobile-menu .btn { margin-top: 1.25rem; }
}

@media (min-width: 901px) { .mobile-menu { display: none; } }

/* ---------- 6. Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(4.5rem, 10vw, 8rem);
  min-height: min(88vh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero .wrap { position: relative; z-index: 2; width: 100%; }

.hero-copy { max-width: min(100%, 760px); }

.hero h1 {
  font-size: var(--fs-display);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  /* ch resolves against the display size, so this holds the headline to
     two or three lines at every breakpoint. */
  max-width: 15ch;
}

.hero .lead { max-width: 27em; }

@media (max-width: 780px) {
  .hero-copy { max-width: 100%; }
}

/* ---------- 7. Client grid (hairline tiles) ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1.25rem);
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  min-height: clamp(120px, 14vw, 168px);
  padding: 1.25rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease),
              transform 0.35s var(--ease);
}
.tile:hover { border-color: var(--border); background: var(--surface-raised); transform: translateY(-2px); }

/* Client logos ship pre-rendered as monochrome ink at 2x, so the width/height
   attributes in the markup are the true display size. */
.tile-logo {
  max-width: 100%;
  height: auto;
  opacity: 0.68;
  transition: opacity var(--motion-slow) var(--ease);
}
.tile:hover .tile-logo { opacity: 1; }
.tile-kind {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ---------- 8. Impact / stats ---------- */

.impact { position: relative; overflow: hidden; }

.impact::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto;
  height: 150%;
  background: radial-gradient(58% 46% at 50% 42%, rgba(10,31,68,0.05), transparent 70%);
  pointer-events: none;
}

.impact .wrap { position: relative; z-index: 1; }

.impact h2 { max-width: 20ch; margin-inline: auto; }
.impact .lead { max-width: 32em; margin-inline: auto; margin-top: 1.5rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(3.5rem, 8vw, 6rem);
  text-align: left;
}

.stat-num {
  font-size: var(--fs-stat);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-label {
  margin-top: 0.85rem;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}
.stat-src {
  margin-top: 0.3rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ---------- 9. Work ledger ---------- */

.ledger { border-top: 1px solid var(--border-subtle); }

.ledger-item { border-bottom: 1px solid var(--border-subtle); }

.ledger-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 0.9fr) 44px;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  text-align: left;
  transition: opacity 0.3s var(--ease);
}
.ledger-item:hover .ledger-head { opacity: 1; }
.ledger:hover .ledger-item:not(:hover) .ledger-head { opacity: 0.55; }

.ledger-client {
  color: var(--text);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.1;
}
.ledger-sector { font-size: var(--fs-sm); color: var(--text-muted); }
.ledger-metric {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.ledger-metric strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.ledger-plus {
  justify-self: end;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease),
              border-color 0.3s var(--ease);
}
.ledger-head:hover .ledger-plus { border-color: var(--border-strong); background: var(--surface-raised); }
.ledger-head[aria-expanded="true"] .ledger-plus { transform: rotate(45deg); }

/* Collapsible panel. See the note on .collapsible below for why this is
   max-height rather than the grid-template-rows trick. */
.ledger-body { }
.ledger-body > div { overflow: hidden; }

.ledger-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 3.5vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.ledger-inner h4 {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.85rem;
}
.ledger-inner p, .ledger-inner li { font-size: var(--fs-sm); }
.ledger-inner ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; }

.stack-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 0.28rem 0.7rem;
  line-height: 1.3;
}

@media (max-width: 780px) {
  .ledger-head {
    grid-template-columns: 1fr 40px;
    grid-template-areas: "client plus" "sector plus" "metric metric";
    gap: 0.5rem 1rem;
  }
  .ledger-client { grid-area: client; }
  .ledger-sector { grid-area: sector; }
  .ledger-metric { grid-area: metric; margin-top: 0.75rem; }
  .ledger-plus { grid-area: plus; align-self: start; }
  .ledger:hover .ledger-item:not(:hover) .ledger-head { opacity: 1; }
}

/* ---------- 10. Method steps ---------- */

.steps {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border-subtle);
}

.step {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border-subtle);
}

.step-num {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding-top: 0.5rem;
}
.step h3 { max-width: 18ch; }
.step-body p { font-size: var(--fs-sm); }
.step-body p:first-child { color: var(--text-secondary); }

.step-quote {
  margin-top: 1.1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  color: var(--text);
  font-size: var(--fs-sm);
  font-style: normal;
}

@media (max-width: 860px) {
  .step { grid-template-columns: 56px minmax(0, 1fr); }
  .step-body { grid-column: 2; }
}

/* ---------- 11. Cards (generic) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(0.85rem, 1.6vw, 1.25rem);
}

/* Four cards read better 2x2 than as a 3 + 1 orphan row. */
.card-grid.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .card-grid.grid-2 { grid-template-columns: 1fr; } }

.card {
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease);
}
.card:hover { border-color: var(--border); background: var(--surface-raised); }
.card h3 { margin-bottom: 0.7rem; }
.card p { font-size: var(--fs-sm); margin-bottom: 0; }

.card-num {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Two-column "we do / we don't". Always exactly two, so declare it. */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.6vw, 1.25rem);
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.split ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.9rem; }
.split li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.75rem;
  font-size: var(--fs-sm);
  align-items: start;
}
.split li span:first-child { color: var(--text-muted); line-height: 1.6; }
.split li b { color: var(--text); font-weight: 500; }

/* ---------- 12. Quote ---------- */

.quote {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(2rem, 5vw, 4rem);
}
.quote blockquote {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  line-height: 1.35;
  letter-spacing: -0.024em;
  font-weight: 500;
  text-wrap: balance;
}
.quote figcaption {
  margin-top: 1.75rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* ---------- 13. FAQ ---------- */

.faq { border-top: 1px solid var(--border-subtle); max-width: 900px; }
.faq-item { border-bottom: 1px solid var(--border-subtle); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: clamp(1.25rem, 2.4vw, 1.75rem) 0;
  text-align: left;
  color: var(--text);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.018em;
}
.faq-icon {
  flex: none;
  width: 14px;
  height: 14px;
  position: relative;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); opacity: 0; }

.faq-a > div { overflow: hidden; }
.faq-a p { font-size: var(--fs-sm); max-width: 68ch; padding-bottom: clamp(1.25rem, 2.4vw, 1.75rem); }

/* ---------- 14. CTA band ---------- */

.cta-band { position: relative; overflow: hidden; text-align: center; }
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(52% 60% at 50% 100%, rgba(10,31,68,0.055), transparent 68%);
  pointer-events: none;
}
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band h2 { font-size: var(--fs-h1); max-width: 18ch; margin-inline: auto; }
.cta-band .lead { max-width: 30em; margin: 1.5rem auto 0; }

/* ---------- 15. Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.field-row { display: grid; gap: 0.5rem; }
.field-row.full { grid-column: 1 / -1; }

label {
  font-size: var(--fs-sm);
  color: var(--text);
  font-weight: 500;
}
label .opt { color: var(--text-muted); font-weight: 400; }

input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
textarea { min-height: 130px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:hover, select:hover, textarea:hover { border-color: var(--border); }
/* Mouse focus gets the soft treatment; keyboard focus keeps a real ring.
   Never strip the outline from :focus outright, it takes the indicator away
   from keyboard users too (WCAG 2.4.7). */
input:focus, select:focus, textarea:focus {
  border-color: var(--border-strong);
  background: var(--surface-raised);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235e6b8b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
select option { background: #ffffff; color: var(--text); }

.form-note { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 1rem; }

.form-status {
  margin-top: 1rem;
  font-size: var(--fs-sm);
  color: var(--text);
  display: none;
}
.form-status.show { display: block; }

/* ---------- 16. Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.25rem;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.footer-brand p { font-size: var(--fs-sm); max-width: 34ch; margin-top: 1rem; }
.footer-col h4 {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; }
.footer-col a {
  /* Full 44px target; the list gap is removed so the rhythm stays even. */
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: color 0.25s var(--ease);
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ---------- 17. Page hero (interior pages) ---------- */

.page-hero { padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { max-width: 32em; margin-top: clamp(1.25rem, 2.5vw, 1.75rem); }

/* ---------- 18. Case study article ---------- */

.case { border-top: 1px solid var(--border-subtle); padding-block: clamp(3.5rem, 7vw, 6rem); }
.case-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  /* Top-aligned by default. Bottom-aligning a one-line heading against a
     five-line paragraph strands the heading at the foot of a tall empty
     column. */
  align-items: start;
}

/* Case-study headers are the exception: an eyebrow + client name against a
   short pull-quote are close enough in height that sitting them on a shared
   baseline reads as deliberate. */
.case .case-top { align-items: end; }
.case h2 { max-width: 14ch; }
.case-pull {
  color: var(--text);
  font-size: clamp(1.125rem, 1.9vw, 1.4375rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.kpi-row {
  display: grid;
  /* Explicit tracks: auto-fit leaves collapsed 0px tracks here, and the 1px
     gap that draws the dividers would render them as stray hairlines. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.kpi {
  background: var(--surface);
  padding: clamp(1.25rem, 2.4vw, 1.75rem);
}
.kpi-val {
  color: var(--text);
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.kpi-key { margin-top: 0.55rem; font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: 0.04em; }

@media (max-width: 860px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 430px) { .kpi-row { grid-template-columns: 1fr; } }

.case-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.case-cols h4 {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.9rem;
}
.case-cols p, .case-cols li { font-size: var(--fs-sm); }
.case-cols ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.45rem; }

/* ---------- 19. Reveal on scroll ---------- */

/* Only hide content once JS has confirmed it will bring it back. Without the
   .js class (script blocked, error before init) everything stays visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--motion-slower) var(--ease),
              transform var(--motion-slower) var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   20. Visual components
   Line icons, the mechanism diagram, comparison bars, the engagement rail
   and client monograms. All drawn in CSS/SVG, no image assets.
   ========================================================================== */

/* ---------- 20.1 Icons ---------- */

.ico {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 26px; height: 26px; }

.split li .ico { margin-top: 2px; }
.split li .ico-yes { color: var(--text); }
.split li .ico-no  { color: var(--text-muted); }

/* Icon badge in a card corner */
.card-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--text);
  margin-bottom: 1.5rem;
  transition: border-color 0.35s var(--ease);
}
.card:hover .card-ico { border-color: var(--border); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.card-head .card-num { margin-bottom: 0; }
.card-head .card-ico { margin-bottom: 0; }

/* ---------- 20.2 Mechanism diagram ---------- */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.flow-node {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease);
}
.flow-node:hover { border-color: var(--border); background: var(--surface-raised); }
.flow-node.is-ours { background: var(--surface-raised); border-color: var(--border); }

.flow-ico { color: var(--text); }
.flow-label {
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.25;
}
.flow-sub { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; }

.flow-arrow {
  align-self: center;
  color: var(--text-muted);
  display: grid;
  place-items: center;
}

/* Bracket marking the two stages the client never touches */
.flow-band {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.flow-band-inner {
  grid-column: 3 / 6;
  border: 1px solid var(--border-subtle);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  padding: 0.7rem 1rem 0.85rem;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.flow-band-inner b { color: var(--text-secondary); font-weight: 500; }

/* Base state first, so the media query below can override it. */
.flow-note-mobile {
  display: none;
  margin-top: 1rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 900px) {
  .flow {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .flow-arrow { transform: rotate(90deg); padding: 0.6rem 0; }
  .flow-band { display: none; }
  .flow-node.is-ours { position: relative; }
  .flow-note-mobile { display: block; }
}

/* ---------- 20.3 Comparison bars ---------- */

.compare {
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 1.75rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface);
}

.cmp-group { display: grid; gap: 0.6rem; }

.cmp-title {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.cmp-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  font-size: var(--fs-sm);
}
.cmp-label { color: var(--text-muted); font-size: var(--fs-xs); letter-spacing: 0.05em; }

.cmp-bar {
  height: 10px;
  border-radius: 100px;
  background: rgba(10, 31, 68, 0.08);
  overflow: hidden;
}
/* The bar's width is set inline in the markup, so its resting state is correct
   with or without JavaScript and carries no transform. The grow-in is a
   keyframe animation, which is purely additive: if it never plays, the bar is
   simply already the right size. A transition from scaleX(0) would instead
   leave the bar invisible whenever it stalled. */
.cmp-bar i {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 100px;
  background: rgba(10, 31, 68, 0.22);
  transform-origin: left center;
}
.cmp-row.is-after .cmp-bar i { background: var(--ink); }
.js .reveal.in .cmp-bar i { animation: barGrow 1.1s var(--ease) both; }

@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal.in .cmp-bar i { animation: none; }
}

.cmp-val {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cmp-row.is-after .cmp-val { color: var(--text); font-weight: 500; }

@media (max-width: 520px) {
  .cmp-row { grid-template-columns: 52px minmax(0, 1fr); }
  .cmp-val { grid-column: 2; justify-self: start; margin-top: -0.2rem; }
}

/* ---------- 20.4 Engagement rail ---------- */

.rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.75rem;
}
.rail::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: linear-gradient(90deg,
    var(--border-subtle), var(--border-strong) 45%, var(--border-strong) 55%, var(--border-subtle));
}
.rail-step { position: relative; text-align: center; }
.rail-step::before {
  content: "";
  position: absolute;
  top: -27px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg);
}
.rail-step.is-paid::before { background: var(--ink); border-color: var(--ink); }
.rail-when {
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.rail-what { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 0.2rem; }

@media (max-width: 640px) {
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 0.5rem; }
  .rail::before { display: none; }
  .rail-step::before { position: static; display: block; margin: 0 auto 0.6rem; }
}

/* ---------- 20.6 Stat icon row ---------- */

.stat-ico {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  transition: color 0.35s var(--ease);
}
.stats > div:hover .stat-ico { color: var(--text-secondary); }

/* Small icon beside a section label */
.case-cols h4,
.ledger-inner h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.h4-ico { display: inline-flex; color: var(--text-muted); }

/* Both of these hold exactly four items, so pin the tracks rather than letting
   auto-fit produce a 3 + 1 orphan row at tablet widths. */
.tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats     { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1023px) {
  .tile-grid, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tile-grid, .stats { grid-template-columns: 1fr; }
}

/* ==========================================================================
   21. Motion system
   Word-by-word headline reveals, the hero word globe, the nebula wash, an
   infinite marquee, a direction-aware header and a press effect on buttons.
   Every one of these is additive: if the script never runs, the page is
   still complete and readable.
   ========================================================================== */

/* ---------- 21.1 Word-by-word headline reveal ---------- */

/* Each word sits in a clipping box and slides up out of it. */
.js [data-words] .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.js [data-words] .word > span {
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  transition: transform var(--motion-slower) var(--ease),
              opacity var(--motion-slower) var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-words].is-visible .word > span {
  transform: none;
  opacity: 1;
}

/* ---------- 21.2 Hero word globe ---------- */

.globe {
  position: absolute;
  top: 50%;
  right: -2%;
  width: min(62vw, 720px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease) 0.25s;
  /* The sphere deliberately overhangs the viewport. Fade its outer ring so the
     overhang reads as depth rather than as words sliced by the crop. */
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 98%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 98%);
}
.globe.is-ready { opacity: 1; }
.globe canvas { width: 100%; height: 100%; display: block; }

@media (max-width: 900px) {
  .globe {
    top: auto;
    bottom: -8%;
    right: 50%;
    width: min(120vw, 620px);
    transform: translateX(50%);
    opacity: 0;
  }
  .globe.is-ready { opacity: 0.55; }
}

/* ---------- 21.3 Nebula wash ---------- */

/* A procedural cloud drawn once to canvas and held at a very low opacity, so
   it reads as texture in the dark rather than as an image. */
.nebula {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.nebula canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
  animation: nebulaDrift 90s ease-in-out infinite alternate;
}
.nebula.is-ready canvas { opacity: 0.09; }

@keyframes nebulaDrift {
  from { transform: scale(1.04) translate3d(-1%, 0.5%, 0); }
  to   { transform: scale(1.14) translate3d(1.5%, -1%, 0); }
}

.impact .wrap, .impact .stats { position: relative; z-index: 1; }

/* ---------- 21.4 Marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: clamp(0.75rem, 1.4vw, 1.25rem);
  animation: marquee 90s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .tile { width: clamp(190px, 20vw, 260px); flex: none; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 21.5 Direction-aware header ---------- */

.site-header {
  transition: transform var(--motion-slow) var(--ease),
              background-color var(--motion-slow) var(--ease),
              border-color var(--motion-slow) var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }

/* ---------- 21.6 Button press ---------- */

/* The visible surface is a pseudo-element, so it can be nudged on press
   without moving the label or affecting layout. */
.btn { position: relative; isolation: isolate; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: inherit;
  border: inherit;
  transition: transform var(--motion-fast) linear;
}
.btn:active::before { transform: scale(0.975); }

/* ---------- 21.7 Hover lifts ---------- */

.tile, .card, .flow-node, .kpi, .quote {
  transition: border-color var(--motion-slow) var(--ease),
              background-color var(--motion-slow) var(--ease),
              transform var(--motion-slow) var(--ease);
}

/* ---------- 21.8 Preloader ---------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: grid;
  place-items: center;
  animation: preloaderOut var(--motion-slower) var(--ease) 0.35s both;
}
.preloader img { width: 34px; height: 34px; object-fit: contain; opacity: 0.9; }
.preloader.is-done { display: none; }

@keyframes preloaderOut {
  to { opacity: 0; visibility: hidden; }
}

/* Without JS there is nothing to wait for, so never cover the page. */
html:not(.js) .preloader { display: none; }

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
  .marquee-track { animation: none; }
  .nebula canvas { animation: none; }
  .js [data-words] .word > span { transform: none; opacity: 1; transition: none; }
  .globe { transition: none; }
  .site-header.is-hidden { transform: none; }
}

/* ==========================================================================
   22. Interactive components
   A cost calculator, a tab pattern for the method and the case studies, and
   a fit checker. Each one replaces a block of prose with something the
   visitor does, and each degrades to readable content without JavaScript.
   ========================================================================== */

/* ---------- 22.1 Tabs ---------- */

.tabs {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.tab-list {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--border-subtle);
}

.tab {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: clamp(0.85rem, 1.6vw, 1.15rem) 0;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.25;
  transition: color var(--motion-medium) var(--ease);
  min-height: 44px;
}
.tab:hover { color: var(--text-secondary); }
.tab[aria-selected="true"] { color: var(--text); }

.tab-num {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 400;
}
.tab[aria-selected="true"] .tab-num { color: var(--text); }

.tab-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--motion-medium) var(--ease),
              transform var(--motion-medium) var(--ease);
}
.tab[aria-selected="true"] .tab-arrow { opacity: 1; transform: none; }

.tab-panels { position: relative; min-height: 1px; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.js .tab-panel.is-active { animation: panelIn var(--motion-slower) var(--ease) both; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.tab-panel h3 {
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  margin-bottom: 1rem;
}
.tab-panel p { font-size: var(--fs-sm); max-width: 56ch; }

@media (max-width: 860px) {
  .tabs { grid-template-columns: 1fr; gap: 1.75rem; }
  .tab-list { display: flex; overflow-x: auto; gap: 0.5rem; border-top: 0;
              scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px; }
  .tab-list::-webkit-scrollbar { display: none; }
  .tab {
    flex: none;
    grid-template-columns: auto;
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    padding: 0.6rem 1rem;
    font-size: var(--fs-sm);
    white-space: nowrap;
  }
  .tab[aria-selected="true"] { border-color: var(--border-strong); background: var(--surface); }
  .tab-num, .tab-arrow { display: none; }
}

/* ---------- 22.2 Cost calculator ---------- */

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.calc-controls { display: grid; gap: clamp(1.5rem, 3vw, 2rem); }
.calc-field { display: grid; gap: 0.85rem; }

.calc-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.calc-label b {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Range input, restyled in both engines */
.calc input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  /* 44px tall so the drag target meets the minimum; the visible track stays
     4px and the browser centres it inside the taller box. */
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.calc input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 100px;
  background: linear-gradient(to right, var(--ink) var(--fill, 40%),
                              rgba(10, 31, 68, 0.12) var(--fill, 40%));
}
.calc input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 100px;
  background: rgba(10, 31, 68, 0.12);
}
.calc input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 100px;
  background: var(--ink);
}
.calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border);
  transition: transform var(--motion-fast) var(--ease);
}
.calc input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--border);
}
.calc input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.calc input[type="range"]:focus-visible { outline: none; }
.calc input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 2px var(--ink);
}

/* Segmented control */
.seg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg);
}
.seg button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 0.4rem;
  border-radius: 9px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
  transition: color var(--motion-fast) var(--ease),
              background-color var(--motion-fast) var(--ease);
}
.seg button:hover { color: var(--text-secondary); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--text-inverse); }

/* Result */
.calc-out { text-align: left; }
.calc-out-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.calc-figure {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.calc-sub { margin-top: 1rem; font-size: var(--fs-sm); color: var(--text-secondary); max-width: 34ch; }
.calc-sub b { color: var(--text); font-weight: 500; }
.calc-note { margin-top: 1.25rem; font-size: var(--fs-xs); color: var(--text-muted); max-width: 36ch; }

@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 22.3 Fit checker ---------- */

.fitcheck {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.fit-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(1.75rem, 3vw, 2.25rem); }

.fit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.05rem;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: left;
  transition: border-color var(--motion-fast) var(--ease),
              background-color var(--motion-fast) var(--ease),
              color var(--motion-fast) var(--ease);
}
.fit-chip:hover { border-color: var(--border); color: var(--text); }
.fit-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--text-inverse);
}
.fit-chip .ico { width: 15px; height: 15px; opacity: 0.45; transition: opacity var(--motion-fast) var(--ease); }
.fit-chip[aria-pressed="true"] .ico { opacity: 1; }

.fit-verdict { border-top: 1px solid var(--border-subtle); padding-top: clamp(1.5rem, 3vw, 2rem); }
.fit-score {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}
.fit-title {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.024em;
  line-height: 1.2;
  margin-bottom: 0.7rem;
}
.fit-body { font-size: var(--fs-sm); max-width: 58ch; }

/* ---------- 22.4 Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .tab-panel.is-active { animation: none; }
}

/* Visually hidden, still announced by screen readers. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Horizontal variant: tab list on top, panels full width. Used where the
   panel content is wide (case studies) rather than a short definition. */
.tabs--top { grid-template-columns: 1fr; gap: clamp(2rem, 4vw, 3rem); }
.tabs--top .tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 0;
  border-bottom: 1px solid var(--border-subtle);
}
.tabs--top .tab {
  width: auto;
  flex: none;
  grid-template-columns: auto auto;
  gap: 0.6rem;
  padding: 0 clamp(0.9rem, 2vw, 1.4rem) 1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs--top .tab:first-child { padding-left: 0; }
.tabs--top .tab[aria-selected="true"] { border-bottom-color: var(--ink); }
.tabs--top .tab-arrow { display: none; }

@media (max-width: 860px) {
  .tabs--top .tab-list { flex-wrap: nowrap; overflow-x: auto; border-bottom: 1px solid var(--border-subtle); }
  .tabs--top .tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0;
                    background: none; padding: 0 1rem 0.85rem; }
  .tabs--top .tab:first-child { padding-left: 0; }
  .tabs--top .tab[aria-selected="true"] { background: none; border-bottom-color: var(--ink); }
}

/* ---------- 22.5 Step accordion ---------- */

/* The method page keeps every word, but collapsed, so the page can be scanned
   in six lines and read in full on demand. */
.steps[data-accordion] .step { display: block; padding: 0; }

.step-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 16px;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  width: 100%;
  padding: clamp(1.25rem, 2.4vw, 1.75rem) 0;
  text-align: left;
  color: var(--text);
  transition: color var(--motion-medium) var(--ease);
}
.step-head:hover { color: var(--text-secondary); }
.step-head h3 { font-size: var(--fs-h3); }
.step-head .step-num { padding-top: 0; }

.step-body-wrap > div { overflow: hidden; }

.step-head .faq-icon { justify-self: end; }

.steps[data-accordion] .step-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  padding: 0 0 clamp(1.5rem, 3vw, 2rem) calc(56px + clamp(0.75rem, 2vw, 1.5rem));
  max-width: none;
}

/* The header row spans the full width, so prose alone left half of it empty.
   Every rule now carries a figure in a second column, which fills the row and
   gives the space something to do. */
@media (min-width: 900px) {
  .steps[data-accordion] .step-body {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
  /* The prose is one block and the figure is another, so the two sit side by
     side as whole columns. Placing the figure into a shared row instead makes
     a tall figure stretch that row and push the next paragraph down the page. */
  .steps[data-accordion] .step-prose { grid-column: 1; }
  .steps[data-accordion] .step-body > .rule-fig {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
}

/* On narrow screens the figure follows the prose rather than sitting beside it. */
.rule-fig { margin: 1.25rem 0 0; }
@media (min-width: 900px) { .rule-fig { margin: 0; } }

@media (max-width: 700px) {
  .step-head { grid-template-columns: 34px minmax(0, 1fr) 16px; }
  .steps[data-accordion] .step-body { padding-left: 0; }
}

/* ---------- 22.6 Collapsed panels leave the tab order ---------- */

/* Clipping with overflow alone keeps the content in the accessibility tree and
   in the tab order, so a keyboard user can land on links they cannot see.
   visibility:hidden removes it from both. The delay lets the height finish
   animating on close, and is dropped on open so nothing flashes in late. */
.ledger-body > div,
.faq-a > div,
.step-body-wrap > div {
  visibility: hidden;
  transition: visibility 0s linear var(--motion-slower);
}
.ledger-head[aria-expanded="true"] + .ledger-body > div,
.faq-q[aria-expanded="true"] + .faq-a > div,
.step-head[aria-expanded="true"] + .step-body-wrap > div {
  visibility: visible;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .ledger-body > div,
  .faq-a > div,
  .step-body-wrap > div { transition: none; }
}

/* Honeypot. Off-screen rather than display:none, since some bots skip
   fields that are explicitly hidden. */
.hp{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}

/* ==========================================================================
   23. Methodology disclosure
   A native <details>, so the workings are one click away, need no script,
   and are readable by anything that can read the page at all.
   ========================================================================== */

.disclose {
  max-width: var(--max-w-text);
  margin-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--border-subtle);
}

.disclose > summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color var(--motion-fast) var(--ease);
}
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--motion-medium) var(--ease);
}
.disclose[open] > summary::before { transform: rotate(-135deg) translate(-2px, -2px); }
.disclose > summary:hover { color: var(--ink-hover); }

.disclose-body { padding-bottom: 1.75rem; }
.disclose-body p { font-size: var(--fs-sm); }
.disclose-body b { color: var(--text); font-weight: 500; }

.disclose-src { color: var(--text-muted); font-size: var(--fs-xs) !important; line-height: 1.65; }
.disclose-src .link { font-size: inherit; }

.table-scroll { overflow-x: auto; }

.src-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.5rem;
  font-size: var(--fs-xs);
}
.src-table th,
.src-table td {
  text-align: left;
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.src-table thead th {
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.src-table td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
.src-table td:last-child { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.src-table td:nth-child(3) { font-variant-numeric: tabular-nums; white-space: nowrap; }


/* ==========================================================================
   24. Measure
   Prose caps at ~70 characters. Stated as a default with exceptions rather
   than an enumerated selector list, so a paragraph added later is capped
   without anyone remembering to come back here.

   32em is the number: an average character of running prose in DM Sans is
   ~0.45em, so 32em is ~71 characters at any font size. `ch` is the wrong
   unit for this, since 1ch (the width of "0") is 0.685em, and a 62ch cap
   rendered at ~92 characters.
   ========================================================================== */

main :is(p, li, blockquote, dd):not(.eyebrow):not(.form-status):not(.flow-note-mobile),
.footer-brand p {
  max-width: 32em;
}

/* Full-bleed exceptions: these are layout, not prose. */
.eyebrow,
.marquee li,
.seg li { max-width: none; }

/* Centred blocks keep their centring while gaining the cap. */
.center p, .cta-band .lead, .impact .lead, .flow-note-mobile { margin-inline: auto; }

/* A link sitting on its own line is a control, not inline text, so it takes
   the 44px target. Links inside a sentence are exempt under WCAG 2.5.8. */
.link-block {
  min-height: 44px;
  align-items: center;
}

/* The 404 headline is an h1 for structure but sits in a CTA band, so it keeps
   the band's visual scale rather than the page-hero one. */
.cta-band h1 { font-size: var(--fs-h1); max-width: 18ch; margin-inline: auto; }

/* Links in the footer's bottom rule get the same target as the column links. */
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ==========================================================================
   25. Rule figures
   One component, six variants. Each expanded rule gets a small schematic in
   the right column instead of a pull-quote, so the space carries the idea
   rather than repeating the prose.

   Built from divs rather than SVG: every shape here is a rectangle, a circle
   or a line, and divs animate more cheaply and read more clearly in markup.
   The animation is gated on the accordion's own aria-expanded state, so it
   replays each time a rule opens and needs no JavaScript.
   ========================================================================== */

.rule-fig {
  display: grid;
  gap: 1.15rem;
  align-content: center;
  min-height: 190px;
  padding: clamp(1.25rem, 2.4vw, 1.6rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface);
}

.rule-fig-cap {
  max-width: none !important;
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---- Animation gate ------------------------------------------------------
   Parts rest in their "before" state and settle when the rule is open. */
.rule-fig [data-p] {
  opacity: 0;
  transition: opacity var(--motion-slow) var(--ease),
              transform var(--motion-slow) var(--ease),
              width var(--motion-slower) var(--ease);
  transition-delay: var(--d, 0ms);
}
.step-head[aria-expanded="true"] + .step-body-wrap .rule-fig [data-p] { opacity: 1; }

/* ---- 01 Many complaints in, one outcome out ---- */
.fig-outcome .fo { display: flex; align-items: center; gap: 0.9rem; }
.fig-outcome .fo-cluster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  flex: none;
}
.fig-outcome .fo-cluster i {
  width: 11px; height: 11px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  transform: scale(0.4);
}
.step-head[aria-expanded="true"] + .step-body-wrap .fig-outcome .fo-cluster i { transform: scale(1); }

.fig-outcome .fo-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transform-origin: left;
}
.step-head[aria-expanded="true"] + .step-body-wrap .fig-outcome .fo-line { transform: scaleX(1); }

.fig-outcome .fo-target {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  transform: scale(0.5);
}
.fig-outcome .fo-target span {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--ink);
}
.step-head[aria-expanded="true"] + .step-body-wrap .fig-outcome .fo-target { transform: scale(1); }

/* ---- 02 Two processes running in parallel, then the invoice ---- */
.fig-parallel .fp { display: grid; gap: 0.85rem; }
.fig-parallel .fp-row { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 0.75rem; }
.fig-parallel .fp-lab { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.fig-parallel .fp-track { height: 8px; border-radius: 100px; background: rgba(10, 31, 68, 0.07); overflow: hidden; }
.fig-parallel .fp-track i { display: block; height: 100%; width: 0; border-radius: 100px; background: var(--ink); }
.fig-parallel .fp-track.is-ours i { background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 11px); }
.step-head[aria-expanded="true"] + .step-body-wrap .fig-parallel .fp-track i { width: 100%; }

.fig-parallel .fp-foot {
  display: grid; grid-template-columns: 52px 1fr; gap: 0.75rem; align-items: center;
  font-size: 11px; letter-spacing: 0.05em; color: var(--text-muted);
}
.fig-parallel .fp-split { position: relative; height: 22px; }
.fig-parallel .fp-split::before {
  content: ""; position: absolute; left: 62%; top: 0; bottom: 9px;
  border-left: 1px dashed var(--border-strong);
}
.fig-parallel .fp-split span { position: absolute; left: 62%; bottom: -2px; transform: translateX(-50%); white-space: nowrap; }

/* ---- 03 A price per unit, multiplied ---- */
.fig-unit .fu { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.fig-unit .fu i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--ink);
  transform: scale(0.3);
}
.fig-unit .fu i:nth-child(n + 13) { background: rgba(10, 31, 68, 0.16); }
.step-head[aria-expanded="true"] + .step-body-wrap .fig-unit .fu i { transform: scale(1); }

/* ---- 04 Twelve months, an exit under every one ---- */
.fig-months .fm { display: flex; align-items: flex-end; gap: 5px; height: 62px; }
.fig-months .fm i {
  flex: 1;
  height: 100%;
  border-radius: 3px;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
}
.step-head[aria-expanded="true"] + .step-body-wrap .fig-months .fm i { transform: scaleY(1); }
.fig-months .fm-exit {
  margin-top: 8px;
  border-top: 1px dashed var(--border-strong);
  transform: scaleX(0);
  transform-origin: left;
}
.step-head[aria-expanded="true"] + .step-body-wrap .fig-months .fm-exit { transform: scaleX(1); }

/* ---- 05 The boundary: your systems, our middle ---- */
.fig-boundary .fb { display: flex; align-items: center; gap: 8px; }
.fig-boundary .fb-node {
  flex: none; width: 34px; height: 44px;
  border: 1.5px solid var(--border-strong);
  border-radius: 7px;
  transform: translateY(6px);
}
.fig-boundary .fb-ours {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px;
  border: 1.5px dashed var(--ink);
  border-radius: 10px;
}
.fig-boundary .fb-ours i { width: 26px; height: 30px; border-radius: 5px; background: var(--ink); transform: scale(0.4); }
.fig-boundary .fb-arrow { flex: none; width: 14px; height: 1.5px; background: var(--border-strong); transform: scaleX(0); transform-origin: left; }
.step-head[aria-expanded="true"] + .step-body-wrap .fig-boundary .fb-node { transform: none; }
.step-head[aria-expanded="true"] + .step-body-wrap .fig-boundary .fb-ours i { transform: scale(1); }
.step-head[aria-expanded="true"] + .step-body-wrap .fig-boundary .fb-arrow { transform: scaleX(1); }

/* ---- 06 Jargon struck out, plain words left standing ---- */
.fig-plain .fpl { display: grid; gap: 1.1rem; }
.fig-plain .fpl-group { display: flex; flex-wrap: wrap; gap: 7px; }
.fig-plain .fpl-group i {
  position: relative;
  height: 11px;
  border-radius: 3px;
  background: rgba(10, 31, 68, 0.16);
}
.fig-plain .is-jargon i::after {
  content: "";
  position: absolute; left: 0; top: 50%;
  height: 1.5px; width: 0;
  background: var(--ink);
  transition: width var(--motion-slower) var(--ease);
  transition-delay: var(--d, 0ms);
}
.step-head[aria-expanded="true"] + .step-body-wrap .fig-plain .is-jargon i::after { width: 100%; }
.fig-plain .is-plain i { background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .rule-fig [data-p],
  .rule-fig [data-p] * { transition: none !important; }
  .rule-fig [data-p] { opacity: 1 !important; transform: none !important; }
  .fig-parallel .fp-track i { width: 100% !important; }
  .fig-plain .is-jargon i::after { width: 100% !important; transition: none !important; }
}

/* ==========================================================================
   26. Collapsible panels
   Work ledger, FAQ and method rules all collapse through this one rule.

   `grid-template-rows: 0fr -> 1fr` animates to the exact content height with
   no magic number and no JavaScript. Firefox only began animating it in 129;
   older versions open instantly instead, which is fine.

   Gated on `.js` so a page whose script fails to load never collapses a panel
   it has no way to reopen.
   ========================================================================== */

.ledger-body,
.faq-a,
.step-body-wrap { display: grid; }

.ledger-body > div,
.faq-a > div,
.step-body-wrap > div { overflow: hidden; }

.js .ledger-body,
.js .faq-a,
.js .step-body-wrap {
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--motion-slower) var(--ease);
}

.js .ledger-head[aria-expanded="true"] + .ledger-body,
.js .faq-q[aria-expanded="true"] + .faq-a,
.js .step-head[aria-expanded="true"] + .step-body-wrap { grid-template-rows: 1fr; }

@media (prefers-reduced-motion: reduce) {
  .js .ledger-body, .js .faq-a, .js .step-body-wrap { transition: none; }
}

/* Prose block inside an expanded rule. */
.step-prose > p + p { margin-top: 1.15em; }
.step-prose > p:last-child { margin-bottom: 0; }
