/* Self-hosted fonts (latin subset, SIL Open Font License, see fonts/OFL-*.txt) */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; src: url('../fonts/archivo-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 400 500; font-stretch: 100%; font-display: swap; src: url('../fonts/martian-mono-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/schibsted-grotesk-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/schibsted-grotesk-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* freegroup.io
   Layout idea: a paper desk. Wide margins, one strong left edge, type does the work.
   Colour comes only from highlighter swipes and from the coloured side of each origami sheet. */
:root {
  --paper:   oklch(0.977 0.003 255);   /* #f6f7f9 page */
  --paper-2: oklch(0.948 0.005 255);   /* #eceef2 alternate band */
  --paper-3: oklch(0.915 0.007 255);   /* #e1e4ea placeholder sheet */
  --ink:     oklch(0.245 0.026 264);   /* #1c2230 */
  --ink-2:   oklch(0.47 0.022 264);    /* #5a6274 secondary text */
  --rule:    oklch(0.88 0.007 255);    /* #d9dce3 hairlines */
  --hl-y:    oklch(0.915 0.165 103);   /* #f7e04b marker yellow */
  --hl-p:    oklch(0.82 0.115 352);    /* #f5a3c7 marker pink */
  --hl-g:    oklch(0.88 0.13 148);     /* #9fe8a0 marker green */

  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --f-data: 'Martian Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px;
  --space-2xl: 48px; --space-3xl: 64px; --space-4xl: 96px;
  --section: clamp(72px, 11vw, 160px);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: clamp(16px, 1.05vw + 10px, 18px); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; } /* keep the width/height attributes as a ratio, never a fixed height, so a capped width cannot squash a photo */
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.band { background: var(--paper-2); }
.muted { color: var(--ink-2); max-width: 52ch; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--f-data); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: 0 0.6em; align-items: baseline;
}
.eyebrow .dot { color: var(--rule); }
.h2 {
  font-family: var(--f-display); font-stretch: 112%; font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1; letter-spacing: -0.02em;
}
.h2--xl { font-size: clamp(2.5rem, 7vw, 6rem); font-stretch: 118%; line-height: 0.95; }

/* ---------- highlighter ---------- */
.hl {
  --hl: var(--hl-y);
  background-image: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 92%, transparent 92%);
  background-repeat: no-repeat; background-size: 100% 100%; background-position: 0 50%;
  padding: 0 0.14em; margin: 0 -0.08em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl--p { --hl: var(--hl-p); }
.hl--g { --hl: var(--hl-g); }
.js .hl.is-pending { background-size: 0% 100%; }
.js .hl.is-on { background-size: 100% 100%; transition: background-size 0.9s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .js .hl.is-pending { background-size: 100% 100%; } .js .hl.is-on { transition: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em; min-height: 52px; padding: 0 1.4em;
  background: var(--ink); color: var(--paper); text-decoration: none; border: 0; cursor: pointer;
  font: 600 1rem/1 var(--f-body); border-radius: 3px;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn:hover { background: var(--hl-y); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--small { min-height: 40px; padding: 0 1em; font-size: 0.9rem; }
.link-arrow { justify-self: start; font-weight: 600; text-decoration: none; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; }
.link-arrow::after { content: ' →'; }
.link-arrow:hover { background-image: linear-gradient(var(--hl-p), var(--hl-p)); background-size: 100% 40%; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--paper); transition: box-shadow 0.3s; padding-top: env(safe-area-inset-top, 0px); }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--rule); }
.nav__inner { display: flex; align-items: center; gap: var(--space-xl); min-height: 72px; }
.wordmark { font-family: var(--f-display); font-stretch: 118%; font-weight: 820; font-size: 1.45rem; line-height: 1; letter-spacing: -0.025em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark--footer { font-size: 1.3rem; display: block; }
.wordmark--footer .brand-logo { width: 160px; height: auto; display: block; }
/* brand lockup (crane + FreeGroup), an SVG sized in em so it follows the wordmark's font-size at every breakpoint.
   Its viewBox is 990 units tall for a 600-unit cap height; Archivo's cap height is 0.686 em, so 0.686 x 990 / 600 = 1.132 em. */
.brand-logo { display: block; height: 1.132em; width: auto; }
.nav__links { display: flex; gap: var(--space-lg); margin-left: auto; font-size: 0.92rem; }
.nav__links a { text-decoration: none; color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); }
.nav__menu { display: none; }
@media (max-width: 900px) {
  .nav__inner { position: relative; gap: var(--space-md); }
  .nav__menu { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 40px; padding: 0 4px;
    background: none; border: 0; color: var(--ink); font: 600 0.9rem/1 var(--f-body); cursor: pointer; }
  .nav__menu-bars, .nav__menu-bars::before, .nav__menu-bars::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 1px; transition: transform .25s var(--ease-out), opacity .2s; }
  .nav__menu-bars { position: relative; }
  .nav__menu-bars::before, .nav__menu-bars::after { content: ''; position: absolute; left: 0; }
  .nav__menu-bars::before { top: -5px; } .nav__menu-bars::after { top: 5px; }
  .nav__menu[aria-expanded="true"] .nav__menu-bars { background: transparent; }
  .nav__menu[aria-expanded="true"] .nav__menu-bars::before { transform: translateY(5px) rotate(45deg); }
  .nav__menu[aria-expanded="true"] .nav__menu-bars::after { transform: translateY(-5px) rotate(-45deg); }
  .nav__links { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; gap: 0;
    background: var(--paper); box-shadow: 0 1px 0 var(--rule), 0 14px 24px -12px oklch(0.3 0.02 260 / 0.18);
    padding: var(--space-sm) max(16px, env(safe-area-inset-right, 0px)) var(--space-md) max(16px, env(safe-area-inset-left, 0px)); }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 0; font-size: 1.05rem; color: var(--ink); border-bottom: 1px solid var(--rule); }
  .nav__links a:last-child { border-bottom: 0; }
}
@media (max-width: 900px) {
  .nav .btn--small { white-space: nowrap; flex-shrink: 0; margin-left: auto; }
  .nav__menu { order: 3; margin-left: 0; } /* logo left, menu button top-right */
}
@media (max-width: 420px) { .nav__brand { font-size: 1.2rem; } .nav__inner { gap: 10px; } .nav__menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (max-width: 380px) { .nav__brand { font-size: 1.25rem; } .nav .btn--small { padding: 0 0.8em; font-size: 0.85rem; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 112px) var(--section); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.hero__copy { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; }
.hero__name {
  font-family: var(--f-display); font-weight: 850; font-stretch: 125%;
  font-size: clamp(3rem, 9.4vw, 9.2rem); line-height: 0.86; letter-spacing: -0.035em;
}
.hero__name span { display: block; }
.hero__role { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: clamp(1.15rem, 2.1vw, 1.9rem); line-height: 1.2; letter-spacing: -0.01em; display: flex; flex-wrap: wrap; gap: 0 0.45em; margin-top: calc(-1 * var(--space-md)); }
.hero__role .dot { color: var(--ink-2); font-weight: 400; }
.hero__lead { font-size: clamp(1.15rem, 1.5vw, 1.45rem); line-height: 1.45; max-width: 36ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg) var(--space-xl); }

.photo { margin: 0; position: relative; }
.photo__sheet {
  aspect-ratio: 4 / 5; max-width: 100%; background: var(--paper-3); position: relative;
  clip-path: polygon(0 0, 78% 0, 100% 17.6%, 100% 100%, 0 100%);
  display: grid; place-items: center;
}
.photo__sheet::after { /* the folded-down corner */
  content: ''; position: absolute; top: 0; right: 0; width: 22%; aspect-ratio: 1;
  background: linear-gradient(225deg, transparent 50%, oklch(0.86 0.008 255) 50%);
  filter: drop-shadow(-3px 3px 4px oklch(0.4 0.02 260 / 0.14));
}
.photo__sheet span { font-family: var(--f-data); font-size: 0.8rem; color: var(--ink-2); letter-spacing: 0.04em; }
/* Ronen's headshot: the photo is only resized and centre-cropped; framing is object-fit/position */
.photo__sheet--img picture { position: absolute; inset: 0; display: block; }
.photo__sheet--img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.photo__sheet--img::after { z-index: 1; }

/* hero entrance: one orchestrated moment.
   Visible by default. The hidden starting state exists only inside the animation, and only once
   site.js has put .js on <html>; the animation always ends on (and holds) the visible state. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.js .hero [data-in] { animation: rise 0.9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) { .js .hero [data-in] { animation: none; } }

/* ---------- where I help ---------- */
.help { padding-block: var(--section); }
.help__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-2xl); }
.help__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--space-2xl); counter-reset: none; }
.help__list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--space-md); font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.4; padding-top: var(--space-md); border-top: 1px solid var(--rule); }
.help__list li::first-letter { text-transform: uppercase; }
.fold-tick { width: 18px; height: 18px; margin-top: 4px; color: var(--ink); }

/* ---------- problems solved (proof) ---------- */
.proof { padding-block: var(--section); }
.proof__list { margin-top: clamp(40px, 6vw, 88px); display: grid; }
.case {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  gap: var(--space-xl) clamp(24px, 4vw, 64px); padding-block: clamp(32px, 4.5vw, 64px);
  border-top: 1px solid var(--ink);
}
.case:last-child { border-bottom: 1px solid var(--ink); }
.case__where { font-family: var(--f-data); font-size: 0.78rem; letter-spacing: 0.03em; color: var(--ink-2); padding-top: 0.6em; }
.case__main { display: grid; gap: var(--space-lg); min-width: 0; }
.case__title { font-family: var(--f-display); font-stretch: 106%; font-weight: 760; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.08; letter-spacing: -0.015em; }
.case__body { color: var(--ink); max-width: 60ch; }
.case__stats { display: grid; gap: var(--space-lg); align-content: start; }
.stat { display: grid; gap: 2px; }
.stat__v { font-family: var(--f-display); font-stretch: 112%; font-weight: 850; font-size: clamp(2rem, 3.1vw, 3rem); line-height: 0.95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__l { font-size: 0.88rem; color: var(--ink-2); }

/* ---------- how we'd work ---------- */
.steps { padding-block: var(--section); }
.steps__list { margin-top: var(--space-3xl); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xl); counter-reset: step; }
.step { display: grid; gap: var(--space-md); align-content: start; padding-top: var(--space-lg); border-top: 1px solid var(--ink); }
.step__n { font-family: var(--f-display); font-stretch: 125%; font-weight: 850; font-size: clamp(2.6rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -0.03em; }
.step h3 { font-family: var(--f-display); font-stretch: 106%; font-weight: 740; font-size: 1.3rem; line-height: 1.15; }
.step p { color: var(--ink-2); }
.step .btn { justify-self: start; margin-top: var(--space-sm); }

/* ---------- projects + origami ---------- */
.projects { padding-top: var(--section); }
.projects__head { display: grid; gap: var(--space-lg); margin-bottom: var(--space-2xl); }
.proj { position: relative; height: 175vh; }
.proj__stick { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; }
.proj__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.proj:nth-child(even) .proj__stage { order: 2; }
.proj__stage { position: relative; aspect-ratio: 1; width: 100%; max-height: 78vh; max-width: 78vh; justify-self: center; }
.proj__stage .origami-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.proj__ground { position: absolute; inset: auto 12% 8% 12%; height: 1px; background: var(--rule); }
.proj__meter--stage { display: none; position: absolute; left: 0; right: 0; bottom: 0; justify-content: center; z-index: 1; pointer-events: none; }
.proj__meter--stage i { flex-basis: 72px; }
.proj__text { display: grid; gap: var(--space-lg); align-content: center; min-width: 0; }
.proj__kind { font-family: var(--f-data); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-2); display: flex; gap: var(--space-md); align-items: center; flex-wrap: wrap; }
.badge { font-family: var(--f-data); font-size: 0.72rem; padding: 4px 8px; border: 1px solid var(--ink); border-radius: 2px; color: var(--ink); }
.proj__name { font-family: var(--f-display); font-stretch: 122%; font-weight: 850; font-size: clamp(2.4rem, 5.6vw, 5.2rem); line-height: 0.92; letter-spacing: -0.03em; }
.proj__body { font-size: clamp(1.05rem, 1.25vw, 1.2rem); max-width: 44ch; }
.proj__meter { display: flex; align-items: center; gap: var(--space-md); font-family: var(--f-data); font-size: 0.72rem; color: var(--ink-2); }
.proj__meter i { flex: 0 0 120px; height: 2px; background: var(--rule); position: relative; overflow: hidden; }
.proj__meter i::after { content: ''; position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* reduced motion (and ?static=1): no pinning, every form shown folded */
.is-static .proj { height: auto; padding-block: var(--space-3xl); }
.is-static .proj__stick { position: static; height: auto; }
.is-static .proj__stage { max-height: 560px; max-width: 560px; }

/* ---------- team: org chart ---------- */
.team { padding-block: var(--section); }
.team__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3xl); }
.team__head { display: grid; gap: var(--space-lg); align-content: start; }
.team__lead { max-width: 40ch; font-size: clamp(1.05rem, 1.3vw, 1.2rem); }
/* wires are an opaque mix (not ink at 50% alpha), so a T or an elbow where two wires overlap never darkens */
.org { --wire: color-mix(in oklab, var(--ink) 50%, var(--paper-2)); --drop: 28px; position: relative; }
.org ul { list-style: none; margin: 0; padding: 0; }
.org__card { position: relative; z-index: 1; }
.org__text { display: grid; gap: 3px; min-width: 0; }
.org__name { font-family: var(--f-display); font-stretch: 118%; font-weight: 800; font-size: 1.15rem; line-height: 1.05; letter-spacing: -0.015em; }
.org__role { color: var(--ink-2); font-size: 0.82rem; line-height: 1.3; }
.org__scope { display: block; color: var(--ink-2); font-size: 0.72rem; line-height: 1.3; opacity: .85; }
.org__card--lead .org__name { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.org__card--lead .org__role { font-size: 0.92rem; }
.fan__inf { font-family: var(--f-body); font-size: 12px; fill: var(--ink-2); fill-opacity: 0.5; }

/* avatars: a photo-print pinned to the page with a strip of tape. Portraits are never recoloured. Scaled down for the chart. */
.avatar { position: relative; display: block; width: 64px; height: 64px; border-radius: 10px; padding: 3px; background: oklch(0.99 0.002 255);
  box-shadow: 0 1px 1px oklch(0.3 0.02 260 / 0.08), 0 5px 12px -4px oklch(0.3 0.02 260 / 0.22); transform: rotate(-1.6deg); }
.org__li:nth-child(even) > .org__card .avatar { transform: rotate(1.4deg); }
.org__li:nth-child(3n) > .org__card .avatar { transform: rotate(-0.6deg); }
.avatar img, .avatar__paper { display: block; width: 100%; height: 100%; border-radius: 7px; object-fit: cover; }
.avatar::before { /* tape */
  content: ''; position: absolute; top: -6px; left: 50%; width: 30px; height: 11px; transform: translateX(-50%) rotate(-4deg);
  background: oklch(0.95 0.025 103 / 0.78); box-shadow: 0 1px 1px oklch(0.3 0.02 260 / 0.08); z-index: 1;
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 45%);
}
.avatar__paper { display: grid; place-items: center; background: var(--paper-2); }
.avatar__paper svg { width: 40%; height: 40%; }

/* wide screens: a top-down chart. Each branch's width is weighted by how many leaves it carries (u3..u11),
   so every parent sits centred over its own branch and the hairline wires are plain borders. */
@media (min-width: 961px) {
  .org__root { display: flex; justify-content: center; }
  .org__li { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: var(--drop) 6px 0; }
  .org__root > .org__li { padding: 0; width: 100%; }
  .u3 { flex: 3 1 0; } .u4 { flex: 4 1 0; } .u7 { flex: 7 1 0; } .u10 { flex: 10 1 0; } .u11 { flex: 11 1 0; }
  .org .org__kids { display: flex; flex: 1 1 auto; width: 100%; position: relative; padding-top: var(--drop); }
  .org__kids::before { content: ''; position: absolute; top: 0; left: 50%; height: var(--drop); border-left: 1px solid var(--wire); }
  .org__kids > .org__li::before, .org__kids > .org__li::after { content: ''; position: absolute; top: 0; width: 50%; height: var(--drop); border-top: 1px solid var(--wire); }
  .org__kids > .org__li::before { right: calc(50% - 1px); width: calc(50% + 1px); }
  .org__kids > .org__li::after { left: 50%; border-left: 1px solid var(--wire); }
  .org__kids > .org__li:first-child::before { border: 0; }
  .org__kids > .org__li:last-child::after { border: 0; }
  .org__kids > .org__li:last-child::before { border-right: 1px solid var(--wire); border-top-right-radius: 10px; }
  .org__kids > .org__li:first-child::after { border-top-left-radius: 10px; }
  .org__kids > .org__li:only-child::before { border: 0; }
  .org__kids > .org__li:only-child::after { border: 0; border-left: 1px solid var(--wire); border-radius: 0; }
  .org__card { display: grid; justify-items: center; gap: 12px; text-align: center; }
  .org__card--lead { gap: 14px; }
  .org__kids .org__kids .avatar { width: 58px; height: 58px; }
  .org__stem { flex: 1 1 auto; width: 1px; min-height: 6px; margin-top: 6px; background: color-mix(in oklab, var(--ink) 36%, var(--paper-2)); }
  .org__li--stub > .org__stem { margin-top: 0; }
  /* one width for every fan (sized to fit the narrowest column), so all of them open and fade on the same lines */
  .org { --fanw: clamp(80px, 8.9vw, 132px); }
  .fan { display: block; flex: none; width: var(--fanw); max-width: 100%; height: auto; }
  .fan--stub { width: calc(var(--fanw) * 110 / 140); }
  .tail { display: none; }
}

/* phones and tablets: a vertical tree with indentation, each agent's subagents as a short tail */
@media (max-width: 960px) {
  .org { max-width: 560px; }
  .fan, .org__stem { display: none; }
  .org__card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; }
  .org__card--lead { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
  .org .avatar { width: 52px; height: 52px; border-radius: 9px; }
  .org .org__kids { margin-left: 26px; }
  .org__root > .org__li > .org__kids { margin-left: 26px; }
  .org__kids > .org__li { position: relative; padding: 16px 0 0 26px; }
  .org__kids > .org__li::before { content: ''; position: absolute; left: 0; top: 0; width: 18px; height: calc(16px + 26px);
    border-left: 1px solid var(--wire); border-bottom: 1px solid var(--wire); border-bottom-left-radius: 10px; }
  .org__kids > .org__li:not(:last-child)::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--wire); }
  .org__kids > .org__li--stub { padding-top: 10px; }
  .org__kids > .org__li--stub::before { height: calc(10px + 24.5px); width: 22px; }
  .tail { display: block; margin-left: 22px; }
  .tail--stub { margin-left: -12px; }
}

/* subagents grow in, generation by generation, as the chart scrolls in, then shimmer very slowly */
.js:not(.is-static) .org .fan__l { opacity: 0; }
.js:not(.is-static) .org.is-on .fan__l { animation: fan-in 1.1s var(--ease-out) both; }
.js:not(.is-static) .org.is-on .fan__l2 { animation-delay: 0.3s; }
.js:not(.is-static) .org.is-on .fan__l3 { animation-delay: 0.6s; }
.js:not(.is-static) .org.is-on .fan__l4 { animation-delay: 0.9s; }
.js:not(.is-static) .org.is-on .fan__l5 { animation-delay: 1.2s; }
.js:not(.is-static) .org.is-on :is(.fan__l3, .fan__l4, .fan__l5) .fan__s { animation: fan-shimmer 8s ease-in-out 2.4s infinite; }
.js:not(.is-static) .org.is-on .fan__l4 .fan__s { animation-duration: 10s; animation-delay: 3.1s; }
.js:not(.is-static) .org.is-on .fan__l5 .fan__s { animation-duration: 12s; animation-delay: 3.8s; }
@keyframes fan-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fan-shimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .org .fan__l, .org .fan__s { animation: none !important; opacity: 1 !important; } }

/* ---------- calculator ---------- */
.calc { padding-block: var(--section); }
.calc__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.calc__grid > div:first-child { display: grid; gap: var(--space-lg); }
.calc__inputs { display: grid; gap: var(--space-xl); margin-top: var(--space-lg); }
.field { display: grid; gap: var(--space-sm); }
.field__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); }
.field label { font-weight: 600; font-size: 0.98rem; }
.num { display: inline-flex; align-items: baseline; gap: 2px; border-bottom: 1px solid var(--ink); font-family: var(--f-data); font-size: 1rem; }
.num input { width: 7ch; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: right; padding: 4px 0; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num input:focus { outline: none; }
.num:focus-within { background: var(--hl-y); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(var(--ink), var(--ink)) 0 0 / var(--fill, 50%) 100% no-repeat, var(--rule); }
input[type=range]::-moz-range-track { height: 2px; background: var(--rule); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.calc__out { background: var(--paper-2); padding: clamp(24px, 3.5vw, 48px); display: grid; gap: var(--space-xl); position: sticky; top: 96px; }
.calc__result { display: grid; gap: var(--space-xs); }
.calc__label { font-size: 0.92rem; color: var(--ink-2); }
.calc__num { font-family: var(--f-display); font-stretch: 125%; font-weight: 850; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 0.95; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calc__formula { font-family: var(--f-data); font-size: 0.76rem; line-height: 1.8; color: var(--ink); border-top: 1px solid var(--rule); padding-top: var(--space-lg); overflow-x: auto; }
.calc__formula b { white-space: nowrap; font-weight: 500; background: var(--hl-y); padding: 0 3px; }
.calc__note { font-size: 0.85rem; color: var(--ink-2); }

/* ---------- book ---------- */
.book { padding-block: var(--section); }
.book__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.book__grid > div:first-child { display: grid; gap: var(--space-lg); }
.book__lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 36ch; }
.book__panel { background: var(--paper); padding: clamp(24px, 3.5vw, 48px); }
.book__form { display: grid; gap: var(--space-xl); }
.bfield { display: grid; gap: var(--space-sm); }
.bfield label { font-weight: 600; font-size: 0.95rem; }
.bfield input, .bfield textarea {
  font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  padding: 10px 0; border-radius: 0; width: 100%;
}
.bfield textarea { min-height: 96px; resize: vertical; border: 1px solid var(--ink); padding: 10px 12px; }
.bfield input:focus, .bfield textarea:focus { outline: none; background: oklch(0.96 0.06 103); }
.bfield .err { color: oklch(0.5 0.17 25); font-size: 0.85rem; min-height: 1.2em; }
.bfield[data-invalid] input, .bfield[data-invalid] textarea { border-color: oklch(0.5 0.17 25); }
.bfield select {
  font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink);
  padding: 10px 4px 10px 0; border-radius: 0; flex: 0 1 auto; width: 14em; max-width: 46%; min-width: 0; text-overflow: ellipsis;
}
.bfield select:focus { outline: none; background: oklch(0.96 0.06 103); }
.bfield[data-invalid] select { border-color: oklch(0.5 0.17 25); }
.phone { display: flex; gap: 12px; align-items: end; min-width: 0; }
.phone input { flex: 1 1 auto; min-width: 0; }
.reach { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--space-lg); }
.reach legend { padding: 0; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.reach__hint { font-size: 0.88rem; color: var(--ink-2); }
.reach__err { color: oklch(0.5 0.17 25); font-size: 0.85rem; min-height: 0; }
.reach__err:empty { display: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.book__form .btn { justify-self: start; }
.book__form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form__err { color: oklch(0.5 0.17 25); }
.book__done { display: grid; gap: var(--space-md); outline: none; }
.book__done-mark { width: 56px; height: 56px; color: var(--ink); }
.book__done h3 { font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }

/* ---------- footer ---------- */
.footer { padding-block: var(--space-3xl) calc(var(--space-3xl) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule); }
.footer__inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-xl); align-items: center; }

.footer__cred { font-size: 0.85rem; line-height: 1.6; color: var(--ink-2); max-width: 70ch; display: flex; flex-direction: column; padding-left: var(--space-xl); border-left: 1px solid var(--rule); }
.footer__meta { font-family: var(--f-data); font-size: 0.75rem; color: var(--ink-2); white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .case { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .case__where { padding-top: 0; }
  .case__stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl) var(--space-xl); }
  .footer__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .footer__cred { padding-left: 0; border-left: 0; }
}
@media (max-width: 860px) {
  .hero__grid, .help__grid, .team__grid, .calc__grid, .book__grid { grid-template-columns: minmax(0, 1fr); }
  .photo { max-width: 340px; }
  .help__list { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .calc__out { position: static; }
  /* origami on phones: pinned like desktop. Words on top, the model below, held centred while it folds */
  .proj { height: 260svh; }
  .proj__stick { position: sticky; top: 0; height: 100svh; display: flex; align-items: center;
    padding-top: calc(var(--nav-h, 72px) + env(safe-area-inset-top, 0px)); box-sizing: border-box; }
  .proj__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); width: 100%; }
  .proj:nth-child(even) .proj__stage { order: 0; }
  .proj__text { order: -1; gap: var(--space-sm); } /* phones: the words first, the origami below them */
  .proj__name { font-size: clamp(2rem, 10vw, 2.6rem); }
  .proj__body { font-size: 0.98rem; }
  .proj__stage { width: min(100%, 46svh); max-width: none; max-height: 46svh; }
  .projects { padding-bottom: var(--space-2xl); }
}
@media (max-width: 560px) {
  .steps__list { grid-template-columns: minmax(0, 1fr); }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

/* honeypot field: off-screen, never focusable, never announced */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* hero photo (round 4 main): a printed photo with a curled bottom-left corner and a matching top-right curl at 60%, a gentle tilt and lift */
.r2 { margin: 0; position: relative; width: 100%; isolation: isolate; }
.r2 picture, .r2 img { display: block; width: 100%; height: 100%; }
.r2 img { object-fit: cover; object-position: 50% 30%; }
.r2__shadow { position: absolute; inset: 0; z-index: -1; filter: blur(22px); pointer-events: none; }
.r2__body {
  filter:
    drop-shadow(0 1px 1px oklch(0.25 0.02 262 / 0.20))
    drop-shadow(0 8px 12px oklch(0.25 0.02 262 / 0.10))
    drop-shadow(0 22px 34px oklch(0.25 0.02 262 / 0.12));
}
.r2__lift { position: relative; transform-origin: 50% 55%; }
.r2__paper { position: relative; aspect-ratio: 4 / 5; background: oklch(0.993 0.002 255); }
.r2__paper picture { position: absolute; inset: 0; }
.r2__light { position: absolute; inset: 0; pointer-events: none; }
.r2__flapwrap { position: absolute; inset: 0; pointer-events: none; filter: drop-shadow(-2px 4px 5px oklch(0.25 0.02 262 / 0.28)); }
.r2__flap { position: absolute; inset: 0; }
.r3 .r2__lift { transform: perspective(1400px) rotateY(6deg) rotateX(2deg) rotateZ(-1.6deg); }
.r3 .r2__light { background: none; }
.r3 .r3__curl { clip-path: polygon(0 82.4%, 22% 100%, 19.5% 93%, 16.5% 86.8%, 10% 83.6%);
  background: linear-gradient(45deg, oklch(0.78 0.01 255) 0%, oklch(0.9 0.006 255) 8%, oklch(1 0 0) 13%, oklch(0.95 0.004 255) 17%, oklch(0.88 0.008 255) 22%); }
.r3 .r3__dogear { background: linear-gradient(45deg, oklch(0.995 0.001 255) 0%, oklch(0.965 0.003 255) 60%, oklch(0.9 0.006 255) 100%); }
.r4 .r3__flap--b { display: block; }
.r4 .r2__shadow { background: radial-gradient(ellipse 60% 55% at 46% 58%, oklch(0.25 0.02 262 / 0.18), transparent 70%),
  radial-gradient(circle at 6% 96%, oklch(0.25 0.02 262 / 0.30), transparent 24%),
  radial-gradient(circle at 95% 5%, oklch(0.25 0.02 262 / 0.20), transparent 16%); transform: translate(-4px, 20px); }
.r4--main .r2__paper { clip-path: polygon(0 0, 86.8% 0, 100% 10.56%, 100% 100%, 22% 100%, 0 82.4%); }
.r4--main .r3__flap--b { clip-path: polygon(100% 10.56%, 86.8% 0, 88.3% 4.2%, 90.1% 7.92%, 94% 9.84%);
  background: linear-gradient(225deg, oklch(0.78 0.01 255) 0%, oklch(0.9 0.006 255) 4.8%, oklch(1 0 0) 7.8%, oklch(0.95 0.004 255) 10.2%, oklch(0.88 0.008 255) 13.2%); }
@media (max-width: 860px) {
  .r2 { max-width: 340px; }
  /* phones: the tilt widens the print's footprint, so inset it to keep the 16px side margin clear */
  .r3 { padding-inline: 12px; box-sizing: border-box; }
}

/* small print under the form's submit button, and the privacy page */
.form__privacy { font-size: 0.78rem; line-height: 1.45; color: var(--ink-2); max-width: 52ch; margin: 0; }
.form__privacy a, .footer__meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal { padding-block: var(--space-3xl) var(--section); }
.legal .wrap { max-width: 720px; display: grid; gap: var(--space-md); }
.legal h1 { margin: 0 0 var(--space-sm); }
.legal h2 { margin: var(--space-lg) 0 0; font-size: 1.25rem; }
.legal p { margin: 0; max-width: 65ch; }
.legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal h1 { font-family: var(--f-display); font-stretch: 118%; font-weight: 800; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1; letter-spacing: -0.02em; }
.legal__back { font-size: 0.9rem; }
.legal__back--end { margin-top: var(--space-xl); }
