:root {
  --paper: #fafaf8;
  --f-display: "Host Grotesk", system-ui, sans-serif;
  --f-text: "Host Grotesk", system-ui, sans-serif;
  --f-text: "Inter", system-ui, sans-serif;
  --display-weight: 600;
  --display-track: -0.015em;
  --display-leading: 0.96;
  --nav-h: clamp(64px, 7vw, 104px);
}
.display { text-transform: uppercase; }

/* ---------- Big nav, fixed to the top ---------- */
.bignav {
  position: fixed; left: 0; right: 0; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  height: var(--nav-h); padding: 0 var(--gutter);
  font-family: var(--f-display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.25rem, 0.6rem + 3.3vw, 3.75rem); letter-spacing: -0.01em; line-height: 1;
  color: #fff; mix-blend-mode: difference;
}
.bignav a { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 0.07em; text-underline-offset: 0.1em; transition: text-decoration-color 0.4s var(--ease); }
.bignav a.on, .bignav a:hover, .bignav a:focus-visible { text-decoration-color: currentColor; }
.bignav a:hover, .bignav a:focus-visible { font-style: italic; }
@media (max-width: 719px) {
  :root { --nav-h: 56px; }
  .bignav { font-size: 4.9vw; letter-spacing: 0; }
}

/* ---------- Reels ---------- */
.hero { position: relative; height: 340svh; }
@media (prefers-reduced-motion: reduce) { .hero { height: auto; } }
/* dvh follows the phone's toolbars, so the hero is always the whole visible screen */
.pin { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); height: calc(100dvh - var(--nav-h)); overflow: hidden; }
/* measures the tallest the screen gets once the toolbars slide away (see build() in grid.js) */
.lvh-probe { position: fixed; top: 0; left: 0; width: 0; height: 100vh; height: 100lvh; visibility: hidden; pointer-events: none; }
.hero { margin-top: var(--nav-h); }
.section, .work { scroll-margin-top: var(--nav-h); }
.hero:not(.ready) .pin { opacity: 0; }
.hero.ready .pin { opacity: 1; transition: opacity 0.6s var(--ease); }

.reels {
  position: absolute; left: 0; right: 0; top: 0; overflow: hidden;
}
.reel { position: absolute; top: 0; width: var(--cell); }
.strip { will-change: transform; }
.cell {
  position: relative; width: var(--cell); height: var(--cell);
}
/* ---------- Grid marks: a still layer over the spinning reels ---------- */
.marks { position: absolute; left: 0; right: 0; top: 0; z-index: 1; pointer-events: none; }
.marks span { position: absolute; }
/* cross: hairline crosses at every corner */
[data-mark="cross"] .pt { width: 14px; height: 14px; margin: -7px 0 0 -7px; opacity: 0.4;
  background: linear-gradient(var(--ink), var(--ink)) center / 1px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) center / 100% 1px no-repeat; }
/* dot: a pin-prick at every corner */
[data-mark="dot"] .pt {
  width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%; background: var(--ink);
  opacity: calc(0.55 * var(--k, 1)); transition: opacity 0.35s var(--ease);
}
/* rule: hairlines between reels, like the drums of a machine */
[data-mark="rule"] .v { width: 1px; height: 100%; margin-left: -0.5px; background: var(--ink); opacity: 0.16; }
/* coord: every cell has an address */
[data-mark="coord"] .c { font: 500 10px/1 var(--f-text); letter-spacing: 0.04em; color: #8a8a86; mix-blend-mode: difference; }
/* payline: one window, the row the machine pays out on */
[data-mark="payline"] .h { left: 0; right: 0; height: 1px; margin-top: -0.5px; background: var(--ink); opacity: 0.85; }
[data-mark="payline"] .arrow { width: 0; height: 0; margin-top: -7px; border: 7px solid transparent; }
[data-mark="payline"] .arrow.l { left: 0; border-left: 10px solid var(--ink); border-right: 0; }
[data-mark="payline"] .arrow.r { left: auto; right: 0; border-right: 10px solid var(--ink); border-left: 0; }
.cell.pic { padding: 4px; }
.cell.pic img { width: 100%; height: 100%; object-fit: cover; }
.cell.letter {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: var(--f-display); font-weight: 800; font-style: italic;
  font-size: calc(var(--cell) * var(--fit, 1.08)); line-height: 1; letter-spacing: 0;
}
.cell.letter span { transform: translateY(-0.02em); }
/* specimen glyphs: small enough that descenders and overshoots (@ Q J &) fit the cell */
.cell.glyph { font-size: calc(var(--cell) * 0.78); }
.cell.glyph span { transform: none; }
.cell.glyph.inv { padding: 4px; font-size: calc(var(--cell) * 0.72); background: var(--ink); background-clip: content-box; color: var(--paper); }

.claim {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(20px, 3vw, 40px); z-index: 2;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--col-gap); align-items: end;
}
.claim h1 { grid-column: 1 / -1; font-size: clamp(2.2rem, 0.6rem + 4.6vw, 5.8rem); }
.claim .sub { margin-top: 14px; max-width: 30em; font-size: var(--t-m); }
.claim .actions { justify-self: end; margin-top: 14px; }

/* The claim arrives in order: the headline rolls in letter by letter (assets/roll.css),
   then the line, then the buttons. Going back up it all leaves at once, quickly. */
.claim { pointer-events: none; }
.claim.in { pointer-events: auto; }
.claim .sub, .claim .actions .btn {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.claim.in .sub, .claim.in .actions .btn {
  opacity: 1; transform: none;
  transition: opacity 0.8s var(--ease) calc(var(--i) * 70ms), transform 1s var(--ease) calc(var(--i) * 70ms),
    background-color 0.35s var(--ease), color 0.35s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .claim .sub, .claim .actions .btn { opacity: 1; transform: none; }
}
@media (max-width: 719px) {
  .claim { grid-template-columns: minmax(0, 1fr); }
  .claim h1 { font-size: 11vw; }
  .claim .actions { justify-self: start; }
}

/* ---------- Work: a dark wheel of names ---------- */
.work {
  position: relative; margin-top: 0; padding: 0;
  background: var(--ink); color: var(--paper);
}
.work .label sup { color: #8f8e88; }
/* the All projects / Featured switch, View case and the category filters:
   plain words set like the big nav, only smaller, with the same hover */
.work .pill {
  font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1;
  font-size: clamp(1rem, 0.75rem + 0.7vw, 1.5rem); color: var(--paper);
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 0.07em; text-underline-offset: 0.12em;
  transition: text-decoration-color 0.4s var(--ease);
}
.work .pill[aria-pressed="true"], .work .pill:hover, .work .pill:focus-visible { text-decoration-color: currentColor; }
.work .pill:hover, .work .pill:focus-visible { font-style: italic; }
.wheel-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.work[data-view="all"] .wheel-pin,
.work[data-view="featured"] .all { display: none; }

.frames { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.frame {
  grid-area: 1 / 1; width: min(40vw, 560px); aspect-ratio: 16 / 10; overflow: hidden;
  opacity: 0; transform: scale(0.96);
  transition: opacity 0.5s var(--ease), transform 0.9s var(--ease);
}
.frame.on { opacity: 1; transform: none; }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* difference keeps the name in the middle readable on light pictures as well as dark */
.wheel { position: absolute; left: 0; top: 50%; width: 100%; mix-blend-mode: difference; }
.wheel li {
  position: absolute; left: 50%; top: 0; transform-origin: 50% 50%;
  margin-top: -0.5em; white-space: nowrap;
  font-size: clamp(2rem, 1rem + 3.4vw, 4.75rem); line-height: 1;
}
.wheel button { color: #8f8e88; transition: color 0.3s var(--ease); font-weight: 600; letter-spacing: -0.015em; }
.wheel li.on button { color: var(--paper); }

.meta { position: absolute; left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.meta.top { top: calc(var(--nav-h) + 12px); }
.meta.bottom { bottom: 28px; display: block; }
.meta.bottom .caption { font-size: var(--t-s); }
.meta.bottom .line { color: #a9a8a2; max-width: 36em; margin-top: 4px; }
.meta.bottom .case-link { margin-top: 14px; }
.sq-grid a.item { display: block; }

.all { padding: calc(var(--nav-h) + clamp(28px, 4vw, 56px)) var(--gutter) 120px; }
.all-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.all-head .label sup { color: #8f8e88; }
.filters { display: flex; flex-wrap: wrap; gap: 10px clamp(18px, 2.4vw, 36px); margin: 26px 0 40px; }
.sq-grid .item[hidden] { display: none; }
::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: cubic-bezier(0.22, 0.75, 0.12, 1); }
.sq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px var(--col-gap); }
.sq-grid .media { aspect-ratio: 1; background: #222; }
.sq-grid .caption { margin-top: 10px; }
.sq-grid .line { color: #a9a8a2; margin-top: 4px; }
@media (max-width: 860px) { .sq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) {
  .frame { width: 86vw; }
  .wheel li { font-size: 9vw; }
}

/* ---------- The rest, set loud ---------- */
.section { padding-top: clamp(90px, 12vw, 180px); }
.manifesto .lines { font-size: clamp(2.4rem, 1rem + 5vw, 7rem); }
.services h3 { font-size: clamp(1.6rem, 1rem + 2vw, 3rem); }
.process h3 { font-size: clamp(1.4rem, 0.7rem + 1.6vw, 2.5rem); }
.ai .lead { font-size: clamp(2.2rem, 1rem + 4vw, 5.75rem); }
.why ul { font-family: var(--f-text); text-transform: none; font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
.cta h2 { font-size: clamp(3rem, 1rem + 9vw, 13rem); }
.cta .mail { text-transform: none; }
