/* ondynamics.com: site styles (rebuild, October 2026). */

@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #f6f5f2;
  --paper-2: #efede8;
  --ink: #121212;
  --ink-2: #4c4c4f;
  --mute: #6b6b67; /* small text, 4.6:1 on paper */
  --cont: #8b8b87; /* large text only, 3.2:1 on paper */
  --line: rgba(18, 18, 18, 0.12);
  --line-strong: rgba(18, 18, 18, 0.22);
  --dark: #0f1011;
  --dark-2: #18191b;
  --on-dark: #f2f1ee;
  --on-dark-mute: #8f8f8b;
  --line-dark: rgba(242, 241, 238, 0.14);

  --accent: #d4472a;        /* large type, marks, dots */
  --accent-ink: #b5371c;    /* small text on paper, 5.4:1 */
  --accent-on-dark: #ff7d5e;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --header: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}


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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- type ---------- */

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.label::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}
.label.plain::before { display: none; }

.display {
  font-size: clamp(3rem, 7.4vw, 7.6rem);
  line-height: 0.95;
  letter-spacing: -0.048em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(2.2rem, 4.6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0;
}
.cont { color: var(--cont); }
.acc { color: var(--accent); }
.lede { font-size: clamp(1.1rem, 1.4vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 36ch; margin: 0; }

[data-theme="dark"] { background: var(--dark); color: var(--on-dark); }
[data-theme="dark"] .cont,
[data-theme="dark"] .label { color: var(--on-dark-mute); }
[data-theme="dark"] .lede { color: #c9c8c3; }
[data-theme="dark"] .acc { color: var(--accent-on-dark); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 22px 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn:active { transform: scale(0.98); }
[data-theme="dark"] .btn { background: var(--on-dark); color: var(--dark); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  font-weight: 500;
}
.link svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.link:hover svg { transform: translateX(3px); }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header);
  color: var(--ink);
  transition: color 0.45s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  transition: background 0.45s var(--ease), border-color 0.45s;
}
.site-header.is-top::before { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header.on-dark { color: var(--on-dark); }
.site-header.on-dark::before { background: color-mix(in srgb, var(--dark) 90%, transparent); border-color: var(--line-dark); }
.site-header.on-dark.is-top::before { background: transparent; border-color: transparent; }
.site-header.menu-open::before,
.site-header.menu-open.is-top::before,
.site-header.menu-open.on-dark::before { background: var(--paper); border-color: var(--line); -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header.menu-open,
.site-header.menu-open.on-dark { color: var(--ink); }
.site-header.menu-open .nav-cta { background: var(--ink); color: var(--paper); }

.nav {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.02em; font-size: 1.12rem; }
.brand .mark { width: 24px; height: 24px; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding: 0; }
.nav-item > a,
.nav-item > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.25s;
}
.nav-item > button svg { width: 10px; height: 10px; transition: transform 0.3s var(--ease); }
.nav-item > a:hover,
.nav-item > button:hover,
.nav-item > button[aria-expanded="true"] { background: color-mix(in srgb, currentColor 8%, transparent); }
.nav-item > button[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-cta { height: 40px; padding: 0 18px; font-size: 0.95rem; }
.site-header.on-dark:not(.menu-open) .nav-cta { background: var(--on-dark); color: var(--dark); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; margin: 5px auto; background: currentColor; transition: transform 0.3s var(--ease); }

/* mega menu */
.mega {
  position: fixed;
  top: var(--header);
  left: 0;
  right: 0;
  z-index: 49;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.28s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.28s var(--ease), transform 0.35s var(--ease); }
.mega-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: 36px var(--gutter) 40px;
  display: grid;
  grid-template-columns: 1fr 1fr minmax(320px, 400px);
  gap: 0;
}
.mega-col { padding-right: 32px; margin-right: 32px; border-right: 1px solid var(--line); }
.mega-col:nth-last-child(2) { border-right: 0; }
.mega-col h3 { font-family: var(--mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--mute); margin: 0 0 18px; }
.mega-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mega-col a { display: block; padding: 7px 0; text-decoration: none; font-size: 1.05rem; letter-spacing: -0.01em; transition: color 0.2s, transform 0.3s var(--ease); }
.mega-col a small { display: block; color: var(--mute); font-size: 0.82rem; letter-spacing: 0; margin-top: 1px; }
.mega-col a:hover, .mega-col a[aria-current] { color: var(--accent-ink); transform: translateX(3px); }
.feature {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 20px;
  align-items: end;
  padding: 22px;
  border-radius: 6px;
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 34%, #1a1210) 0%, #0e1012 70%);
  color: var(--on-dark);
  text-decoration: none;
  min-height: 220px;
  overflow: hidden;
}
.feature img { border-radius: 2px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); transform: rotate(-4deg) translateY(6px); transition: transform 0.5s var(--ease); }
.feature:hover img { transform: rotate(0) translateY(0); }
.feature .label { color: #d9c4bd; }
.feature strong { display: block; font-weight: 500; font-size: 1.15rem; letter-spacing: -0.02em; line-height: 1.2; margin: 10px 0 12px; }
.feature span.more { font-size: 0.9rem; color: #e4dcd8; }
.feature.quote { grid-template-columns: 1fr; align-items: start; }
.feature.quote q { font-size: 1.2rem; line-height: 1.35; letter-spacing: -0.02em; quotes: "\201C" "\201D"; }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(18, 18, 18, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.scrim.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }

.sheet { display: none; }

/* ---------- fixed form canvas ---------- */

#form-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
section,
footer { position: relative; }

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header) + 6vh);
  overflow: hidden;
}
.hero .wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 7vh; }
.hero-name { font-size: clamp(1.15rem, 1.6vw, 1.5rem); letter-spacing: -0.02em; margin: 0 0 28px; font-weight: 500; }
.hero .display { max-width: 11.5ch; }
.hero .lede { margin-top: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 40px; }

.hero-light { background: radial-gradient(70% 80% at 78% 40%, #fbfaf8 0%, var(--paper) 60%); }
.hero-dark { background: #0d0e0f url("../img/hero-dark-bg.webp") center / cover no-repeat; }
@media (max-width: 900px) { .hero-dark { background-image: url("../img/hero-dark-bg-m.webp"); background-position: left top; } }
.hero-dark .display { font-weight: 400; letter-spacing: -0.04em; }

/* ticker */
.ticker {
  position: relative;
  z-index: 2;
  border-top: 1px dashed var(--line-strong);
  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);
}
[data-theme="dark"] .ticker { border-color: var(--line-dark); }
.ticker-track { display: flex; width: max-content; animation: tick 60s linear infinite; }
.ticker-track span {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 18px 26px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 52px;
}
.ticker-track span::after { content: "/"; color: var(--mute); }
@keyframes tick { to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---------- proof row ---------- */

.proof { padding: 120px 0 140px; }
.proof-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
}
.proof-cell { position: relative; padding: 40px 28px 36px; border-right: 1px dashed var(--line-strong); }
.proof-cell:last-child { border-right: 0; }
.proof-cell b { display: block; font-size: clamp(2.6rem, 4.4vw, 4.2rem); font-weight: 400; letter-spacing: -0.05em; line-height: 1; }
.proof-cell p { margin: 14px 0 0; color: var(--ink-2); font-size: 0.95rem; line-height: 1.4; max-width: 22ch; }
.cross { position: absolute; width: 17px; height: 17px; pointer-events: none; }
.cross::before,
.cross::after { content: ""; position: absolute; background: var(--ink); }
.cross::before { left: 8px; top: 0; width: 1px; height: 17px; }
.cross::after { top: 8px; left: 0; height: 1px; width: 17px; }
.cross.tl { top: -9px; left: -9px; }
.cross.tr { top: -9px; right: -9px; }
.cross.bl { bottom: -9px; left: -9px; }
.cross.br { bottom: -9px; right: -9px; }

.section-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-bottom: 64px; }
.section-head .lede { justify-self: end; }

/* ---------- services stage (scroll-driven) ---------- */

.services { height: 340vh; transition: background 0.8s var(--ease); }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.stage-grid { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.stage-intro { position: absolute; z-index: 2; top: calc(var(--header) + 36px); left: 0; right: 0; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); display: flex; justify-content: space-between; align-items: baseline; }
.stage-count { font-family: var(--mono); font-size: 0.8rem; color: var(--mute); letter-spacing: 0.06em; }
.svc-list { position: relative; min-height: 420px; }
.svc {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
  pointer-events: none;
}
.svc.is-active { opacity: 1; transform: none; pointer-events: auto; }
.svc.is-past { transform: translateY(-24px); }
.svc .link { align-self: flex-start; }
.svc .num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-ink); letter-spacing: 0.06em; margin-bottom: 18px; }
.svc .h2 { max-width: 12ch; }
.svc p { margin: 22px 0 0; max-width: 40ch; color: var(--ink-2); font-size: 1.15rem; }
.pills { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 26px 0 30px; padding: 0; list-style: none; }
.pills li { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.pills li:not(:last-child)::after { content: "·"; margin: 0 6px 0 10px; color: var(--mute); }
[data-theme="dark"] .pills li { color: #c3c2bd; }
.svc-rail { position: absolute; z-index: 2; left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); bottom: 36px; display: flex; gap: 6px; }
.svc-rail button { position: relative; width: 28px; height: 14px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.svc-rail button::before { content: ""; position: absolute; left: 0; top: 5.5px; width: 100%; height: 3px; background: var(--line-strong); transform-origin: left; transition: transform 0.4s var(--ease), background 0.4s; }
.svc-rail button.is-active::before { transform: scaleX(1.6); background: var(--ink); }
.svc-rail button.is-active { margin-right: 17px; }
.svc-caption { position: absolute; z-index: 2; right: calc(var(--gutter) + 88px); bottom: 32px; font-family: var(--mono); font-size: 0.72rem; color: var(--mute); letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------- selected work ---------- */

.work { padding: 140px 0 80px; transition: background 0.9s var(--ease); background: var(--tint-bg, var(--paper)); }
.work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  padding: 72px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.work-row:last-child { border-bottom: 1px solid var(--line); }
.stat { font-size: clamp(4.5rem, 10vw, 10rem); line-height: 0.85; letter-spacing: -0.06em; font-weight: 400; color: var(--accent); margin: 0; }
.stat-note { margin: 18px 0 0; color: var(--ink-2); max-width: 30ch; font-size: 0.98rem; }
.work-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.work-row .h3 { max-width: 18ch; }
.work-row p.desc { margin: 18px 0 0; color: var(--ink-2); max-width: 46ch; }

/* ---------- method (dark band) ---------- */

.method { padding: 140px 0 150px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 80px; border-top: 1px solid var(--line-dark); }
.step { position: relative; padding: 32px 28px 0 0; }
.step::before { content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%; background: var(--accent-on-dark); transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease); }
.method.is-in .step::before { transform: scaleX(1); }
.method.is-in .step:nth-child(2)::before { transition-delay: 0.25s; }
.method.is-in .step:nth-child(3)::before { transition-delay: 0.5s; }
.method.is-in .step:nth-child(4)::before { transition-delay: 0.75s; }
.step .label { margin-bottom: 26px; }
.step h3 { font-size: 1.55rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 14px; }
.step p { margin: 0; color: #b5b4af; font-size: 0.98rem; max-width: 28ch; }

/* ---------- books ---------- */

.books { padding: 150px 0; }
.books-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.shelf { display: flex; align-items: flex-end; gap: clamp(18px, 3vw, 44px); perspective: 1400px; }
.cover {
  position: relative;
  flex: 0 0 auto;
  width: var(--w, 200px);
  transform: rotateY(var(--ry, -18deg)) rotateX(2deg);
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease);
  text-decoration: none;
}
.cover img { width: 100%; border-radius: 2px 4px 4px 2px; box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4) inset, 24px 34px 50px -12px rgba(18, 18, 18, 0.38); }
.cover::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 7%; background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.12) 60%, transparent); border-radius: 2px 0 0 2px; }
.cover:hover { transform: rotateY(0) rotateX(0) translateY(-6px); }
.cover-cap { margin-top: 18px; font-size: 0.86rem; color: var(--ink-2); line-height: 1.35; }
.cover-cap .label { display: flex; margin-bottom: 6px; }

/* ---------- labs (dark band) ---------- */

.labs { padding: 150px 0; min-height: 100svh; }
.labs blockquote { margin: 40px 0 0; max-width: 20ch; }
.labs-list { margin-top: 100px; border-top: 1px solid var(--line-dark); max-width: 52%; }
.lab { display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--line-dark); text-decoration: none; }
.lab > * { transition: transform 0.4s var(--ease); }
.lab:hover > * { transform: translateX(10px); }
.lab h3 { margin: 0; font-size: 1.6rem; font-weight: 500; letter-spacing: -0.03em; }
.lab p { margin: 8px 0 0; color: #b5b4af; font-size: 0.98rem; }
.lab svg { width: 18px; height: 18px; }

/* ---------- insights ---------- */

.insights { padding: 150px 0 110px; }
.post { display: grid; grid-template-columns: 160px 1fr 200px 24px; gap: 24px; align-items: baseline; padding: 30px 0; border-top: 1px solid var(--line); text-decoration: none; transition: color 0.25s; }
.post:last-child { border-bottom: 1px solid var(--line); }
.post h3 { margin: 0; font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.2; }
.post .tag { color: var(--mute); font-size: 0.9rem; }
.post svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.post:hover { color: var(--accent-ink); }
.post:hover svg { transform: translate(3px, -3px); }

/* ---------- close ---------- */

.close { padding: 170px 0 190px; min-height: 92svh; display: flex; align-items: center; }
.close .display { max-width: 10ch; }
.close .hero-actions { margin-top: 48px; }

/* ---------- footer ---------- */

.site-footer { padding: 72px 0 40px; border-top: 1px solid var(--line-dark); }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.foot .foot-h { font-family: var(--mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--on-dark-mute); margin: 0 0 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; color: #d9d8d3; }
.foot a:hover { color: var(--on-dark); }
.foot p { color: var(--on-dark-mute); margin: 16px 0 0; max-width: 30ch; font-size: 0.95rem; }
.foot-base { display: flex; justify-content: space-between; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line-dark); font-family: var(--mono); font-size: 0.72rem; color: var(--on-dark-mute); letter-spacing: 0.05em; text-transform: uppercase; }

/* ---------- reveal ---------- */

.rv { opacity: 0; transform: translateY(12px); transition: opacity 0.55s var(--ease), transform 0.6s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.05s; }
.rv.d2 { transition-delay: 0.1s; }
.rv.d3 { transition-delay: 0.15s; }

/* ---------- assistant ---------- */

.orb-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
}
.orb {
  position: absolute;
  inset: 0;
  border-radius: 48% 52% 55% 45% / 50% 45% 55% 50%;
  background:
    radial-gradient(40% 40% at 32% 28%, rgba(255, 255, 255, 0.95) 0%, transparent 100%),
    radial-gradient(60% 60% at 72% 70%, color-mix(in srgb, var(--accent) 80%, #6b4dff) 0%, transparent 100%),
    radial-gradient(80% 80% at 50% 50%, var(--accent) 0%, color-mix(in srgb, var(--accent) 45%, #9fd8ff) 60%, #e3f1ff 100%);
  box-shadow: 0 10px 30px -6px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 0 14px rgba(255, 255, 255, 0.55);
  animation: breathe 9s ease-in-out infinite, turn 24s linear infinite;
}
@keyframes breathe {
  0%, 100% { border-radius: 48% 52% 55% 45% / 50% 45% 55% 50%; }
  50% { border-radius: 55% 45% 48% 52% / 45% 55% 50% 50%; }
}
@keyframes turn { to { transform: rotate(360deg); } }
.orb-hint {
  position: fixed;
  right: 92px;
  bottom: 34px;
  z-index: 60;
  max-width: 230px;
  padding: 10px 14px;
  border-radius: 12px 12px 4px 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.86rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.orb-hint.is-shown { opacity: 1; transform: none; }
:root[data-hero="dark"] .orb-hint { background: var(--on-dark); color: var(--dark); }

.assistant {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}
.assistant.is-open { opacity: 1; visibility: visible; transition: opacity 0.45s var(--ease); }
.as-col { display: flex; flex-direction: column; justify-content: flex-end; padding: 96px var(--gutter) 56px; max-width: 680px; }
.as-log { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: 52vh; padding-right: 8px; }
.msg { max-width: 46ch; padding: 12px 16px; border-radius: 14px; font-size: 1rem; line-height: 1.45; animation: rise 0.5s var(--ease); }
.msg.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; align-self: flex-end; }
.msg a { color: var(--accent-ink); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 16px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: 0.88rem; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.chip:hover,
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.as-input { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 20px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 40px -18px color-mix(in srgb, var(--accent) 60%, transparent); }
.as-input input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; height: 44px; }
.as-input button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; }
.as-input button svg { width: 16px; height: 16px; }
.as-note { margin: 14px 0 0; font-size: 0.8rem; color: var(--mute); }
.as-orb-wrap { display: grid; place-items: center; }
.as-orb { position: relative; width: min(38vw, 520px); aspect-ratio: 1; }
.as-orb .orb { filter: blur(10px) saturate(1.1); animation-duration: 11s, 40s; opacity: 0.9; }
.as-orb .orb.o2 { inset: 14%; filter: blur(26px); opacity: 0.55; animation-duration: 15s, 30s; animation-direction: reverse; mix-blend-mode: multiply; }
.as-close { position: absolute; top: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }
.as-close svg { width: 14px; height: 14px; }

/* ---------- contact page ---------- */

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100svh; }
.contact-art { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.contact-art canvas { width: 100%; height: 100%; display: block; }
.contact-art .art-cap { position: absolute; left: var(--gutter); bottom: 32px; z-index: 2; }
.contact-form { padding: calc(var(--header) + 72px) var(--gutter) 96px; max-width: 760px; }
.contact-form .display { font-size: clamp(3rem, 6vw, 6rem); }
.field-group { margin-top: 48px; border-top: 1px solid var(--line-strong); padding-top: 22px; display: grid; grid-template-columns: 190px 1fr; gap: 24px; }
.field-group > span { font-weight: 500; }
.fields { display: grid; gap: 16px; margin-top: 48px; }
.fields label { display: grid; gap: 6px; font-size: 0.9rem; color: var(--ink-2); }
.fields input,
.fields textarea { font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); padding: 10px 0; outline: 0; transition: border-color 0.2s; }
.fields input:focus,
.fields textarea:focus { border-color: var(--accent); }
.fields textarea { min-height: 120px; resize: vertical; }
.direct { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px dashed var(--line-strong); padding-top: 26px; }
.direct a { text-decoration: none; font-weight: 500; }
.direct span { display: block; font-size: 0.85rem; color: var(--mute); margin-bottom: 6px; }
.proto-note { margin-top: 18px; font-size: 0.8rem; color: var(--mute); }

/* ---------- page transitions (light, script-driven) ---------- */

main, .site-footer { animation: page-in 0.6s var(--ease) backwards; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }
body.leaving main, body.leaving .site-footer { opacity: 0; transform: translateY(-8px); transition: opacity 0.22s ease, transform 0.22s ease; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .mega-inner { grid-template-columns: 1fr 1fr; }
  .mega-inner .feature { display: none; }
  .mega-col:nth-last-child(2) { border-right: 0; }
}

@media (max-width: 900px) {
  :root { --header: 60px; }
  .nav-list,
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open .nav-toggle span:first-child { transform: translateY(3px) rotate(45deg); }
  .nav.is-open .nav-toggle span:last-child { transform: translateY(-3px) rotate(-45deg); }
  .mega { display: none; }
  .sheet {
    display: block;
    position: fixed;
    inset: var(--header) 0 0 0;
    z-index: 49;
    background: var(--paper);
    color: var(--ink);
    overflow-y: auto;
    padding: 24px var(--gutter) 120px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  .sheet.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s var(--ease); }

  .hero { padding-top: calc(var(--header) + 4vh); }
  .hero .wrap { justify-content: flex-end; padding-bottom: 48px; }
  .proof { padding: 80px 0 90px; }
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .proof-cell:nth-child(2n) { border-right: 0; }
  .proof-cell:nth-child(-n + 2) { border-bottom: 1px dashed var(--line-strong); }
  .proof-cell { padding: 28px 18px 26px; }
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
  .section-head .lede { justify-self: start; }
  .stage-grid { grid-template-columns: 1fr; align-items: end; padding-bottom: 96px; }
  .stage-intro { top: calc(var(--header) + 16px); }
  .svc-list { min-height: 340px; }
  .svc { justify-content: flex-end; }
  .svc p { font-size: 1rem; }
  .svc-caption { display: none; }
  .work { padding: 90px 0 40px; }
  .work-row { grid-template-columns: 1fr; gap: 24px; padding: 48px 0; }
  .method { padding: 96px 0; }
  .steps { grid-template-columns: 1fr; margin-top: 48px; border-top: 0; }
  .step { padding: 26px 0 30px; border-top: 1px solid var(--line-dark); }
  .books { padding: 96px 0; }
  .books-grid { grid-template-columns: 1fr; gap: 56px; }
  .labs { padding: 96px 0; }
  .labs-list { max-width: none; margin-top: 64px; }
  .lab { grid-template-columns: 1fr auto; }
  .lab .label { grid-column: 1 / -1; }
  .insights { padding: 96px 0 72px; }
  .post { grid-template-columns: 1fr 24px; gap: 10px 16px; }
  .post .label,
  .post .tag { grid-column: 1 / -1; }
  .post .tag { order: -1; display: none; }
  .close { padding: 110px 0 130px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: 1 / -1; }
  .foot-base { flex-direction: column; gap: 8px; }
  .assistant { grid-template-columns: 1fr; }
  .as-orb-wrap { position: absolute; inset: 0 0 auto 0; height: 38vh; pointer-events: none; }
  .as-orb { width: 46vw; }
  .contact { grid-template-columns: 1fr; }
  .contact-art { position: relative; height: 42svh; }
  .contact-form { padding-top: 48px; }
  .field-group { grid-template-columns: 1fr; gap: 14px; }
  .direct { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .orb { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  main, .site-footer { animation: none; }
  body.leaving main, body.leaving .site-footer { opacity: 1; transform: none; }
}

/* contact page: the header stays solid over the split */
.site-header.solid::before, .site-header.solid.is-top::before { background: var(--paper); border-color: var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.contact-art { background: radial-gradient(70% 60% at 50% 45%, color-mix(in srgb, var(--accent) 20%, #121416) 0%, var(--dark) 72%); color: var(--on-dark); }
.contact-art .label { color: var(--on-dark-mute); }

/* =====================================================================
   Inner pages
   ===================================================================== */

body.no-scroll { overflow: hidden; }
.acc-ink { color: var(--accent-ink); }
[data-theme="dark"] .acc-ink { color: var(--accent-on-dark); }

/* page hero */
.pg-hero { min-height: 88svh; display: flex; align-items: center; padding: calc(var(--header) + 9vh) 0 10vh; overflow: hidden; }
.pg-hero .display { font-size: clamp(2.6rem, 5.4vw, 5.6rem); max-width: 11.5ch; margin-top: 26px; }
.pg-hero .lede { margin-top: 30px; max-width: 40ch; }
.pg-hero.short { min-height: 64svh; }
.pg-hero .hero-actions { margin-top: 38px; }

/* bands */
.band { padding: clamp(96px, 12vw, 150px) 0; }
.band.tight { padding: clamp(72px, 8vw, 104px) 0; }
.band.paper-2 { background: var(--paper-2); }
.band > .wrap > .label + .h2 { margin-top: 24px; }
.band .lede { margin-top: 26px; }

/* two columns: words on the left, the illustration's slot on the right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; min-height: 60svh; }
.split .fig { min-height: 440px; }
.split .txt > p { color: var(--ink-2); max-width: 46ch; margin: 22px 0 0; }
[data-theme="dark"] .split .txt > p { color: #c3c2bd; }
.split .txt > .h2 { max-width: 14ch; margin-top: 22px; }
.fig-cap { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mute); margin-top: 28px; display: block; }

/* statement */
.statement { font-size: clamp(1.9rem, 3.6vw, 3.4rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 500; max-width: 24ch; margin: 24px 0 0; text-wrap: balance; }

/* bullet list */
.ticks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; max-width: 52ch; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; background: var(--accent); }
[data-theme="dark"] .ticks li { color: #c3c2bd; }
.ticks b { color: var(--ink); font-weight: 500; }
[data-theme="dark"] .ticks b { color: var(--on-dark); }

/* list rows */
.rows { margin-top: 56px; border-top: 1px solid var(--line); }
[data-theme="dark"] .rows { border-color: var(--line-dark); }
.row { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.1fr) 28px; gap: 28px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
[data-theme="dark"] .row { border-color: var(--line-dark); }
.row .num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-ink); letter-spacing: 0.05em; }
[data-theme="dark"] .row .num { color: var(--accent-on-dark); }
.row h3 { margin: 0; font-size: clamp(1.4rem, 2.1vw, 1.9rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.row p { margin: 0; color: var(--ink-2); }
[data-theme="dark"] .row p { color: #c3c2bd; }
.row svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
a.row > * { transition: transform 0.4s var(--ease); }
a.row:hover > :not(svg) { transform: translateX(8px); }
a.row:hover svg { transform: translate(3px, -3px); }

/* engagement shapes */
.eng { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 64px; border-top: 1px dashed var(--line-strong); }
.eng-item { padding: 32px 32px 8px 0; border-right: 1px dashed var(--line-strong); }
.eng-item + .eng-item { padding-left: 32px; }
.eng-item:last-child { border-right: 0; }
.eng-item .label { margin-bottom: 20px; }
.eng-item h3 { margin: 0 0 12px; font-size: 1.5rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.12; }
.eng-item p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.eng-item ul { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 0.93rem; color: var(--ink-2); }
.eng-item ul::before { content: "Walk out with"; display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }

/* three columns separated by dashed rules */
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 64px; }
.cols3 > div { padding: 0 32px 0 0; }
.cols3 > div + div { padding-left: 32px; border-left: 1px dashed var(--line-strong); }
[data-theme="dark"] .cols3 > div + div { border-color: var(--line-dark); }
.cols3 h3 { margin: 14px 0 12px; font-size: 1.45rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.12; }
.cols3 p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
[data-theme="dark"] .cols3 p { color: #c3c2bd; }

/* case studies (work) */
.cases { transition: background 0.9s var(--ease); background: var(--tint-bg, var(--paper)); }
.case { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding: 80px 0; border-top: 1px solid var(--line); }
.case:last-child { border-bottom: 1px solid var(--line); }
.case figure { margin: 0; position: relative; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; background: var(--paper-2); }
.case figure img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.6s var(--ease); }
.case.rv.is-in figure img { transform: scale(1); }
.case .stat { font-size: clamp(3.6rem, 7vw, 6.6rem); }
.case .h3 { margin-top: 18px; max-width: 20ch; }
.case p.desc { margin: 16px 0 0; color: var(--ink-2); max-width: 48ch; }
.case .work-meta { margin-bottom: 26px; }
.case .ticks { margin-top: 18px; font-size: 0.96rem; }
.quote-src { display: block; margin-top: 10px; font-size: 0.86rem; color: var(--mute); }

/* ledger (about, publications) */
.ledger { margin-top: 56px; border-top: 1px solid var(--line); }
.ledger-row { display: grid; grid-template-columns: 170px minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.ledger-row .when { font-family: var(--mono); font-size: 0.8rem; color: var(--mute); letter-spacing: 0.03em; }
.ledger-row h3 { margin: 0; font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.ledger-row h3 small { display: block; font-size: 0.9rem; color: var(--mute); font-weight: 400; letter-spacing: 0; margin-top: 4px; }
.ledger-row p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

/* photo with caption */
.photo { margin: 0; }
.photo img { width: 100%; border-radius: 6px; aspect-ratio: 4 / 5; object-fit: cover; }
.photo.wide img { aspect-ratio: 3 / 2; }
.photo figcaption { font-size: 0.86rem; color: var(--mute); margin-top: 12px; }

/* book pages */
.book-hero { min-height: 92svh; padding: calc(var(--header) + 8vh) 0 10vh; display: flex; align-items: center; }
.book-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: center; }
.book-hero .display { font-size: clamp(2.6rem, 5vw, 5rem); max-width: 14ch; margin-top: 24px; }
.book-3d { justify-self: center; perspective: 1600px; }
.book-3d .cover { --w: min(30vw, 360px); --ry: -22deg; }
.facts-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 56px 0 0; border-top: 1px dashed var(--line-strong); }
.facts-dl div { padding: 22px 24px 22px 0; border-bottom: 1px dashed var(--line-strong); }
.facts-dl dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.facts-dl dd { margin: 8px 0 0; font-size: 1.1rem; letter-spacing: -0.01em; }
.chapters { counter-reset: ch; list-style: none; margin: 48px 0 0; padding: 0; border-top: 1px solid var(--line); }
.chapters li { counter-increment: ch; display: grid; grid-template-columns: 90px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 1.15rem; letter-spacing: -0.015em; }
.chapters li::before { content: "Ch " counter(ch); font-family: var(--mono); font-size: 0.8rem; color: var(--accent-ink); letter-spacing: 0.04em; padding-top: 4px; }
.endorse { margin: 0; padding: 32px 0; border-top: 1px solid var(--line); }
.endorse p { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.45; letter-spacing: -0.015em; margin: 0; max-width: 60ch; }
.endorse cite { display: block; margin-top: 16px; font-style: normal; font-size: 0.92rem; color: var(--mute); }
.endorse cite b { color: var(--ink); font-weight: 500; }

/* insights index and articles */
.post-hero { padding: calc(var(--header) + 10vh) 0 64px; min-height: 64svh; display: flex; align-items: flex-end; }
.post-hero .display { font-size: clamp(2.4rem, 4.8vw, 4.6rem); max-width: 18ch; margin-top: 24px; line-height: 1.02; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 30px; font-family: var(--mono); font-size: 0.78rem; color: var(--mute); letter-spacing: 0.04em; text-transform: uppercase; }
.prose { max-width: 70ch; margin: 0 auto; padding: 24px var(--gutter) 40px; font-size: 1.12rem; line-height: 1.7; color: #262628; position: relative; z-index: 2; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; margin-top: 2.2em; color: var(--ink); }
.prose h3 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; margin-top: 1.8em; color: var(--ink); }
.prose p { margin-bottom: 0; }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { margin: 1.8em 0; padding: 0 0 0 24px; border-left: 2px solid var(--accent); font-size: 1.3rem; line-height: 1.45; letter-spacing: -0.015em; color: var(--ink); }
.prose hr, .prose .wp-block-separator { border: 0; border-top: 1px dashed var(--line-strong); margin: 3em 0; }
.prose img { border-radius: 6px; height: auto; }
.prose figure { margin: 2em 0; }
.prose figcaption, .prose .wp-element-caption { font-size: 0.88rem; color: var(--mute); margin-top: 10px; line-height: 1.45; }
.prose svg { max-width: 100%; height: auto; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); padding: 2px 6px; border-radius: 4px; }
.prose pre { font-family: var(--mono); font-size: 0.86rem; background: #16171a; color: #e9e8e4; padding: 20px; border-radius: 8px; overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter) 0; position: relative; z-index: 2; }
.post-nav a { display: block; padding: 24px 0; border-top: 1px solid var(--line); text-decoration: none; }
.post-nav a span { display: block; font-family: var(--mono); font-size: 0.72rem; color: var(--mute); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.post-nav a b { font-weight: 500; font-size: 1.15rem; letter-spacing: -0.02em; }
.post-nav a + a { text-align: right; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.cats a { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; }
.cats a:hover, .cats a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* contact form status */
[data-status] { margin: 18px 0 0; font-size: 0.95rem; min-height: 1.5em; color: var(--ink-2); }
[data-status][data-state="ok"] { color: #1f6b45; }
[data-status][data-state="error"] { color: var(--accent-ink); }
[data-status] a { color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* nav: current section */
.nav-item > a[aria-current="page"],
.nav-item > button.is-current { background: color-mix(in srgb, currentColor 8%, transparent); }

@media (max-width: 900px) {
  .pg-hero { min-height: 80svh; align-items: flex-end; padding-bottom: 56px; }
  .split { grid-template-columns: 1fr; gap: 0; min-height: 0; }
  .split .fig { display: none; }
  .row { grid-template-columns: 1fr 24px; gap: 8px 16px; padding: 24px 0; }
  .row .num, .row p { grid-column: 1 / -1; }
  .row .num { order: -1; }
  .eng, .cols3 { grid-template-columns: 1fr; margin-top: 40px; }
  .eng-item, .eng-item + .eng-item { padding: 26px 0; border-right: 0; border-bottom: 1px dashed var(--line-strong); }
  .cols3 > div, .cols3 > div + div { padding: 24px 0; border-left: 0; border-top: 1px dashed var(--line-strong); }
  .case { grid-template-columns: 1fr; padding: 48px 0; gap: 28px; }
  .ledger-row { grid-template-columns: 1fr; gap: 6px; }
  .book-hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .book-3d { order: 0; }
  .book-3d .cover { --w: 46vw; }
  .facts-dl { grid-template-columns: 1fr 1fr; }
  .post-hero { min-height: 52svh; }
  .prose { font-size: 1.04rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a + a { text-align: left; }
}


/* screen recordings and videos */
.screen { margin: 34px 0 0; max-width: 460px; border-radius: 10px; overflow: hidden; background: #111; box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 34px 60px -34px rgba(18, 18, 18, 0.45); }
.screen video { display: block; width: 100%; height: auto; }
.screen-cap { display: block; margin-top: 12px; font-size: 0.86rem; color: var(--mute); max-width: 460px; }
[data-theme="dark"] .screen-cap { color: var(--on-dark-mute); }
.screens3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 64px; align-items: start; }
.screens3 .screen { margin: 0; max-width: none; aspect-ratio: 4 / 5; }
.screens3 .screen video { height: 100%; object-fit: cover; object-position: top; }
.film { margin: 48px 0 0; border-radius: 10px; overflow: hidden; background: #111; max-width: 960px; }
.film video { display: block; width: 100%; height: auto; }
.film.square { max-width: 560px; }
@media (max-width: 900px) { .screens3 { grid-template-columns: 1fr; } .screens3 .screen { aspect-ratio: auto; } }

/* case rows on dark bands */
[data-theme="dark"] .quote-src, [data-theme="dark"] .stat-note, [data-theme="dark"] .case p.desc, [data-theme="dark"] .ledger-row p { color: #c3c2bd; }
[data-theme="dark"] .case, [data-theme="dark"] .ledger, [data-theme="dark"] .ledger-row { border-color: var(--line-dark); }
[data-theme="dark"] .stat { color: var(--accent-on-dark); }

/* WordPress admin bar, when signed in */
.admin-bar .site-header { top: 32px; }
.admin-bar .mega { top: calc(var(--header) + 32px); }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } .admin-bar .sheet { inset: calc(var(--header) + 46px) 0 0 0; } }

/* one page: links and current section */
a.work-row { text-decoration: none; color: inherit; }
a.work-row:hover .h3 { color: var(--accent-ink); }
.nav-item > a[aria-current] { background: color-mix(in srgb, currentColor 8%, transparent); }
.nav-item > a[data-mega] svg { width: 10px; height: 10px; }

/* ---------- mobile menu ---------- */
@media (max-width: 900px) {
  .sheet { padding: 8px var(--gutter) 40px; }
  .sheet-main { display: grid; }
  .sheet-main a { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 1.75rem; letter-spacing: -0.03em; font-weight: 500; }
  .sheet-main i { font-style: normal; font-family: var(--mono); font-size: 0.72rem; color: var(--mute); letter-spacing: 0.06em; }
  .sheet-main a[aria-current] span { color: var(--accent-ink); }
  .sheet .sheet-cta { display: flex; justify-content: center; width: 100%; margin-top: 24px; height: 56px; padding: 0 24px; font-size: 1.05rem; }
  .sheet-deeper { margin-top: 32px; }
  .sheet-deeper h3 { font-family: var(--mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--mute); margin: 0 0 8px; }
  .sheet-deeper div { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .sheet-deeper a { display: block; padding: 9px 0; font-size: 1rem; color: var(--ink-2); text-decoration: none; }
  .sheet-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 28px 0 0; padding-top: 18px; border-top: 1px dashed var(--line-strong); font-size: 0.92rem; }
  .sheet-contact a { color: var(--ink-2); text-decoration: none; }
  .sheet.is-open .sheet-main a, .sheet.is-open .sheet-cta, .sheet.is-open .sheet-deeper, .sheet.is-open .sheet-contact { animation: sheet-in 0.4s var(--ease) both; }
  .sheet.is-open .sheet-main a:nth-child(2) { animation-delay: 0.03s; }
  .sheet.is-open .sheet-main a:nth-child(3) { animation-delay: 0.06s; }
  .sheet.is-open .sheet-main a:nth-child(4) { animation-delay: 0.09s; }
  .sheet.is-open .sheet-main a:nth-child(5) { animation-delay: 0.12s; }
  .sheet.is-open .sheet-main a:nth-child(6) { animation-delay: 0.15s; }
  .sheet.is-open .sheet-cta { animation-delay: 0.18s; }
  .sheet.is-open .sheet-deeper, .sheet.is-open .sheet-contact { animation-delay: 0.22s; }
  body.no-scroll .orb-btn, body.no-scroll .orb-hint { opacity: 0; pointer-events: none; }
  .nav-toggle span { width: 22px; height: 1.6px; margin: 6px auto; }
  .nav.is-open .nav-toggle span:first-child { transform: translateY(3.8px) rotate(45deg); }
  .nav.is-open .nav-toggle span:last-child { transform: translateY(-3.8px) rotate(-45deg); }

  /* services: a plain stack on phones, no pinned scrolling */
  .services { height: auto; background: var(--dark) !important; }
  .stage { position: relative; height: auto; overflow: visible; padding: 88px 0 24px; }
  .stage-intro { position: relative; top: auto; padding-bottom: 8px; }
  .stage-count, .svc-rail { display: none; }
  .stage-grid { display: block; height: auto; padding-bottom: 0; }
  .svc-list { min-height: 0; }
  .svc { position: relative; inset: auto; opacity: 1; transform: none; pointer-events: auto; padding: 44px 0 48px; border-top: 1px solid var(--line); }
  .svc.is-past { transform: none; }
  .svc .h2 { font-size: clamp(2rem, 8.6vw, 2.6rem); }
  .rv.d1, .rv.d2, .rv.d3 { transition-delay: 0s; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .sheet.is-open * { animation: none !important; } }

/* contact: short form */
.contact-form .fields { margin-top: 40px; gap: 20px; }
.topic-row { margin-top: 28px; }
.topic-row > span { display: block; font-size: 0.9rem; color: var(--ink-2); margin-bottom: 10px; }
.topic-row small { color: var(--mute); }
.topic-row .chips { margin: 0; }
.contact-form .hero-actions { margin-top: 30px; }
.direct-line { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 56px 0 0; padding-top: 20px; border-top: 1px dashed var(--line-strong); font-size: 0.95rem; }
.direct-line a { color: var(--ink-2); text-decoration: none; }
.direct-line a:hover { color: var(--accent-ink); }
@media (max-width: 900px) { .contact-art { height: 30svh; } .contact-form { padding-top: 36px; } }

/* phones: a smaller assistant orb, tucked into the corner */
@media (max-width: 900px) {
  .orb-btn { width: 44px; height: 44px; right: 14px; bottom: 14px; }
  .orb-hint { right: 66px; bottom: 18px; max-width: 190px; font-size: 0.8rem; }
}

/* assistant on phones: sized to the visible screen, input always in view */
@media (max-width: 900px) {
  .assistant { display: flex; flex-direction: column; inset: 0 0 auto 0; height: var(--vvh, 100dvh); }
  .assistant .as-orb-wrap { display: none; }
  .as-col { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; max-width: none; padding: 68px 16px 12px; }
  .as-log { flex: 0 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
  .assistant .chips { flex: 0 0 auto; flex-wrap: nowrap; overflow-x: auto; margin: 12px -16px 10px; padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .assistant .chips::-webkit-scrollbar { display: none; }
  .assistant .chip { flex: 0 0 auto; }
  .as-input { flex: 0 0 auto; }
  .as-input input { font-size: 16px; }
  .as-note { font-size: 0.72rem; margin-top: 8px; }
  .as-close { top: 14px; right: 14px; }
}

/* persona fixes and media, 27 Oct 2026 */
.talk { margin: 30px 0 0; border-radius: 10px; overflow: hidden; background: #111214; }
.talk video { display: block; width: 100%; height: auto; }
.split > .talk { justify-self: center; margin: 0; width: 100%; }
.photo.band-img img { aspect-ratio: 21 / 9; }
.eng-item .link { margin-top: 18px; font-size: 0.95rem; }
.form-note { font-size: 0.85rem; color: var(--mute); margin: 14px 0 0; }
.form-note a { color: inherit; }
.page-contact .orb-btn, .page-contact .orb-hint { display: none; }
.pg-hero .split { min-height: 0; }
.pg-hero .photo img { aspect-ratio: 4 / 5; max-height: 72svh; object-fit: cover; }
video[data-autoplay] { cursor: pointer; }
@media (max-width: 900px) {
  .orb-hint { display: none; }
  .shelf .cover { transform: none; }
  .shelf .cover-cap .label { display: none; }
  .shelf { gap: 14px; }
  .pg-hero .photo { order: -1; margin-bottom: 8px; }
  .pg-hero .photo img { max-height: 46svh; }
}
@media (max-width: 700px) {
  .prose svg { min-width: 640px; }
  .prose figure:has(svg), .prose div:has(> svg) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* portrait cut-out: never cropped, sits straight on the page */
.photo.cutout img, .pg-hero .photo.cutout img { aspect-ratio: auto; object-fit: contain; border-radius: 0; width: 100%; height: auto; max-height: 78svh; }
.photo.cutout { display: flex; justify-content: center; align-items: flex-end; }
@media (max-width: 900px) {
  .pg-hero .photo.cutout img, .photo.cutout img { max-height: 54svh; width: auto; max-width: 100%; }
}

/* How I work: steps with diagrams; diagrams elsewhere */
.how-steps { display: grid; gap: clamp(64px, 9vw, 120px); margin-top: clamp(48px, 7vw, 88px); }
.how-step { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.how-steps .how-step:nth-child(even) .how-txt { order: 2; }
.how-txt h3 { margin: 16px 0 12px; font-size: clamp(1.7rem, 2.6vw, 2.4rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.how-txt p { margin: 0; color: var(--ink-2); max-width: 40ch; }
.how-txt .h2 + p { margin-top: 22px; }
.diagram { margin: 0; background: #f8f7f4; border: 1px solid var(--line); border-radius: 10px; padding: clamp(10px, 1.6vw, 20px); box-shadow: 0 34px 60px -46px rgba(18, 18, 18, 0.45); position: relative; z-index: 2; }
.diagram a { display: block; cursor: zoom-in; }
.diagram img { display: block; width: 100%; height: auto; border-radius: 4px; }
.diagram figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mute); }
.diagram.rv img { clip-path: inset(0 100% 0 0); transition: clip-path 1.3s var(--ease) 0.15s; }
.diagram.rv.is-in img { clip-path: inset(0 0 0 0); }
.diagram-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 56px; align-items: start; }
.how-step > .diagram.wide { grid-column: 1 / -1; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(246, 245, 242, 0.97); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; animation: sheet-in 0.25s var(--ease); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.4); border-radius: 6px; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.2rem; }
@media (max-width: 900px) {
  .how-step, .diagram-pair { grid-template-columns: 1fr; gap: 24px; }
  .how-steps .how-step:nth-child(even) .how-txt { order: 0; }
  .lightbox { padding: 8px; overflow: auto; align-items: flex-start; }
  .lightbox img { max-width: none; width: 200%; max-height: none; }
}
@media (prefers-reduced-motion: reduce) { .diagram.rv img { clip-path: none; transition: none; } }

/* diagrams: the wide column always holds the diagram; tall diagrams capped */
.how-steps .how-step:nth-child(even) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.diagram img { max-height: 72svh; object-fit: contain; }
@media (max-width: 900px) {
  .how-steps .how-step:nth-child(even) { grid-template-columns: 1fr; }
}

/* Diagrams drawn as SVG (site/diagrams.py): they take the page's type and colours */
.dg { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.dg svg { display: block; width: 100%; height: auto; font-family: var(--font); overflow: visible; }
.dg .dg-m { display: none; }
.dg svg text { fill: var(--ink); }
.dg .bg { opacity: 1; }
.dg .gd { fill: rgba(18, 18, 18, 0.09); }
.dg .t { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.dg .c { font-size: 13.5px; fill: var(--ink-2); }
.dg .s, .dg .z, .dg .el, .dg .f { font-family: var(--mono); }
.dg .s { font-size: 10.5px; letter-spacing: 0.06em; fill: var(--mute); }
.dg .f { font-size: 12px; fill: var(--ink-2); }
.dg .f.pk { fill: var(--ink); font-weight: 500; }
.dg .z { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--mute); }
.dg .za { font-size: 13px; fill: var(--ink-2); }
.dg .el { font-size: 11px; letter-spacing: 0.02em; fill: var(--ink-2); paint-order: stroke; stroke: #f8f7f4; stroke-width: 5px; stroke-linejoin: round; }
.dg .acc, .dg .a .s, .dg .e.a .el { fill: var(--accent-ink); }
.dg .zone rect { fill: rgba(18, 18, 18, 0.035); }
.dg .who { fill: var(--ink-2); }
.dg .box rect, .dg .dec polygon, .dg .term rect, .dg .db path, .dg .eb { fill: #fdfcfa; stroke: rgba(18, 18, 18, 0.24); stroke-width: 1; }
.dg .db .rim { fill: none; }
.dg .k rect, .dg .db.k path:first-child, .dg .term.end rect, .dg .eh { fill: #161616; stroke: #161616; }
.dg .db.k .rim { stroke: rgba(255, 255, 255, 0.25); }
.dg .k text, .dg .term.end text, .dg .t.on { fill: var(--on-dark); }
.dg .k .s { fill: #a9a8a3; }
.dg .a rect, .dg .a polygon { fill: #fbefea; stroke: var(--accent); stroke-width: 1.3; }
.dg .a .t { fill: var(--accent-ink); }
.dg .a.sm .t { font-size: 13px; }
.dg .dot, .dg .kd { fill: var(--accent); }
.dg .card rect:first-child { fill: #fdfcfa; stroke: rgba(18, 18, 18, 0.24); }
.dg .box .bar-bg { fill: rgba(18, 18, 18, 0.08); stroke: none; }
.dg .box .bar { fill: var(--accent); stroke: none; }
.dg .field .ok { fill: rgba(18, 18, 18, 0.2); }
.dg .field .hit { fill: var(--accent); }
.dg .e path, .dg .lg { fill: none; stroke: #55555a; stroke-width: 1.3; stroke-linejoin: round; }
.dg .e.d path, .dg .lg.d { stroke-dasharray: 4 4; }
.dg .e.a path, .dg .lg.a { stroke: var(--accent); }
.dg .mk { fill: none; stroke: #55555a; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.dg .mk.a { stroke: var(--accent); }
.dg .crow { fill: none; stroke: #55555a; stroke-width: 1.2; }
.dg .crow.k { stroke-width: 1.3; }
.dg .rel path { stroke: #6b6b70; }
.dg .pulse { fill: var(--accent); opacity: 0; transition: opacity 0.6s 1.6s; }

/* drawn in when the figure scrolls into view */
.diagram.rv .dg .n, .diagram.rv .dg .zone { opacity: 0; transform: translateY(8px); transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); transition-delay: calc(min(var(--i), 40) * 35ms); }
.diagram.rv .dg .e { opacity: 0; transition: opacity 0.5s var(--ease); transition-delay: calc(min(var(--i), 40) * 35ms + 150ms); }
.diagram.rv .dg .e path[pathLength] { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease); transition-delay: inherit; }
.diagram.rv.is-in .dg .n, .diagram.rv.is-in .dg .zone { opacity: 1; transform: none; }
.diagram.rv.is-in .dg .e { opacity: 1; }
.diagram.rv.is-in .dg .e path[pathLength] { stroke-dashoffset: 0; }
.diagram.is-in .dg .pulse, .lightbox .pulse { opacity: 0.9; }
@media (prefers-reduced-motion: reduce) {
  .diagram.rv .dg .n, .diagram.rv .dg .zone, .diagram.rv .dg .e { opacity: 1; transform: none; transition: none; }
  .diagram.rv .dg .e path[pathLength] { stroke-dasharray: none; transition: none; }
  .dg .pulse { display: none; }
}

/* layout: diagrams get the room they need */
.how-step { grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr); }
.how-steps .how-step:nth-child(even) { grid-template-columns: minmax(0, 1.38fr) minmax(0, 0.62fr); }
.diagram { min-width: 0; }
.diagram.wide { width: 100%; max-width: 1160px; margin: 48px auto 0; }
.diagram-pair { grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 1160px; margin-left: auto; margin-right: auto; }
.lightbox .dg { width: min(100%, 1500px); cursor: zoom-out; }
.lightbox .dg-m { display: none; }
@media (max-width: 900px) {
  .how-step, .how-steps .how-step:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .dg { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dg .dg-d { min-width: 760px; }
  .dg.has-m .dg-d { display: none; }
  .dg.has-m .dg-m { display: block; max-width: 420px; margin: 0 auto; }
  .lightbox .dg { width: 1000px; max-width: none; overflow: visible; }
  .lightbox .dg .dg-d { display: block; }
}

/* phones: the first section keeps a band above its text for the illustration (form.js centres it there) */
@media (max-width: 900px) {
  .hero[data-form]:not([data-form="none"]),
  .pg-hero[data-form]:not([data-form="none"]) { padding-top: calc(var(--header) + 26svh); }
  .hero[data-form]:not([data-form="none"]) .wrap { justify-content: flex-start; padding-top: 2svh; }
}

/* ?hero=video: the drawing-on-paper film behind the hero, faded out under the text */
.hero-film { display: none; }
.has-film .hero-film {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%;
  pointer-events: none; mix-blend-mode: multiply; opacity: 0.7; filter: brightness(1.18) contrast(1.12) saturate(0.6);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 44%, #000 72%), linear-gradient(180deg, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, transparent 44%, #000 72%), linear-gradient(180deg, #000 80%, transparent 100%); mask-composite: intersect;
  animation: film-in 1.6s var(--ease) both;
}
.has-film .wrap, .has-film .ticker { position: relative; z-index: 1; }
@keyframes film-in { from { opacity: 0; } }
@media (max-width: 900px) {
  .has-film .hero-film {
    top: var(--header); height: 34svh; object-position: 50% 50%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 100%);
  }
}

/* the header reads light over a dark first section even before site.js runs */
html:has(main > section:first-child[data-theme="dark"]) .site-header.is-top:not(.menu-open) { color: var(--on-dark); }
html:has(main > section:first-child[data-theme="dark"]) .site-header.is-top:not(.menu-open) .nav-cta { background: var(--on-dark); color: var(--dark); }

/* the proof strip: each figure links to the work behind it */
a.proof-cell { color: inherit; text-decoration: none; transition: background-color 0.3s var(--ease); }
a.proof-cell > svg { position: absolute; top: 22px; right: 22px; width: 14px; height: 14px; color: var(--mute); opacity: 0.5; transition: opacity 0.3s, transform 0.3s var(--ease), color 0.3s; }
a.proof-cell:hover, a.proof-cell:focus-visible { background: rgba(18, 18, 18, 0.03); }
a.proof-cell:hover > svg, a.proof-cell:focus-visible > svg { opacity: 1; color: var(--accent); transform: translate(2px, -2px); }
a.proof-cell:hover b { color: var(--accent-ink); }
a.proof-cell b { transition: color 0.3s; }
@media (max-width: 900px) { a.proof-cell > svg { top: 16px; right: 14px; } }
.case[id] { scroll-margin-top: calc(var(--header) + 32px); }

/* ---------- wayfinding: the current section is always named ---------- */
/* nav: the current item is a filled pill */
.nav-item > a[aria-current],
.nav-item > a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.site-header.on-dark:not(.menu-open) .nav-item > a[aria-current] { background: var(--on-dark); color: var(--dark); }
.nav-item > a[aria-current]::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; }

/* reading progress along the foot of the header */
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; z-index: 2; pointer-events: none; }
.site-header.menu-open .read-progress { opacity: 0; }

/* "you are here": a strip attached under the header once past the hero, naming the section and what you are reading */
.wayfinder { position: fixed; top: var(--header); left: 0; right: 0; z-index: 45; height: 38px; pointer-events: none; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(-6px); transition: opacity 0.35s var(--ease), transform 0.45s var(--ease), background-color 0.45s var(--ease); }
.wayfinder.is-on { opacity: 1; transform: none; }
.wf-pill { max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink); white-space: nowrap; overflow: hidden; }
.wf-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 10px; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.wf-a { font-weight: 600; }
.wf-a, .wf-b, .wf-c { display: inline-block; }
.wf-b, .wf-c { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.wf-c { color: var(--accent-ink); }
.wf-b:not(:empty)::before, .wf-c:not(:empty)::before { content: "/"; margin: 0 10px; color: var(--mute); }
.wayfinder.is-new .wf-b, .wayfinder.is-new .wf-c { animation: wf-in 0.45s var(--ease); }
@keyframes wf-in { from { opacity: 0; transform: translateY(4px); } }
.wayfinder.on-dark { background: color-mix(in srgb, var(--dark) 90%, transparent); border-color: var(--line-dark); }
.wayfinder.on-dark .wf-pill { color: var(--on-dark); }
.wayfinder.on-dark .wf-b { color: #c9c8c3; }
.wayfinder.on-dark .wf-c { color: var(--accent-on-dark); }
.admin-bar .wayfinder { top: calc(var(--header) + 32px); }
@media (max-width: 900px) {
  .wayfinder { height: 34px; }
  .wf-pill { font-size: 0.66rem; }
  .wf-b:not(:empty)::before, .wf-c:not(:empty)::before { margin: 0 7px; }
  /* phones: with three levels, drop the group (Services, Books) so the page and section fit one line */
  .wf-pill:has(.wf-b:not(:empty)):has(.wf-c:not(:empty)) .wf-a { display: none; }
  .wf-pill:has(.wf-b:not(:empty)):has(.wf-c:not(:empty)) .wf-b { font-weight: 600; color: inherit; }
  .wf-pill:has(.wf-b:not(:empty)):has(.wf-c:not(:empty)) .wf-b::before { content: none; }
}
@media (max-width: 782px) { .admin-bar .wayfinder { top: calc(var(--header) + 46px); } }
@media (prefers-reduced-motion: reduce) { .wayfinder { transition: opacity 0.2s; transform: none; } .wayfinder.is-new .wf-b, .wayfinder.is-new .wf-c { animation: none; } }

/* ---------- services: dark, with a labelled stepper and clear service badges ---------- */
.services[data-theme="dark"] { background: var(--dark); transition: background-color 0.6s var(--ease); }
[data-theme="dark"] .svc p { color: #c9c8c3; }
.svc .num { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 26px; }
[data-theme="dark"] .svc .num { color: var(--on-dark); border-color: color-mix(in srgb, var(--accent-on-dark) 55%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.svc .num::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); margin-left: 4px; }
.svc-art { display: none; }

.stage-count { display: flex; align-items: baseline; gap: 0; font-size: 0.95rem; }
.stage-count [data-count] { font-size: 1.6rem; color: var(--on-dark); letter-spacing: -0.02em; margin-right: 6px; }
.stage-hint { margin-left: 22px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-dark-mute); }
.stage-hint i { display: inline-block; font-style: normal; margin-left: 6px; animation: hint-bob 1.8s var(--ease) infinite; }
@keyframes hint-bob { 50% { transform: translateY(4px); } }

/* the rail: five labelled tabs along the foot of the stage, each filling as you scroll through it */
.svc-rail { left: 0; right: 0; bottom: 30px; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.svc-rail button { width: auto; height: auto; padding: 14px 0 4px; text-align: left; color: var(--on-dark-mute); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; border-top: 2px solid var(--line-dark); display: flex; gap: 10px; align-items: baseline; transition: color 0.3s; }
.svc-rail button::before { content: none; }
.svc-rail button.is-active { margin-right: 0; color: var(--on-dark); }
.svc-rail button:hover { color: var(--on-dark); }
.svc-rail button .n { color: var(--accent-on-dark); }
.svc-rail button .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-rail button .fill { position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--accent-on-dark); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 0.15s linear; }
.svc-rail button.is-done .fill { background: color-mix(in srgb, var(--on-dark) 45%, transparent); }

@media (max-width: 900px) {
  /* phones: the services stack, each with its own illustration and more room between them */
  .stage { padding: 96px 0 40px; }
  .services .svc { padding: 64px 0 72px; border-top: 1px solid var(--line-dark); }
  .services .svc:first-child { border-top: 0; padding-top: 32px; }
  .svc-art { display: block; width: min(78%, 320px); height: auto; margin: 0 0 18px -6px; }
  .stage-hint { display: none; }
}

/* engagement timeline */
.dg .gl { stroke: rgba(18, 18, 18, 0.12); stroke-width: 1; stroke-dasharray: 3 4; }
.dg .golive { stroke: var(--accent); stroke-width: 1.5; }
.eng-viz { margin-top: 72px; }
.eng-viz .dg { cursor: default; }

/* ---------- assistant launcher: the site's own mark, quietly alive ---------- */
.orb-btn { width: 52px; height: 52px; background: var(--ink); color: var(--paper); display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.55); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.orb-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px color-mix(in srgb, var(--accent) 60%, transparent); }
.orb-btn .orb-mark { width: 26px; height: 26px; overflow: visible; }
.orb-mark .spin { transform-box: view-box; transform-origin: 11px 12px; animation: mark-turn 26s linear infinite; }
.orb-mark .pip { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: pip-breathe 2.8s ease-in-out infinite; }
.orb-btn .ping { position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation: ping 5.5s var(--ease) infinite 1.5s; pointer-events: none; }
@keyframes mark-turn { to { transform: rotate(360deg); } }
@keyframes pip-breathe { 50% { transform: scale(1.3); filter: drop-shadow(0 0 3px var(--accent)); } }
@keyframes ping { 0% { opacity: 0.7; transform: scale(1); } 40%, 100% { opacity: 0; transform: scale(1.6); } }
.as-orb { width: min(30vw, 360px); color: var(--ink); }
.as-orb .orb-mark { width: 100%; height: auto; }
.as-orb .orb-mark .spin { animation-duration: 40s; }
@media (max-width: 900px) { .orb-btn .orb-mark { width: 22px; height: 22px; } }
@media (prefers-reduced-motion: reduce) { .orb-mark .spin, .orb-mark .pip, .orb-btn .ping { animation: none; } }
