/* ============================================================
   WIT Architects
   ============================================================ */

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

:root {
  --paper:      #fbfbf9;
  --ink:        #111110;
  /* 4.7:1 on --paper. The lighter grey this replaced sat at 3.2:1, which
     fails WCAG AA for the small sizes it is used at - labels, captions,
     figure notes are all 11-13px. */
  --muted:      #72726b;
  --line:       rgba(17, 17, 16, 0.14);
  --line-solid: #e3e3de;

  --pad:    clamp(16px, 2.4vw, 40px);
  --gutter: clamp(12px, 1.4vw, 24px);

  /* Fluid type. The display sizes are deliberately close to their
     viewport ceiling - this page is meant to feel oversized. */
  --t-hero:  clamp(3.25rem, 12.2vw, 13rem);
  --t-xl:    clamp(2.5rem, 7.4vw, 6.75rem);
  --t-lg:    clamp(1.9rem, 4.2vw, 3.6rem);
  --t-md:    clamp(1.3rem, 2.1vw, 1.9rem);
  --t-body:  clamp(0.975rem, 0.72vw + 0.78rem, 1.2rem);
  --t-small: 0.8125rem;
  --t-label: 0.6875rem;

  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease2: cubic-bezier(0.65, 0, 0.35, 1);

  --header-h: 62px;
}

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

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

/* Component display rules (.pgrid, .toolbar...) would otherwise outrank
   the UA's [hidden] rule, so toggling el.hidden would do nothing. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--t-body);
  line-height: 1.5;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

::selection { background: var(--ink); color: var(--paper); }

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

/* --- 3. Type primitives ---------------------------------- */

.display {
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display--hero { font-size: var(--t-hero); letter-spacing: -0.045em; }

/* A heading written as two lines must render as two lines at every width.
   --len is the longest line's width in em, measured at build time, so the
   size is capped at whatever the column can show on one line. Without this
   the headings fit only by the grace of Archivo's metrics - a fallback font
   would wrap them to three lines and break the masked reveal with them. */
.display--fit { white-space: nowrap; }
.display--xl   { font-size: var(--t-xl); }
.display--lg   { font-size: var(--t-lg); }
.display--md   { font-size: var(--t-md); letter-spacing: -0.02em; line-height: 1.08; }

.lede {
  font-size: clamp(1.15rem, 1.9vw, 1.75rem);
  line-height: 1.32;
  letter-spacing: -0.018em;
  font-weight: 400;
  text-wrap: pretty;
}

.prose p + p { margin-top: 1.15em; }
.prose { max-width: 62ch; text-wrap: pretty; }

.label {
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--muted);
}

.section-no {
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* --- 4. Layout ------------------------------------------- */

.wrap { padding-inline: var(--pad); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.section {
  padding-block: clamp(72px, 11vh, 160px);
  border-top: 1px solid var(--line);
}

/* A section header: number on the left, label beside it. */
.section-head {
  grid-column: 1 / -1;
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  margin-bottom: clamp(28px, 4vw, 56px);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  padding-inline: var(--pad);
  /* A frosted bar rather than mix-blend-mode: difference, which turns
     illegible over the mid-tone renders that scroll under it. Against the
     paper background at the top of every page it reads as transparent. */
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  color: var(--ink);
}

/* Browsers without backdrop-filter get an opaque bar instead of a
   see-through one with text sitting on the image. */
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--paper); }
}

.site-header a { color: inherit; }

.brand {
  display: block;
  width: clamp(52px, 5.2vw, 76px);
  flex: none;
}
.brand svg { width: 100%; height: auto; display: block; fill: currentColor; }

.nav {
  display: flex;
  gap: clamp(14px, 1.8vw, 30px);
  font-size: var(--t-small);
  letter-spacing: -0.005em;
}

.nav a {
  position: relative;
  padding-block: 2px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.header-meta {
  margin-left: auto;
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- 6. Links & buttons ---------------------------------- */

/* "View projects +" - the plus nudges right on hover. */
.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  letter-spacing: -0.02em;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15em;
  transition: border-color 0.4s var(--ease);
}
.arrow-link span { transition: transform 0.45s var(--ease); }
.arrow-link:hover { border-color: var(--ink); }
.arrow-link:hover span { transform: translateX(0.35em); }

.arrow-link--sm { font-size: var(--t-small); font-weight: 500; }

.pill {
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.5em 1.05em;
  transition: background 0.3s var(--ease2), color 0.3s var(--ease2), border-color 0.3s var(--ease2);
  white-space: nowrap;
}
.pill:hover { border-color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --- 7. Loader ------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--paper);
  display: grid;
  place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader[hidden] { display: grid !important; opacity: 0; visibility: hidden; pointer-events: none; }

.loader__mark { width: clamp(250px, 60vw, 540px); }
.loader__mark .ribbon {
  width: 100%;
  height: auto;
  display: block;
  color: var(--ink);
  font-family: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* The tape unrolls one fold at a time; site.js sets each segment's opacity
   from the real load progress, so the mark IS the progress bar. */
.rb-seg {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.loader__pct {
  position: fixed;
  right: var(--pad);
  bottom: calc(var(--pad) + 4px);
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* --- 8. Scroll reveal ------------------------------------ */

/* Lines of display type rise out of a mask. */
.reveal-line { display: block; overflow: hidden; }

/* Word-level stagger for the big statements: each word rises on its own
   beat, a fraction behind the one before it. */
.rw {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 42ms);
}
.is-in .rw { transform: translateY(0); }

/* Wrap-tolerant variant: no mask, so the line is free to re-wrap. Words
   fade and lift a little instead of rising out of a clip. */
.reveal-line--flow { overflow: visible; }
.reveal-line--flow .rw {
  opacity: 0;
  transform: translateY(0.34em);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 52ms);
}
.is-in .reveal-line--flow .rw { opacity: 1; transform: none; }

/* The whole-line variant shares the same wrapper, so it has to exclude the
   word spans - otherwise it forces them to display:block and every word
   lands on its own line. */
.reveal-line > span:not(.rw) {
  display: block;
  transform: translateY(105%);
  transition: transform 1s var(--ease);
}
.is-in .reveal-line > span:not(.rw) { transform: translateY(0); }
.reveal-line:nth-child(2) > span:not(.rw) { transition-delay: 0.07s; }
.reveal-line:nth-child(3) > span:not(.rw) { transition-delay: 0.14s; }
.reveal-line:nth-child(4) > span:not(.rw) { transition-delay: 0.21s; }
.reveal-line:nth-child(5) > span:not(.rw) { transition-delay: 0.28s; }

.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.is-in.fade-up, .is-in .fade-up { opacity: 1; transform: none; }

.is-in .fade-up:nth-child(2) { transition-delay: 0.06s; }
.is-in .fade-up:nth-child(3) { transition-delay: 0.12s; }
.is-in .fade-up:nth-child(4) { transition-delay: 0.18s; }

/* Images scale back to 1 as they enter - a slow settle. */
.media {
  overflow: hidden;
  background: #eeeeea;
  position: relative;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  opacity: 0;
  transition: transform 1.4s var(--ease), opacity 1s var(--ease);
}
.is-in .media img, .media.is-in img { transform: none; opacity: 1; }

/* --- 9. Home hero ---------------------------------------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 4vh);
  padding-bottom: clamp(28px, 5vh, 64px);
}

.hero__title { margin-bottom: auto; padding-top: 6vh; }

.hero__foot {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  align-items: end;
}
.hero__foot .lede { grid-column: 6 / 12; }
.hero__foot .label { grid-column: 1 / 5; }

@media (max-width: 860px) {
  .hero__foot .lede, .hero__foot .label { grid-column: 1 / -1; }
  .hero__foot { gap: 1.5rem; }
}

@media (max-width: 760px) {
  /* A full-height hero leaves a dead gap on a phone - let it size to
     its content and set the rhythm with real spacing instead. */
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 9vh);
    padding-bottom: clamp(36px, 8vh, 72px);
  }
  .hero__title {
    margin-bottom: clamp(44px, 11vh, 88px);
    padding-top: 0;
  }
}

.intro-band {
  padding-block: clamp(40px, 7vh, 96px);
}

/* --- 10. Home sections ----------------------------------- */

.statement { grid-column: 1 / 8; container-type: inline-size; }
.statement .display { margin-bottom: clamp(24px, 3vw, 44px); }
.aside { grid-column: 9 / -1; }

@media (max-width: 900px) {
  .statement, .aside { grid-column: 1 / -1; }
  .aside { margin-top: 2.5rem; }
}

.def {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  padding-block: clamp(40px, 6vw, 90px);
}
.def__term { grid-column: 1 / 6; }
.def__body { grid-column: 7 / -1; }
@media (max-width: 900px) {
  .def__term, .def__body { grid-column: 1 / -1; }
  .def__body { margin-top: 1.5rem; }
}

/* --- 11. Project grid ------------------------------------ */

/* Gapless, edge-to-edge - the images do the talking. */
.pgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 1100px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }

/* One project per row on a phone. Two columns left each render about 187px
   wide - too small to read a building, and conspicuously so once a filter
   cuts the grid down to one or two of them. */
@media (max-width: 760px) {
  .pgrid { grid-template-columns: 1fr; }
  .pcard { aspect-ratio: 4 / 3; }
  /* The meta no longer needs a hover to be reachable at this size. */
  .pcard__meta { opacity: 1; transform: none; }
}

.pcard {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eeeeea;
}
.pcard img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Per-project framing from content.py ("thumb"); centred by default. */
  object-position: var(--thumb-focus, 50% 50%);
  transform-origin: var(--thumb-focus, 50% 50%);
  transform: scale(var(--thumb-zoom, 1));
  transition: transform 1.1s var(--ease);
}
.pcard:hover img { transform: scale(calc(var(--thumb-zoom, 1) * 1.045)); }

.pcard__meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.pcard:hover .pcard__meta,
.pcard:focus-visible .pcard__meta { opacity: 1; transform: none; }

.pcard__title { font-size: var(--t-md); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.pcard__sub { font-size: var(--t-label); text-transform: uppercase; letter-spacing: 0.09em; opacity: 0.85; margin-top: 0.35em; }

/* A project with no imagery yet: typography fills the tile. */
.pcard--text {
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
}
.pcard--text .pcard__meta {
  position: static;
  opacity: 1;
  transform: none;
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
}
.pcard--text .pcard__meta > * { display: block; }
.pcard--text .display--md { transition: transform 0.7s var(--ease); }
.pcard--text:hover .display--md { transform: translateX(6px); }

/* --- 12. Projects page: ring ----------------------------- */

.ring-stage {
  position: relative;
  height: 100svh;
  min-height: 560px;
}

/* As the home hero it sits under the fixed header. */
.ring-stage--hero { padding-top: var(--header-h); }

.ring-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  /* Horizontal drags spin the ring; vertical ones still scroll the page,
     which matters on a phone where the hero fills the screen. */
  touch-action: pan-y;
}
.ring-stage canvas:active { cursor: grabbing; }

/* No WebGL: the centred headline carries the hero on its own. */
.is-ring-failed .ring-hint { display: none; }

.ring-center {
  container-type: inline-size;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  text-align: center;
  padding-inline: var(--pad);
}

.ring-headline { display: block; }

/* The fixed half of the statement is drawn hollow so the noun that changes
   with the ring reads as the answer to it. Stroke width is in em, so it
   stays proportional from 22px on a phone to 56px on a desktop.
   
   Guarded by @supports: without text-stroke a transparent fill would leave
   the line invisible rather than merely unstyled. */
@supports (-webkit-text-stroke: 1px currentColor) {
  .ring-headline .reveal-line--flow .rw {
    color: transparent;
    -webkit-text-stroke: 0.032em var(--ink);
  }
}

/* The cycling word sits on its own line so only that line re-centres when
   the word changes length - "life" to "environments" is a big swing. */
.ring-word {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.ring-word > span { display: inline-block; will-change: transform, opacity; }

/* The canvas starts below the stage's header padding, so the overlay has
   to start there too or the headline rides above the ring's centre. */
.ring-stage--hero .ring-center { top: var(--header-h); }

/* The ring's opening is a wide, shallow ellipse, so the headline is set to
   run across it on one line at desktop widths and fold to two when narrow. */
.ring-stage--hero .ring-center .display { max-width: 94%; }

.ring-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 5vh, 48px);
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}

/* A portrait viewport makes the ellipse a thin band adrift in whitespace.
   Shorten the stage, shrink the centre type to fit inside the ring, and
   drop the sector labels - they collide with each other at this width. */
@media (max-width: 760px) {
  .ring-stage { height: 68svh; min-height: 400px; }
  /* Shorter than it looks: the camera fits itself to the stage's aspect,
     so trimming the height widens the frame and the ring comes out bigger
     with less dead space above it. */
  .ring-stage--hero { height: 72svh; min-height: 440px; }
  .ring-center .display { font-size: clamp(1.4rem, 6.7vw, 2.4rem); }
  /* The hero headline is sized by build-pages.py's fit_style() instead: it
     writes an inline font-size, which would outrank a rule here. */
  .ring-label { display: none; }
}

/* Sector labels laid around the ring, positioned by JS. */
.ring-label {
  position: absolute;
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.85rem var(--pad);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.toolbar__spacer { margin-left: auto; }

@media (max-width: 760px) {
  .toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    /* Bleed the row to both edges so the scroll reads as intentional. */
    padding-inline: 0;
    gap: 0.4rem;
  }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > :first-child { padding-left: var(--pad); }
  .toolbar > :last-child { padding-right: var(--pad); }
  .toolbar__spacer { min-width: 0.5rem; }
}

/* --- 13. Project detail ---------------------------------- */

.pdetail {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  padding-top: calc(var(--header-h) + clamp(28px, 6vh, 72px));
}

/* Title parks itself on the left while the images scroll past. */
.pdetail__aside {
  grid-column: 1 / 5;
  position: sticky;
  top: calc(var(--header-h) + clamp(24px, 5vh, 56px));
  align-self: start;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 36px);
  padding-bottom: 3rem;
}

.pdetail__main { grid-column: 6 / -1; padding-bottom: clamp(60px, 10vh, 140px); }

@media (max-width: 900px) {
  .pdetail__aside {
    grid-column: 1 / -1;
    position: static;
    padding-bottom: 1.5rem;
  }
  .pdetail__main { grid-column: 1 / -1; }
}

.meta-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
  padding-block: clamp(32px, 5vw, 56px);
  border-block: 1px solid var(--line);
  margin-block: clamp(32px, 5vw, 56px);
}
@media (min-width: 760px) { .meta-table { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.meta-table dt { font-size: var(--t-label); text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.meta-table dd { margin: 0.4em 0 0; font-size: var(--t-small); line-height: 1.35; }

.figures { display: flex; flex-direction: column; gap: clamp(14px, 2vw, 28px); margin-top: clamp(40px, 6vw, 80px); }
.figures .media { width: 100%; }
figcaption {
  font-size: var(--t-label);
  color: var(--muted);
  margin-top: 0.7em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.fig-full {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: border-color 0.3s var(--ease);
}
.fig-full:hover { border-color: var(--ink); }

.award {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
}

/* --- 14. Next project ------------------------------------ */

.next {
  border-top: 1px solid var(--line);
  padding-block: clamp(50px, 8vh, 110px);
}
.next a { display: block; }
.next .display--xl { transition: transform 0.8s var(--ease); }
.next a:hover .display--xl { transform: translateX(clamp(8px, 1.4vw, 24px)); }

/* --- 15. Info / founders --------------------------------- */

.founder {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  padding-block: clamp(44px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
.founder__name { grid-column: 1 / 5; }
.founder__body { grid-column: 6 / -1; }
@media (max-width: 900px) {
  .founder__name, .founder__body { grid-column: 1 / -1; }
  .founder__body { margin-top: 1.25rem; }
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(44px, 6vw, 80px) clamp(24px, 3vw, 40px);
}
.footer-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter) ; }
.footer-col { grid-column: span 3; }
@media (max-width: 860px) { .footer-col { grid-column: span 6; } }
@media (max-width: 520px) { .footer-col { grid-column: 1 / -1; } }

.footer-col li + li { margin-top: 0.4em; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 3px; }

.colophon {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(40px, 7vw, 90px);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* The oversized wordmark that closes every page: full bleed, so it
   escapes the footer's own side padding. */
.footer-mark {
  margin: clamp(30px, 5vw, 60px) calc(var(--pad) * -1) 0;
}
.footer-mark svg { width: 100%; height: auto; display: block; fill: var(--ink); }

/* --- 17. Utilities --------------------------------------- */

.u-muted { color: var(--muted); }
.u-mt-1 { margin-top: 0.75rem; }
.u-mt-2 { margin-top: 1.5rem; }
.u-mt-3 { margin-top: clamp(24px, 3.5vw, 48px); }
.u-mt-4 { margin-top: clamp(40px, 6vw, 80px); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- 18. Reduced motion ---------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-line > span, .rw { transform: none; opacity: 1; }
  .fade-up { opacity: 1; transform: none; }
  .media img { transform: none; opacity: 1; }
  /* The ring is motion by definition. Drop the canvas and the drag hint,
     but keep the stage so the home headline it centres still shows; the
     projects index starts on the grid and hides the stage from JS. */
  .ring-stage canvas, .ring-hint { display: none; }
  .ring-stage { height: auto; min-height: 0; }
  .ring-center { position: static; padding-block: clamp(90px, 18vh, 200px); }
}


/* --- 19. Full-bleed image bands -------------------------- */

.bleed {
  margin: 0;
  overflow: hidden;
}
.bleed .media {
  height: clamp(300px, 64vh, 780px);
}
.bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Parallax offset, written by site.js; 0 when motion is reduced. */
  transform: scale(1.14) translate3d(0, var(--shift, 0px), 0);
  transition: opacity 1s var(--ease);
}
.is-in .bleed img, .bleed.is-in img { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .bleed img { transform: none; }
}

/* --- 20. Project marquee --------------------------------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: clamp(14px, 1.8vw, 26px);
  /* Fade both ends so titles enter and leave rather than being cut. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__run {
  display: flex;
  align-items: center;
  flex: none;
}

.marquee__run a {
  display: inline-flex;
  align-items: center;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
  transition: opacity 0.35s var(--ease);
}
.marquee__run a:hover { opacity: 0.4; }

.marquee__dot {
  margin-inline: clamp(0.5em, 1.2vw, 0.8em);
  opacity: 0.3;
  font-weight: 400;
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
  .marquee__track { animation: none; }
  .marquee__run:last-child { display: none; }
}

/* --- 21. Disciplines & sectors --------------------------- */

.disciplines li {
  display: flex;
  align-items: baseline;
  gap: clamp(0.9rem, 2vw, 2rem);
  padding-block: clamp(0.5rem, 1.1vw, 0.9rem);
  border-top: 1px solid var(--line);
}
.disciplines li:last-child { border-bottom: 1px solid var(--line); }

.discipline__no {
  font-size: var(--t-label);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}

.sector-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--t-small);
  padding-block: 0.45em;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

/* --- 22. Stats ------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 44px);
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

.stat__num {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  margin-top: 0.3em;
}

.stat__note {
  font-size: var(--t-small);
  color: var(--muted);
  margin-top: 0.8em;
  max-width: 26ch;
}

/* --- 23. Founder cards ----------------------------------- */

.founder-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 64px);
}
@media (max-width: 760px) { .founder-cards { grid-template-columns: 1fr; } }

.founder-card {
  padding-top: clamp(20px, 2.5vw, 32px);
  border-top: 1px solid var(--line);
}
.founder-card__quote {
  margin-top: clamp(16px, 2vw, 28px);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.4;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

/* --- 24. Closing call to action -------------------------- */

.cta { text-align: left; container-type: inline-size; }
.cta .arrow-link { font-size: clamp(1.1rem, 2.2vw, 1.9rem); }

/* --- 25. Founder facts ----------------------------------- */

.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 8rem) 1fr;
  gap: 0.5rem 1.25rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 1px solid var(--line); }

.facts dt {
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.facts dd { margin: 0; font-size: var(--t-small); line-height: 1.45; }

@media (max-width: 540px) {
  .facts > div { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* An address or handle set at display size still needs to read as a link. */
.link-underline {
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.06em;
  transition: border-color 0.4s var(--ease);
  overflow-wrap: anywhere;
}
.link-underline:hover { border-color: var(--ink); }

/* --- 26. Areas of practice ------------------------------- */

.practice { border-top: 1px solid var(--line); }
.practice__row { border-bottom: 1px solid var(--line); }

.practice__row > a {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  align-items: baseline;
  padding: clamp(18px, 2.6vw, 38px) var(--pad);
  /* Contain the fill's stacking so z-index:-1 sits behind the text but
     still above the page background. */
  isolation: isolate;
  transition: color 0.45s var(--ease);
}

/* The row fills from the bottom on hover, the way the reference's overlay
   does, and the text inverts with it. */
.practice__row > a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease);
}
.practice__row > a:hover,
.practice__row > a:focus-visible { color: var(--paper); }
.practice__row > a:hover::before,
.practice__row > a:focus-visible::before { transform: scaleY(1); }

.practice__name   { grid-column: 1 / 6; }
.practice__projects {
  grid-column: 7 / 11;
  font-size: var(--t-small);
  line-height: 1.4;
  opacity: 0.62;
}
.practice__count {
  grid-column: 11 / 12;
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  opacity: 0.62;
}
.practice__no {
  grid-column: 12 / -1;
  justify-self: end;
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  opacity: 0.62;
}

@media (max-width: 860px) {
  .practice__row > a {
    grid-template-columns: 1fr auto;
    gap: 0.35rem 1rem;
    align-items: start;
  }
  .practice__name     { grid-column: 1; grid-row: 1; }
  .practice__no       { grid-column: 2; grid-row: 1; justify-self: end; }
  .practice__projects { grid-column: 1 / -1; grid-row: 2; }
  .practice__count    { grid-column: 1 / -1; grid-row: 3; }
}

/* The fill is motion; without it the hover still has to be legible. */
@media (prefers-reduced-motion: reduce) {
  .practice__row > a::before { transition: none; }
}
