/* Totuu Labs, v3 prototype. One stylesheet for every page: a logo intro, one mesh gradient, and the dot in 3D. */

/* ---------- Tokens ---------- */
:root {
  --bg: #F5F6F1;
  --ink: #0D120E;
  --accent: #F2552C;
  --lime: #D8F06A;

  --ink-2: color-mix(in oklab, var(--ink) 72%, transparent);
  --ink-3: color-mix(in oklab, var(--ink) 50%, transparent);
  --line: color-mix(in oklab, var(--ink) 13%, transparent);
  --wash: color-mix(in oklab, var(--ink) 6%, transparent);

  --glass: rgba(255, 255, 255, .5);
  --glass-edge: rgba(255, 255, 255, .78);
  --glass-shadow: 0 14px 34px -16px rgba(13, 18, 14, .22), 0 2px 6px -2px rgba(13, 18, 14, .08);

  --grain-o: .07;

  --pane: linear-gradient(140deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .34));
  --pane-edge: rgba(255, 255, 255, .72);
  --pane-shadow: 0 24px 48px -32px rgba(13, 18, 14, .38);
  --dev: linear-gradient(165deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .5));
  --dev-edge: rgba(255, 255, 255, .95);
  --dev-shadow: 0 44px 70px -40px rgba(13, 18, 14, .5), 0 14px 26px -18px rgba(13, 18, 14, .2);
  --ink-dim: color-mix(in oklab, var(--ink) 58%, transparent);
  --field: rgba(255, 255, 255, .72);
  --field-edge: color-mix(in oklab, var(--ink) 20%, transparent);
  --err: #A8201A;

  --font-d: "Funnel Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-b: "Funnel Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1320px;
  --card-h: min(56svh, 540px);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0A0D0B;
  --ink: #F1F3EA;
  --accent: #FF6A3D;

  --ink-2: color-mix(in oklab, var(--ink) 84%, transparent);
  --ink-3: color-mix(in oklab, var(--ink) 62%, transparent);
  --line: color-mix(in oklab, var(--ink) 16%, transparent);
  --wash: color-mix(in oklab, var(--ink) 9%, transparent);

  --glass: rgba(20, 26, 22, .46);
  --glass-edge: rgba(255, 255, 255, .13);
  --glass-shadow: 0 14px 34px -14px rgba(0, 0, 0, .6), 0 2px 6px -2px rgba(0, 0, 0, .4);

  --grain-o: .09;

  --pane: linear-gradient(140deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .03));
  --pane-edge: rgba(255, 255, 255, .11);
  --pane-shadow: 0 24px 48px -30px rgba(0, 0, 0, .6);
  --dev: linear-gradient(165deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07));
  --dev-edge: rgba(255, 255, 255, .26);
  --dev-shadow: 0 44px 70px -40px rgba(0, 0, 0, .8), 0 14px 26px -18px rgba(0, 0, 0, .5);
  --ink-dim: color-mix(in oklab, var(--ink) 66%, transparent);
  --field: rgba(255, 255, 255, .07);
  --field-edge: color-mix(in oklab, var(--ink) 24%, transparent);
  --err: #FFB4A8;

  color-scheme: dark;
}

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

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: color-mix(in oklab, var(--ink) 30%, transparent) transparent;
  scrollbar-width: thin;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-b);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--lime); color: #0D120E; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-d); font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 200;
  padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 500;
  transition: top .3s var(--ease);
}
.skip:focus { top: 16px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* ---------- The light ---------- */
#light {
  position: fixed; inset: 0; z-index: -2;
  width: 100%; height: 100lvh;
  display: block;
}
.no-gl #light { display: none; }
.no-gl body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  transition: opacity 1.2s var(--ease);
  background:
    radial-gradient(90% 60% at 30% -10%, color-mix(in oklab, var(--lime) 75%, var(--bg)) 0, transparent 70%),
    radial-gradient(80% 55% at 85% -5%, color-mix(in oklab, #F6F0A0 70%, var(--bg)) 0, transparent 70%);
}
.js.no-gl:not(.is-loaded) body::before { opacity: 0; }
:root[data-theme="dark"].no-gl body::before {
  background:
    radial-gradient(90% 60% at 30% -10%, #3F560F 0, transparent 70%),
    radial-gradient(80% 55% at 85% -5%, #1C4A41 0, transparent 70%);
}

.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: var(--grain-o);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.1 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---------- Intro ---------- */
/* The wordmark draws in, then main.js turns its full stop into the 3D dot and lets the page take over. */
.intro { display: none; }
.js .intro {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  pointer-events: none;
  color: var(--ink);
}
.js .intro[hidden], .js.no-intro .intro { display: none; }
.intro svg { width: clamp(210px, 32vw, 440px); height: auto; overflow: hidden; }
.in-l { transform: translateY(300px); }
.in-dot { fill: var(--accent); transform-box: fill-box; transform-origin: center; transform: scale(0); }
.intro-go .in-l { animation: in-rise .8s var(--ease) calc(var(--i) * 60ms + 60ms) both; }
.intro-go .in-dot { animation: in-dot .5s cubic-bezier(.34, 1.5, .64, 1) .6s both; }
.intro.is-3d .in-dot { visibility: hidden; }
.intro.is-out .in-l { animation: in-leave .7s cubic-bezier(.6, 0, .3, 1) calc(var(--i) * 35ms) both; }
.intro.is-out .in-dot { opacity: 0; transition: opacity .3s linear; }
@keyframes in-rise { from { transform: translateY(300px); } to { transform: none; } }
@keyframes in-dot { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes in-leave { from { transform: none; } to { transform: translateY(-300px); } }

/* ---------- Glass ---------- */
.nav-bar, .nav-sheet, .btn--glass, .ico-chip, .card-url, .more {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 0 0 1px var(--glass-edge), var(--glass-shadow);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 50;
  pointer-events: none;
}
.nav-bar {
  pointer-events: auto;
  width: min(100% - 2 * var(--gutter), var(--maxw));
  height: 62px;
  margin-inline: auto;
  padding: 0 10px 0 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 999px;
  transition: background-color .5s var(--ease), transform .8s var(--ease), opacity .8s var(--ease);
}
.js .nav-bar { opacity: 0; transform: translateY(-14px); }
.js.is-loaded .nav-bar { opacity: 1; transform: none; }
/* Only the home page brings the nav in. On the other pages it is there from the start, so moving between pages is calm. */
.js body:not([data-page="home"]) .nav-bar { opacity: 1; transform: none; }
.nav.is-scrolled .nav-bar { background: color-mix(in srgb, var(--bg) 66%, transparent); }

.brand { display: inline-flex; align-items: center; height: 44px; border-radius: 12px; }
.brand svg { height: 21px; width: auto; }
.brand-dot, .wm-dot { fill: var(--accent); }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: .9375rem; font-weight: 500;
  color: var(--ink-2);
  transition: color .3s var(--ease), background-color .3s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--wash); }
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 4px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--accent);
  transform: scale(0); transition: transform .5s var(--ease);
}
.nav-links a[aria-current] { color: var(--ink); }
.nav-links a[aria-current]::after { transform: scale(1); }
.nav-sheet a[aria-current] { background: var(--wash); }

.nav-actions { display: flex; align-items: center; gap: 6px; }

.theme-toggle, .menu-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  transition: background-color .3s var(--ease);
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--wash); }
.theme-toggle svg, .menu-toggle svg { width: 20px; height: 20px; }
.tt-core, .tt-cut, .tt-rays { transform-box: fill-box; transform-origin: center; transition: transform .7s var(--ease), opacity .4s var(--ease); }
:root[data-theme="dark"] .tt-core { transform: scale(1.55); }
:root[data-theme="dark"] .tt-cut { transform: translate(-10.5px, 5.5px); }
:root[data-theme="dark"] .tt-rays { transform: scale(.3) rotate(60deg); opacity: 0; }

.menu-toggle { display: none; }
.menu-toggle path { transform-box: fill-box; transform-origin: center; transition: transform .5s var(--ease); }
.nav.is-open .m-a { transform: translateY(3px) rotate(45deg); }
.nav.is-open .m-b { transform: translateY(-3px) rotate(-45deg); }

.nav-sheet {
  pointer-events: none;
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin: 8px auto 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  padding: 10px;
  border-radius: 28px;
  display: none; flex-direction: column;
  opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top center;
  visibility: hidden;
  transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s .4s;
}
.nav-sheet a {
  padding: 14px 18px; border-radius: 18px;
  font-family: var(--font-d); font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em;
}
.nav-sheet a:active { background: var(--wash); }
.nav.is-open .nav-sheet {
  pointer-events: auto; opacity: 1; transform: none; visibility: visible;
  transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  height: 54px; padding: 0 9px 0 26px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 500; font-size: 1rem; letter-spacing: -.005em;
  white-space: nowrap;
  transition: transform .6s var(--ease), scale .3s var(--ease), box-shadow .5s var(--ease), background-color .3s var(--ease);
  will-change: transform;
}
.btn:hover { box-shadow: 0 16px 30px -14px color-mix(in oklab, var(--ink) 55%, transparent); }
.btn:active { scale: .975; }
.btn:focus-visible, .more:focus-visible { border-radius: 999px; }
.btn-ico {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); color: var(--ink);
  transition: transform .6s var(--ease);
}
.btn-ico svg { width: 16px; height: 16px; }
.btn:hover .btn-ico { transform: rotate(-45deg); }

.btn--sm { height: 42px; padding: 0 20px; font-size: .9375rem; }
.btn--lg { height: 66px; padding: 0 11px 0 32px; font-size: 1.125rem; gap: 18px; }
.btn--lg .btn-ico { width: 44px; height: 44px; }
.btn--lg .btn-ico svg { width: 18px; height: 18px; }
.btn--glass { background: var(--glass); color: var(--ink); padding: 0 26px; }
.btn--glass:hover { box-shadow: inset 0 0 0 1px var(--glass-edge), 0 18px 34px -16px color-mix(in oklab, var(--ink) 40%, transparent); }

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 128px var(--gutter) 112px;
  text-align: center;
}
.hero-inner { display: grid; justify-items: center; will-change: transform, opacity; }

.hero h1 {
  max-width: 11.6em;
  font-size: clamp(2.5rem, 6.3vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.035em;
}
.h1-a, .h1-b { display: block; }
.hero h1 .dot { color: var(--accent); }
.w { display: inline-block; }

.js .hero h1 .w { opacity: 0; transform: translateY(.42em); filter: blur(10px); }
.js.is-loaded .hero h1 .w {
  opacity: 1; transform: none; filter: none;
  transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms + 120ms);
}

.hero-sub {
  max-width: 34em;
  margin-top: clamp(22px, 3.2vh, 34px);
  font-size: clamp(1.0625rem, 1.25vw, 1.1875rem);
  color: var(--ink-2);
}
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(26px, 3.8vh, 40px); }

.js .hero-sub, .js .hero-cta { opacity: 0; transform: translateY(18px); }
.js.is-loaded .hero-sub, .js.is-loaded .hero-cta {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease) .75s, transform 1.1s var(--ease) .75s;
}
.js.is-loaded .hero-cta { transition-delay: .87s; }

/* The headline arrives in the ash tone and fills to full ink, word by word, once the page has loaded.
   main.js adds .is-lit. Without scripts the headline is simply ink. */
.js .hero h1 .w, .js .ph h1 .w { color: var(--ink-3); }
.js.is-lit .hero h1 .w, .js.is-lit .ph h1 .w {
  color: var(--ink);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter .9s var(--ease), color 1s var(--ease) calc(var(--i, 0) * 110ms);
}
.js.intro-go.is-loaded .hero h1 .w { transition-delay: calc(var(--i, 0) * 55ms + 420ms); }
.js.intro-go.is-loaded .hero-sub { transition-delay: 1.05s; }
.js.intro-go.is-loaded .hero-cta { transition-delay: 1.17s; }
.js.intro-go .nav-bar { transition-delay: .3s; }

.cue {
  position: absolute; left: 50%; bottom: 26px;
  width: 44px; height: 64px; margin-left: -22px;
  display: grid; place-items: center;
  border-radius: 22px;
}
.cue-line { position: relative; width: 1px; height: 52px; background: color-mix(in oklab, var(--ink) 22%, transparent); }
.cue-line i {
  position: absolute; left: -2.5px; top: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: cue 2.6s cubic-bezier(.6, 0, .25, 1) infinite;
}
@keyframes cue {
  0% { transform: translateY(-3px); opacity: 0; }
  18% { opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translateY(49px); opacity: 0; }
}
.js .cue { opacity: 0; }
.js.is-loaded .cue { opacity: 1; transition: opacity 1.2s var(--ease) 1.3s; }

/* ---------- 2. Story ---------- */
/* Default is a plain list of four blocks. main.js adds .is-stepped to pin the screen and show one at a time. */
.story { padding-block: clamp(96px, 16svh, 170px); }
.steps { display: grid; gap: clamp(48px, 8svh, 88px); max-width: 44rem; }
.step { display: grid; gap: 18px; justify-items: start; align-content: center; }
.step h2, .step h3 {
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -.035em;
}
.step h2 .w { transition: opacity .5s linear; }
.step p { max-width: 30em; color: var(--ink-2); font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); }

.ico-chip {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  color: var(--ink);
}
.ico { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.js .story.is-stepped .ico-draw > * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease) .2s; }
.js .story.is-stepped .step.is-active .ico-draw > * { stroke-dashoffset: 0; }
.js .story.is-stepped .step.is-active .ico-draw > *:nth-child(2) { transition-delay: .4s; }
.js .story.is-stepped .step.is-active .ico-draw > *:nth-child(3) { transition-delay: .6s; }

.story-dots { display: none; }

.story.is-stepped { padding: 0; height: 330svh; }
.story.is-stepped .story-pin {
  position: sticky; top: 0;
  height: 100svh;
  display: grid; align-items: center;
}
.story.is-stepped .steps {
  position: relative; display: block;
  max-width: min(44rem, 56%);
  height: clamp(320px, 48svh, 430px);
}
.story.is-stepped .step {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(30px); filter: blur(8px);
  pointer-events: none;
  transition: opacity .55s var(--ease), transform .9s var(--ease), filter .55s var(--ease);
}
.story.is-stepped .step.is-past { transform: translateY(-30px); }
.story.is-stepped .step.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; transition-delay: .12s; }
.story.is-stepped .story-dots { display: flex; gap: 12px; padding-left: 3px; margin-top: clamp(20px, 4svh, 40px); }
.story-dots i {
  width: 8px; height: 8px; border-radius: 99px;
  background: color-mix(in oklab, var(--ink) 24%, transparent);
  transition: transform .7s var(--ease), background-color .5s var(--ease);
}
.story-dots i.is-on { transform: scale(1.6); background: var(--accent); }

/* ---------- 3. Work ---------- */
/* Default is a plain grid, so the projects are reachable with reduced motion or with scripts off.
   main.js adds .is-pinned to turn it into the sideways gallery. */
.work { position: relative; padding-top: clamp(96px, 16svh, 170px); }
.work-track {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) clamp(18px, 2vw, 30px);
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}
.work-intro { grid-column: 1 / -1; display: grid; gap: 18px; margin-bottom: 8px; }
.work-intro h2, .services-head h2, .split-head h2 {
  font-size: clamp(2.1rem, 4.1vw, 3.75rem);
  line-height: 1;
  letter-spacing: -.035em;
}
.work-intro p, .services-head p { color: var(--ink-2); max-width: 30em; }
.work-intro .note { font-size: .875rem; }

.card-link { display: block; border-radius: 26px; }

/* Each project sits in a glass laptop. The screen is 16:10, the same shape as the screenshot, so nothing is cropped. */
.device {
  --bz: clamp(8px, 1vw, 14px);
  position: relative;
  will-change: transform;
  transition: translate .9s var(--ease);
}
.card-link:hover .device, .proj-shot:hover .device { translate: 0 -8px; }
.device-lid {
  position: relative;
  width: 86%; margin-inline: auto;
  padding: var(--bz);
  border-radius: clamp(14px, 1.6vw, 22px) clamp(14px, 1.6vw, 22px) 6px 6px;
  background: var(--dev);
  box-shadow: inset 0 0 0 1px var(--dev-edge), var(--dev-shadow);
}
.device-lid::before {
  content: ""; position: absolute; left: 50%; top: calc(var(--bz) / 2 - 2px);
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: color-mix(in oklab, var(--ink) 34%, transparent);
}
.device-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: clamp(6px, .75vw, 11px);
  overflow: hidden;
  background: #0D120E;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--ink) 18%, transparent);
}
.card-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.device-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(112deg, rgba(255, 255, 255, .17) 0%, rgba(255, 255, 255, .05) 22%, rgba(255, 255, 255, 0) 40%);
  transition: opacity .9s var(--ease);
}
.card-link:hover .device-screen::after, .proj-shot:hover .device-screen::after { opacity: .35; }
.device-base {
  position: relative;
  height: clamp(9px, 1.15vw, 15px);
  border-radius: 3px 3px 16px 16px / 3px 3px 12px 12px;
  background: var(--dev);
  box-shadow: inset 0 0 0 1px var(--dev-edge), inset 0 -2px 3px -1px color-mix(in oklab, var(--ink) 16%, transparent), var(--dev-shadow);
}
.device-base::before {
  content: ""; position: absolute; left: 50%; top: 0;
  width: 13%; height: 42%; translate: -50% 0;
  border-radius: 0 0 8px 8px;
  background: color-mix(in oklab, var(--ink) 15%, transparent);
}

.card-cap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 7% 0;
}
.card-cap h3 { font-size: 1.375rem; letter-spacing: -.02em; line-height: 1.2; }
.card-url {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px 0 15px;
  border-radius: 999px;
  font-size: .875rem; font-weight: 500; color: var(--ink);
}
.card-url svg { width: 14px; height: 14px; transition: transform .6s var(--ease); }
.card-link:hover .card-url svg, a.card-url:hover svg { transform: translate(2px, -2px); }

.work-end { grid-column: 1 / -1; justify-self: start; }
.more {
  height: 54px; padding: 0 24px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 500;
  transition: background-color .5s var(--ease), color .5s var(--ease), transform .6s var(--ease), box-shadow .5s var(--ease);
  will-change: transform;
}
.more svg { width: 18px; height: 18px; transition: transform .6s var(--ease); }
.more:hover { background: var(--ink); color: var(--bg); box-shadow: inset 0 0 0 1px var(--ink); }
.more:hover svg { transform: translateX(4px); }
.work-bar { display: none; }

/* Pinned sideways gallery */
.work.is-pinned { padding-top: 0; }
.work.is-pinned .work-pin {
  position: sticky; top: 0;
  height: 100svh;
  display: flex; align-items: center;
  overflow: clip;
}
.work.is-pinned .work-track {
  display: flex; align-items: flex-start;
  gap: clamp(30px, 3.4vw, 54px);
  width: max-content; margin: 0;
  padding: 44px max(var(--gutter), (100vw - var(--maxw)) / 2) 0;
  will-change: transform;
}
.work.is-pinned .work-intro {
  flex: none;
  width: clamp(300px, 31vw, 470px);
  height: var(--card-h);
  margin: 0; padding-right: clamp(12px, 2.6vw, 48px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 18px;
}
.work.is-pinned .card { flex: none; }
.work.is-pinned .device { width: calc(var(--card-h) * 1.72); }
.work.is-pinned .work-end {
  flex: none;
  height: var(--card-h);
  padding-inline: clamp(24px, 5vw, 96px);
  display: grid; place-items: center;
}
.work.is-pinned .more {
  width: clamp(150px, 14vw, 190px); height: auto; aspect-ratio: 1; padding: 0;
  border-radius: 50%;
  display: grid; place-content: center; justify-items: center; gap: 10px;
}
.work.is-pinned .work-bar {
  display: block;
  position: absolute; left: max(var(--gutter), (100vw - var(--maxw)) / 2); right: max(var(--gutter), (100vw - var(--maxw)) / 2); bottom: 34px;
  height: 2px; border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.work-bar i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- 4. Services ---------- */
.services { min-height: 100svh; padding-block: clamp(120px, 22svh, 230px) clamp(96px, 16svh, 180px); }
.services-grid {
  display: grid; grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 7vw, 130px);
  align-items: start;
}
.services-head { position: sticky; top: clamp(112px, 18svh, 170px); display: grid; gap: 22px; }

.svc { border-top: 1px solid var(--line); }
.svc-item { border-bottom: 1px solid var(--line); }
.svc-item h3 { font: inherit; letter-spacing: 0; }
.svc-head {
  width: 100%;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
  padding-block: clamp(18px, 2.3vw, 28px);
  text-align: left;
  border-radius: 14px;
}
.svc-head .ico-chip { width: 52px; height: 52px; transition: background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease), scale .6s var(--ease); }
.svc-title {
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(1.45rem, 2.5vw, 2.3rem);
  line-height: 1.08; letter-spacing: -.032em;
  color: var(--ink-dim);
  transition: color .5s var(--ease), transform .7s var(--ease);
}
.svc-item.is-open .svc-title, .svc-head:hover .svc-title, .svc-head:focus-visible .svc-title { color: var(--ink); }
.svc-head:hover .svc-title { transform: translateX(6px); }
.svc-head:hover .ico-chip { scale: 1.06; }
.svc-item.is-open .ico-chip { background: var(--ink); color: var(--bg); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.svc-sign {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 22%, transparent);
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
.svc-sign::before, .svc-sign::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 1.6px; margin: -.8px 0 0 -7px;
  background: currentColor; border-radius: 2px;
  transition: transform .7s var(--ease);
}
.svc-sign::after { transform: rotate(90deg); }
.svc-item.is-open .svc-sign::after { transform: rotate(0deg); }
.svc-head:hover .svc-sign { background: var(--wash); }

/* Panels are open by default, so they read without scripts. main.js adds .is-ready to collapse all but one. */
.svc-panel { display: grid; grid-template-rows: 1fr; }
.svc-inner { min-height: 0; overflow: hidden; }
.svc.is-ready .svc-panel { grid-template-rows: 0fr; transition: grid-template-rows .8s var(--ease); }
.svc.is-ready .svc-item.is-open .svc-panel { grid-template-rows: 1fr; }
.svc.is-ready .svc-inner { visibility: hidden; opacity: 0; transition: opacity .4s var(--ease), visibility 0s .4s; }
.svc.is-ready .svc-item.is-open .svc-inner { visibility: visible; opacity: 1; transition: opacity .7s var(--ease) .15s, visibility 0s; }
.svc-body {
  display: grid; gap: 14px; justify-items: start;
  padding: 0 0 clamp(22px, 2.6vw, 32px) calc(52px + clamp(14px, 1.6vw, 22px));
}
.svc-body p { max-width: 33em; color: var(--ink-2); }
.link {
  display: inline-flex; align-items: center; gap: 8px;
  padding-block: 10px;
  font-weight: 500;
  text-decoration: underline; text-underline-offset: .32em; text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in oklab, var(--ink) 34%, transparent);
  transition: text-decoration-color .3s var(--ease);
}
.link svg { width: 16px; height: 16px; transition: transform .6s var(--ease); }
.link:hover { text-decoration-color: currentColor; }
.link:hover svg { transform: translateX(4px); }

/* ---------- 5. Contact and footer ---------- */
.contact {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: clamp(104px, 15svh, 170px);
}
.contact-inner { display: grid; justify-items: start; gap: clamp(20px, 3svh, 30px); }
.contact h2 {
  font-size: clamp(2.6rem, min(5.6vw, 9.5svh), 5rem);
  line-height: .98; letter-spacing: -.035em;
}
.contact-inner > p { max-width: 31em; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); color: var(--ink-2); }
.contact-inner > div { margin-top: 6px; }

.foot { margin-top: clamp(32px, 5svh, 96px); padding-bottom: clamp(18px, 2.6svh, 30px); }
.foot-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 28px;
  padding-bottom: clamp(10px, 1.6svh, 20px);
  font-size: .9375rem;
  color: var(--ink);
}
.foot-row nav { display: flex; flex-wrap: wrap; gap: 0 26px; }
.foot-row a {
  padding-block: 12px;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .28em; text-decoration-thickness: 1px;
  transition: text-decoration-color .3s var(--ease);
}
.foot-row a:hover { text-decoration-color: currentColor; }
.wm { display: block; width: min(100%, 38svh * 3.807); height: auto; color: var(--ink); overflow: hidden; }
/* No will-change on the letters: they are SVG groups, and promoting them to their own layers left them unpainted in Chrome after some scroll paths. */
.wm-dot { transform-box: fill-box; transform-origin: center; }
@media (max-height: 800px) and (min-width: 901px) {
  .wm { width: min(100%, 33svh * 3.807); }
}

/* ---------- Inner pages ---------- */
/* Page hero: the title, one paragraph, and a square that marks where main.js draws the page's 3D shape. */
.ph { padding: clamp(150px, 25svh, 240px) 0 clamp(52px, 9svh, 110px); }
.ph--short { padding-bottom: clamp(28px, 5svh, 60px); }
.ph-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 5vw, 90px); }
.ph h1 {
  max-width: 11em;
  font-size: clamp(2.7rem, 7.2vw, 6.25rem);
  line-height: .96; letter-spacing: -.04em;
}
.ph h1::after { content: "."; color: var(--accent); }
.ph-lead { max-width: 33em; margin-top: clamp(20px, 3svh, 32px); font-size: clamp(1.0625rem, 1.3vw, 1.25rem); color: var(--ink-2); }
.ph-meta { margin-top: 18px; font-size: .9375rem; color: var(--ink-2); }
.ph-mark { width: clamp(190px, 25vw, 350px); aspect-ratio: 1; }

.js .ph h1 .w { opacity: 0; transform: translateY(.42em); filter: blur(10px); }
.js.is-loaded .ph h1 .w {
  opacity: 1; transform: none; filter: none;
  transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms + 80ms);
}
.js .ph h1::after { opacity: 0; transition: opacity .6s var(--ease) .7s; }
.js.is-loaded .ph h1::after { opacity: 1; }
.js .ph-lead, .js .ph-meta { opacity: 0; transform: translateY(18px); }
.js.is-loaded .ph-lead, .js.is-loaded .ph-meta {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease) .45s, transform 1.1s var(--ease) .45s;
}

/* A band is one section of an inner page. A split puts its heading on the left and its content on the right. */
.band { padding-block: clamp(60px, 11svh, 130px); }
.band--first { padding-top: clamp(20px, 4svh, 48px); }
.split { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.split--form { grid-template-columns: 5fr 7fr; }
.split-head { position: sticky; top: clamp(112px, 18svh, 170px); display: grid; gap: 22px; }
.split-head > p { color: var(--ink-2); max-width: 26em; }

.prose p { max-width: 34em; font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.5; color: var(--ink-2); }
.prose p:first-child { color: var(--ink); }
.prose p + p { margin-top: 1.1em; }

/* Numbered rules (About) */
.rules { list-style: none; margin: 0; padding: 0; counter-reset: rule; border-top: 1px solid var(--line); }
.rules li {
  counter-increment: rule;
  display: grid; grid-template-columns: clamp(44px, 5vw, 72px) minmax(0, 1fr); column-gap: clamp(12px, 2vw, 28px); row-gap: 10px;
  padding-block: clamp(24px, 3.4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.rules li::before { content: counter(rule, decimal-leading-zero); grid-row: 1 / span 2; padding-top: .5em; font-size: .9375rem; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rules h3 { font-size: clamp(1.4rem, 2.3vw, 2.1rem); line-height: 1.1; letter-spacing: -.03em; }
.rules p { grid-column: 2; max-width: 34em; color: var(--ink-2); }

/* Plain rows (services available after launch) */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li {
  padding-block: clamp(18px, 2.4vw, 28px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(1.2rem, 1.9vw, 1.7rem); line-height: 1.2; letter-spacing: -.025em;
}

/* A list where each line is something included */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .46em;
  width: 11px; height: 6px;
  border-left: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink);
  transform: rotate(-45deg);
}

/* Work page: one project per row, laptop on one side and the facts on the other */
.projects { padding-bottom: clamp(40px, 8svh, 100px); }
.proj {
  display: grid; grid-template-columns: 7fr 5fr; align-items: center;
  gap: clamp(28px, 5vw, 90px);
  padding-block: clamp(48px, 9svh, 110px);
}
.proj + .proj { border-top: 1px solid var(--line); }
.proj:nth-child(even) { grid-template-columns: 5fr 7fr; }
.proj:nth-child(even) .proj-shot { order: 2; }
.proj-shot { display: block; border-radius: 26px; }
.proj-text { display: grid; gap: 14px; justify-items: start; }
.proj-kind { font-size: .9375rem; color: var(--ink-2); }
.proj-text h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.02; letter-spacing: -.035em; }
.proj-sum { max-width: 30em; font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); color: var(--ink); }
.proj-label { margin-top: 10px; font-family: var(--font-b); font-size: .9375rem; font-weight: 600; letter-spacing: 0; }
.proj-note { max-width: 32em; font-size: .875rem; color: var(--ink-2); }
.proj-text .card-url { margin-top: 10px; transition: background-color .4s var(--ease); }
.proj-text .card-url:hover { background: color-mix(in srgb, var(--bg) 70%, transparent); }

/* Services page: the list on the right, and on the left a counter with the 3D shape under it */
.zone { padding-block: clamp(8px, 2svh, 28px) clamp(40px, 8svh, 100px); }
.zone-grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 6vw, 110px); }
.zone-head { position: sticky; top: clamp(112px, 18svh, 170px); }
.zone-count { font-family: var(--font-d); font-weight: 500; font-size: clamp(2.8rem, 5.4vw, 4.75rem); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.zone-of { font-family: var(--font-b); font-size: 1rem; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.zone-name { margin-top: 10px; color: var(--ink-2); }
.part { display: grid; gap: 16px; justify-items: start; padding-block: clamp(40px, 8svh, 92px); border-top: 1px solid var(--line); }
.part:last-child { border-bottom: 1px solid var(--line); }
.part .ico-chip { transition: background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease); }
.part.is-current .ico-chip { background: var(--ink); color: var(--bg); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.part h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.02; letter-spacing: -.035em; }
.part-lede { max-width: 22em; font-family: var(--font-d); font-weight: 500; font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.22; letter-spacing: -.02em; }
.part > p:not(.part-lede) { max-width: 34em; color: var(--ink-2); }
.part .ticks { margin-top: 8px; }

/* Contact page: what happens next, and the form */
.next { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: step; display: grid; gap: 26px; }
.next li { counter-increment: step; position: relative; padding-left: 52px; display: grid; gap: 6px; }
.next li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .9375rem; font-weight: 500;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 26%, transparent);
}
.next h3 { font-family: var(--font-b); font-size: 1.0625rem; font-weight: 600; letter-spacing: 0; }
.next p { max-width: 27em; color: var(--ink-2); }
.next-alt { margin-top: 34px; color: var(--ink-2); }
.next-alt a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.next-alt a:hover { text-decoration-color: var(--accent); }

.form {
  position: relative;
  display: grid; gap: 22px;
  padding: clamp(22px, 3.2vw, 42px);
  border-radius: 30px;
  background: var(--pane);
  box-shadow: inset 0 0 0 1px var(--pane-edge), var(--pane-shadow);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-size: .9375rem; font-weight: 500; }
.opt { margin-left: 6px; font-size: .8125rem; font-weight: 400; color: var(--ink-2); }
.field-hint { font-size: .875rem; color: var(--ink-2); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; height: 54px; padding: 0 16px;
  border: 0; border-radius: 14px;
  background: var(--field); color: var(--ink);
  font: inherit;
  box-shadow: inset 0 0 0 1px var(--field-edge);
  -webkit-appearance: none; appearance: none;
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.field textarea { height: auto; min-height: 150px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field input::placeholder { color: var(--ink-2); opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 42%, transparent); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 14px; }
.select { position: relative; }
.select select { padding-right: 44px; cursor: pointer; }
.select svg { position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; translate: 0 -50%; pointer-events: none; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.check input {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin: 0; border-radius: 8px;
  display: grid; place-content: center;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--field-edge);
  cursor: pointer;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.check input::after {
  content: ""; width: 11px; height: 6px; margin-top: -3px;
  border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg);
  transform: rotate(-45deg) scale(0); transition: transform .4s var(--ease);
}
.check input:checked { background: var(--ink); box-shadow: none; }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check label { font-weight: 400; font-size: 1rem; padding-top: 1px; cursor: pointer; }
.field.is-invalid input, .field.is-invalid textarea { box-shadow: inset 0 0 0 2px var(--err); }
.field-error { font-size: .875rem; font-weight: 500; color: var(--err); }
.field-error::before { content: "! "; font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 4px; }
.form-actions .btn { border: 0; cursor: pointer; }
.form-actions .btn:disabled { opacity: .6; cursor: default; }
.form-note { flex: 1 1 16em; font-size: .875rem; color: var(--ink-2); }
.form-note a, .prose--doc a { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; color: var(--ink); }
.form-status { padding: 14px 18px; border-radius: 14px; background: var(--field); box-shadow: inset 0 0 0 1px var(--field-edge); font-weight: 500; }
.form-status[data-kind="error"] { color: var(--err); box-shadow: inset 0 0 0 1.5px var(--err); }

/* Privacy and Terms: one readable column */
.prose--doc { max-width: 44rem; }
.prose--doc h2 { margin: 2.2em 0 .6em; font-size: clamp(1.4rem, 2.1vw, 1.75rem); line-height: 1.15; letter-spacing: -.025em; }
.prose--doc > h2:first-child { margin-top: 0; }
.prose--doc p, .prose--doc p:first-child { max-width: none; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); }
.prose--doc p + p { margin-top: .9em; }
.prose--doc strong { color: var(--ink); font-weight: 600; }
.prose--doc code { padding: .1em .4em; border-radius: 6px; background: var(--wash); font-size: .92em; }
.prose--doc ul { margin: 0 0 1em; padding-left: 1.2em; display: grid; gap: .7em; color: var(--ink-2); }
.callout { margin-block: 2.4em; padding: clamp(22px, 3vw, 34px); border-radius: 24px; background: var(--pane); box-shadow: inset 0 0 0 1px var(--pane-edge), var(--pane-shadow); }
.callout h2 { margin-top: 0; }

/* The contact page already is the call to action, so its closing section is the footer alone. */
.contact--plain { min-height: 0; padding-top: clamp(40px, 8svh, 100px); }

/* ---------- Reveals ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); }
.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s);
}
.js [data-reveal="mask"], .js [data-reveal="mask"].in { opacity: 1; transform: none; transition: none; }
.js [data-reveal="mask"] > .mi { display: block; transform: translateY(.45em); clip-path: inset(0 0 105% 0); }
.js [data-reveal="mask"].in > .mi {
  transform: none; clip-path: inset(-12% -4% -18% -4%);
  transition: transform 1.3s var(--ease) var(--d, 0s), clip-path 1.3s var(--ease) var(--d, 0s);
}

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 100;
  width: 0; height: 0;
  pointer-events: none;
  opacity: 0; transition: opacity .4s var(--ease);
}
.cursor.is-on { opacity: 1; }
.cursor-ring {
  position: absolute; left: -17px; top: -17px;
  width: 34px; height: 34px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 34%, transparent);
  transition: transform .55s var(--ease), scale .3s var(--ease), background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.cursor-label {
  position: absolute; left: 0; top: 0;
  font-size: .8125rem; font-weight: 500; color: var(--ink); white-space: nowrap;
  opacity: 0; transform: translate(-50%, -50%) scale(.6);
  transition: opacity .3s var(--ease), transform .5s var(--ease);
}
.cursor.is-link .cursor-ring {
  transform: scale(1.6);
  background: color-mix(in oklab, var(--ink) 7%, transparent);
  box-shadow: inset 0 0 0 .6px color-mix(in oklab, var(--ink) 12%, transparent);
}
.cursor.is-view .cursor-ring {
  transform: scale(2.6);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: inset 0 0 0 .4px var(--glass-edge), 0 6px 14px -8px rgba(13, 18, 14, .3);
}
.cursor.is-view .cursor-label { opacity: 1; transform: translate(-50%, -50%); }
.cursor.is-down .cursor-ring { scale: .88; }

/* ---------- Case studies ---------- */
/* Hero: the facts on the left, the project's laptop on the right. That laptop shares a view-transition name with
   the project's card on Home and Work, so opening the case study grows the card's laptop into this one. */
.cs-hero { padding-bottom: clamp(40px, 8svh, 96px); }
.cs-hero-grid { display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: clamp(28px, 5vw, 84px); }
.cs-hero-text { display: grid; justify-items: start; min-width: 0; }
.cs-kind { margin-bottom: clamp(14px, 2svh, 22px); font-size: .9375rem; color: var(--ink-2); }
.cs-hero h1 { font-size: clamp(2.9rem, 6.2vw, 5.75rem); }
.cs-facts { width: 100%; display: grid; gap: 12px; margin: clamp(24px, 3.5svh, 36px) 0 0; padding-top: clamp(18px, 2.6svh, 26px); border-top: 1px solid var(--line); }
.cs-facts div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 14px; }
.cs-facts dt { font-size: .875rem; color: var(--ink-2); padding-top: .1em; }
.cs-facts dd { margin: 0; font-size: .9375rem; }
.cs-live { margin-top: 26px; }
.cs-hero-device { width: 100%; }
.js .cs-kind, .js .cs-facts, .js .cs-live { opacity: 0; transform: translateY(18px); }
.js.is-loaded .cs-kind, .js.is-loaded .cs-facts, .js.is-loaded .cs-live {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease) .55s, transform 1.1s var(--ease) .55s;
}
.js.is-loaded .cs-kind { transition-delay: .05s; }
.js.is-loaded .cs-live { transition-delay: .65s; }

/* Section headings that sit above full-width content */
.cs-head { display: grid; gap: 18px; margin-bottom: clamp(32px, 5svh, 56px); }
.cs-head h2, .cs-h { font-size: clamp(2.1rem, 4.1vw, 3.75rem); line-height: 1; letter-spacing: -.035em; }
.cs-head p { max-width: 34em; color: var(--ink-2); font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); }
.cs-h { margin-bottom: clamp(28px, 4.5svh, 52px); }
.cs-label { font-size: .9375rem; font-weight: 600; }
.cs-label--gap { margin: clamp(48px, 8svh, 84px) 0 18px; }

/* The organisers' numbers */
.cs-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.cs-stats li, .cs-card {
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: 26px;
  background: var(--pane);
  box-shadow: inset 0 0 0 1px var(--pane-edge), var(--pane-shadow);
}
.cs-stats li { display: grid; align-content: start; gap: 4px; }
.cs-num { font-family: var(--font-d); font-weight: 500; font-size: clamp(3rem, 6vw, 5.25rem); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.cs-unit { font-family: var(--font-d); font-size: clamp(1.25rem, 1.7vw, 1.5rem); letter-spacing: -.02em; }
.cs-stats p { margin-top: 12px; max-width: 26em; color: var(--ink-2); }

/* Cards: problems, audiences and build notes */
.cs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.cs-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cs-grid--2 { margin-top: clamp(40px, 7svh, 72px); }
.cs-card { display: grid; align-content: start; gap: 14px; }
.cs-card .ico-chip { margin-bottom: 6px; background: color-mix(in oklab, var(--ink) 7%, transparent); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cs-card h3 { font-size: clamp(1.3rem, 1.9vw, 1.65rem); line-height: 1.12; letter-spacing: -.025em; }
.cs-card > p { color: var(--ink-2); }
.cs-card .ticks { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.cs-grid--4 .cs-card h3 { font-size: clamp(1.2rem, 1.5vw, 1.4rem); }

/* Key pages: a laptop and its story, alternating sides */
.cs-screens { display: grid; }
.cs-screen { display: grid; grid-template-columns: 7fr 5fr; align-items: center; gap: clamp(28px, 5vw, 90px); padding-block: clamp(36px, 7svh, 84px); }
.cs-screen + .cs-screen { border-top: 1px solid var(--line); }
.cs-screen:nth-child(even) { grid-template-columns: 5fr 7fr; }
.cs-screen:nth-child(even) > .device { order: 2; }
.cs-screen-text { display: grid; gap: 14px; }
.cs-screen-text h3 { font-size: clamp(1.6rem, 2.6vw, 2.35rem); line-height: 1.05; letter-spacing: -.03em; }
.cs-screen-text p { max-width: 30em; color: var(--ink-2); font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); }

/* Design system */
.cs-swatches { list-style: none; margin: clamp(40px, 7svh, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.cs-swatches li { display: grid; gap: 4px; align-content: start; }
.cs-chip { aspect-ratio: 1 / 1.08; margin-bottom: 10px; border-radius: 20px; background: var(--c); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 14%, transparent), var(--pane-shadow); }
.cs-swatches strong { font-weight: 600; }
.cs-swatches code { font: .8125rem/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-2); }
.cs-swatches span:not(.cs-chip) { font-size: .875rem; color: var(--ink-2); }
.cs-type { margin-top: clamp(40px, 7svh, 72px); padding-top: clamp(24px, 3.5svh, 36px); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.cs-type-name { font-family: var(--font-d); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.035em; }
.cs-type > p:last-child { max-width: 38em; color: var(--ink-2); }
.cs-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.cs-part { margin: 0; padding: clamp(10px, 1.2vw, 16px); border-radius: 26px; background: var(--pane); box-shadow: inset 0 0 0 1px var(--pane-edge), var(--pane-shadow); display: grid; gap: 12px; align-content: start; }
.cs-part--wide { grid-column: 1 / -1; }
.cs-part img { display: block; width: 100%; height: auto; border-radius: 16px; }
.cs-part figcaption { padding: 0 6px 4px; font-size: .9375rem; color: var(--ink-2); }
.cs-standards { margin-top: clamp(40px, 7svh, 72px); display: grid; gap: 16px; }

/* How a change reaches the live site */
.cs-flow { list-style: none; margin: clamp(40px, 7svh, 72px) 0 0; padding: 0; counter-reset: flow; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cs-flow li {
  counter-increment: flow;
  display: grid; gap: 6px; align-content: start;
  padding: 18px 18px 20px;
  border-radius: 20px;
  background: var(--pane);
  box-shadow: inset 0 0 0 1px var(--pane-edge), var(--pane-shadow);
}
.cs-flow li::before { content: counter(flow, decimal-leading-zero); margin-bottom: 14px; font-size: .8125rem; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cs-flow strong { font-weight: 600; line-height: 1.25; }
.cs-flow span { font-size: .875rem; line-height: 1.4; color: var(--ink-2); }
.cs-flow li.is-client { background: transparent; box-shadow: none; outline: 1.5px dashed color-mix(in oklab, var(--ink) 34%, transparent); outline-offset: -1.5px; }
.cs-flow-key { margin-top: 14px; font-size: .875rem; color: var(--ink-2); }

/* What we delivered */
.cs-did { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.cs-did h3 { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: clamp(1.3rem, 1.9vw, 1.65rem); letter-spacing: -.025em; }

/* The result */
.cs-result .wrap { display: grid; justify-items: start; gap: 22px; }
.cs-result-text { max-width: 19em; font-size: clamp(2rem, 4.2vw, 3.9rem); line-height: 1.04; letter-spacing: -.035em; }
.cs-result-sub { max-width: 36em; color: var(--ink-2); font-size: clamp(1.0625rem, 1.3vw, 1.25rem); }
.cs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; }
.cs-actions .card-url { height: 54px; padding: 0 20px 0 24px; font-size: 1rem; }

/* The next case study, at the foot of each one. Its laptop carries that project's transition name, so it grows
   into the next case study's hero. */
.cs-next { padding-block: clamp(20px, 4svh, 48px) clamp(60px, 11svh, 130px); }
.cs-next-link {
  display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: clamp(24px, 4vw, 70px);
  padding: clamp(22px, 3vw, 44px);
  border-radius: 30px;
  background: var(--pane);
  box-shadow: inset 0 0 0 1px var(--pane-edge), var(--pane-shadow);
  transition: box-shadow .6s var(--ease);
}
.cs-next-text { display: grid; gap: 12px; justify-items: start; }
.cs-next-text h2 { font-size: clamp(2.1rem, 4.4vw, 4rem); line-height: 1; letter-spacing: -.04em; }
.cs-next-text p { max-width: 26em; color: var(--ink-2); }
.cs-next-link .card-cta { margin-top: 8px; }
.cs-next-link:hover .device { translate: 0 -8px; }
.cs-next-link:hover .card-cta svg { transform: translateX(3px); }
@media (max-width: 900px) { .cs-next-link { grid-template-columns: 1fr; } }

/* The card that opens a case study says so */
.card-cta { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 15px; border-radius: 999px; font-size: .875rem; font-weight: 500; }
.card-cta svg { width: 14px; height: 14px; transition: transform .6s var(--ease); }
.card-link:hover .card-cta svg, .proj-shot:hover + .proj-text .card-cta svg, a.card-cta:hover svg { transform: translateX(3px); }

/* ---------- Page transitions ---------- */
/* The nav stays put while the page changes under it, and a project's laptop travels from its card to the case
   study hero. Both are named only for page-to-page moves: the theme switch clears the names so its circular reveal
   covers the whole page. */
.nav-bar { view-transition-name: site-nav; }
.vt-theme .nav-bar, .vt-theme [style*="view-transition-name"] { view-transition-name: none !important; }
::view-transition-group(site-nav) { animation-duration: 0s; }
::view-transition-group(*) { animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
/* Every project laptop that travels between pages belongs to one class, so a new case study needs no CSS here. */
.device[style*="view-transition-name"] { view-transition-class: cs; }
::view-transition-group(*.cs) { animation-duration: .85s; }
::view-transition-old(*.cs), ::view-transition-new(*.cs) { animation-duration: .5s; height: 100%; object-fit: fill; }

/* ---------- Theme switch ---------- */
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-theme::view-transition-new(root) { animation: vt-reveal 1s cubic-bezier(.3, 0, .1, 1) both; }

/* Moving between pages cross-fades where the browser supports it. The opt-in itself is an inline style in
   src/partials/head.html, so it is in place before this file loads, even when the browser is revalidating it. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
@keyframes vt-reveal {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .work-track { grid-template-columns: 1fr; gap: 40px; }
  .device-lid { width: 90%; }
  .card-cap { padding-inline: 5%; }

  .story.is-stepped .story-pin { align-items: end; padding-bottom: clamp(40px, 9svh, 84px); }
  .story.is-stepped .steps { max-width: none; height: clamp(300px, 46svh, 400px); }
  .story.is-stepped .step { align-content: start; }
  .ico-chip { width: 50px; height: 50px; }

  .services-grid { grid-template-columns: 1fr; gap: 40px; }

  .ph { padding-top: clamp(120px, 18svh, 170px); }
  .ph-grid { grid-template-columns: 1fr; gap: 18px; }
  .ph-mark { order: -1; width: clamp(96px, 26vw, 150px); }
  .split, .split--form, .zone-grid { grid-template-columns: 1fr; gap: 36px; }
  .split-head { position: static; }
  .zone-side { display: none; }
  .proj, .proj:nth-child(even) { grid-template-columns: 1fr; gap: 26px; }
  .proj:nth-child(even) .proj-shot { order: 0; }
  .services-head { position: static; }
  .svc-body { padding-left: 0; }
  .wm { width: 100%; }

  .cs-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .cs-stats, .cs-grid, .cs-grid--4, .cs-did { grid-template-columns: 1fr; }
  .cs-screen, .cs-screen:nth-child(even) { grid-template-columns: 1fr; gap: 22px; }
  .cs-screen:nth-child(even) > .device { order: 0; }
  .cs-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
  .cs-parts { grid-template-columns: 1fr; }
  .cs-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .cs-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav { top: 12px; }
  .nav-bar { height: 56px; padding: 0 8px 0 20px; }
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
  .nav-sheet { display: flex; }
  .brand svg { height: 19px; }
  .btn--sm { padding: 0 16px; height: 40px; }
  .hero { padding: 112px var(--gutter) 104px; }
  .card-cap { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .foot-row nav { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 26px; }
  .form { border-radius: 24px; }
  .svc-head .ico-chip { width: 46px; height: 46px; }
  .svc-sign { width: 36px; height: 36px; }
}

@media (max-width: 380px) {
  .nav-actions .btn--sm { display: none; }
}

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { display: none; }
  .cue-line i { animation: none; top: 23px; }
  .js .intro { display: none; }
  .js .hero h1 .w, .js .ph h1 .w { color: var(--ink); }
  .js .ph h1 .w, .js .ph h1::after, .js .ph-lead, .js .ph-meta, .js .cs-kind, .js .cs-facts, .js .cs-live { opacity: 1; transform: none; filter: none; transition: none; }
  .proj-shot:hover .device { translate: none; }
  .card-link:hover .device { translate: none; }
  .js .hero h1 .w, .js .hero-sub, .js .hero-cta, .js .nav-bar, .js .cue, .js [data-reveal], .js [data-reveal="mask"] > .mi {
    opacity: 1; transform: none; filter: none; clip-path: none; transition: none;
  }
  .step h2 .w { transition: none; }
  .vt-theme::view-transition-new(root) { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
