/* =========================================================
   Alex Walker — editorial portfolio
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #ECE9E5;
  --bg-alt: #E3DFDA;
  --surface: #DCD7D1;
  --fg: #141413;
  /* --muted ≥ 4.5:1 on --bg and --bg-alt (body-size text);
     --faint ≥ 3:1 (large text and dimmed hover states only) */
  --muted: #625E59;
  --faint: #827D78;
  --line: rgba(20, 20, 19, 0.14);
  --line-strong: rgba(20, 20, 19, 0.3);
  --accent: #C6F432;
  --accent-ink: #141413;
  --inverse-bg: #141413;
  --inverse-fg: #ECE9E5;

  --font-sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 3.4vw, 48px);
  --section-y: clamp(96px, 14vw, 200px);
  --header-h: 72px;

  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121211;
  --bg-alt: #191918;
  --surface: #232321;
  --fg: #ECE9E5;
  --muted: #8E8A84;
  --faint: #6A6762;
  --line: rgba(236, 233, 229, 0.12);
  --line-strong: rgba(236, 233, 229, 0.28);
  --inverse-bg: #ECE9E5;
  --inverse-fg: #121211;
  color-scheme: dark;
}

/* No-JS fallback: follow the OS preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #121211;
    --bg-alt: #191918;
    --surface: #232321;
    --fg: #ECE9E5;
    --muted: #8E8A84;
    --faint: #6A6762;
    --line: rgba(236, 233, 229, 0.12);
    --line-strong: rgba(236, 233, 229, 0.28);
    --inverse-bg: #ECE9E5;
    --inverse-fg: #121211;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol, dl, dd, p, h1, h2, h3, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
strong { font-weight: 500; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Programmatic focus targets (in-page links, skip link) don't need a ring */
[tabindex="-1"]:focus { outline: none; }

/* Hidden visually, still read by screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  transform: translateY(-200%);
  transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.6;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line-strong);
}

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  flex: none;
  /* Two pulses (4.8s) so it stops before 5s: WCAG 2.2.2 Pause, Stop, Hide */
  animation: pulse 2.4s ease-in-out 2;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.link-list li + li { margin-top: 2px; }
.link-list a,
.footer__contact a,
.menu__meta a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .45s var(--ease), color .3s;
}
.link-list a:hover,
.footer__contact a:hover,
.menu__meta a:hover { background-size: 100% 1px; }

.meta-title {
  color: var(--muted);
  margin-bottom: 12px;
}

/* Image placeholders: a soft tone while photos load */
.feature-card__media,
.case__media,
.service__media,
.bleed,
.approach__slide {
  background: linear-gradient(135deg, var(--surface), var(--bg-alt));
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: transform .5s var(--ease), background-color .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header:focus-within { transform: none; }
body.menu-open .site-header {
  transform: none;
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wordmark__logo {
  display: block;
  width: auto;
  height: clamp(30px, 2.6vw, 38px);
  transition: transform .6s var(--ease);
}
.wordmark:hover .wordmark__logo { transform: translateX(3px); }
/* Light ink by default; swap to the off-white version in dark mode */
.wordmark__logo--dark { display: none; }
:root[data-theme="dark"] .wordmark__logo--light { display: none; }
:root[data-theme="dark"] .wordmark__logo--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .wordmark__logo--light { display: none; }
  :root:not([data-theme]) .wordmark__logo--dark { display: block; }
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 36px);
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.header-link svg { width: 12px; height: 12px; transition: transform .35s var(--ease); }
.header-link:hover svg { transform: translate(2px, -2px); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}
.theme-toggle__icon { position: relative; width: 14px; height: 14px; }
.theme-toggle__icon svg {
  position: absolute; inset: 0;
  width: 14px; height: 14px;
  transition: transform .5s var(--ease), opacity .3s;
}
.icon-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
:root[data-theme="dark"] .icon-sun { opacity: 1; transform: none; }

.menu-toggle {
  position: relative;
  width: 44px; height: 44px; /* comfortable touch target around the 34px icon */
  margin-right: -5px;
  padding-inline: 5px;
  display: grid;
  align-content: center;
  gap: 6px;
}
.menu-toggle span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform .5s var(--ease), width .4s var(--ease);
  transform-origin: center;
}
.menu-toggle:hover span:last-child { transform: scaleX(.6); transform-origin: right; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg) scaleX(.8); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg) scaleX(.8); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg-alt);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease-in-out), visibility 0s linear .8s;
  visibility: hidden;
  overflow-y: auto;
}
.menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path .8s var(--ease-in-out), visibility 0s;
}

.menu__inner {
  min-height: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 24px;
  padding-top: calc(var(--header-h) + 32px);
  padding-bottom: 32px;
}
.menu__top { grid-column: 1 / -1; }
.menu__tagline { display: flex; gap: 10px; align-items: baseline; color: var(--muted); }

.menu__nav {
  grid-column: 5 / -1;
  align-self: center;
  padding-block: 40px;
}
.menu__nav li { overflow: hidden; border-top: 1px solid var(--line); }
.menu__nav a:focus-visible,
.footer__nav a:focus-visible { outline-offset: -2px; } /* parent clips overflow */
.menu__nav li:last-child { border-bottom: 1px solid var(--line); }
.menu__nav a {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 48px);
  padding-block: clamp(6px, 1vw, 12px);
  transform: translateY(105%);
  transition: transform .9s var(--ease), color .3s;
}
.menu.is-open .menu__nav a { transform: none; }
.menu__nav li:nth-child(1) a { transition-delay: .25s; }
.menu__nav li:nth-child(2) a { transition-delay: .3s; }
.menu__nav li:nth-child(3) a { transition-delay: .35s; }
.menu__nav li:nth-child(4) a { transition-delay: .4s; }
.menu__nav li:nth-child(5) a { transition-delay: .45s; }
.menu__nav .mono { color: var(--muted); min-width: 44px; }
.menu__label {
  font-size: clamp(2.75rem, min(7.4vw, 9vh), 7.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 500;
  transition: transform .5s var(--ease);
}
.menu__nav a:hover .menu__label { transform: translateX(16px); }
.menu__nav ol:hover a:not(:hover) { color: var(--faint); }

.menu__meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.menu.is-open .menu__meta { opacity: 1; transform: none; transition-delay: .55s; }
.menu__credits { text-align: right; align-self: end; color: var(--muted); }

/* ---------- Reveal system ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(48px, 9vh, 120px));
  padding-bottom: 32px;
  display: flex;
}
.hero > .container { display: flex; flex-direction: column; }

.hero__title {
  font-weight: 500;
  font-size: 16.4vw; /* refined by JS to fit the container exactly */
  line-height: 0.9;
  letter-spacing: -0.055em;
  text-transform: lowercase;
  white-space: nowrap;
  margin-left: -0.04em;
  padding-bottom: 0.06em;
}
.hero__title-inner { display: inline-block; }
.hero__title .char-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.12em 0 0.08em;
  margin: -0.12em 0 -0.08em;
}
.hero__title .char {
  display: inline-block;
  will-change: transform;
}
.js .hero__title .char {
  transform: translateY(105%);
  transition: transform 1.2s var(--ease);
  transition-delay: calc(var(--i) * 0.045s + 0.1s);
}
.js .hero.is-ready .hero__title .char { transform: none; }

.hero__rule {
  margin-top: clamp(16px, 2.4vw, 32px);
  transform-origin: left;
}
.js .hero__rule { transform: scaleX(0); transition: transform 1.4s var(--ease-in-out) .35s; }
.js .hero.is-ready .hero__rule { transform: none; }

.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 48px;
  padding-top: clamp(24px, 3vw, 40px);
}

.hero__intro { grid-column: 1 / span 5; }

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero__lede {
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--muted);
  max-width: 22em;
}
.hero__lede strong { color: var(--fg); }

.feature-card {
  grid-column: 9 / -1;
  display: block;
}
.feature-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
}
.feature-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.showcase__link:hover .feature-card__media img { transform: scale(1.06); }

.btn-chip {
  position: absolute;
  top: 12px; right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 4px 12px;
  background: #F6F4F1;
  color: #141413;
  font-size: 0.6563rem;
}
.btn-chip__arrow {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  background: #141413;
  color: #F6F4F1;
  overflow: hidden;
}
.btn-chip__arrow svg,
.contact__arrow svg { width: 12px; height: 12px; transition: transform .45s var(--ease); }
.showcase__link:hover .btn-chip__arrow svg { animation: arrow-through .6s var(--ease); }
@keyframes arrow-through {
  0% { transform: translateX(0); }
  45% { transform: translateX(140%); }
  46% { transform: translateX(-140%); }
  100% { transform: translateX(0); }
}

.feature-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-top: 12px;
}
.feature-card__title { font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; }

.tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--muted);
  font-size: 0.6563rem;
  line-height: 1.5;
  text-align: right;
}

/* Hero slideshow: slides share one grid cell; only the current one (and the one it is
   covering, for the length of the transition) is displayed. */
.showcase__slides { display: grid; }
.showcase__slide { grid-area: 1 / 1; display: none; }
.showcase__slide.is-current,
.showcase__slide.is-leaving { display: block; }
.showcase__slide.is-current { position: relative; z-index: 2; }
.showcase__slide.is-leaving { z-index: 1; }
.showcase__slide.is-leaving .feature-card__meta { visibility: hidden; }
.showcase__link { display: block; }
.showcase .feature-card__media { aspect-ratio: 900 / 640; }

/* Incoming slide wipes in (from the right, or the left when going back) while the
   screenshot settles from a slight zoom and the caption rises in. "backwards" fill
   so hover effects work again once the animation ends. */
.js .showcase__slide.is-current .feature-card__media { animation: showcase-in 1s var(--ease) backwards; }
.js .showcase__slide.is-current.is-back .feature-card__media { animation-name: showcase-in-back; }
.js .showcase__slide.is-current .feature-card__media img { animation: showcase-zoom 1.4s var(--ease) backwards; }
.js .showcase__slide.is-current .feature-card__meta { animation: showcase-meta .7s var(--ease) .15s backwards; }
.js .showcase.is-static .showcase__slide.is-current * { animation: none; }
@keyframes showcase-in { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes showcase-in-back { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes showcase-zoom { from { transform: scale(1.12); } to { transform: none; } }
@keyframes showcase-meta { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.showcase__controls {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 16px;
  margin-top: 14px;
}
html:not(.js) .showcase__controls { display: none; }
/* Timer line: fills over the autoplay interval, then the next slide comes in */
.showcase__timer {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.showcase__timer span {
  display: block;
  height: 100%;
  background: var(--fg);
  transform-origin: left center;
  transform: scaleX(0);
}
.showcase__timer.is-running span { animation: showcase-timer var(--showcase-delay, 5s) linear forwards; }
@keyframes showcase-timer { to { transform: scaleX(1); } }
.showcase__count {
  color: var(--muted);
  font-size: 0.6563rem;
  font-variant-numeric: tabular-nums;
}
.showcase__buttons { display: flex; gap: 6px; }
.showcase__btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color .3s, color .3s, border-color .3s;
}
.showcase__btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.showcase__btn svg { width: 12px; height: 12px; }
.showcase__btn .icon-play,
.showcase.is-paused .showcase__btn .icon-pause { display: none; }
.showcase.is-paused .showcase__btn .icon-play { display: block; }

.hero__foot {
  margin-top: auto;
  padding-top: clamp(80px, 14vh, 180px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.hero__foot .link-list { color: var(--muted); }
.hero__foot .link-list a:hover { color: var(--fg); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.scroll-cue svg { width: 13px; height: 13px; animation: nudge 2s var(--ease) 2; }
.scroll-cue:hover svg { animation-iteration-count: infinite; }
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Full-bleed visual */
.bleed {
  position: relative;
  height: clamp(320px, 82vh, 900px);
  overflow: hidden;
}
.bleed img {
  position: absolute;
  inset: -12% 0;
  width: 100%;
  height: 124%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
/* Portrait: the photo is cropped tight above the head, so keep it pinned to the top edge
   (no overscan or vertical drift) and let only a gentle zoom-out play on scroll. */
.bleed--portrait { background: #2B2E33; }
.bleed--portrait img {
  inset: 0;
  height: 100%;
  object-position: 50% 0;
  transform-origin: 50% 0;
  transform: none;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }

.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(56px, 8vw, 120px);
}
.section-head--split {
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  align-items: end;
}
.section-head--split > div { grid-column: 1 / span 7; display: grid; gap: 18px; }

.index {
  font-size: clamp(1.375rem, 2.4vw, 2.25rem);
  letter-spacing: -0.02em;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1;
}

.display {
  font-size: clamp(2.75rem, 7vw, 7.25rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: 500;
}

/* ---------- W/01 Works ---------- */
/* Layout follows the reference: number left (4 cols), title right (7 cols);
   rows pair a small sticky card with a large card, alternating sides. */
.works__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 18px;
  align-items: start;
  margin-bottom: clamp(56px, 6vw, 96px);
}
.works__index {
  grid-column: 1 / span 4;
  padding-top: .9em;
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--muted);
}
.works__title {
  grid-column: 6 / -1;
  font-size: clamp(2.75rem, 5.4vw, 5.75rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.works__row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 56px;
  align-items: start;
  margin-bottom: clamp(56px, 6.5vw, 96px);
}
.works__row > .case--s { grid-column: 1 / span 4; }
.works__row > .case--l { grid-column: 6 / -1; }
.works__row--flip > .case--l { grid-column: 1 / span 7; grid-row: 1; }
.works__row--flip > .case--s { grid-column: 9 / -1; grid-row: 1; }

/* Small cards hold their place while the large card beside them scrolls past */
.case--s { position: sticky; top: 32px; }
.js .case[data-reveal] { transform: translateY(50px); }
.js .case[data-reveal].is-in { transform: none; }

.case__link { display: block; }
.case__media {
  position: relative;
  display: block;
  overflow: hidden;
}
.case__media--wide { aspect-ratio: 16 / 9; }
.case__media--card { aspect-ratio: 800 / 527; }
.case__media--3x2 { aspect-ratio: 3 / 2; }
.case__media--4x3 { aspect-ratio: 4 / 3; }
.case__media > img,
.works__all-media > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Image sequences: first frame shows by default; JS steps through on hover */
[data-seq] > img + img { opacity: 0; }
[data-seq].is-cycling > img { opacity: 0; }
[data-seq].is-cycling > img.is-current { opacity: 1; }

/* Large cards: a preview panel opens from the centre on hover and drifts with the pointer */
.case__peek {
  position: absolute;
  left: 15%; top: 19%;
  width: 70%; height: 62%;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  clip-path: inset(50% 50% 50% 50%);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: clip-path .8s var(--ease), transform .6s var(--ease);
}
.case__peek img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.25);
  transition: transform 1.1s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .case__link:hover .case__peek { clip-path: inset(0 0 0 0); }
  .case__link:hover .case__peek img { transform: none; }
}

.case__caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(16px, 4vw, 60px);
  padding-top: 20px;
}
.case__name {
  font-size: clamp(1.125rem, 1.7vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.case__link:hover .case__name { background-size: 100% 1px; }
.case__tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  text-align: right;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

/* Pixel arrow + "All Works" */
.works__more {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 40px;
  align-items: end;
  padding-top: clamp(16px, 2vw, 40px);
}
.works__arrow {
  grid-column: 1 / span 4;
  width: clamp(120px, 18vw, 260px);
  color: var(--surface);
  overflow: hidden;
}
.works__arrow svg { display: block; width: 100%; height: auto; fill: currentColor; }
.works__all {
  grid-column: 9 / -1;
  display: grid;
  gap: 14px;
  justify-items: start;
}
.works__all-label {
  font-size: 1.125rem;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
}
.works__all:hover .works__all-label { background-size: 100% 1px; }
.works__all-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 400 / 260;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface), var(--bg-alt));
}

/* "View work" bubble that trails the pointer */
.cursor-bubble {
  position: fixed;
  left: 0; top: 0;
  z-index: 150;
  width: 100px; height: 100px;
  margin: -50px 0 0 -50px;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 50%;
  background: #fff;
  color: #141413;
  font-size: 0.6875rem;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  transform: scale(0);
  will-change: transform;
}

/* ---------- A/02 About ---------- */
.about__statement {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 24px;
  align-items: start;
}
.about__statement .index { grid-column: 1 / span 3; padding-top: .35em; }
.statement {
  grid-column: 4 / -1;
  font-size: clamp(1.75rem, 3.6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--faint);
  text-wrap: balance;
}
.statement strong { color: var(--fg); font-weight: 500; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: clamp(80px, 11vw, 180px);
}
.metric {
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
  /* Markup is <dt>label</dt><dd>value</dd>; show the value first */
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
}
.metric__value {
  font-size: clamp(3.5rem, 7.6vw, 8.25rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}
.metric__label {
  margin-top: 18px;
  color: var(--muted);
  max-width: 18em;
}

/* ---------- Approach interlude ---------- */
/* Pinned for one screen per stage (--steps). Each step opens the next image from a centre
   slit to full bleed and slides the titles up through a one-item mask. */
.approach {
  --ap-ease: cubic-bezier(.19, 1, .22, 1); /* expo-out, like the reference */
  position: relative;
  height: calc(var(--steps, 4) * 100vh);
  background: #0E0E0D;
  color: #F2F0EC;
}
.approach__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* Thin accent bar across the top, filled by scroll progress */
.approach__progress {
  position: absolute;
  top: 0; left: 0;
  z-index: 3;
  width: 100%;
  height: 4px;
}
.approach__progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(var(--ap, 0));
}

/* Images: stacked; later ones open over earlier ones from the centre */
.approach__slides { position: absolute; inset: 0; }
.approach__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  clip-path: inset(50% 50% 50% 50%);
  transition: clip-path 1.2s var(--ap-ease);
  will-change: clip-path;
}
.approach__slide.is-open { clip-path: inset(0 0 0 0); }
.approach__slide:first-child { clip-path: none; }
.approach__slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.6s var(--ap-ease);
}
.approach__slide.is-open img,
.approach__slide:first-child img { transform: none; }
/* Even dark veil over every image so the white text always reads: at 60% even a pure
   white patch of photo ends up dark enough for 4.5:1 behind the small description */
.approach__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 9, .6);
}

/* Centred content */
.approach__ui {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.approach__counter {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  margin: 0 0 clamp(18px, 2.2vw, 32px);
}

/* Title list: all items share one grid cell. The name and the description each sit in
   their own mask; the text inside waits below (105%), rises in when current, and leaves
   upward (-105%) when passed, so outgoing and incoming lines never overlap. */
.approach__titles {
  display: grid;
  width: 100%;
}
.approach__title {
  grid-area: 1 / 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: clamp(10px, 1.2vw, 18px);
}
.approach__name,
.approach__desc { display: block; overflow: hidden; }
.approach__name > span,
.approach__desc > span { display: block; }
.js .approach__name > span,
.js .approach__desc > span {
  transform: translateY(105%);
  transition: transform 1.1s var(--ap-ease);
}
.js .approach__title.is-current .approach__desc > span { transition-delay: .08s; }
.js .approach__title.is-current .approach__name > span,
.js .approach__title.is-current .approach__desc > span { transform: none; }
.js .approach__title.is-past .approach__name > span,
.js .approach__title.is-past .approach__desc > span { transform: translateY(-105%); }
.approach__name {
  font-size: clamp(2.75rem, 8vw, 7.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.04;
  padding: 0 .06em .1em; /* room for descenders inside the mask */
}
.approach__desc {
  max-width: 30em;
  font-size: clamp(0.875rem, 1.1vw, 1.0625rem);
  line-height: 1.45;
  color: rgba(242, 240, 236, .9);
}
/* Without JavaScript the stages simply list one after another */
html:not(.js) .approach { height: auto; }
html:not(.js) .approach__sticky { position: relative; min-height: 100vh; padding-block: 96px; }
html:not(.js) .approach__titles { gap: 40px; }
html:not(.js) .approach__title { grid-area: auto; }

.approach__link {
  margin-top: clamp(22px, 3vw, 44px);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 78%;
  background-repeat: no-repeat;
  transition: background-size .45s var(--ease);
}
.approach__link:hover { background-size: 100% 1px; }
/* Dark section: light focus ring */
.approach :focus-visible { outline-color: #F2F0EC; }

/* ---------- E/03 Expertise ---------- */
.services { border-top: 1px solid var(--line-strong); }
.service {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 24px;
  padding-block: clamp(28px, 3.6vw, 52px);
  border-bottom: 1px solid var(--line-strong);
  position: relative;
}
.service__num { grid-column: 1 / span 2; color: var(--muted); padding-top: .6em; }
.service__body { grid-column: 3 / span 6; display: grid; gap: 16px; align-content: start; }
.service__title {
  font-size: clamp(1.875rem, 3.8vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  transition: transform .6s var(--ease);
}
.service:hover .service__title { transform: translateX(10px); }
.service__desc { color: var(--muted); max-width: 30em; font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips li {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.625rem;
  color: var(--muted);
  transition: color .3s, border-color .3s;
}
.service:hover .chips li { color: var(--fg); border-color: var(--fg); }
.service__media {
  grid-column: 10 / -1;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.service__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.35);
  transition: transform 1.1s var(--ease), filter .8s var(--ease);
}
.service:hover .service__media img { transform: scale(1.07) translateX(-2%); filter: none; }

/* ---------- CV/04 Journey ---------- */
.journey__intro {
  grid-column: 9 / -1;
  color: var(--muted);
  font-size: 1rem;
  max-width: 30em;
}
.journey__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr .8fr;
  gap: clamp(32px, 5vw, 80px);
}
.cv-group__title {
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
}

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 3px; top: 18px; bottom: 18px;
  width: 1px;
  background: var(--line-strong);
  transform-origin: top;
}
.js .timeline::before { transform: scaleY(0); transition: transform 1.6s var(--ease-in-out); }
.js .timeline.is-in::before { transform: none; }

.timeline__item {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -22px; top: 21px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--fg);
  transition: background-color .3s;
}
.timeline__item:first-child::before { background: var(--accent); border-color: var(--accent); }
.timeline__item:hover::before { background: var(--fg); }
.js .timeline__item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * .09s + .2s);
}
.js .timeline.is-in .timeline__item { opacity: 1; transform: none; }

.timeline__role { font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; }
.timeline__org { color: var(--muted); font-size: 0.6563rem; margin-top: 2px; }
.timeline__date { white-space: nowrap; font-size: 0.6563rem; padding-top: 3px; }

.toolbox { display: grid; }
.toolbox li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
}
/* Tool logos: single colour, follow the theme, brighten on hover */
.toolbox__logo {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--muted);
  transition: color .3s, transform .4s var(--ease);
}
.toolbox__logo text { font-family: inherit; letter-spacing: -0.04em; }
.toolbox li:hover .toolbox__logo { color: var(--fg); transform: scale(1.12); }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(80px, 10vw, 160px); }

.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line-strong);
  padding-block: clamp(16px, 2vw, 28px);
  margin-bottom: clamp(80px, 12vw, 180px);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track,
.marquee.is-paused .marquee__track { animation-play-state: paused; }

/* Pause control for the moving strip (WCAG 2.2.2) */
.marquee__toggle {
  position: absolute;
  top: 50%; right: var(--gutter);
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  transition: background-color .3s, color .3s;
}
.marquee__toggle:hover { background: var(--fg); color: var(--bg); }
.marquee__toggle svg { width: 10px; height: 10px; }
.marquee__toggle .icon-play { display: none; }
.marquee.is-paused .marquee__toggle .icon-pause { display: none; }
.marquee.is-paused .marquee__toggle .icon-play { display: block; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding-right: clamp(28px, 4vw, 64px);
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: -0.04em;
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 1;
}
.marquee__group i { font-style: normal; font-size: .4em; color: var(--faint); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

.contact__cta { display: block; }
.contact__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 2.4vw, 36px);
}
.contact__arrow {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: background-color .4s, color .4s, border-color .4s;
}
.contact__title {
  display: block;
  margin: 0;
  font-size: clamp(3rem, 10vw, 11.5rem);
  line-height: .92;
  letter-spacing: -0.06em;
  font-weight: 500;
  transition: color .5s var(--ease);
}
.contact__cta:hover .contact__arrow { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.contact__cta:hover .contact__arrow svg { transform: translateX(3px) rotate(-45deg); }
.contact__cta:hover .contact__title { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-strong);
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: 28px;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 40px;
}
.footer__grid > :nth-child(1) { grid-column: 1 / span 5; }
.footer__grid > :nth-child(2) { grid-column: 6 / span 4; }
.footer__grid > :nth-child(3) { grid-column: 10 / -1; }

.footer__nav li { overflow: hidden; }
.footer__nav a {
  display: inline-block;
  font-size: clamp(1.625rem, 2.8vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.12;
  transition: transform .5s var(--ease), color .3s;
}
.footer__nav a:hover { transform: translateX(10px); }
.footer__nav:hover a:not(:hover) { color: var(--faint); }

.footer__contact { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer__contact p:not(.meta-title) { color: var(--muted); margin-top: 8px; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: clamp(64px, 8vw, 120px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--fg);
  text-transform: uppercase;
}
.to-top svg { width: 13px; height: 13px; transition: transform .45s var(--ease); }
.to-top:hover svg { transform: translateY(-4px); }

/* =========================================================
   Scroll motion layer
   ========================================================= */

/* Smooth scrolling (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Stacking: later sections slide over pinned ones */
main > *,
.site-footer {
  position: relative;
  z-index: 2;
  background-color: var(--bg);
  transition: background-color .5s var(--ease);
}
main > .pin-under { z-index: 1; }

/* Headings revealed line by line */
.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.line { display: block; }
.js [data-reveal].split-lines { opacity: 1; transform: none; }
.js .split-lines .line {
  transform: translateY(110%);
  transition: transform 1.15s var(--ease);
  transition-delay: calc(var(--d, 0s) + var(--li, 0) * 0.09s);
}
.js .split-lines.is-in .line { transform: none; }

/* Statement filled word by word as you scroll */
.statement { color: var(--muted); }
.js .statement.words-ready { opacity: 1; transform: none; }
.word { will-change: opacity; }

/* Timeline rule drawn with scroll */
.js .timeline.tl-scrub::before,
.js .timeline.tl-scrub.is-in::before {
  transition: none;
  transform: scaleY(var(--tl, 0));
}

/* Marquee driven by scroll velocity */
.marquee.is-driven .marquee__track { animation: none; }

/* Soft blur where content enters at the bottom edge */
.edge-blur {
  position: fixed;
  inset: auto 0 0 0;
  height: 80px;
  z-index: 80;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.6) 40%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.6) 40%, transparent 100%);
  transition: opacity .5s var(--ease);
}
.edge-blur.is-off,
body.menu-open .edge-blur { opacity: 0; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .hero__intro { grid-column: 1 / span 6; }
  .feature-card { grid-column: 8 / -1; }
  .service__body { grid-column: 3 / span 7; }
  .service__media { grid-column: 10 / -1; }
  .journey__grid { grid-template-columns: 1fr 1fr; }
  .journey__grid .cv-group:last-child { grid-column: 1 / -1; }
  .toolbox { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .menu__nav { grid-column: 3 / -1; }
  .works__title { grid-column: 5 / -1; }
  .works__row > .case--s { grid-column: 1 / span 5; }
  .works__row > .case--l { grid-column: 6 / -1; }
  .works__row--flip > .case--l { grid-column: 1 / span 7; }
  .works__row--flip > .case--s { grid-column: 8 / -1; }
  .works__all { grid-column: 8 / -1; }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }

  .header-link { display: none; }

  .hero { min-height: auto; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__intro, .feature-card { grid-column: 1 / -1; }
  .feature-card { max-width: 520px; }
  .hero__foot { padding-top: 72px; }

  .section-head--split > div,
  .journey__intro { grid-column: 1 / -1; }
  .section-head--split { row-gap: 24px; }

  .works__index,
  .works__title { grid-column: 1 / -1; }
  .works__index { padding-top: 0; }
  .works__row { grid-template-columns: 1fr; margin-bottom: 56px; }
  .works__row > .case--s,
  .works__row > .case--l,
  .works__row--flip > .case--s,
  .works__row--flip > .case--l { grid-column: 1; grid-row: auto; }
  .case--s { position: relative; top: auto; }
  .works__more { grid-template-columns: 1fr; }
  .works__arrow,
  .works__all { grid-column: 1; }
  .works__all { max-width: 420px; }

  .about__statement .index,
  .statement { grid-column: 1 / -1; }
  .metrics { grid-template-columns: 1fr 1fr; row-gap: 48px; }

  .service { grid-template-columns: 1fr; }
  .service__num, .service__body, .service__media { grid-column: 1 / -1; }
  .service__num { padding-top: 0; }
  .service__media { max-width: 520px; }

  .journey__grid { grid-template-columns: 1fr; }

  .footer__grid > * { grid-column: 1 / -1 !important; }

  .menu__nav { grid-column: 1 / -1; }
  .menu__meta { grid-template-columns: 1fr 1fr; }
  .menu__credits { text-align: left; }
}

@media (max-width: 520px) {
  .theme-toggle__sep { display: none; }
  /* Keep the word in the accessible name (WCAG 2.5.3) but hide it visually */
  .theme-toggle__label {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .marquee__toggle-text {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .marquee__toggle { padding: 0; width: 36px; justify-content: center; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 32px; }
  .metrics { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .metric__label { font-size: 0.625rem; }
  .toolbox { grid-template-columns: 1fr; }
  .menu__meta { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal],
  .js .hero__title .char,
  .js .timeline__item { opacity: 1; transform: none; }
  .js .hero__rule,
  .js .timeline::before { transform: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee__group + .marquee__group { display: none; }
  .marquee__group { flex-wrap: wrap; row-gap: 12px; padding-inline: var(--gutter); }
  .marquee__toggle { display: none; }
  .cursor-bubble { display: none; }
  .bleed img { transform: none; }
  .showcase__slide *, .showcase__timer span { animation: none !important; }
  .approach__slide, .approach__slide img,
  .js .approach__name > span, .js .approach__desc > span { transition: none; }
  .approach__slide img { transform: none; }
  .js .split-lines .line { transform: none; }
  .edge-blur { display: none; }
}
