/* =========================================================================
   Seigrint — motion design portfolio

   One system, four scales. Nothing below sets a raw size, radius, duration
   or shadow: everything reads a token, so a change lands everywhere at once.

     · type      — size, leading and tracking move together, per size band
     · motion    — four durations, two curves, critically damped by default
     · radius    — five steps, and nested corners are derived, not guessed
     · elevation — three tiers, each a 3-layer shadow so they interpolate

   Material is carried by blur and elevation — never by tint or outlines.
   ========================================================================= */

/* ------------------------------- tokens -------------------------------- */
:root {
  color-scheme: light;               /* keep form controls + scrollbars light */

  /* ---- colour ---- */
  --bg:            #ffffff;
  --surface:       #ffffff;          /* cards sitting on --bg */
  --well:          #f2f2f4;          /* backdrop behind video */
  --ink:           #1d1d1f;          /* Apple's near-black */
  --ink-soft:      #424245;
  --muted:         #6e6e73;

  --hairline:      rgba(0, 0, 0, 0.09);
  --hairline-soft: rgba(0, 0, 0, 0.055);
  --wash:          rgba(0, 0, 0, 0.04);

  --flare:         #f4511e;          /* reddish orange, core of the sweep */
  --flare-soft:    #ff9a6b;          /* its falloff */
  --live:          #34c759;          /* availability dot — the one status colour */

  /* SF ships two optical cuts: Text below 20pt, Display from 20pt up. On
     Apple platforms -apple-system picks the cut by size on its own; where SF
     is installed by name it has to be chosen here, per size band. Everywhere
     else Inter's opsz axis does the same job. */
  --font-text:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
                  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
                  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* The calligraphic face used for one word in the About heading. */
  --font-cal:      "Instrument Serif", "Playfair Display", Georgia, serif;

  /* ---- material ---- */
  /* Liquid glass on white: blur + a lit edge + elevation, not tint. */
  --glass-bg:      rgba(255, 255, 255, 0.72);
  --glass-bg-high: rgba(255, 255, 255, 0.88);
  --glass-blur:    22px;
  --glass-sat:     180%;

  /* ---- elevation ----
     All three tiers keep the same number of layers on purpose: box-shadow
     only interpolates between lists of equal length, so a 2-layer resting
     shadow would snap straight to a 3-layer hover shadow instead of easing.
     The third layer is near-invisible at rest and grows on lift. */
  --e1:
      0 1px 2px rgba(0, 0, 0, 0.04),
      0 4px 12px rgba(0, 0, 0, 0.05),
      0 12px 28px rgba(0, 0, 0, 0.02);
  --e2:
      0 1px 2px rgba(0, 0, 0, 0.04),
      0 8px 24px rgba(0, 0, 0, 0.06),
      0 24px 56px rgba(0, 0, 0, 0.05);
  --e3:
      0 2px 4px rgba(0, 0, 0, 0.05),
      0 16px 40px rgba(0, 0, 0, 0.10),
      0 40px 88px rgba(0, 0, 0, 0.08);

  /* ---- motion ----
     Apple thinks in damping + response, not duration. Everything here is
     critically damped (no overshoot) — the settle curve below is the web's
     closest read of that. Bounce is reserved for momentum the user supplied,
     and nothing on this page is drag-driven, so nothing bounces. */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);    /* settle — arrivals */
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);    /* travel — both ends */

  --t-press:  110ms;   /* pointer-down feedback — must feel instantaneous */
  --t-fast:   200ms;   /* colour, background, opacity */
  --t-base:   320ms;   /* standard UI response (Apple's 0.3s) */
  --t-slow:   480ms;   /* larger surfaces travelling further */
  --t-reveal: 720ms;   /* first-paint reveals */

  --lift-sm: -2px;     /* buttons, chips */
  --lift-md: -4px;     /* cards, tiles, media panels */

  /* ---- radius ----
     Nested corners are concentric: an inner radius is the outer radius minus
     the padding between them, never a second guess. See --case-pad below. */
  --r-s:    12px;
  --r-m:    16px;
  --r-l:    22px;
  --r-xl:   30px;
  --r-pill: 999px;

  /* ---- layout ---- */
  --gutter: clamp(20px, 5vw, 72px);
  --maxw:   1280px;
  --nav-h:  74px;                    /* 56px pills + their 18px top offset */

  /* ---- type ----
     Tracking is size-specific: large text reads too loose as it grows and
     wants negative tracking, small text wants a touch of positive. One
     letter-spacing for all sizes is wrong somewhere, so there isn't one. */
  --track-micro:   0.07em;           /* 11–12px uppercase labels */
  --track-caption: 0.002em;          /* 13px */
  --track-ui:     -0.008em;          /* 15px */
  --track-body:   -0.011em;          /* 17px */
  --track-lede:   -0.016em;          /* 19–22px */
  --track-h3:     -0.024em;          /* 24–34px */
  --track-h2:     -0.032em;          /* 38–76px */
  --track-h1:     -0.045em;          /* 60px and up */

  /* Leading tracks size inversely — tight on display, open on body. */
  --lead-micro: 1.35;
  --lead-body:  1.6;
  --lead-lede:  1.45;
  --lead-h3:    1.18;
  --lead-h2:    1.06;
  --lead-h1:    0.98;
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* One anchor offset for the whole site. The JS anchor easing reads this
     same value, so a click and a native jump land on the same pixel. */
  scroll-padding-top: calc(var(--nav-h) + 32px);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  /* System font first: it already ships optical sizing, tracking tables and
     legibility tuning. Inter is the stand-in where there is no SF. */
  font-family: var(--font-text);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: var(--lead-body);
  font-weight: 400;
  letter-spacing: var(--track-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* JS drives the easing once it takes over; native smooth would fight the loop. */
html.has-smooth-scroll { scroll-behavior: auto; }

body.is-locked { overflow: hidden; }

/* Nothing on the page is selectable, images and video can't be dragged
   out, and long-pressing media on iOS doesn't raise the save/copy callout. */
*, *::before, *::after {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-touch-callout: none;
}
img, video { -webkit-user-drag: none; }

/* Headings: weight and leading come from the size band, set per component.
   Nothing inherits a display tracking down into a 17px subhead. */
h1, h2, h3 { margin: 0; font-weight: 600; font-family: var(--font-display); }

/* Everything else set at 20px and above takes the Display cut too; the one
   heading that sits at body size goes back to Text. */
.hero__lede, .marquee__track span, .client__logo { font-family: var(--font-display); }
.tile__meta h3 { font-family: var(--font-text); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7;
      stroke-linecap: round; stroke-linejoin: round; }

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

/* The ring follows the shape it is on rather than forcing its own corner. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500; letter-spacing: var(--track-ui);
  transform: translateY(-160%);
  transition: transform var(--t-base) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------------------------- micro-label ------------------------------- */
/* One uppercase treatment for every label on the page — section eyebrows,
   the role line, the fact labels, the about list. They were three sizes and
   three tracking values doing the same job. */
.eyebrow,
.case__role > span,
.case__facts span,
.about__list span {
  font-size: 11.5px;
  font-weight: 500;
  line-height: var(--lead-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--muted);
}

/* -------------------------------- glass -------------------------------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
          backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--e2);
}

/* Light catching the top edge of a glass slab. Kept faint — on white it
   should read as a lit rim, not a visible gradient. */
.glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
      170deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.35) 34%,
      rgba(255, 255, 255, 0) 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* --------------------------------- nav --------------------------------- */
.nav {
  position: fixed;
  top: 18px; left: 0; right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

/* Two separate slabs, centred as a pair and sized to their content rather
   than one wide bar: the mark on its own, then the links. Same height, same
   material, so they read as siblings. */
.nav__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}

.nav__pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  transition: box-shadow var(--t-slow) var(--ease),
              background var(--t-slow) var(--ease),
              transform var(--t-press) var(--ease);
}
.nav.is-scrolled .nav__pill {
  background: var(--glass-bg-high);
  box-shadow: var(--e3);
}

/* The mark: a circle the same height as the links pill. */
.nav__brand {
  flex: 0 0 auto;
  justify-content: center;
  width: 56px;
  padding: 0;
}
.nav__brand img { width: auto; height: 30px; }   /* a glyph, not a tile: no corner radius */
.nav__brand:active { transform: scale(0.94); }

.nav__pill--links { min-width: 0; }

.nav__links { display: flex; gap: 2px; }
.nav__links a {
  position: relative;
  display: block;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  letter-spacing: var(--track-ui);
  color: var(--muted);
  transition: color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.nav__links a:hover { color: var(--ink); background: var(--wash); }
.nav__links a:active { background: rgba(0, 0, 0, 0.075); transition-duration: var(--t-press); }

/* Wayfinding: the pill says which section you are actually in. */
.nav__links a[aria-current="true"] { color: var(--ink); background: var(--wash); }

/* --- the one dark pill, shared by every primary action on the page --- */
.nav__cta,
.btn--primary,
.mailto,
.tag.tag--client {
  background: var(--ink);
  color: #fff;
  border: 0;
  transition: transform var(--t-base) var(--ease),
              opacity var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.nav__cta:hover,
.btn--primary:hover,
.mailto:hover,
.tag.tag--client:hover { opacity: 0.86; transform: translateY(var(--lift-sm)); }

/* Press feedback lives on pointer-down and is effectively instant. Waiting
   for the click to show anything is what makes a page feel dead. */
.nav__cta:active,
.btn--primary:active,
.mailto:active,
.tag.tag--client:active {
  transform: translateY(0) scale(0.97);
  opacity: 0.8;
  transition-duration: var(--t-press);
}

.nav__cta {
  display: inline-flex; align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 500; letter-spacing: var(--track-ui);
  box-shadow: var(--e1);
}

/* Flex column, not grid: as a grid each bar landed in its own row and got
   spread across the full 40px, so the margin below had no say in the gap. */
.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border: 0; border-radius: var(--r-pill);
  /* It sits in its own glass pill now, so a resting fill would read as a
     circle inside a circle. The grey only shows when pressed or open. */
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--ease), transform var(--t-press) var(--ease);
}
.nav__toggle:active { transform: scale(0.92); background: var(--wash); }
.nav__toggle[aria-expanded="true"] { background: rgba(0, 0, 0, 0.09); }

/* Three bars, and they stay three bars — no morph into a cross, and no
   transition, so opening the menu doesn't animate the icon at all. */
.nav__toggle span {
  display: block; width: 17px; height: 2px; border-radius: 2px;
  background: var(--ink);
}
.nav__toggle span + span { margin-top: 3.6px; }

.nav__mobile {
  width: min(100%, 320px);
  margin-top: 8px;
  padding: 10px;
  border-radius: var(--r-xl);
  display: grid;
  gap: 2px;
  transform-origin: top center;
  animation: sheet var(--t-slow) var(--ease) both;
}
.nav__mobile a {
  padding: 13px 16px; border-radius: var(--r-l);
  font-size: 16px; letter-spacing: var(--track-body);
  transition: background var(--t-fast) var(--ease);
}
.nav__mobile a:hover { background: var(--wash); }
.nav__mobile a:active { background: rgba(0, 0, 0, 0.075); transition-duration: var(--t-press); }
.nav__mobile a[aria-current="true"] { background: var(--wash); font-weight: 500; }

/* Enter and exit run the same path in reverse, so the sheet returns the way
   it arrived instead of being cut. */
@keyframes sheet {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.nav__mobile.is-closing { animation: sheet var(--t-base) var(--ease) reverse both; }

/* ------------------------------ section --------------------------------- */
.section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
}

.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section__title {
  font-size: clamp(38px, 7vw, 76px);
  line-height: var(--lead-h2);
  letter-spacing: var(--track-h2);
  margin: 14px 0 0;
}
.section__lede {
  margin-top: 18px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: var(--lead-lede);
  letter-spacing: var(--track-lede);
  color: var(--muted);
  max-width: 46ch;
}

/* --------------------------------- hero -------------------------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(130px, 18vh, 190px) var(--gutter) clamp(40px, 6vw, 72px);
}

.hero__copy { max-width: 900px; }

.hero__title {
  font-size: clamp(60px, 11.5vw, 150px);
  font-weight: 600;
  letter-spacing: var(--track-h1);
  line-height: var(--lead-h1);
  margin: 16px 0 0;
}

/* A second headline line, set just under the title: display size, semibold,
   full ink. It always stays on one line — a wrap point that moves while the
   words roll reads as a glitch. The longest phrase ("motion that makes you
   act") is ~11.1em wide, so on narrow screens the size is capped to fit the
   content width; lengthen a phrase in main.js and raise the 11.4 to match.
   Leading matches the 1.2em letter windows of the roll. */
.hero__lede {
  margin-top: 10px;
  font-size: min(clamp(28px, 6.2vw, 80px), calc((100vw - 2 * var(--gutter)) / 11.4));
  white-space: nowrap;
  line-height: 1.2;
  letter-spacing: var(--track-h2);
  color: var(--ink);
  font-weight: 600;
}

/* Cycling words in the hero line — a letter roll. Every letter sits in its
   own clip window, exactly as tall as the distance it travels: the outgoing
   letter slides up out of its window while the incoming one rises into the
   same column from below, left to right. Pure translation — no fade, no
   blur; the clip is what makes letters appear and disappear.
   JS builds the letters and runs the motion (see main.js). */
.hero__lede .ld {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  vertical-align: top;
}
.hero__lede .ld__w { display: inline-block; white-space: nowrap; }

/* The window. 1.2em rather than 1em so descenders (p, g, y) aren't shaved
   off at rest; the roll travels the full window either way. */
.hero__lede .ld__c {
  display: inline-block;
  overflow: hidden;
  height: 1.2em;
  line-height: 1.2em;
  vertical-align: top;
}
.hero__lede .ld__l { display: inline-block; will-change: transform; }

/* The outgoing copy, pulled out of flow so it stops sizing the slot. JS pins
   its top/left first so it doesn't jump when it goes absolute. */
.hero__lede .ld__w.is-ghost {
  position: absolute;
  pointer-events: none;
}

/* Screen readers get the word, not five separate letters. */
.hero__lede .ld__sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* What the subscription is, in one paragraph — the lede above is mood, this
   is the offer. */
.hero__pitch {
  margin-top: 22px;
  max-width: 54ch;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: var(--lead-lede);
  letter-spacing: var(--track-lede);
  color: var(--muted);
}

/* Availability: scarcity stated plainly, sitting above the name. */
.avail {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 12px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; letter-spacing: var(--track-caption);
  color: var(--ink-soft);
  box-shadow: var(--e1);
}
.avail__dot {
  position: relative;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
}
/* One soft ring breathing out of the dot — enough to read as "live". */
.avail__dot::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--live);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%        { transform: scale(1);   opacity: 0.55; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-size: 15.5px; font-weight: 500; letter-spacing: var(--track-ui);
}
.btn svg { width: 17px; height: 17px; transition: transform var(--t-base) var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary { box-shadow: var(--e1); }
.btn--primary:hover { box-shadow: var(--e2); }

.btn--ghost {
  color: var(--ink);
  background: var(--surface);
  border: 0;
  box-shadow: var(--e1);
  transition: transform var(--t-base) var(--ease),
              background var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.btn--ghost:hover {
  transform: translateY(var(--lift-sm));
  background: #fafafa;
  box-shadow: var(--e2);
}
.btn--ghost:active {
  transform: translateY(0) scale(0.97);
  background: var(--wash);
  transition-duration: var(--t-press);
}

/* the showreel panel */
.hero__reel {
  position: relative;
  margin-top: clamp(48px, 7vw, 88px);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--well);
  aspect-ratio: 16 / 9;
  box-shadow: var(--e3);
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000); /* Safari corner clip */
}
.hero__video { width: 100%; height: 100%; object-fit: cover; }

/* Parallax is composed here rather than written to the element's style
   attribute — an inline transform would overwrite the reveal's own and the
   panel would fade in without ever moving. */
.hero__reel.is-in { transform: translate3d(0, var(--py, 0px), 0); }

.hero__reel-tag,
.tile__badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 500; letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--ink);
  box-shadow: var(--e1);
}

/* ------------------------------ work grid ------------------------------- */
/* Each well takes its video's own aspect ratio, so nothing is cropped.
   Rows size themselves to their content — no fixed tracks needed. */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.2vw, 30px);
  align-items: start;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  cursor: pointer;
  border-radius: var(--r-l);
  transition: transform var(--t-base) var(--ease);
}

/* Match these to the source footage. */
.tile--4x3  .tile__well { aspect-ratio: 4 / 3; }
.tile--1x1  .tile__well { aspect-ratio: 1 / 1; }
.tile--16x9 .tile__well { aspect-ratio: 16 / 9; }
.tile--3x4  .tile__well { aspect-ratio: 3 / 4; }
.tile--9x16 .tile__well { aspect-ratio: 9 / 16; }

.tile__well {
  position: relative;
  aspect-ratio: 16 / 10;             /* fallback when no ratio class is set */
  overflow: hidden;
  border-radius: var(--r-l);
  background: var(--well);
  box-shadow: var(--e1);
  transition: box-shadow var(--t-base) var(--ease);
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
}

.tile__well video,
.tile__well img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

/* The whole card lifts, not just its media — the caption is part of the
   thing you are pointing at. */
.tile:hover { transform: translateY(var(--lift-md)); }
.tile:hover .tile__well { box-shadow: var(--e2); }
.tile:hover .tile__well video { transform: scale(1.04); }
.tile:active { transform: translateY(0) scale(0.99); transition-duration: var(--t-press); }

/* glass sheen sweeping across on hover — the "refraction" pass */
.tile__well::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
      transparent 35%,
      rgba(255, 255, 255, 0.16) 48%,
      rgba(255, 255, 255, 0.04) 56%,
      transparent 68%);
  transform: translateX(-120%);
  transition: transform 1.1s var(--ease);
  pointer-events: none;
  z-index: 1;
}
.tile:hover .tile__well::after { transform: translateX(120%); }

/* Flush with the media above it — a 4px inset just reads as a misalignment. */
.tile__meta { flex: 0 0 auto; padding: 14px 2px 0; }
.tile__meta h3 {
  font-size: 17px; font-weight: 500;
  line-height: var(--lead-h3); letter-spacing: var(--track-body);
}
.tile__meta p {
  margin-top: 3px; font-size: 15px; line-height: 1.45;
  letter-spacing: var(--track-ui); color: var(--muted);
}

/* --------------------------- featured projects -------------------------- */
.cases { display: grid; gap: clamp(20px, 3vw, 36px); }

.case {
  /* The media's corner is derived from this: concentric, not a second guess. */
  --case-pad: clamp(12px, 1.6vw, 16px);

  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(20px, 3vw, 44px);
  /* A 16:9 still can never match the height of a full case-study column, so
     align the two to the top rather than floating the video in dead space. */
  align-items: start;
  padding: var(--case-pad);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--e1);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.case:hover { transform: translateY(var(--lift-md)); box-shadow: var(--e2); }
.case--flip .case__media { order: 2; }

.case__media {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--r-xl) - var(--case-pad));
  background: var(--well);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
}
.case__media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.case:hover .case__media video { transform: scale(1.03); }
.case__media:active { transform: scale(0.995); transition: transform var(--t-press) var(--ease); }

/* Play glyph, as a mask. The viewBox is cropped to the path's own bounds so
   the triangle fills the button exactly instead of sitting in padding. */
:root {
  --play-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9.06445 10.1777'%3E%3Cpath d='M0 9.22852V0.955078C0 0.310547 0.380859 0 0.832031 0C1.03125 0 1.23633 0.0585938 1.43555 0.169922L8.35547 4.21289C8.85938 4.50586 9.06445 4.72852 9.06445 5.0918C9.06445 5.44922 8.85938 5.67773 8.35547 5.9707L1.43555 10.0078C1.23633 10.1191 1.03125 10.1777 0.832031 10.1777C0.380859 10.1777 0 9.86719 0 9.22852Z' fill='white'/%3E%3C/svg%3E");
}

/* The footage underneath is near-white, so a white frosted triangle has
   nothing to sit against. Dark glass is the legible weight here, and it is
   the same material as the rest — blur and elevation, minimal tint. */
.case__play {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 2;
  width: 44px;
  aspect-ratio: 9.06445 / 10.1777;   /* the glyph's own proportions */
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  cursor: pointer;
  /* Tint carries the legibility on its own. A mask is applied after filter,
     so a drop-shadow would be generated on the button's rectangle and then
     masked away — and moving it to a wrapper isn't an option either, since a
     filter on the parent would become a backdrop root and kill the blur. */
  background: rgba(29, 29, 31, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
          backdrop-filter: blur(14px) saturate(160%);

  /* The glass is cut to the play triangle itself — the mask clips both the
     tint and the backdrop blur, so the icon IS the frosted shape rather than
     sitting inside a frosted circle. */
  -webkit-mask-image: var(--play-glyph);
          mask-image: var(--play-glyph);
  -webkit-mask-repeat: no-repeat;  mask-repeat: no-repeat;
  -webkit-mask-position: center;   mask-position: center;
  -webkit-mask-size: contain;      mask-size: contain;

  transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.case__media:hover .case__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(29, 29, 31, 0.78);
}
.case__media:active .case__play {
  transform: translate(-50%, -50%) scale(0.95);
  transition-duration: var(--t-press);
}

.case__body { padding: clamp(6px, 1.5vw, 18px); }

.case__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 500; letter-spacing: var(--track-caption);
  color: var(--ink-soft);
  border: 0;
  background: var(--wash);
}

.case__title {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: var(--lead-h3);
  letter-spacing: var(--track-h3);
}

/* Label over value, matching the facts grid below it — an inline label with
   a magic min-width was a third pattern doing the same job. */
.case__role {
  display: flex; flex-direction: column; gap: 3px;
  margin-top: 16px;
  font-size: 15px; line-height: 1.45; letter-spacing: var(--track-ui);
  color: var(--ink-soft);
}

.case__desc {
  margin-top: 18px; color: var(--muted);
  font-size: 16px; line-height: 1.55; letter-spacing: var(--track-body);
  max-width: 46ch;
}

/* Two up, label over value — four stacked rows made the text column tower
   over the 16:9 still beside it. */
.case__facts {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.case__facts li {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px; line-height: 1.45; letter-spacing: var(--track-ui);
  color: var(--ink-soft);
}
.case__facts li:nth-child(even) { padding-left: clamp(16px, 2vw, 28px); }

/* ------------------------------- clients -------------------------------- */
.clients {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.client {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 28px;
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--e1);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.client:hover { transform: translateY(var(--lift-md)); box-shadow: var(--e2); }
a.client:active { transform: translateY(0) scale(0.99); transition-duration: var(--t-press); }

.client__logo {
  font-size: 28px; font-weight: 600;
  line-height: var(--lead-h3); letter-spacing: var(--track-h3);
}
.client__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 15px; letter-spacing: var(--track-ui); color: var(--muted);
}
.client__count {
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--wash);
  font-size: 12.5px; letter-spacing: var(--track-caption);
}
.client__arrow {
  position: absolute; top: 24px; right: 24px;
  width: 18px; height: 18px;
  color: var(--muted);
  transition: transform var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.client:hover .client__arrow { transform: translate(3px, -3px); color: var(--ink); }

.client--ghost {
  background: var(--wash);
  box-shadow: none;
  color: var(--muted);
}
.client--ghost:hover { transform: none; box-shadow: none; }
.client--ghost .client__logo { font-weight: 300; color: var(--muted); }

/* marquee */
.marquee {
  margin-top: clamp(40px, 6vw, 72px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 22px;
  width: max-content;
  animation: marquee 34s linear infinite;
  will-change: transform;
}
/* Restraint: it stops while you are reading it rather than sliding out from
   under the word you are on. */
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 500;
  line-height: var(--lead-h3);
  letter-spacing: var(--track-h3);
  color: var(--muted);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------- about + contact --------------------------- */
.section--about { padding-bottom: clamp(60px, 8vw, 100px); }

.about {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(32px, 5vw, 72px);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--e1);
}

.about__title {
  margin-top: 16px;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: var(--track-h3);
  max-width: 18ch;
}

/* The heading itself holds still — the letters inside are what animate. */
[data-letters].reveal { opacity: 1; transform: none; filter: none; }

/* Word wrappers stay atomic so lines never break mid-word — the letters
   inside are inline-block and would otherwise wrap anywhere. */
[data-letters] .w { display: inline-block; color: var(--ink); }

/* Letters rise, blur and fade — the way Apple resolves text into place. */
[data-letters] .l {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(0.38em);
  transition: opacity var(--t-reveal) var(--ease),
              filter var(--t-reveal) var(--ease),
              transform var(--t-reveal) var(--ease);
  transition-delay: calc(var(--i, 0) * 26ms);
}
[data-letters].is-in .l {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* One continuous gradient across the whole word, not one per letter.
   It can only be applied once the letters have finished arriving: filter and
   transform each create a stacking context, and a background-clip:text on the
   parent does not follow a transformed child — the glyphs vanish outright.
   So main.js adds .is-lit when the last letter lands, and the letters drop
   their filter and transform at that point. */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  [data-letters] .cal.is-lit {
    color: transparent;
    background-image: linear-gradient(100deg,
        var(--ink) 0%,
        var(--ink) 45%,
        var(--flare-soft) 48%,
        var(--flare) 50%,
        var(--flare-soft) 52%,
        var(--ink) 55%,
        var(--ink) 100%);
    background-size: 300% 100%;
    background-position: 100% 0;     /* flare parked off to the left */
    background-repeat: no-repeat;
    -webkit-background-clip: text;
            background-clip: text;
    /* Long enough to read as an occasional accent rather than a pulse. */
    animation: text-sweep 11s var(--ease-inout) infinite;
  }
  [data-letters] .cal.is-lit .l {
    color: transparent;
    filter: none;
    transform: none;
    transition: none;
  }
}

/* Holds plain for most of the cycle, then sweeps left to right. Both ends of
   the keyframe sit off-glyph, so the loop point is invisible. */
@keyframes text-sweep {
  0%, 68%   { background-position: 100% 0; }
  92%, 100% { background-position: 0% 0; }
}

[data-letters] .cal {
  /* inline-block so the gradient's percentage geometry is predictable */
  display: inline-block;
  font-family: var(--font-cal);
  font-style: italic;
  font-weight: 400;
  /* serif italics read smaller than the UI face at a matched px size */
  font-size: 1.1em;
  letter-spacing: 0;
  padding-right: 0.04em;             /* room for the italic overhang */
}

.about__body {
  margin-top: 22px; color: var(--muted); max-width: 52ch;
  font-size: 17px; line-height: var(--lead-body); letter-spacing: var(--track-body);
}

.about__list { margin-top: 30px; border-top: 1px solid var(--hairline); }
.about__list li {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 0; border-bottom: 1px solid var(--hairline);
  font-size: 15px; line-height: 1.45; letter-spacing: var(--track-ui);
  color: var(--ink-soft);
}

.about__col--contact {
  display: flex; flex-direction: column;
  padding-left: clamp(0px, 2vw, 32px);
  border-left: 1px solid var(--hairline);
}
.about__cta-title {
  margin-top: 16px;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: var(--lead-h3);
  letter-spacing: var(--track-h3);
}

.mailto {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 26px; padding: 16px 22px;
  border-radius: var(--r-pill);
  font-size: clamp(15px, 1.8vw, 17px); font-weight: 500; letter-spacing: var(--track-ui);
  box-shadow: var(--e1);
}
.mailto svg { width: 18px; height: 18px; flex: 0 0 auto; transition: transform var(--t-base) var(--ease); }
.mailto:hover { box-shadow: var(--e2); }
.mailto:hover svg { transform: translateX(4px); }


/* Grouped with the address it belongs to — proximity says "these are all
   ways to reach me" better than pinning it to the column's foot. */
.socials { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 78px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--wash);
  font-size: 14.5px; letter-spacing: var(--track-ui);
  color: var(--ink-soft);
  transition: transform var(--t-base) var(--ease),
              background var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.socials a:hover {
  transform: translateY(var(--lift-sm));
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--e1);
}
.socials a:active {
  transform: translateY(0) scale(0.97);
  background: var(--wash);
  transition-duration: var(--t-press);
}

/* The call is the primary action in the contact column now, so the address
   steps down to the quiet pill rather than stacking two dark ones. */
.about__cta-body {
  margin-top: 12px; max-width: 40ch;
  font-size: 16px; line-height: 1.55; letter-spacing: var(--track-body);
  color: var(--muted);
}
.about__call { align-self: flex-start; margin-top: 24px; }

.mailto.mailto--quiet {
  margin-top: 12px;
  background: var(--wash);
  color: var(--ink);
  box-shadow: none;
}
.mailto.mailto--quiet:hover { opacity: 1; background: var(--surface); box-shadow: var(--e1); }

/* ------------------------------- services ------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.service {
  display: flex; flex-direction: column;
  padding: clamp(22px, 2.4vw, 30px);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--e1);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.service:hover { transform: translateY(var(--lift-md)); box-shadow: var(--e2); }

.service__icon { width: 26px; height: 26px; color: var(--ink); }
.service h3 {
  margin-top: 22px;
  font-family: var(--font-text);
  font-size: 18px; font-weight: 600;
  line-height: var(--lead-h3); letter-spacing: var(--track-body);
}
.service p {
  margin-top: 8px; flex: 1 1 auto;
  font-size: 15px; line-height: 1.5; letter-spacing: var(--track-ui);
  color: var(--muted);
}
/* Same chip as the case tags — a turnaround is a fact about the piece. */
.service__time {
  align-self: flex-start;
  margin-top: 20px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--wash);
  font-size: 12.5px; font-weight: 500; letter-spacing: var(--track-caption);
  color: var(--ink-soft);
}

/* -------------------------------- process ------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin: 0; padding: 0; list-style: none;
}
/* A hairline over each step, not a card: four boxes in a row would compete
   with the service cards right above. */
.step { padding-top: 20px; border-top: 1px solid var(--hairline); }
.step__n {
  font-size: 13px; font-weight: 500; letter-spacing: var(--track-caption);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.step h3 {
  margin-top: 14px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: var(--lead-h3); letter-spacing: var(--track-h3);
}
.step p {
  margin-top: 10px;
  font-size: 15.5px; line-height: 1.55; letter-spacing: var(--track-ui);
  color: var(--muted);
}

.gates {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  margin-top: clamp(40px, 5vw, 64px);
  padding: 18px 22px;
  border-radius: var(--r-l);
  background: var(--wash);
}
.gates__label {
  font-size: 11.5px; font-weight: 500;
  letter-spacing: var(--track-micro); text-transform: uppercase;
  color: var(--muted);
}
.gates__track {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0;
  margin: 0; padding: 0; list-style: none;
}
.gates__track li {
  display: inline-flex; align-items: center;
  font-size: 14.5px; font-weight: 500; letter-spacing: var(--track-ui);
  color: var(--ink);
}
/* The connector belongs to the gate after it, so a wrapped row never starts
   with a dangling line. */
.gates__track li + li::before {
  content: "";
  width: clamp(14px, 2vw, 28px); height: 1px;
  margin: 0 10px;
  background: var(--hairline);
}

/* -------------------------------- pricing ------------------------------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(24px, 2.6vw, 34px);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--e1);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.plan:hover { transform: translateY(var(--lift-md)); box-shadow: var(--e2); }

/* Featured by elevation alone — the material rule holds: no tint, no ring. */
.plan--featured { box-shadow: var(--e3); }
.plan--featured:hover { box-shadow: var(--e3); }

.plan__badge {
  position: absolute; top: clamp(20px, 2.2vw, 28px); right: clamp(20px, 2.2vw, 28px);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--wash);
  font-size: 11.5px; font-weight: 500;
  letter-spacing: var(--track-micro); text-transform: uppercase;
  color: var(--ink-soft);
}

.plan__name {
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: var(--lead-h3); letter-spacing: var(--track-h3);
}
/* Two lines reserved whether it wraps or not, so the three prices sit on
   one baseline across the row. */
.plan__for {
  min-height: calc(2 * 1.45em);
  margin-top: 6px;
  font-size: 15px; line-height: 1.45; letter-spacing: var(--track-ui);
  color: var(--muted);
}

.plan__price {
  display: flex; align-items: baseline; gap: 6px;
  margin-top: 26px;
}
.plan__amount {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.4vw, 54px); font-weight: 600;
  line-height: 1; letter-spacing: var(--track-h2);
  font-variant-numeric: tabular-nums;
}
.plan__per, .plan__from {
  font-size: 15px; letter-spacing: var(--track-ui); color: var(--muted);
}

.plan__cta { justify-content: center; margin-top: 24px; }

.plan__list { margin-top: 26px; border-top: 1px solid var(--hairline-soft); }
.plan__list li {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 15px; line-height: 1.45; letter-spacing: var(--track-ui);
  color: var(--ink-soft);
}
/* A check drawn as a mask so it takes the ink colour from currentColor. */
.plan__list li::before {
  content: "";
  flex: 0 0 auto;
  width: 15px; height: 15px; margin-top: 3px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.oneoff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  margin-top: clamp(14px, 2vw, 20px);
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--e1);
}
.oneoff__title {
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: var(--lead-h3); letter-spacing: var(--track-h3);
}
.oneoff__desc {
  margin-top: 10px; max-width: 56ch;
  font-size: 16px; line-height: 1.55; letter-spacing: var(--track-body);
  color: var(--muted);
}
.oneoff__side { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.oneoff__side .plan__price { margin-top: 0; }

.plans__note {
  margin-top: 20px;
  font-size: 13px; letter-spacing: var(--track-caption);
  color: var(--muted);
}

/* ---------------------------------- faq --------------------------------- */
.faq { max-width: 860px; border-top: 1px solid var(--hairline); }
.faq__item { border-bottom: 1px solid var(--hairline); }

.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0;
  list-style: none;
  cursor: pointer;
  font-size: clamp(17px, 1.8vw, 19px); font-weight: 500;
  line-height: 1.35; letter-spacing: var(--track-lede);
  transition: color var(--t-fast) var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--ink-soft); }

/* A plus that turns into a minus: two gradient bars, and opening collapses
   the vertical one to nothing while the whole glyph turns half a circle. */
.faq__item summary::after {
  content: "";
  flex: 0 0 auto;
  width: 14px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.7px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.7px 100% no-repeat;
  color: var(--muted);
  transition: transform var(--t-base) var(--ease),
              background-size var(--t-base) var(--ease);
}
.faq__item[open] summary::after {
  transform: rotate(180deg);
  background-size: 100% 1.7px, 1.7px 0%;
}

.faq__item p {
  max-width: 64ch;
  padding: 0 40px 24px 0;
  font-size: 16px; line-height: 1.6; letter-spacing: var(--track-body);
  color: var(--muted);
}
.faq__item[open] p { animation: faq-in var(--t-slow) var(--ease) both; }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------- welcome page ------------------------------ */
.welcome { padding-top: clamp(130px, 18vh, 190px); min-height: 100svh; }
.welcome .section__title { margin-top: 22px; max-width: 14ch; }.welcome__steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(40px, 5vw, 64px);
}
.welcome .hero__actions { margin-top: clamp(36px, 4vw, 52px); }
.welcome .plans__note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------- footer -------------------------------- */
.footer {
  /* Above the bottom blur strip, so the footer text stays readable once you
     reach the end of the page instead of sitting behind frosted glass. */
  position: relative;
  z-index: 95;
  background: var(--bg);
  /* Full-bleed background, content still on the 1280 grid. A max-width with
     auto margins left the blur strip showing either side of the footer on
     wide screens. */
  padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  /* The page runs edge to edge under viewport-fit=cover, so the bottom
     padding clears the iPhone home indicator rather than sitting under it. */
  padding-block: 32px calc(48px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 14px; letter-spacing: var(--track-caption); color: var(--muted);
  border-top: 1px solid var(--hairline);
}
.footer__dot { opacity: 0.5; }
.footer__top {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: auto;
  transition: color var(--t-fast) var(--ease);
}
/* An SVG arrow, like every other arrow on the page — a text ↑ was the one
   glyph not drawn from the same icon set. */
.footer__top svg { width: 14px; height: 14px; transition: transform var(--t-base) var(--ease); }
.footer__top:hover { color: var(--ink); }
.footer__top:hover svg { transform: translateY(-2px); }

/* ------------------- progressive top + bottom edge blur ----------------- */
/* Each strip is twice the ramp and hangs a full ramp past its edge, so the
   visible part is always exactly half of it. That keeps the mask stops as
   plain percentages — Safari mis-parses calc() inside gradient colour stops,
   drops the mask, and paints each layer as a hard-edged blurred box.
   Both strips sit at z-index 90: under the nav and the footer, so those stay
   crisp, and over everything else. */
.edge-blur {
  --eb-ramp: clamp(96px, 14vh, 170px);
  position: fixed;
  left: 0; right: 0;
  height: calc(var(--eb-ramp) * 2);
  z-index: 90;
  pointer-events: none;
}
.edge-blur--top    { top: calc(-1 * var(--eb-ramp)); }
.edge-blur--bottom { bottom: calc(-1 * var(--eb-ramp)); }

.edge-blur__layer {
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(var(--b));
          backdrop-filter: blur(var(--b));
  /* Promote each layer to its own compositing layer. Fixed elements that
     re-filter the backdrop every scroll frame otherwise flicker as they are
     repainted and re-rasterised. */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  will-change: transform;
}

/* Same stops for both strips, only the gradient direction flips: 0% always
   means the inner edge of the ramp, 50% the screen edge itself. */
.edge-blur--bottom .edge-blur__layer {
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--from), #000 var(--to));
          mask-image: linear-gradient(to bottom, transparent var(--from), #000 var(--to));
}
.edge-blur--top .edge-blur__layer {
  -webkit-mask-image: linear-gradient(to top, transparent var(--from), #000 var(--to));
          mask-image: linear-gradient(to top, transparent var(--from), #000 var(--to));
}

.edge-blur__layer:nth-child(1) { --b: 1px;  --from: 0%;  --to: 13%; }
.edge-blur__layer:nth-child(2) { --b: 2px;  --from: 11%; --to: 22%; }
.edge-blur__layer:nth-child(3) { --b: 4px;  --from: 20%; --to: 31%; }
.edge-blur__layer:nth-child(4) { --b: 8px;  --from: 29%; --to: 39.5%; }
.edge-blur__layer:nth-child(5) { --b: 16px; --from: 38%; --to: 47.5%; }

/* ------------------------------- lightbox ------------------------------- */
.lightbox {
  --lb-pad: clamp(12px, 1.4vw, 16px);
  --lb-ar: 1.7778;                   /* the open piece's width / height; set by JS */
  --lb-meta: 88px;                   /* room kept for the title + line below */
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  padding: clamp(16px, 4vw, 48px);
}

.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
          backdrop-filter: blur(28px) saturate(150%);
  animation: fade var(--t-slow) var(--ease) both;
}
@keyframes fade { from { opacity: 0; } }

/* Glass, from the same tokens as every other translucent surface here —
   these values used to be typed out a second time and drifted. */
.lightbox__panel {
  position: relative;
  /* Fit the piece to the screen rather than the screen to the piece: the
     panel is as wide as it can be while the stage, at its own ratio, still
     leaves the title visible — no scrolling inside a video player. */
  width: min(1100px, 100%,
             calc((88svh - 2 * var(--lb-pad) - var(--lb-meta)) * var(--lb-ar) + 2 * var(--lb-pad)));
  max-height: 88svh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--lb-pad);
  border-radius: var(--r-xl);
  background: var(--glass-bg-high);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
          backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--e3);
  /* Materialise: blur and scale arrive together so it reads as a real
     surface forming, not an opacity fade. */
  animation: pop var(--t-slow) var(--ease) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(18px) scale(0.97); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* If something arrives one way, it leaves the same way. The panel used to
   enter with an animation and then vanish on a hard cut. */
.lightbox.is-closing .lightbox__panel { animation: pop var(--t-base) var(--ease) reverse both; }
.lightbox.is-closing .lightbox__backdrop { animation: fade var(--t-base) var(--ease) reverse both; }

.lightbox__stage {
  position: relative;
  border-radius: calc(var(--r-xl) - var(--lb-pad));
  overflow: hidden;
  background: var(--well);
  /* The piece's own ratio, read by JS from the source video — the grid takes
     care to crop nothing, so the player should not pillarbox a 1:1 into 16:9. */
  aspect-ratio: var(--lb-ar);
}
.lightbox__stage video { width: 100%; height: 100%; object-fit: contain; background: var(--well); }

.lightbox__meta { padding: 18px 8px 6px; }
.lightbox__meta h3 {
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: var(--lead-h3); letter-spacing: var(--track-h3);
}
.lightbox__meta p {
  margin-top: 6px; color: var(--muted);
  font-size: 15px; line-height: 1.5; letter-spacing: var(--track-ui);
}

/* Light glass, like the rest of the page's chrome. A dark circle was the
   only dark control in the entire interface. */
.lightbox__close {
  position: absolute; top: calc(var(--lb-pad) + 10px); right: calc(var(--lb-pad) + 10px);
  z-index: 3;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--glass-bg-high);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
          backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--e1);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer; padding: 0;
  transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.lightbox__close svg { width: 15px; height: 15px; }
.lightbox__close:hover { transform: scale(1.06); background: var(--surface); }
.lightbox__close:active { transform: scale(0.94); transition-duration: var(--t-press); }

/* ------------------------------- reveals -------------------------------- */
.reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(22px);
  transition: opacity var(--t-reveal) var(--ease),
              filter var(--t-reveal) var(--ease),
              transform var(--t-reveal) var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-in { opacity: 1; filter: blur(0); transform: none; }

/* Media panels skip the blur. Blurring a large video surface is costly, and
   on imagery it reads as a focus pull rather than as type settling. Listed
   after .is-in so it covers both states and leaves no filter layer behind. */
.hero__reel.reveal,
.tile.reveal,
.case.reveal,
.client.reveal,
.plan.reveal,
.oneoff.reveal,
.marquee.reveal { filter: none; }

/* ------------------------------ dot cursor ------------------------------ */
/* The dot inverts the brightness of whatever sits under it: grayscale()
   throws away hue so an accent colour is judged on brightness alone, then
   invert() flips it. A straight inversion, so mid-tones read as grey.
   Position comes from `translate` and the hover state from `scale`, kept as
   separate properties so the per-frame JS updates never clobber the
   transition on the scale. */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;          /* centre it on the pointer */
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  translate: -100px -100px;            /* park it off-screen until first move */
  scale: 1;
  opacity: 0;
  transition: scale var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
  will-change: translate;

  /* Fallback for browsers without backdrop-filter: a hue inversion. */
  background: #fff;
  mix-blend-mode: difference;
}

@supports (backdrop-filter: invert(1)) or (-webkit-backdrop-filter: invert(1)) {
  .cursor {
    background: transparent;
    mix-blend-mode: normal;
    -webkit-backdrop-filter: grayscale(1) invert(1);
            backdrop-filter: grayscale(1) invert(1);
  }
}
.cursor.is-live { opacity: 1; }
.cursor.is-on { scale: 1.9; }

/* Hide the system cursor only once the dot is actually running, so a JS
   failure or an unsupported browser still leaves a usable pointer. */
@media (hover: hover) and (pointer: fine) {
  html.has-dot-cursor,
  html.has-dot-cursor * { cursor: none; }
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ============================ breakpoints ===============================
   Two, and only two. The layout used to break at 560, 640, 760 and 860 —
   four thresholds for what is really "stacked" and "one column".
   ======================================================================== */

/* ---- 860: two columns become one, the nav collapses ---- */
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }

  .case { grid-template-columns: 1fr; }
  .case--flip .case__media { order: 0; }

  .about { grid-template-columns: 1fr; }
  .about__col--contact { border-left: 0; padding-left: 0; padding-top: 8px; }

  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps    { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Three price columns get too narrow to read here; one column, held to a
     card's width so the list doesn't run edge to edge on a tablet. */
  .plans { grid-template-columns: 1fr; max-width: 560px; }
  .oneoff { grid-template-columns: 1fr; max-width: 560px; }
  .oneoff__side { align-items: flex-start; }

  /* Heavy blur is the main jank source on a phone or tablet. The full-width
     panels sit over a flat white background, so a lighter blur is visually
     near-identical and saves a full-screen pass per scroll frame. */
  :root { --glass-blur: 14px; }
  .tile__well::after { display: none; }

  /* Shorter ramps and three blur passes per strip instead of five. With a
     strip at each edge that halves the number of backdrop passes per frame,
     which is what keeps scrolling smooth. */
  .edge-blur { --eb-ramp: clamp(80px, 12vh, 120px); }
  .edge-blur__layer:nth-child(1),
  .edge-blur__layer:nth-child(3) { display: none; }
  .edge-blur__layer:nth-child(2) { --b: 2px;  --from: 0%;  --to: 17%; }
  .edge-blur__layer:nth-child(4) { --b: 5px;  --from: 15%; --to: 33%; }
  .edge-blur__layer:nth-child(5) { --b: 10px; --from: 31%; --to: 47%; }
}

/* ---- 560: single column everywhere ---- */
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .case__facts { grid-template-columns: 1fr; }
  .case__facts li:nth-child(even) { padding-left: 0; }
  .hero__reel { aspect-ratio: 4 / 3; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .services, .steps { grid-template-columns: 1fr; }
  .gates__track li + li::before { width: 10px; margin: 0 7px; }
  .faq__item p { padding-right: 0; }
}

/* ========================== accessibility =============================== */

/* Reduced motion is a gentler equivalent, not the absence of feedback:
   opacity and colour still resolve, only travel and blur are dropped. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: var(--t-fast) !important;
    transition-delay: 0ms !important;
  }

  /* No travel, no blur — the cross-fade carries the change instead. */
  .reveal, .reveal.is-in { opacity: 1; transform: none; filter: none; }
  [data-letters] .l { opacity: 1; transform: none; filter: none; }
  .tile:hover, .case:hover, .client:hover, .service:hover, .plan:hover,
  .btn--ghost:hover, .socials a:hover,
  .nav__cta:hover, .btn--primary:hover, .mailto:hover, .tag.tag--client:hover {
    transform: none;
  }
  .tile:hover .tile__well video,
  .case:hover .case__media video { transform: none; }
  .tile__well::after { display: none; }

  /* A looping horizontal scroll is exactly the kind of motion this asks to
     stop — it parks rather than jumping to its end frame. */
  .marquee__track { animation: none; }

  /* No sweep, and the word stays solid ink rather than flashing through it. */
  [data-letters] .cal.is-lit {
    animation: none;
    background-image: none;
    color: var(--ink);
  }
  [data-letters] .cal.is-lit .l { color: var(--ink); }
}

/* Translucency off: the same surfaces, frosted solid. Nothing loses its
   shape, the material just stops sampling what is behind it. */
@media (prefers-reduced-transparency: reduce) {
  :root {
    --glass-bg:      var(--surface);
    --glass-bg-high: var(--surface);
  }
  .glass,
  .lightbox__panel,
  .lightbox__close {
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
    background: var(--surface);
  }
  .lightbox__backdrop {
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
  }
  .case__play {
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
    background: rgba(29, 29, 31, 0.85);
  }
  .edge-blur { display: none; }
  .cursor {
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
    background: #fff;
    mix-blend-mode: difference;
  }
}

/* Raised contrast: near-solid surfaces with a defined, contrasting border. */
@media (prefers-contrast: more) {
  :root {
    --muted:         #4a4a4f;
    --ink-soft:      #2b2b2e;
    --hairline:      rgba(0, 0, 0, 0.28);
    --hairline-soft: rgba(0, 0, 0, 0.2);
    --glass-bg:      rgba(255, 255, 255, 0.96);
    --glass-bg-high: #ffffff;
    --well:          #ececef;
  }
  .tag, .socials a, .btn--ghost, .case, .client, .about, .glass,
  .service, .plan, .oneoff {
    border: 1px solid var(--hairline);
  }
  .edge-blur { display: none; }
  :focus-visible { outline-width: 3px; }
}
