/* =========================================================================
   Substrate — UNDERSTOREY
   Built in the language of huts.com: one serif doing all the talking, a warm
   cream field between two dark plates, hand-inked marks, and a motion system
   made of exactly two easing curves.
   ========================================================================= */

/* ------------------------------------------------------------- tokens ---- */
:root {
  /* field */
  --ink:          #10291d;
  --forest:       #0d3a2a;
  --moss:         #4b6a42;
  --moss-lift:    #5a7c4d;
  --moss-deep:    #3b5836;
  --ground:       #f7f0e5;
  --ground-soft:  #fcf8f1;
  --ground-deep:  #e9ddcc;
  --soil:         #4b382a;
  --stone:        #928777;
  --sage:         #b6c5ad;
  --lichen:       #cfe0a2;
  --signal:       #c58a24;

  --hairline:     rgba(13, 58, 42, .25);
  --hairline-lt:  rgba(252, 248, 241, .28);

  /* the whole motion vocabulary */
  --ease:      cubic-bezier(.33, 1, .68, 1);   /* everything */
  --ease-hand: cubic-bezier(.175, .885, .32, 1.125); /* rationed: flip + fan */

  /* geometry — one radius scale: media/cards 20px, buttons full pill,
     slabs 40px top corners */
  --r:      20px;
  --r-slab: 40px;

  --header-h: 86px;
  --page-x:   clamp(1.5rem, 3.75vw + .62rem, 4rem);
  --colgap:   clamp(1rem, .75vw + .82rem, 1.5rem);
  --sect-y:   clamp(3rem, 3.38vw + 2.21rem, 5.25rem);

  --serif: "Newsreader", "Iowan Old Style", "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans:  "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mark:  "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis owns scrolling */
}

/* Lenis runtime requirements */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--soil);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.u-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.u-skip {
  position: fixed; left: 50%; top: 8px; translate: -50% -300%;
  z-index: 200; background: var(--lichen); color: var(--ink);
  padding: .6rem 1.2rem; border-radius: 104px; font-size: 14px;
  transition: translate .25s var(--ease);
}
.u-skip:focus-visible { translate: -50% 0; }

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

/* --------------------------------------------------------- type scale ---- */
/* Weight 400 everywhere. Hierarchy is size, family and colour only. */
.d-stat {
  font-family: var(--serif);
  font-size: clamp(4.25rem, 10.28vw, 9.25rem);
  line-height: 1;
  letter-spacing: -.013em;
  color: var(--forest);
  font-optical-sizing: auto;
}
.d-h1, .d-h2 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.01em;
  font-optical-sizing: auto;
}
.d-h3 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.9vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-optical-sizing: auto;
}
.d-h4 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.d-h5 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.3;
  letter-spacing: -.02em;
}
.p-lg {
  font-size: clamp(1.075rem, 1.5vw, 1.375rem);
  line-height: 1.4;
  color: var(--soil);
}
.eyebrow { font-size: 1rem; color: var(--moss); }

/* ------------------------------------------------------------ buttons ---- */
.cta-pair { display: flex; align-items: center; gap: 6px; }

.pill, .orb {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 104px;
  font-size: 1rem;
  white-space: nowrap;
  transition:
    background-color .4s var(--ease),
    border-color .4s var(--ease),
    color .4s var(--ease),
    transform .2s var(--ease);
}
.pill { height: 48px; padding: 0 1.5rem; }
.orb { width: 48px; height: 48px; flex: none; }
.orb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.orb svg path { transition: transform .3s var(--ease); }
.pill:hover, .orb:hover { transform: translateY(-2px); }
.orb:hover svg path { transform: translateX(2px); }

.pill-solid  { background: var(--moss-lift); color: var(--ground-soft); }
.orb-solid   { background: var(--moss-lift); color: var(--ground-soft); }
.pill-solid:hover, .orb-solid:hover { background: var(--moss); }

.pill-lichen { background: var(--lichen); color: var(--ink); }
.pill-lichen:hover { background: #dcebb4; }

.pill-outline { border: 1px solid var(--hairline); color: var(--forest); }
.orb-outline  { border: 1px solid var(--hairline); color: var(--forest); }
.pill-outline:hover, .orb-outline:hover { border-color: var(--moss); background: rgba(75,106,66,.07); }

.pill-outline-light { border: 1px solid var(--hairline-lt); color: var(--ground-soft); }
.orb-outline-light  { border: 1px solid var(--hairline-lt); color: var(--ground-soft); }
.pill-outline-light:hover, .orb-outline-light:hover { background: rgba(252,248,241,.12); }

.pill-dark { background: var(--forest); color: var(--ground-soft); }
.orb-dark  { background: var(--forest); color: var(--ground-soft); }
.pill-dark:hover, .orb-dark:hover { background: var(--ink); }

.tlink {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 1rem; color: var(--moss);
}
.tlink svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }

/* =============================== header ================================== */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: var(--header-h);
  color: var(--ground-soft);
  transition:
    background-color .2s var(--ease) .2s,
    color .2s var(--ease) .2s,
    transform .6s var(--ease);
}
.hdr-in {
  height: 100%;
  padding: 0 var(--page-x);
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
}
.hdr.is-hidden { transform: translateY(calc(-1 * var(--header-h))); }
.hdr.on-light { color: var(--forest); }

.wordmark {
  font-family: var(--mark);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -.045em;
  text-transform: uppercase;
  line-height: 1;
  margin-right: auto;
}

.nav-list { display: flex; align-items: center; gap: clamp(.9rem, 1.8vw, 1.5rem); }
.nav-item { position: relative; font-size: 14px; line-height: 1; }
.nav-item > a { display: inline-block; padding: 8px 0; position: relative; }
.nav-item > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-item > a:hover::after { transform: scaleX(1); }

.plus { display: inline-block; position: relative; width: 9px; height: 9px; margin-left: 5px; vertical-align: -1px; }
.plus::before, .plus::after {
  content: ""; position: absolute; background: currentColor;
  transition: transform .3s var(--ease);
}
.plus::before { left: 0; right: 0; top: 4px; height: 1px; }
.plus::after  { top: 0; bottom: 0; left: 4px; width: 1px; }
.has-sub:hover .plus::after { transform: rotate(90deg); }

.sub {
  position: absolute; top: 100%; left: -1rem;
  min-width: 250px;
  margin-top: 14px;
  padding: .9rem 0;
  background: var(--ground-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  color: var(--forest);
  display: grid;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s .35s;
  box-shadow: 0 18px 40px rgba(16,41,29,.10);
}
.has-sub:hover .sub, .has-sub:focus-within .sub {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s;
}
.sub a {
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.2;
  padding: .5rem 1.25rem;
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.sub a:hover { color: var(--moss); background: rgba(75,106,66,.06); }

.hdr-cta { height: 44px; font-size: 14px; }

.burger {
  display: none;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--lichen);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  transition: background-color .3s var(--ease);
}
.burger span { display: block; width: 20px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

.mnav {
  position: fixed; inset: 0; z-index: 80;
  background: var(--forest);
  color: var(--ground-soft);
  padding: calc(var(--header-h) + 2rem) var(--page-x) 3rem;
  display: flex; flex-direction: column; justify-content: center; gap: 2.5rem;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.mnav[hidden] { display: none; }
.mnav.is-open { opacity: 1; }
.mnav nav { display: grid; gap: .5rem; }
.mnav nav a {
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.mnav .pill { align-self: start; }

/* ================================ hero =================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: var(--header-h) var(--page-x) 0;
  background: var(--moss);
  overflow: hidden;
  isolation: isolate;
}
.hero-plate { position: absolute; inset: 0; z-index: -1; }
.hero-plate img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .5;
  filter: saturate(.75);
}
.hero-plate::after {
  /* the paper-grain the reference gets from video noise */
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(252,248,241,.028) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(16,41,29,.05) 0 1px, transparent 1px 4px);
}

.hero-in {
  width: min(867px, 100%);
  margin: 0 auto;
  text-align: center;
  padding-bottom: clamp(6rem, 22vh, 18rem); /* the deliberate void */
}
.hero-h1 { color: var(--ground-soft); }
.hero-h1 .ln { display: block; }
.hero-h1 .ln,
.hero-cta {
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.u-preload .hero-h1 .ln,
.u-preload .hero-cta { opacity: 0; transform: translateY(18px); }
.hero-h1 .ln:nth-child(1) { transition-delay: .12s; }
.hero-h1 .ln:nth-child(2) { transition-delay: .22s; }
.hero-h1 .ln:nth-child(3) { transition-delay: .32s; }
.hero-cta { transition-delay: .5s; }

.mark { position: relative; display: inline-block; }
.scribble {
  position: absolute; left: -2%; right: -2%; width: 104%;
  bottom: -.16em; height: .28em;
  overflow: visible;
}
.scribble path {
  fill: none; stroke: var(--lichen); stroke-width: 3.4;
  stroke-linecap: round;
}
.u-loaded .scribble path { animation: draw .9s var(--ease) forwards; }
.u-loaded .scribble path:nth-child(2) { animation-delay: .18s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-cta { display: flex; justify-content: center; margin-top: clamp(2rem, 4vw, 3rem); }

/* ================================ rail =================================== */
.rail { position: relative; background: var(--ground); }
.rail-sticky {
  position: sticky; top: 0;
  height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  padding-top: calc(var(--header-h) + var(--sect-y));
  padding-bottom: var(--sect-y);
  overflow: hidden;
}
.rail-h {
  text-align: center;
  color: var(--forest);
  max-width: 900px;
  margin: 0 auto clamp(2rem, 4vw, 3.25rem);
  padding: 0 var(--page-x);
}
.hscroll { width: 100%; min-height: 0; overflow-x: clip; }
.htrack {
  display: flex;
  column-gap: 24px;
  padding-inline: var(--page-x);
  will-change: transform;
  height: 100%;
}
.cardw { flex: none; width: 421px; }

.card { perspective: 1200px; height: 100%; min-height: 420px; }
.card-in {
  position: relative; height: 100%;
  transform-style: preserve-3d;
  transition: transform .8s var(--ease-hand);
}
html:not(.lenis-scrolling) .card:hover .card-in { transform: rotateY(180deg); }

.face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--ground-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  display: grid;
  overflow: hidden;
}
.face.front { grid-template-rows: 1fr auto; }
.face.back {
  transform: rotateY(180deg);
  border-color: var(--moss);
  align-content: start;
  gap: 1rem;
  padding-top: clamp(1.75rem, 3vw, 2.5rem);
}
.face.back p { font-size: 1rem; color: var(--soil); }
.face.back .tlink { margin-top: .25rem; }

.ill { display: grid; place-items: center; padding: .5rem; }
.ill svg {
  width: 100%; max-width: 260px; height: auto;
  color: var(--moss);
  fill: none; stroke: currentColor;
  stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round;
}
.card-cap { text-align: center; color: var(--forest); transition: color .15s var(--ease); }
html:not(.lenis-scrolling) .card:hover .card-cap { color: var(--moss); }

.rail-hint {
  text-align: center; font-size: 14px; color: var(--stone);
  margin-top: clamp(1rem, 2vw, 1.5rem);
}

/* ============================== dividers ================================= */
.divider {
  display: grid;
  padding: clamp(1rem, 2vw, 2rem) var(--page-x);
  background: var(--ground);
}
.divider svg { width: 100%; height: auto; fill: none; stroke: var(--moss); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.divider.in-view path { animation: draw 1.1s var(--ease) forwards; }
.divider.in-view path:nth-child(2) { animation-delay: .55s; }
.divider.in-view path:nth-child(3) { animation-delay: .8s; }
.divider.in-view path:nth-child(4) { animation-delay: 1s; }

.div-a { justify-items: end; }
.div-a svg { max-width: 226px; margin-right: 18%; }
.div-b { justify-items: center; }
.div-b svg { max-width: 300px; }
.div-c { justify-items: center; }
.div-c svg { max-width: 220px; margin-left: 14%; }

/* =========================== back and forth ============================== */
.baf {
  background: var(--ground);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 3.5vw, 3.5rem) var(--page-x);
}
.baf.reverse .baf-media { order: 2; }

.baf-media { display: grid; place-items: center; }
.fan {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 1 / 1;
}
.fan figure {
  position: absolute; margin: 0;
  left: var(--x); top: var(--y);
  width: 90%; aspect-ratio: 1 / 1;
  border-radius: var(--r);
  overflow: clip;
  background: var(--ground-deep);
  opacity: 0;
  transform: scale(1.25);
  transition: transform .8s var(--ease-hand), opacity .8s var(--ease);
}
.fan.in-view figure { opacity: 1; transform: rotate(var(--r)) scale(1); }
.fan.in-view figure:nth-child(2) { transition-delay: .1s; }
.fan.in-view figure:nth-child(3) { transition-delay: .2s; }
.fan figure img { width: 100%; height: 100%; object-fit: cover; }
/* The source photographs are 16:9 and the plates are square, so `cover` alone
   always keeps the pale sky. Each figure zooms and biases down to the treeline. */
.fan-plate img { transform: scale(1.4);  transform-origin: 50% 74%; }
.fan-wide img  { transform: scale(1.55); transform-origin: 44% 78%; }
.fan-crop img  { transform: scale(2.1);  transform-origin: 84% 58%; }
.fan-crop2 img { transform: scale(1.7);  transform-origin: 30% 60%; }

.baf-text { max-width: 540px; display: grid; gap: clamp(1rem, 1.6vw, 1.5rem); justify-items: start; }
.baf-text h2 { color: var(--forest); }
.baf-text .cta-pair { margin-top: .5rem; }

/* ============================ work handoff =============================== */
.feature-head {
  background: var(--ground);
  padding: clamp(2.5rem, 5vw, 5rem) var(--page-x) clamp(2rem, 4vw, 3.5rem);
}
.feature-head h2 { color: var(--forest); max-width: 900px; }

.feature { background: var(--ink); }
.projects { display: block; }

.project {
  position: relative;
  display: block;
  height: 100svh;
  overflow: clip;
}
.p-shot { margin: 0; height: 100svh; }
.p-shot img {
  width: 100%; height: 100%; object-fit: cover;
  /* the source frames are 16:9 with a lot of flat overcast sky; each panel
     zooms to the treeline so cream type lands on something */
  transform: scale(1.22); transform-origin: 50% 76%;
  filter: brightness(.58) saturate(.85) sepia(.12) contrast(1.03);
  transition: transform .8s var(--ease), filter .8s var(--ease);
}
.project:hover .p-shot img { transform: scale(1.26); filter: brightness(.64) saturate(.9) sepia(.1); }

.p-dark .p-shot img { transform: scale(1.02); transform-origin: 50% 50%; filter: brightness(1.12) saturate(.9); }
.p-dark:hover .p-shot img { transform: scale(1.06); filter: brightness(1.26) saturate(.95); }
/* panel 03 reads as dusk on the same land: tighter on the lit window, colder
   and darker so it doesn't repeat panel 01's overcast frame */
.p-crop .p-shot img {
  object-position: 82% 55%; transform: scale(1.75); transform-origin: 82% 55%;
  filter: brightness(.4) saturate(.58) sepia(0) contrast(1.14);
}
.p-crop:hover .p-shot img { transform: scale(1.8); filter: brightness(.46) saturate(.64) contrast(1.12); }

.p-content { position: absolute; inset: 0 0 auto 0; height: 200svh; }
.p-sticky { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; }
.p-cap {
  padding: 0 var(--page-x);
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  color: var(--ground-soft);
  max-width: 1100px;
}
.p-cap h3 { color: var(--ground-soft); max-width: 15ch; }

.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  font-size: 12px; line-height: 18px; letter-spacing: -.01em;
  padding: .35rem .75rem;
  border-radius: 104px;
  background: rgba(16, 41, 29, .62);
  color: var(--ground-soft);
}

.p-inset {
  position: absolute; right: var(--page-x); top: 50%;
  margin: 0; translate: 0 -50%;
  width: min(420px, 32vw); aspect-ratio: 4 / 3;
  border-radius: var(--r); overflow: clip;
  border: 1px solid var(--hairline-lt);
}
.p-inset img { width: 100%; height: 100%; object-fit: cover; }

.feature-foot {
  background: var(--ink);
  padding: clamp(2.5rem, 5vw, 4rem) var(--page-x);
  display: grid; justify-items: center;
}

/* ================================ voice ================================== */
.voice {
  background: var(--ground);
  padding: clamp(3rem, 6vw, 6rem) var(--page-x) clamp(2rem, 4vw, 4rem);
}
.voice-h { color: var(--forest); margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.voice-row {
  display: grid;
  grid-template-columns: minmax(0, 975px) minmax(0, 420px);
  align-items: center;
}
.quote-card {
  margin: 0;
  background: var(--ground-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: grid; gap: 1.5rem;
  align-content: center;
  min-height: 460px;
  position: relative; z-index: 1;
}
.qglyph {
  font-family: var(--serif);
  font-size: 6.5rem; line-height: 1; color: var(--moss);
  display: block; height: 3rem;
}
.quote-body {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.9vw, 1.5rem);
  line-height: 1.35;
  color: var(--forest);
  max-width: 46ch;
}
.q-name { font-size: 1.125rem; color: var(--ink); }
.q-meta { font-size: 1.125rem; color: var(--stone); }

.voice-shot {
  position: relative; margin: 0 0 0 -90px;
  aspect-ratio: 420 / 400;
  border-radius: var(--r); overflow: clip;
  z-index: 2;
}
.voice-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; }
.chip {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 12px; line-height: 18px;
  padding: .35rem .75rem; border-radius: 104px;
  background: rgba(16,41,29,.62); color: var(--ground-soft);
}

/* ================================ stats ================================== */
.stats {
  background: var(--ground);
  padding: clamp(3rem, 6vw, 6rem) var(--page-x) clamp(2rem, 4vw, 4rem);
}
.stats .eyebrow { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(2rem, 4vw, 3.5rem);
  position: relative;
}
.stat-grid::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: var(--sage);
}
.stat-col { display: grid; align-content: start; }
.stat-col-a { padding-right: clamp(1rem, 2vw, 2rem); }
.stat-col-b { padding-left: clamp(1rem, 2vw, 2rem); margin-top: clamp(3rem, 8vw, 8rem); }

.stat {
  position: relative;
  padding: clamp(1rem, 2vw, 1.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--sage);
}
.stat-cap { font-size: 1rem; line-height: 1.5; color: var(--soil); max-width: 34ch; margin-top: .75rem; }
.d-stat .char { display: inline-block; opacity: 0; transform: translateY(14px); }
.stat.in-view .d-stat .char {
  opacity: 1; transform: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: calc(var(--i) * 40ms);
}
.emph {
  position: absolute; left: clamp(3.5rem, 12vw, 9rem); top: -.5rem;
  width: clamp(38px, 5vw, 58px); height: auto;
  fill: none; stroke: var(--moss); stroke-width: 4.5; stroke-linecap: round;
  z-index: 1;
}
.stat.in-view .emph path { animation: draw .5s var(--ease) forwards; animation-delay: .5s; }
.stat.in-view .emph path:nth-child(2) { animation-delay: .62s; }
.stat.in-view .emph path:nth-child(3) { animation-delay: .74s; }

.stats-note {
  margin-top: clamp(2rem, 4vw, 3rem);
  font-size: 14px; color: var(--stone); max-width: 62ch;
}

/* ============================== live sim ================================= */
.sim {
  background: var(--ground);
  padding: clamp(2rem, 4vw, 4rem) var(--page-x) clamp(3rem, 6vw, 6rem);
}
.sim-head { display: grid; gap: 1rem; justify-items: start; max-width: 720px; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.sim-head h2 { color: var(--forest); }
.sim-lede { font-size: 1rem; color: var(--soil); max-width: 56ch; }
.sim-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 12px; line-height: 18px;
  padding: .35rem .8rem; border-radius: 104px;
  border: 1px solid rgba(197,138,36,.45); color: #8a5f14;
  background: rgba(197,138,36,.09);
}
.sim-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }

.sim-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  background: var(--ground-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}
.sim-stages { display: grid; gap: .9rem; align-content: start; }
.sim-stage { display: grid; gap: .45rem; }
.sim-stage-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.sim-stage-name { color: var(--forest); }
.sim-stage-pct { color: var(--stone); font-variant-numeric: tabular-nums; }
.sim-bar { height: 2px; background: var(--sage); position: relative; overflow: hidden; }
.sim-bar i { position: absolute; inset: 0 auto 0 0; background: var(--moss); transform-origin: left; transform: scaleX(0); transition: transform .6s var(--ease); }
.sim-stage.is-done .sim-stage-name { color: var(--moss); }

.sim-feed { display: grid; gap: .6rem; align-content: start; min-width: 0; }
.sim-feed-h { font-size: 12px; line-height: 18px; color: var(--stone); }
.sim-feed ul { display: grid; gap: 0; }
.sim-feed li {
  display: grid; grid-template-columns: auto 1fr auto; gap: .75rem;
  align-items: baseline;
  font-size: 14px; color: var(--soil);
  padding: .45rem 0;
  border-top: 1px solid rgba(182,197,173,.55);
  animation: feedin .5s var(--ease) both;
  min-width: 0;
}
.sim-feed li span:first-child { color: var(--moss); font-variant-numeric: tabular-nums; }
.sim-feed li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-feed li span:last-child { color: var(--stone); font-variant-numeric: tabular-nums; }
@keyframes feedin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ================================= cta =================================== */
.cta-panel {
  position: relative;
  background: var(--lichen);
  border-radius: var(--r-slab) var(--r-slab) 0 0;
  margin-top: clamp(2rem, 4vw, 4rem);
  padding: clamp(3rem, 6vw, 6rem) var(--page-x) calc(clamp(3rem, 6vw, 6rem) + var(--r-slab));
  overflow: hidden;
}
.cta-doodle {
  position: absolute; left: clamp(.5rem, 3vw, 3rem); bottom: 0;
  width: clamp(90px, 11vw, 165px); height: auto;
  fill: none; stroke: var(--forest); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  color: var(--forest);
  opacity: .9;
}
.cta-in {
  max-width: 1100px; margin: 0 auto;
  padding-left: clamp(0px, 14vw, 210px);
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
}
.cta-in h2 { color: var(--forest); max-width: 18ch; }
.cta-in .cta-pair { justify-self: start; }

/* =============================== footer ================================== */
.sock {
  background: var(--forest);
  color: var(--ground-soft);
  border-radius: var(--r-slab) var(--r-slab) 0 0;
  margin-top: calc(-1 * var(--r-slab));
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 6vw, 5.5rem) var(--page-x) 2rem;
}
.sock-in {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 2.2fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.sock-mark {
  font-family: var(--mark); font-weight: 800;
  font-size: clamp(2.25rem, 4.4vw, 4rem);
  letter-spacing: -.05em; line-height: .9;
  text-transform: uppercase;
}
.sock-line { margin-top: 1.25rem; font-size: 14px; color: var(--sage); max-width: 24ch; }

.sock-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 2rem); }
.sock-col { display: grid; align-content: start; gap: .55rem; }
.sock-lbl { font-size: 1rem; font-weight: 500; margin-bottom: .35rem; }
.sock-col a {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.2;
  color: var(--ground-soft);
  transition: color .15s var(--ease);
}
.sock-col a:hover { color: var(--lichen); }

.sock-bar {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(252,248,241,.16);
  font-size: 14px; color: var(--sage);
}

/* ============================== reveals ================================== */
[data-reveal] { opacity: 0; transform: translateY(24px); }
[data-reveal].in-view {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

/* ============================== responsive =============================== */
@media (max-width: 1180px) {
  .cardw { width: 340px; }
  .voice-row { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
  .p-inset { width: 30vw; }
}

@media (max-width: 1024px) {
  .nav, .hdr-cta { display: none; }
  .burger { display: flex; }
  .wordmark { margin-right: auto; }
  .baf, .baf.reverse { grid-template-columns: 1fr; gap: 2rem; }
  .baf.reverse .baf-media { order: 0; }
  .baf-text { max-width: none; }
  .sock-in { grid-template-columns: 1fr; }
  .sock-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .sim-body { grid-template-columns: 1fr; }
  .voice-row { grid-template-columns: 1fr; }
  .voice-shot { margin: -60px 0 0 auto; width: min(320px, 70%); }
  .p-inset { display: none; }
  .cta-in { padding-left: 0; }
  .cta-doodle { opacity: .55; left: auto; right: 2%; }
}

@media (max-width: 720px) {
  :root { --header-h: 72px; }

  .hero-in { padding-bottom: clamp(4rem, 14vh, 8rem); }
  .hero-h1 .ln { display: inline; }

  /* the rail stops pinning and becomes a drag-scroll of back faces,
     exactly the way the reference degrades */
  .rail { height: auto !important; }
  .rail-sticky { position: static; height: auto; padding-top: calc(var(--header-h) + var(--sect-y)); }
  .hscroll { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hscroll::-webkit-scrollbar { display: none; }
  .htrack { transform: none !important; column-gap: 16px; padding-bottom: 1rem; }
  .cardw { width: 78vw; scroll-snap-align: center; }
  .card { min-height: 380px; }
  .card-in { transform: none !important; }
  .face.front { display: none; }
  .face.back { transform: none; position: relative; }
  .rail-hint { display: none; }

  .stat-grid { grid-template-columns: 1fr; }
  .stat-grid::before { display: none; }
  .stat-col-a, .stat-col-b { padding: 0; margin-top: 0; }
  .emph { left: auto; right: 4%; }

  .p-cap h3 { max-width: none; }
  /* the sticky caption travel is a desktop move: at 390 the panel's bottom edge
     sliced the wrapped chip row (the review floors) mid-text, so the caption
     rides with its own panel instead */
  .p-content { height: 100svh; }
  .voice-shot { margin: -40px 0 0 auto; width: 78%; }
  .quote-body { max-width: none; }
  .sock-cols { grid-template-columns: 1fr; }
  .sock-bar { flex-direction: column; gap: .5rem; }
  .divider { padding-block: .5rem; }
  .div-a svg { max-width: 130px; margin-right: 6%; }
  .div-b svg { max-width: 210px; }
  .div-c svg { max-width: 130px; margin-left: 4%; }
  .sim-body { padding: 1rem; }
  /* rotated plates need slack at the edges or they push the page sideways */
  .fan { width: 100%; }
  .fan figure { width: 74%; }
}

/* =========================== reduced motion ============================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }
  .hero-h1 .ln, .hero-cta { opacity: 1; transform: none; }
  .scribble path { stroke-dashoffset: 0; }
  .divider path { stroke-dashoffset: 0; }
  .emph path { stroke-dashoffset: 0; }
  [data-reveal] { opacity: 1; transform: none; }
  .fan figure { opacity: 1; transform: rotate(var(--r)); }
  .d-stat .char { opacity: 1; transform: none; }
  .rail { height: auto !important; }
  .rail-sticky { position: static; height: auto; }
  .hscroll { overflow-x: auto; }
  .htrack { transform: none !important; }
  .card-in { transform: none !important; }
}

/* =========================================================================
   Secondary pages — work.html / method.html
   Same tokens, same two curves, new layout families so the pages do not
   repeat the home page's rhythm.
   ========================================================================= */

/* short dark plate for sub-page heroes */
.page-head {
  position: relative;
  min-height: 74svh;
  display: grid; align-content: center;
  padding: calc(var(--header-h) + var(--sect-y)) var(--page-x) var(--sect-y);
  background: var(--moss);
  overflow: hidden; isolation: isolate;
}
.page-head .hero-plate { position: absolute; inset: 0; z-index: -1; }
.page-head-in { width: min(980px, 100%); margin: 0 auto; text-align: center; color: var(--ground-soft); }
.page-head-in h1 { color: var(--ground-soft); }
.page-head-in .lede {
  margin: clamp(1.25rem, 2.5vw, 2rem) auto 0;
  max-width: 58ch;
  font-size: clamp(1.075rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: rgba(252, 248, 241, .82);
}
.page-head-in .cta-pair { justify-content: center; margin-top: clamp(1.75rem, 3vw, 2.5rem); }

.band { background: var(--ground); padding: clamp(3rem, 6vw, 6rem) var(--page-x); }
.band-in { max-width: 1240px; margin: 0 auto; }
.band h2 { color: var(--forest); }
.band-lede { margin-top: 1.25rem; max-width: 58ch; }

/* client diagnostic: three figures across, framing carried in every caption */
.figure-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.figure-row .stat { border-top: 1px solid var(--sage); border-bottom: 0; padding-bottom: 0; }
.figure-row .d-stat { font-size: clamp(3rem, 6vw, 5.5rem); }

.findings { margin-top: clamp(2rem, 4vw, 3rem); display: grid; gap: 0; max-width: 76ch; }
.findings li {
  padding: 1rem 0; border-top: 1px solid rgba(182,197,173,.7);
  font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.5; color: var(--soil);
}
.findings li:last-child { border-bottom: 1px solid rgba(182,197,173,.7); }
.deliverable { margin-top: 1.5rem; font-size: 1rem; color: var(--stone); max-width: 60ch; }

/* case entries: serif title, ledger of metrics, quote in serif */
.case { border-top: 1px solid var(--sage); padding: clamp(2rem, 4vw, 3.5rem) 0; }
.case-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.case-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.chip-lt {
  font-size: 12px; line-height: 18px; padding: .3rem .7rem; border-radius: 104px;
  border: 1px solid var(--hairline); color: var(--forest);
}
.chip-own { background: rgba(75,106,66,.1); }
.case h3 { color: var(--forest); }
.case-body { display: grid; gap: 1rem; }
.case-body p { font-size: 1.0625rem; line-height: 1.5; }
.case-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.25rem 1.5rem; margin-top: 1.75rem; }
.case-metric .v { font-family: var(--serif); font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1.1; color: var(--forest); }
.case-metric .l { font-size: 14px; color: var(--soil); margin-top: .35rem; }
.case-metric .f { font-size: 12px; color: var(--stone); margin-top: .2rem; }
.case-quote {
  margin: clamp(1.75rem, 3vw, 2.5rem) 0 0;
  font-family: var(--serif); font-size: clamp(1.15rem, 1.7vw, 1.375rem); line-height: 1.35;
  color: var(--moss); max-width: 52ch;
}

/* stage index: sticky left column, stage blocks on the right */
.stages { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); }
.stage-index { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; display: grid; gap: .75rem; }
.stage-index a {
  font-family: var(--serif); font-size: 1.375rem; line-height: 1.2;
  color: var(--stone); transition: color .3s var(--ease);
  display: flex; align-items: baseline; gap: .75rem;
}
.stage-index a .n { font-family: var(--sans); font-size: 12px; }
.stage-index a.is-current, .stage-index a:hover { color: var(--forest); }

.stage {
  border-top: 1px solid var(--sage);
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  display: grid; gap: 1rem;
}
.stage .timing { font-size: 14px; color: var(--moss); }
.stage h3 { color: var(--forest); }
.stage p { font-size: 1.0625rem; line-height: 1.5; max-width: 60ch; }
.stage .keep {
  margin-top: .75rem; padding: 1.25rem 1.5rem;
  background: var(--ground-soft); border: 1px solid var(--hairline); border-radius: var(--r);
  font-size: 1rem; color: var(--soil); max-width: 62ch;
}
.stage .keep b { font-weight: 400; color: var(--moss); }

/* agreement chain */
.chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: clamp(1rem, 2vw, 1.75rem); margin-top: clamp(2rem, 4vw, 3rem); }
.chain-node {
  background: var(--ground-soft); border: 1px solid var(--hairline); border-radius: var(--r);
  padding: 1.5rem; display: grid; gap: .6rem; align-content: start;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.chain-node:hover { border-color: var(--moss); transform: translateY(-3px); }
.chain-node .n { font-size: 12px; color: var(--moss); }
.chain-node h3 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; color: var(--forest); }
.chain-node p { font-size: 14px; line-height: 1.5; }

@media (max-width: 1024px) {
  .figure-row { grid-template-columns: 1fr; }
  .case-top { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; }
  .stage-index { position: static; grid-auto-flow: column; overflow-x: auto; gap: 1.25rem; padding-bottom: .5rem; }
  .stage-index a { white-space: nowrap; }
}
