/* Leon Editorial — portfolio theme for Leon A.
   Design system modelled on an editorial Framer portfolio (structure and rhythm only):
   full-bleed hero, "02 ( Label ) © 2026" section bars over hairlines, big tight grotesque
   statements, black numbered service rows, text work rows. White / black / grays;
   colour comes from the media. Tokens (colours, fonts, container) live in tokens.json.

   Display type rule (ui-ux-design release gate): display sizes scale with clamp() + container
   query units (cqi) against the containers marked `container-type: inline-size` below, and
   wrap rather than being clipped. Nothing here masks text with overflow hidden/clip. */

@font-face {
  font-family: "Inter Tight";
  src: url("../assets/fonts/inter-tight-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --gutter: clamp(20px, 3.125vw, 40px);
  --section-y: clamp(72px, 9vw, 128px);
  --radius: 10px;
  --hair: 1px solid var(--border);
  --hair-dark: 1px solid rgba(255, 255, 255, 0.22);
  --band: #000;               /* the black sections and footer; lifted to a dark gray in dark mode */
  --gray-2: #8A8A8A;          /* large text only on white (3.4:1); fine on black (6.1:1) */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --tap: 44px;                /* minimum touch target */
  --nav-h: 68px;              /* height of the sticky .site-header: 12px + --tap + 12px */
  --kui-pin-offset: var(--nav-h); /* pinned kUInetic sections stop below the sticky nav */
  --fs-body: clamp(17px, 1.45vw, 20px);
  --fs-small: clamp(13px, 1.1vw, 15px);
  --fs-statement: clamp(32px, 5.9cqi, 72px);
  --fs-h3: clamp(28px, 3.75cqi, 48px);
  --lh-copy: 1.38;            /* paragraphs: readable leading (foundations / type scale) */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.04em; line-height: 1.02; margin: 0; }
p { margin: 0; }
code, pre, kbd { font-family: var(--font-mono); letter-spacing: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
/* containers that display type measures against (cqi = 1% of the content box width) */
.section > .wrap, .page-head, .hero-inner, .site-footer > .wrap { container-type: inline-size; }

/* ---------- header ---------- */
/* Stays at the top on every page. Solid on purpose: no translucency or blur. Dialogs (mobile menu, wall, viewers) sit in the top layer, above it. */
.site-header { position: sticky; top: 0; z-index: 40; color: var(--fg); background: var(--bg); }
.site-header.scrolled { box-shadow: 0 1px 0 var(--border); }
.nav-row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 24px; padding-block: 12px; font-size: 16px; letter-spacing: -0.01em;
}
.brand { white-space: nowrap; display: inline-flex; align-items: center; min-height: var(--tap); font-size: 20px; font-weight: 600; text-decoration: none; letter-spacing: -0.03em; justify-self: start; }
.main-nav { justify-self: center; }
.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.main-nav > a { margin-inline: 14px; }
.main-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); text-decoration: none; opacity: .92; }
.main-nav a:hover, .main-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }
.main-nav a[href^="http"]::after, .mnav a[href^="http"]::after, .footer-nav a[href^="http"]::after { content: "\00a0\2197"; }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 16px; }
.nav-year { opacity: .92; }
.nav-toggle, .mnav-close {
  display: none; font: inherit; color: inherit; background: none; border: 0; padding: 0 2px; cursor: pointer;
  min-height: var(--tap); min-width: var(--tap);
}
.nav-toggle:hover, .mnav-close:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.site-header.nav-compact .main-nav, .site-header.nav-compact .nav-year { display: none; }
.site-header.nav-compact .nav-toggle { display: inline-block; }
@media (max-width: 900px) {
  .nav-row { grid-template-columns: 1fr auto; }
  .main-nav, .nav-year { display: none; }
  .nav-toggle { display: inline-block; font-size: 18px; }
}
/* Home: the hero keeps its full-screen size and tucks up under the nav, so the first view does not shift. */
.page-home .hero { margin-top: calc(-1 * var(--nav-h)); }

/* mobile drawer */
.mnav { border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; background: #000; color: #fff; }
.mnav::backdrop { background: rgba(0,0,0,.4); }
.mnav-panel { display: flex; flex-direction: column; height: 100%; padding: 12px var(--gutter) 40px; }
.mnav-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.mnav-close { display: inline-block; font-size: 18px; }
.mnav-body { margin-top: auto; }
.mnav-list { list-style: none; margin: 0; padding: 0; }
.mnav-item { border-top: var(--hair-dark); }
.mnav-row { display: flex; justify-content: space-between; align-items: center; }
.mnav-link { display: block; padding: 14px 0; font-size: clamp(36px, 11vw, 64px); letter-spacing: -0.045em; line-height: 1; text-decoration: none; }
.mnav-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.mnav-disclose { background: none; border: 0; color: inherit; width: var(--tap); height: var(--tap); }
.mnav-disclose svg { width: 20px; }
html.mnav-open { overflow: hidden; }

/* ---------- section bar: 02 ( Label ) © 2026 ---------- */
.bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  font-size: var(--fs-small); letter-spacing: -0.01em;
  padding-bottom: clamp(20px, 2.6vw, 34px); border-bottom: var(--hair);
}
.bar > :last-child { justify-self: end; }
.bar--dark { border-bottom: var(--hair-dark); }
.section { padding-top: var(--section-y); }
.section > .wrap > .bar + * { margin-top: clamp(28px, 2.6vw, 34px); }

/* ---------- statements ---------- */
.statement {
  font-size: var(--fs-statement); font-weight: 500; line-height: 1.04; letter-spacing: -0.05em;
  max-width: 17.5em; text-wrap: pretty;
  --kui-mask-bleed: 0.12em;
}
.statement .dim { color: var(--gray-2); }
.lede { font-size: var(--fs-body); max-width: 34ch; line-height: 1.3; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 48px;
  min-width: min(100%, 325px); min-height: 56px; padding: 14px 28px 14px 32px;
  background: var(--accent); color: var(--accent-fg); text-decoration: none;
  font-size: clamp(18px, 1.7vw, 22px); letter-spacing: -0.03em; border-radius: 2px;
  transition: background-color .2s ease;
}
.btn:hover { background: #262626; }
:root:not([data-theme="light"]) .btn:hover, :root:not([data-theme="light"]) .nav-cta:hover { background: #d9d9d9; }
.btn .arrow { font-size: 1.1em; transition: translate .25s var(--ease-out); }
.btn:hover .arrow, .btn:focus-visible .arrow { translate: 4px 0; }
.btn--light { background: #fff; color: #000; }
.btn--light:hover { background: #e6e6e6; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
/* focus rings must contrast with the page, not with the button's own text colour */
.btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
.section--dark :focus-visible, .site-footer :focus-visible, .mnav :focus-visible { outline-color: #fff; }

/* underlined inline link inside a big statement (e.g. "Tovu" → tovu.dev) */
.statement-link { color: inherit; text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }
.statement-link:hover { text-decoration-thickness: .1em; }
.statement-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; color: #fff; background: #0b0b0b;
  display: flex; flex-direction: column; isolation: isolate;
}
/* .hero-media clips the parallax-scaled backdrop, so the hero itself never clips its text.
   No hero image yet: a deep red-to-black studio backdrop; a portrait <img> placed inside covers it. */
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: clip; }
.hero-media-inner { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, #b3121b 0%, #6e0a10 45%, #0b0b0b 100%); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { /* legibility gradient */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.2) 22%, rgba(0,0,0,.34) 48%, rgba(0,0,0,.76) 76%, rgba(0,0,0,.92) 100%);
}
.hero::after { /* static film grain */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
}
/* The open area under the nav is the portrait's frame; the text block sits together at the bottom. */
.hero-inner { flex: 1; display: grid; grid-template-rows: 1fr auto; padding-top: 96px; padding-bottom: clamp(20px, 2.4vw, 32px); }
.hero-mid { display: grid; grid-template-columns: 1fr 1fr; align-items: end; align-content: end; gap: 24px; padding-bottom: clamp(28px, 4cqi, 56px); }
.hero-services { list-style: none; margin: 0; padding: 0; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.08; }
.hero-lead { justify-self: end; max-width: 300px; }
.hero-statement { font-size: clamp(16px, 1.45vw, 19px); line-height: 1.08; text-indent: 2.4em; }
.hero-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); margin-top: 6px;
  font-size: clamp(16px, 1.45vw, 19px); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
}
.hero-link .arrow { transition: translate .25s var(--ease-out); }
.hero-link:hover .arrow, .hero-link:focus-visible .arrow { translate: 4px 0; }
/* The h1 is the two taglines as display type, bottom-aligned by .hero-inner's "1fr auto" rows.
   The longer line sizes the type: cqi keeps it inside the row at every width, and it wraps on phones. */
.hero-title {
  margin: 0; font-size: clamp(34px, 5.6cqi, 104px); font-weight: 600; text-transform: uppercase;
  line-height: .92; letter-spacing: -0.045em; text-wrap: balance;
}
.hero-line { display: block; }
.hero-line--dim { color: rgba(255,255,255,.72); }

/* page heads (non-home pages) */
.page-head { padding-top: clamp(48px, 8vw, 112px); }
.page-title { margin-top: clamp(28px, 4vw, 56px); font-size: clamp(56px, 28cqi, 330px); font-weight: 600; text-transform: uppercase; line-height: .82; letter-spacing: -0.06em; margin-left: -0.04em; overflow-wrap: anywhere; }
.page-head .lede { margin-top: 24px; margin-left: 29%; max-width: 30ch; }

/* ---------- about ---------- */
.about-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-top: clamp(48px, 6.5vw, 84px); }
.about-photo { grid-column: 1 / span 2; }
.about-photo img { width: 100%; max-width: 210px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about-col { grid-column: span 4; line-height: var(--lh-copy); letter-spacing: -0.01em; }
.about-col:first-of-type { grid-column: 5 / span 4; }
.about-cta { grid-column: 5 / -1; margin-top: clamp(24px, 3.5vw, 44px); }

/* ---------- works (image-free text rows: name, category, line, link) ---------- */
.works { list-style: none; padding: 0; margin: clamp(8px, 1.5vw, 24px) 0 0; } /* the section bar's hairline is the top rule */
.work { margin: 0; border-bottom: var(--hair); }
.work > a {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: baseline;
  padding-block: clamp(22px, 2.6vw, 36px); text-decoration: none;
}
.work-name { grid-column: 1 / span 4; font-size: clamp(36px, 5.2cqi, 72px); font-weight: 600; line-height: .95; letter-spacing: -0.05em; }
/* category is small text, so it uses --muted (5.3:1 on white), not --gray-2 (3.4:1) */
.work-cat { grid-column: 5 / span 2; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: -0.01em; color: var(--muted); }
.work-line { grid-column: 7 / span 4; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.3; letter-spacing: -0.01em; color: var(--muted); }
.work-link { grid-column: 11 / span 2; justify-self: end; white-space: nowrap; font-size: clamp(14px, 1.25vw, 17px); }
.work-link .arrow { display: inline-block; transition: transform .3s ease; }
.work a:hover .work-name, .work a:focus-visible .work-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.work a:hover .work-link .arrow, .work a:focus-visible .work-link .arrow { transform: translate(3px, -3px); }
.works-note { margin-top: clamp(56px, 7vw, 96px); text-align: center; color: var(--muted); line-height: var(--lh-copy); }
.works-note--left { text-align: left; }
.works-cta { display: flex; justify-content: center; margin-top: 28px; }

/* a bar with only its number left (label and © removed) keeps the number at the left edge */
.bar > :only-child { grid-column: 1 / -1; justify-self: start; text-align: left; }

/* ---------- dark (services-style) section ---------- */
.section--dark { background: var(--band); color: #fff; padding-bottom: var(--section-y); margin-top: var(--section-y); }
.section--dark .bar { border-bottom: var(--hair-dark); }
.section--dark .muted { color: #9A9A9A; }
.facts-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-top: clamp(32px, 4vw, 56px); }
.facts-row > .lede { grid-column: 1 / span 5; max-width: none; }
.facts { grid-column: 7 / -1; list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: var(--hair-dark); }
.facts li:last-child { border-bottom: var(--hair-dark); }
.facts li span:last-child { color: #9A9A9A; text-align: right; }
.rows { list-style: none; margin: clamp(56px, 7vw, 96px) 0 0; padding: 0; }
.row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding-block: clamp(24px, 2.6vw, 32px); border-bottom: var(--hair-dark); }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; }
.row-num { grid-column: 1 / span 2; font-size: var(--fs-h3); letter-spacing: -0.05em; line-height: 1; }
.row-media { grid-column: 3 / span 4; }
.row-media video { width: 100%; height: auto; border-radius: var(--radius); background: #111; aspect-ratio: 16 / 10; object-fit: cover; }
.row-title { grid-column: 7 / span 3; padding-left: clamp(0px, 2vw, 24px); font-size: clamp(26px, 2.5vw, 34px); line-height: 1.02; letter-spacing: -0.045em; }
.row-desc { grid-column: 10 / span 3; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.3; letter-spacing: -0.01em; color: #BDBDBD; }

/* ---------- demo deck (Home, Tovu): a fanned pile that settles into a 2x2 grid ----------
   Motion is all kUInetic (see the comment in render/pages/index.html). This CSS is only the settled layout,
   which is also what reduced motion, no JS and phones get. Cards are opaque so a pile reads as a pile. */
.deck { margin-top: clamp(48px, 6vw, 80px); }
.deck-grid { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: 1fr; gap: 40px; }
.deck-card { min-width: 0; position: relative; }
.deck-fig { margin: 0; }
.deck-media { overflow: hidden; border-radius: 24px; background: #151515; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.8); }
.deck-media video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #151515; }
/* Caption: the title gets the full card width (row 1), so it stays on one line on desktop;
   the category and the link share row 2. The wrapper div is display: contents so no markup change is needed. */
.deck-cap { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: baseline; padding: 12px 4px 0; }
.deck-cap > div { display: contents; }
.deck-title { grid-column: 1 / -1; margin: 0; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 500; }
.deck-cat { grid-column: 1; grid-row: 2; margin: 4px 0 0; font-size: 14px; line-height: 1.3; color: #9A9A9A; }
.deck-link { grid-column: 2; grid-row: 2; justify-self: end; font-size: 14px; line-height: 1.3; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.35); transition: border-color 160ms ease-out; }
.deck-link:hover, .deck-link:focus-visible { border-color: #fff; }
.deck-desc { grid-column: 1 / -1; margin: 10px 0 0; max-width: 42ch; font-size: 15px; line-height: 1.4; color: #BDBDBD; }
/* Portfolio: same cards, static 2x2 grid at full content width with no sticky stage */
@media (min-width: 768px) { .deck--static .deck-grid { grid-template-columns: 1fr 1fr; gap: 40px 16px; width: 100%; } }
@media (min-width: 768px) {
  /* The sticky stage is one viewport tall. A full-width 2x2 at 16:10 is taller than one viewport at
     1280x772 and 1440x900, so the grid is as wide as the content allows AND as wide as the height allows:
     2 media rows + 2 one-line captions (72px budget each) + 16px gap + 24px padding always fit. */
  .deck-stage { box-sizing: border-box; min-height: calc(100vh - var(--nav-h)); min-height: calc(100svh - var(--nav-h)); display: grid; place-items: center; padding-block: 12px; }
  .deck-grid { grid-template-columns: 1fr 1fr; gap: 16px; width: min(100%, calc((100svh - var(--nav-h) - 184px) * 1.6 + 16px)); }
}
/* Reduced motion: kUInetic's rm:disable already puts every card at rest; this guard also drops the pin
   and its spacer so the settled grid is a plain static block with no extra scroll. */
@media (prefers-reduced-motion: reduce) {
  .deck .deck-stage { position: static !important; min-height: 0; }
  .deck [data-kui-spacer] { display: none !important; }
}

.links-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(48px, 6vw, 80px); }

/* ---------- process list ---------- */
.process { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.process li { grid-column: 4 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; padding-block: clamp(20px, 2.2vw, 28px); border-bottom: var(--hair); }
.process li:first-child { padding-top: 0; }
.p-head { grid-column: span 4; display: flex; gap: 22px; font-size: clamp(20px, 1.9vw, 24px); letter-spacing: -0.035em; }
.p-desc { grid-column: span 5; font-size: clamp(15px, 1.25vw, 17px); line-height: 1.3; letter-spacing: -0.01em; max-width: 40ch; }

/* ---------- live demo (code next to the element it animates) ---------- */
.demo { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.demo li { display: grid; grid-template-rows: auto 1fr; border: var(--hair); border-radius: var(--radius); }
.demo pre { margin: 0; padding: 16px 18px; background: #0A0A0A; color: #EDEDED; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.demo pre .k { color: #9A9A9A; }
.demo-stage { display: grid; place-items: center; min-height: 200px; padding: 28px; background: var(--surface); text-align: center; border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px); }
.demo-chip { display: inline-block; padding: 14px 22px; background: var(--accent); color: var(--accent-fg); border-radius: 999px; font-size: 18px; }
.demo-words { font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.045em; line-height: 1.02; max-width: 14ch; }
.demo-count { font-size: clamp(56px, 7vw, 96px); letter-spacing: -0.06em; line-height: 1; font-variant-numeric: tabular-nums; display: inline-block; min-width: 3ch; }
.demo-hover { display: inline-block; padding: 18px 26px; border: 1px solid var(--fg); border-radius: 999px; background: var(--bg); font-size: 18px; cursor: default; }
.code-block-wrap { position: relative; }
.code-copy-btn { position: absolute; top: 4px; right: 4px; width: var(--tap); height: var(--tap); display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; border: 0; border-radius: 6px; cursor: pointer; transition: background-color .2s ease; }
.code-copy-btn:hover { background: rgba(255,255,255,.18); }
.code-copy-btn:focus-visible { outline-color: #fff; outline-offset: -3px; }
.code-copy-btn svg { width: 16px; height: 16px; }
.code-copy-btn .icon-check, .code-copy-btn.copied .icon-copy { display: none; }
.code-copy-btn.copied .icon-check { display: block; }
pre.has-copy-btn { padding-right: 56px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(40px, 5vw, 64px); }
.stats--3 { grid-template-columns: repeat(3, 1fr); }
.stat-number { display: inline-block; min-width: 3ch; font-size: clamp(64px, 9cqi, 128px); font-weight: 500; letter-spacing: -0.065em; line-height: .9; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-label { display: block; margin-top: clamp(16px, 2.5vw, 32px); font-size: clamp(18px, 1.9vw, 24px); letter-spacing: -0.035em; }
.stat-label small { display: block; font-size: var(--fs-small); color: var(--muted); letter-spacing: -0.01em; margin-top: 6px; }
.stat-copy { font-size: clamp(18px, 1.9vw, 24px); line-height: 1.25; letter-spacing: -0.03em; }

/* ---------- sites slot ---------- */
.site-list { list-style: none; margin: 0; padding: 0; }
.site-list:empty { display: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--band); color: #fff; padding-top: var(--section-y); margin-top: var(--section-y); }
.section--dark + .site-footer, .section--dark + div + .site-footer { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-top: 24px; font-size: 16px; }
.footer-nav { grid-column: 1 / span 4; }
.footer-nav ul, .footer-legal ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.footer-nav a, .footer-legal a { display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); text-decoration: none; }
/* inline links inside sentences: padding grows the hit area to 44px without moving the line */
.works-note a { padding-block: 12px; }
.footer-nav a:hover, .footer-legal a:hover { text-decoration: underline; }
.footer-nav > a, .footer-legal > a { display: flex; width: fit-content; }
.footer-legal { grid-column: 5 / span 3; }
.footer-note { grid-column: 9 / -1; justify-self: end; color: #9A9A9A; padding-top: 12px; }
/* same 3.3em measure as the hero title; wraps instead of overflowing if the name grows */
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 16px 20px; font-size: 14px; color: #9A9A9A; }
.footer-base a { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: none; }
.footer-base a:hover { text-decoration: underline; color: #fff; }
.site-footer--minimal { padding-top: 0; }
.site-footer--minimal .footer-base nav ul { display: flex; gap: 16px; }

/* ---------- long-form pages (Privacy, Blog, posts) ---------- */
.post-detail { max-width: 860px; margin-inline: auto; padding-block: clamp(48px, 7vw, 104px) 0; }
.post-detail h1 { font-size: clamp(48px, 7vw, 96px); font-weight: 600; letter-spacing: -0.055em; line-height: .92; margin-bottom: clamp(28px, 4vw, 48px); padding-bottom: clamp(20px, 2.6vw, 34px); border-bottom: var(--hair); }
.post-detail h2 { font-size: clamp(26px, 3vw, 36px); margin: 1.6em 0 .5em; }
.post-detail h3 { font-size: 22px; margin: 1.4em 0 .4em; }
.post-detail p, .post-detail ul, .post-detail ol { margin: 0 0 1em; line-height: 1.35; letter-spacing: -0.015em; }
.post-detail pre { background: #0A0A0A; color: #EDEDED; padding: 16px; border-radius: 6px; overflow-x: auto; font-size: 14px; }
.post-detail img { border-radius: var(--radius); }
.latest-posts { padding-top: 48px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.blog-grid > * { border-top: var(--hair); padding-top: 16px; }
.blog-grid a { text-decoration: none; }
.blog-grid h2, .blog-grid h3 { font-size: 24px; margin: 8px 0; }
.jini-pagination { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  /* video spans two rows so the title sits at its top and the description directly under the title */
  .row { grid-template-rows: auto 1fr; }
  .row-num { grid-column: 1 / span 1; grid-row: 1; }
  .row-media { grid-column: 2 / span 5; grid-row: 1 / span 2; }
  .row-title { grid-column: 8 / span 5; grid-row: 1; padding-left: 0; }
  .row-desc { grid-column: 8 / span 5; grid-row: 2; align-self: start; margin-top: 12px; }
  .process li { grid-column: 1 / -1; }
  .p-head { grid-column: span 5; }
  .p-desc { grid-column: span 7; }
}
@media (max-width: 760px) {
  .hero-inner { padding-top: 84px; }
  .hero-mid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 28px; }
  .hero-services { justify-self: end; text-align: right; }
  .hero-lead { justify-self: start; max-width: 32ch; }
  .hero-statement { text-indent: 0; }
  .page-head .lede { margin-left: 0; }
  .about-row, .facts-row, .footer-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 16px; }
  .about-photo, .about-col, .about-col:first-of-type, .about-cta { grid-column: 1; }
  .about-photo img { max-width: 160px; }
  .work > a { grid-template-columns: 1fr auto; row-gap: 8px; column-gap: 16px; }
  .work-name { grid-column: 1; grid-row: 1; }
  .work-link { grid-column: 2; grid-row: 1; }
  .work-cat, .work-line { grid-column: 1 / -1; }
  .facts-row > .lede, .facts { grid-column: 1; }
  .row { grid-template-columns: auto 1fr; grid-template-rows: none; row-gap: 14px; }
  .row-num { grid-column: 1; grid-row: 1; font-size: 28px; padding-right: 8px; }
  .row-title { grid-column: 2; grid-row: 1; }
  .row-media, .row-desc { grid-column: 1 / -1; grid-row: auto; margin: 0; }
  .process li { display: block; }
  .p-desc { margin-top: 10px; }
  .demo { grid-template-columns: 1fr; }
  .stats, .stats--3 { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .stats--3 > :last-child { grid-column: 1 / -1; }
  .footer-nav, .footer-legal, .footer-note { grid-column: 1; justify-self: start; }
  .footer-note { padding-top: 0; }
  .bar { font-size: 13px; }
  .btn { width: 100%; }
}

/* ==========================================================================
   Additions for the work-led Home page. Everything above this line is the
   original Leon Editorial system; these rules only add what it lacked, using
   its tokens, type scale and spacing.
   ========================================================================== */

/* nav button: the theme's black button, compact. Inverted over the black Home hero. */
.nav-cta {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px;
  background: var(--accent); color: var(--accent-fg); text-decoration: none; white-space: nowrap;
  font-size: 16px; letter-spacing: -0.02em; border-radius: 2px; transition: background-color .2s ease;
}
.nav-cta:hover { background: #262626; }
.mnav-cta { margin-top: 24px; }

/* hero: real site work on the backdrop instead of a video.
   --shot-h sizes the shots against the screen so they always stop above the text. */
.hero--work { background: var(--bg); color: var(--fg); }
.hero--work .hero-media-inner { background: var(--bg); }
.hero--work::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 50%, transparent) 0%, color-mix(in srgb, var(--bg) 0%, transparent) 14%, color-mix(in srgb, var(--bg) 0%, transparent) 44%, color-mix(in srgb, var(--bg) 84%, transparent) 60%, var(--bg) 72%);
}
.hero--work::after { content: none; }
.hero-wall {
  --shot-h: min(40svh, 28vw, calc(100svh - 490px));
  position: absolute; left: 50%; top: clamp(72px, 10svh, 112px); translate: -50% 0;
  display: grid; grid-template-columns: repeat(3, calc(var(--shot-h) * 1.6)); gap: 16px;
}
.hero-shot { height: var(--shot-h); overflow: hidden; border-radius: 24px; background: var(--surface); }
.hero-shot:nth-child(2) { translate: 0 clamp(16px, 4svh, 48px); }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
/* wider than the theme's 300px so the button fits */
.hero--work .hero-lead { max-width: 340px; }
.hero--work .hero-statement { text-indent: 0; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 14px; }

/* work grid: big and small frames, zig-zagging down the page */
.shots-note { margin-top: 14px; }
.shots {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: clamp(56px, 6.4cqi, 96px);
  margin-top: clamp(40px, 4.4cqi, 64px);
}
.shot { min-width: 0; margin: 0; }
.shot:nth-child(4n+1) { grid-column: 1 / span 7; }
.shot:nth-child(4n+2) { grid-column: 8 / span 5; margin-top: clamp(56px, 11cqi, 176px); }
.shot:nth-child(4n+3) { grid-column: 1 / span 5; margin-top: clamp(56px, 11cqi, 176px); }
.shot:nth-child(4n) { grid-column: 6 / span 7; }
/* The frame clips the parallax. The 16:10 shot sits in a 16:9 frame at its natural height, so the whole width of the
   site stays visible and the spare height at the bottom covers the 6% travel. */
.shot-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 24px; background: var(--surface); }
.shot-frame img { position: absolute; left: 0; top: 0; width: 100%; height: auto; max-width: none; }
/* The reveal's clip and the frame's overflow would both cut an outer ring, so the focus ring sits inside the frame. */
.shot-frame img:focus-visible { outline: 0; filter: brightness(.6); }
.shot-frame:has(img:focus-visible) { outline: 3px solid #fff; outline-offset: -6px; }
/* name and link on one line, type of site under the name: long names can't push the link onto its own row */
.shot-cap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 18px; padding: 14px 4px 0; }
.shot-title { font-size: var(--fs-h3); letter-spacing: -0.05em; }
.shot-cap .work-cat { grid-column: 1; grid-row: 2; }
.shot-cap .work-link { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); }
.shot-cap .work-link .arrow { display: inline-block; transition: transform .3s ease; }
.shot-cap .work-link:hover .arrow, .shot-cap .work-link:focus-visible .arrow { transform: translate(3px, -3px); }

/* services: the black rows with no video column, so the type carries them */
.rows--text .row { align-items: baseline; }
/* equal-width digits, so the titles after 01, 02, 03 line up down the list */
.rows--text .row-num, .p-head > span:first-child { font-variant-numeric: tabular-nums; }
.rows--text .row-title { grid-column: 3 / span 5; padding-left: 0; font-size: var(--fs-h3); letter-spacing: -0.05em; }
.rows--text .row-desc { grid-column: 9 / -1; }

/* about */
.about-more { margin-top: clamp(20px, 2.4cqi, 32px); }
.about-roles { margin-top: clamp(24px, 3cqi, 40px); }

/* contact: same voice as the big page titles, sized to the sentence */
.closer-title {
  font-size: clamp(56px, 13cqi, 216px); font-weight: 600; text-transform: uppercase; line-height: .9;
  letter-spacing: -0.06em; margin-left: -0.04em; text-wrap: balance; --kui-mask-bleed: 0.14em;
}
/* the contact band runs straight into the black footer */
main:has(> .section--dark:last-child) + .site-footer { margin-top: 0; }

@media (max-width: 1024px) {
  .rows--text .row { grid-template-rows: none; }
  .rows--text .row-num { grid-column: 1 / span 2; }
  .rows--text .row-title { grid-column: 3 / span 4; grid-row: 1; }
  .rows--text .row-desc { grid-column: 7 / -1; grid-row: 1; margin-top: 0; }
}
@media (max-width: 760px) {
  /* phone shots: three tall frames across, the outer two cut by the screen edges */
  .hero-wall { --shot-h: 42svh; grid-template-columns: repeat(3, calc(var(--shot-h) * .4621)); gap: 10px; top: 64px; }
  .hero-shot { border-radius: 16px; }
  /* black by the time the services list starts, so the list never sits on a shot */
  .hero--work::before { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 50%, transparent) 0%, color-mix(in srgb, var(--bg) 0%, transparent) 12%, color-mix(in srgb, var(--bg) 0%, transparent) 30%, color-mix(in srgb, var(--bg) 86%, transparent) 46%, var(--bg) 54%); }
  .hero--work .hero-lead { max-width: none; justify-self: stretch; }
  .hero-actions { align-items: stretch; }

  .shots { grid-template-columns: 1fr; row-gap: 40px; }
  .shot:nth-child(n) { grid-column: 1; margin-top: 0; }
  /* phone shots are far taller than the frame, so cover fills it; 112% again keeps the parallax off the edge */
  .shot-frame { aspect-ratio: 4 / 5; border-radius: 16px; }
  .shot-frame img { height: 112%; object-fit: cover; object-position: 50% 0; }
  .deck--pairs .deck-grid { grid-template-columns: 1fr 1fr; gap: 24px 12px; }

  .rows--text .row { grid-template-columns: auto 1fr; row-gap: 6px; }
  .rows--text .row-num { grid-column: 1; grid-row: 1; }
  .rows--text .row-title { grid-column: 2; grid-row: 1; }
  .rows--text .row-desc { grid-column: 2; grid-row: 2; }
}
/* short phones: the hero text needs the height, so the shots shrink and the services list (repeated in section 03) goes */
@media (max-width: 760px) and (max-height: 735px) {
  .hero--work .hero-services { display: none; }
  .hero-wall { --shot-h: 30svh; }
}
@media (max-width: 760px) and (max-height: 620px) {
  .hero-wall { --shot-h: 22svh; }
}
/* very short screens and phones on their side: the text fills the height, so there is no room for shots */
@media (min-width: 761px) and (max-height: 620px), (max-height: 520px) {
  .hero-wall { display: none; }
}
/* undoes the theme's full-cover .hero-media img, which is for a single backdrop image */
.hero-media .hero-shot img { position: static; inset: auto; }

/* ==========================================================================
   Home motion: TheTayWay curtain view, widening work row, strip, contact trail.
   Each one is an addition over a plain layout that still reads with no JS.
   ========================================================================== */

/* Mathey's phone shot has its headline low in the screen, so this one frame looks further down. */
@media (max-width: 760px) {
  .shot-frame--mathey img { object-position: 50% 40%; }
}

/* the widening row: the same 7/5 row as the grid above until group-expand is running on a fine pointer */
.shots-row { grid-column: 1 / -1; min-width: 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
/* group-expand clips its cards; the focus ring on "View site" has to stay whole */
.shots-row > .shot { overflow: visible; }
@media (max-width: 760px) {
  .shots-row { grid-template-columns: 1fr; row-gap: 40px; }
}
@media (min-width: 48rem) and (hover: hover) and (pointer: fine) {
  /* The image is sized by the row's height, so widening shows more of the site rather than zooming it. */
  .shots-row[data-kui-fx~='group-expand'] { display: flex; column-gap: 24px; --row-h: min(35cqi, 70svh); }
  .shots-row[data-kui-fx~='group-expand'] > .shot { margin-top: 0; }
  .shots-row[data-kui-fx~='group-expand'] .shot-frame { aspect-ratio: auto; height: var(--row-h); }
  .shots-row[data-kui-fx~='group-expand'] .shot-frame img { height: 106.5%; object-fit: cover; object-position: 0 0; }
}

/* TheTayWay: one large view and four buttons, switched on by scripts/home-motion.js */
.design-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.design-tabs[hidden] { display: none; }
.design-btn {
  min-height: var(--tap); padding: 0 18px; border: var(--hair); border-radius: 2px; background: transparent; color: var(--fg);
  font: inherit; font-size: 16px; letter-spacing: -0.02em; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.design-btn:hover { border-color: var(--fg); }
.design-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.design-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.deck--switch .deck-grid { grid-template-columns: 1fr; gap: 0; width: 100%; overflow: hidden; border-radius: 24px; }
.deck--switch .deck-card { grid-area: 1 / 1; visibility: hidden; }
.deck--switch .deck-cap { display: none; }
.deck--switch .deck-grid[data-design="athletic"] [data-design-card="athletic"],
.deck--switch .deck-grid[data-design="editorial"] [data-design-card="editorial"],
.deck--switch .deck-grid[data-design="mono"] [data-design-card="mono"],
.deck--switch .deck-grid[data-design="sky"] [data-design-card="sky"] { visibility: visible; }

/* contact trail: dimmed so the white heading and bar stay readable over any screenshot */
/* the theme's img { display: block } would otherwise show these sources, whatever the hidden attribute says */
.trail-source { display: none; }
#contact { --kui-trail-width: clamp(180px, 20vw, 300px); --kui-trail-height: calc(var(--kui-trail-width) * .625); }
#contact [data-kui-trail-layer] img { border-radius: 12px; filter: brightness(.45); }

@media (max-width: 760px) {
  .design-btn { flex: 1 1 0; min-width: 0; padding: 0 6px; }
  .deck--switch .deck-grid { border-radius: 16px; }
}

/* ==========================================================================
   Light and dark. tokens.light.json is the white system; tokens.json is the same
   black/white/gray system inverted. Dark is :root without data-theme="light"
   (scripts/theme-toggle.js removes the attribute), and the script is in <head> so
   the saved mode applies before first paint. Hero, drawer and bands stay black or
   near-black in both modes.
   ========================================================================== */
:root:not([data-theme="light"]) { color-scheme: dark; --band: #171717; --gray-2: #9A9A9A; }

.mode-toggle { display: inline-grid; place-items: center; min-width: var(--tap); min-height: var(--tap); padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.mode-toggle:hover { opacity: .7; }
.mnav-mode { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); margin-top: 20px; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 18px; letter-spacing: -0.02em; cursor: pointer; }
.mnav-mode-light { display: none; }
:root:not([data-theme="light"]) .mnav-mode-dark { display: none; }
:root:not([data-theme="light"]) .mnav-mode-light { display: inline; }

/* ==========================================================================
   Selected work: one card per site that sticks as the next one slides over it,
   and inside each card that site's screens moving on their own.
   ========================================================================== */
.projects { display: grid; gap: 16px; margin-top: clamp(40px, 4.4cqi, 64px); }
.proj { background: var(--surface); border-radius: 24px; overflow: clip; }
.proj-body { display: grid; grid-template-columns: 3fr 9fr; column-gap: clamp(24px, 3cqi, 48px); align-items: end; padding: clamp(20px, 2.4cqi, 36px); }
.proj-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding-block-end: 8px; }
.proj-num { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); letter-spacing: 0; margin-block-end: 12px; font-variant-numeric: tabular-nums; }
.proj-meta .shot-title { font-size: var(--fs-h3); letter-spacing: -0.05em; }
.proj-meta .work-cat { color: var(--muted); }
.proj-actions { display: flex; align-items: center; gap: 18px; margin-block-start: 14px; }
.proj-actions .work-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); }
.proj-actions .arrow { display: inline-block; transition: transform .3s ease; }
.proj-actions .work-link:hover .arrow, .proj-actions .work-link:focus-visible .arrow { transform: translate(3px, -3px); }
.set-pause { min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--muted); font: inherit; letter-spacing: -0.02em; cursor: pointer; }
.set-pause:hover { color: var(--fg); }
.set-pause-b, .set-pause[aria-pressed="true"] .set-pause-a { display: none; }
.set-pause[aria-pressed="true"] .set-pause-b { display: inline; }
.set-pause[hidden] { display: none; }
/* The wall button stays hidden until scripts/wall.js runs (.btn would otherwise override [hidden]). */
.wall-trigger[hidden] { display: none; }

.proj-stage { min-width: 0; }
.set { width: 100%; --card-ratio: 16 / 10; --card-w: min(100%, calc((100svh - 13rem) * 1.6)); }
.set .card { margin: 0; overflow: hidden; border-radius: 16px; background: var(--bg); aspect-ratio: var(--card-ratio); box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .55); }
.set .card picture { display: block; height: 100%; }
.set .card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
/* JS on, deck not started yet (it starts near the screen): only the first shot, in the deck's size, so nothing jumps */
.set--pending { display: block; }
.set--pending .card:not(:first-child) { display: none; }
/* no JS or reduced motion: the same screens as a calm grid, first one large */
.set:not([data-kui-fx]):not(.set--pending) { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.set:not([data-kui-fx]):not(.set--pending) .card:first-child { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .proj-body { grid-template-columns: 1fr; row-gap: 14px; padding: 16px; }
  .proj-stage { order: -1; }
  .proj-meta { padding: 0 4px 4px; }
  .proj-actions { justify-content: space-between; width: 100%; }
}
@media (max-width: 760px) {
  .projects { gap: 12px; }
  .proj { border-radius: 16px; }
  .proj-body { padding: 12px; }
  .set { --card-ratio: 4 / 5; --card-w: 100%; }
  .set .card { border-radius: 12px; }
  .set:not([data-kui-fx]):not(.set--pending) { grid-template-columns: repeat(2, 1fr); }
}

/* the sideways showpiece */
.strip { padding-top: var(--section-y); }
.strip-stage { display: grid; align-content: center; }
.strip-title { position: absolute; top: clamp(32px, 4cqi, 64px); left: var(--gutter); z-index: 1; font-size: var(--fs-statement); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.strip-stage:not([data-kui-fx]) .strip-title { position: static; padding-inline: var(--gutter); margin-block-end: 24px; }
.strip-stage .track { display: flex; gap: 16px; padding-inline: var(--gutter); }
.strip-stage:not([data-kui-fx]) .track { overflow-x: auto; }
.strip-stage img { flex: none; width: clamp(290px, 44vw, 720px); height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; border-radius: 24px; background: var(--surface); outline: var(--hair); outline-offset: -1px; }
@media (prefers-reduced-motion: reduce) {
  .strip-title { position: static; padding-inline: var(--gutter); margin-block-end: 24px; }
  .strip-stage .track { overflow-x: auto; }
}
@media (max-width: 760px) {
  .strip-stage img { border-radius: 16px; width: 80vw; }
  /* tighter composition on a phone: the title sits just above the row instead of at the top of the pinned screen */
  .strip-title { position: static; padding-inline: var(--gutter); margin-block-end: 20px; max-width: 100vw; }
}

/* phone header: name, mode toggle, button and Menu on one line */
@media (max-width: 420px) { .nav-actions { gap: 4px; } .nav-row { gap: 10px; } .nav-cta { padding: 0 10px; } }
/* no room below this; the hero and the mobile menu both carry the button */
@media (max-width: 359px) { .nav-cta { display: none; } }

/* Under "More designs.": says what clicking a screenshot does. */
.strip-note { display: inline-block; margin-left: clamp(14px, 1.6vw, 24px); font-size: clamp(16px, 1.3vw, 19px); font-weight: 400; letter-spacing: -0.01em; line-height: 1.3; color: var(--muted); }

/* The Home hero follows light and dark: same layout, text and button flip with the tokens. */
.hero--work .hero-line--dim { color: var(--muted); }
.hero--work .btn--light { background: var(--accent); color: var(--accent-fg); }
.hero--work .btn--light:hover { background: var(--fg); color: var(--bg); opacity: .86; }
.hero--work :focus-visible, .page-home .site-header :focus-visible { outline-color: var(--fg); }

/* One word sized to fill the line and never break: for titles short enough to fit. 26.5cqi is measured for DESIGNS (3.72em wide, less the -0.04em margin, plus room for the last letter). Another word needs its own number. */

/* ==========================================================================
   Designs hub (render/pages/designs.html): one row per design, numbered by CSS so an entry can be added by copying one <li>.
   ========================================================================== */
.designs { list-style: none; margin: 0; padding: 0; counter-reset: design; }
.design { counter-increment: design; border-top: var(--hair); }
.design:last-child { border-bottom: var(--hair); }
.design-link { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; padding-block: clamp(20px, 2.4vw, 32px); text-decoration: none; }
.design-text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.design-num { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--muted); }
.design-num::before { content: counter(design, decimal-leading-zero); }
.design-name { font-size: var(--fs-statement); letter-spacing: -0.04em; line-height: 1; }
.design-line { font-size: var(--fs-body); line-height: var(--lh-copy); color: var(--muted); max-width: 26em; }
.design-go { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); margin-top: auto; text-decoration: underline; text-underline-offset: 0.22em; }
.design-go .arrow { transition: translate .25s var(--ease-out); }
.design-link:focus-visible .design-go .arrow { translate: 4px 0; }
.design-frame { display: block; overflow: hidden; border-radius: 16px; aspect-ratio: 16 / 10; background: var(--surface); }
.design-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: scale .6s var(--ease-out); }
@media (hover: hover) {
  .design-link:hover .design-go .arrow { translate: 4px 0; }
  .design-link:hover .design-frame img { scale: 1.02; }
}
@media (prefers-reduced-motion: reduce) { .design-frame img, .design-go .arrow { transition: none; } }
@media (max-width: 760px) {
  .design-link { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .design-frame { order: -1; }
  .design-go { margin-top: 0; }
}

/* ==========================================================================
   Header dropdown: a menu item with children (Admin > Menus, "+ child"). The engine renders them as a nested list.
   Opens on hover and keyboard focus. :has(:focus-visible), not :focus-within, so a mouse click does not pin it open.
   Hidden with visibility so closed links cannot be tabbed to. Esc is in scripts/main.js (.is-dismissed).
   ========================================================================== */
.main-nav .menu-item { position: relative; }
.main-nav .has-children > a::after {
  content: ""; width: 6px; height: 6px; margin-left: 8px; translate: 0 -2px; rotate: 45deg;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transition: rotate .18s var(--ease-out);
}
.main-nav ul ul {
  display: block; position: absolute; top: calc(100% + 6px); left: -17px; z-index: 1; min-width: 160px; padding: 6px;
  background: var(--bg); border: var(--hair); border-radius: var(--radius);
  opacity: 0; visibility: hidden; translate: 0 -6px;
  transition: opacity .18s var(--ease-out), translate .18s var(--ease-out), visibility 0s linear .18s;
}
/* Invisible strip over the gap, so the pointer can travel from the link to the panel. */
.main-nav ul ul::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 7px; }
.main-nav ul ul ul { top: -7px; left: 100%; }
.main-nav .has-children:not(.is-dismissed):hover > ul,
.main-nav .has-children:not(.is-dismissed):has(:focus-visible) > ul {
  opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s;
}
.main-nav .has-children:not(.is-dismissed):hover > a::after,
.main-nav .has-children:not(.is-dismissed):has(:focus-visible) > a::after { rotate: 225deg; translate: 0 1px; }
.main-nav ul ul a { display: flex; justify-content: flex-start; width: 100%; padding-inline: 10px; border-radius: calc(var(--radius) - 4px); white-space: nowrap; }
.main-nav ul ul a:not([aria-current="page"]):hover { background: var(--surface); text-decoration: none; }
.main-nav ul ul a:focus-visible { outline-offset: -2px; }

/* Mobile menu: children sit under their parent, smaller and indented. The panel scrolls on short screens and Close stays in reach. */
.mnav-panel { overflow-y: auto; background: inherit; padding-top: 0; }
.mnav-head { position: sticky; top: 0; z-index: 1; padding-top: 12px; background: inherit; }
.mnav-list .mnav-list { padding: 0 0 14px 20px; }
.mnav-list .mnav-list .mnav-item { border-top: 0; }
.mnav-list .mnav-list .mnav-link { display: flex; align-items: center; min-height: var(--tap); padding: 0; font-size: clamp(20px, 6vw, 28px); letter-spacing: -0.03em; }
.mnav-disclose { cursor: pointer; }
.mnav-disclose svg { transition: rotate .2s var(--ease-out); }
.mnav-disclose[aria-expanded="true"] svg { rotate: 180deg; }

@media (prefers-reduced-motion: reduce) {
  .main-nav ul ul, .main-nav .has-children > a::after, .mnav-disclose svg { transition: none; }
  .main-nav ul ul { translate: none; }
}
@media (max-width: 760px) { .strip-note { display: block; margin: 8px 0 0; } }

/* More air between the "More designs" title and the sliding row. */
.strip-stage[data-kui-fx] .track { margin-top: clamp(64px, 13svh, 128px); }

/* ========== Portfolio: one bounded block per site ========== */
/* No page title above the first bar, so the section's full top space would only push the first site down. */
.page-portfolio #sites { padding-top: clamp(32px, 4vw, 56px); }
.pf-index { list-style: none; margin: clamp(20px, 2.4vw, 32px) 0 0; padding: 0; columns: 3; column-gap: clamp(20px, 3vw, 48px); }
.pf-index a { display: flex; align-items: center; gap: 12px; min-height: var(--tap); text-decoration: none; font-size: var(--fs-small); break-inside: avoid; }
.pf-index a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.pf-index span { font-family: var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }

.pf-list { list-style: none; margin: clamp(40px, 5vw, 72px) 0 0; padding: 0; display: grid; gap: clamp(64px, 8vw, 128px); }
/* No overflow here: it would stop the head from sticking. */
.pf-site article { border: 1px solid var(--border-strong); border-radius: 2px; }
/* The black head names the site and stays under the nav until its own block ends, so the next site's head replaces it. */
.pf-head {
  position: sticky; top: var(--nav-h); z-index: 2;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: baseline; column-gap: clamp(14px, 2vw, 28px);
  padding: clamp(12px, 1.4vw, 20px) clamp(16px, 2vw, 28px); background: var(--band); color: #fff;
}
.pf-num, .pf-designs { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; color: #A6A6A6; }
.pf-name { margin: 0; min-width: 0; font-size: clamp(22px, 3.2cqi, 40px); font-weight: 600; line-height: 1.05; letter-spacing: -0.04em; }
.pf-type { margin: 0; font-size: var(--fs-small); color: #fff; }
.pf-designs { margin: 0; white-space: nowrap; }

.pf-grid { padding: clamp(8px, 1vw, 16px); }
.pf-rows { display: grid; gap: clamp(6px, .7vw, 10px); }
/* One row, one height: each picture grows by its own shape. */
.pf-row { display: flex; align-items: flex-start; gap: clamp(6px, .7vw, 10px); }
/* The frame never moves after its entrance, so its hover cannot flicker. clip, not hidden: hidden makes the frame a scroller and the picture's view() timeline would never advance. */
.pf-shot { position: relative; display: block; flex: var(--r) 1 0; min-width: 0; aspect-ratio: var(--r); overflow: clip; border-radius: 4px; background: var(--bg); cursor: zoom-in; }
.pf-shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 var(--border-strong); transition: box-shadow .2s ease; }
.pf-shot:hover::after { box-shadow: inset 0 0 0 2px var(--border-strong); }
.pf-shot:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.pf-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* The lead picture settles from a larger scale: growing from its top edge keeps the screenshot's own nav whole instead of cutting it mid-letter. */
.pf-shot--lead img { transform-origin: 50% 0; }
/* The block head sticks under the nav, so scrolled-to items must clear both (head is at most 82px). */
.pf-shot, .pf-all { scroll-margin-top: 96px; }

.pf-foot { display: flex; justify-content: flex-end; padding: 0 clamp(8px, 1vw, 16px) clamp(8px, 1vw, 16px); }
.pf-foot:has(> [hidden]) { display: none; }
.pf-all { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 18px; background: transparent; color: var(--fg); border: 1px solid var(--border-strong); border-radius: 2px; font: inherit; font-size: 16px; letter-spacing: -0.01em; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.pf-all:hover { background: var(--accent); color: var(--accent-fg); }
.pf-all:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

@media (max-width: 760px) {
  .pf-index { columns: 2; }
  /* The name gets the whole first line: two lines would take too much of a phone screen once the head sticks. */
  .pf-head { grid-template-columns: auto 1fr auto; row-gap: 2px; }
  .pf-name { grid-column: 2 / -1; grid-row: 1; }
  .pf-type { grid-column: 2; grid-row: 2; font-size: 13px; color: #BDBDBD; }
  .pf-designs { grid-column: 3; grid-row: 2; }
  .pf-row { flex-wrap: wrap; }
  .pf-shot--lead { flex: 0 0 100%; }
  .pf-shot--phone, .pf-shot--desk { flex: 1 1 calc(50% - 4px); }
  /* The third desktop frame would sit alone on its own row. */
  .pf-shot--desk:nth-child(3) { display: none; }
  .pf-foot { justify-content: stretch; }
  .pf-all { width: 100%; justify-content: center; }
}
/* Landscape phones and heavy zoom: nav plus a sticky head would cover a third of the screen. */
@media (max-height: 500px) { .pf-head { position: static; } }
@media (prefers-reduced-motion: reduce) { .pf-shot::after, .pf-all { transition: none; } }
