/* ==========================================================================
   Sudesh Kumara — portfolio
   ========================================================================== */
:root {
  --bg: #0a0a0a;
  --bg-2: #121212;
  --fg: #f1ede4;
  --mute: rgba(241, 237, 228, .56);
  --line: rgba(241, 237, 228, .12);
  --accent: #ff5b1f;
  --accent-2: #ffd23f;

  --f-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --f-si: "Noto Sans Sinhala", var(--f-sans);

  --gut: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);

  /* phone sizes */
  --pw: clamp(190px, 17.5vw, 290px);
  --pw-s: clamp(150px, 13.5vw, 230px);
  --fw1: clamp(120px, 11vw, 190px);
  --fw2: clamp(100px, 9vw, 160px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
::selection { background: var(--accent); color: #0a0a0a; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
.si { font-family: var(--f-si); font-weight: 800; letter-spacing: -.02em; }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: #050505; color: var(--fg);
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--gut);
}
.loader__top, .loader__bottom { display: flex; justify-content: space-between; align-items: flex-end; color: var(--mute); }
.loader__words { display: flex; flex-direction: column; align-items: flex-start; }
.loader__words span {
  font-size: clamp(56px, 12vw, 200px); font-weight: 800; line-height: .86; letter-spacing: -.055em;
  text-transform: uppercase; opacity: .1; transition: opacity .3s, color .3s;
}
.loader__words span.on { opacity: 1; }
.loader__words span:nth-child(2).on { color: var(--accent); }
.loader__count { font-size: clamp(48px, 8vw, 128px); font-weight: 300; line-height: .8; color: var(--fg); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.loader__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; }
.loader__bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.cursor__dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--accent); }
.cursor__ring {
  position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 1px solid rgba(241, 237, 228, .45); display: grid; place-items: center;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, border-color .3s;
}
.cursor__label { font: 500 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .04em; color: #0a0a0a; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor.is-link .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: var(--accent); }
.cursor.is-label .cursor__ring { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: var(--accent); border-color: var(--accent); }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-label .cursor__dot, .cursor.is-hidden { opacity: 0; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 160; transform: translate(-50%, calc(100% + 60px));
  background: var(--fg); color: #0a0a0a; padding: 12px 20px; border-radius: 99px;
  font: 500 13px/1 var(--f-mono); text-transform: uppercase; transition: transform .6s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px var(--gut); mix-blend-mode: difference; color: #fff;
  transition: transform .6s var(--ease);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { display: flex; align-items: flex-start; gap: 4px; font-weight: 800; letter-spacing: -.04em; font-size: 22px; line-height: 1; }
.nav__copy { font: 500 10px/1 var(--f-mono); letter-spacing: 0; margin-top: 2px; }
.nav__links { display: flex; gap: clamp(18px, 2.6vw, 40px); font-size: 15px; font-weight: 500; }
.nav__right { display: flex; align-items: center; justify-content: flex-end; gap: 22px; }
.nav__time { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3dff8b; box-shadow: 0 0 0 0 rgba(61, 255, 139, .7); animation: pulse 2s infinite; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 255, 139, .6); } 70% { box-shadow: 0 0 0 10px rgba(61, 255, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 255, 139, 0); } }
.pill { display: inline-flex; align-items: center; padding: 11px 20px; border-radius: 99px; border: 1px solid #fff; font-size: 14px; font-weight: 600; transition: background .3s, color .3s; }
.pill:hover { background: #fff; color: #000; }

/* rolling text links */
.roll { display: inline-block; overflow: hidden; vertical-align: top; }
.roll span { display: inline-block; position: relative; transition: transform .55s var(--ease); }
.roll span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; }
.roll:hover span { transform: translateY(-100%); }

/* ---------- shared ---------- */
section { position: relative; }
main { overflow-x: clip; }
.kicker { display: flex; align-items: center; gap: 12px; color: var(--mute); margin-bottom: 28px; }
.kicker .num { color: var(--accent); }
.kicker::after { content: ""; flex: 0 0 48px; height: 1px; background: currentColor; opacity: .5; }
.sec-head { padding: 0 var(--gut); margin-bottom: clamp(48px, 7vw, 110px); }
.sec-head--row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; }
.sec-title { font-size: clamp(44px, 7.2vw, 128px); font-weight: 700; line-height: .92; letter-spacing: -.05em; }
.sec-title em { color: var(--accent); letter-spacing: -.02em; padding-right: .06em; }
.sec-sub { color: var(--mute); font-size: clamp(16px, 1.35vw, 20px); max-width: 44ch; margin-top: 24px; }
.sec-head--row .sec-sub { margin-top: 0; }
.reveal-line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.reveal-line > span { display: block; }

/* ---------- phone frame ---------- */
.phone {
  --w: 240px;
  width: var(--w); aspect-ratio: 9 / 19.5; position: relative;
  border-radius: calc(var(--w) * .155); padding: calc(var(--w) * .032);
  background: linear-gradient(145deg, #2a2a2a, #0b0b0b 40%, #1a1a1a);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, .14),
    inset 0 0 0 calc(var(--w) * .012) #050505,
    0 50px 100px -30px rgba(0, 0, 0, .55),
    0 30px 60px -30px rgba(0, 0, 0, .5);
}
.phone::after { /* dynamic island */
  content: ""; position: absolute; top: calc(var(--w) * .058); left: 50%; transform: translateX(-50%);
  width: 30%; height: calc(var(--w) * .07); border-radius: 99px; background: #000; z-index: 2;
}
.phone__screen { width: 100%; height: 100%; border-radius: calc(var(--w) * .125); overflow: hidden; background: #111; position: relative; }
.phone__screen img, .phone__screen video { width: 100%; height: 100%; object-fit: cover; }
.phone--land { --w: 100%; aspect-ratio: 19.5 / 9; border-radius: 22px; padding: 7px; }
.phone--land::after { top: 50%; left: 14px; transform: translateY(-50%); width: 11px; height: 28%; }
.phone--land .phone__screen { border-radius: 16px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100svh; height: 100vh; max-height: 1300px; min-height: 640px;
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gut) 20px;
}
.hero__glow {
  position: absolute; left: 58%; top: 52%; width: 70vw; height: 70vw; max-width: 1100px; max-height: 1100px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 91, 31, .22), rgba(255, 91, 31, .06) 40%, transparent 68%);
  filter: blur(10px); pointer-events: none;
}
.hero__top {
  position: absolute; top: 96px; left: var(--gut); right: var(--gut); z-index: 4;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
}
.hero__lede { font-size: clamp(34px, 5vw, 92px); line-height: .98; letter-spacing: -.04em; font-weight: 500; max-width: 12em; }
.hero__lede em { color: var(--accent); font-size: 1.08em; }
.hero__lede { margin: 0; }
.hero__sub {
  margin: clamp(16px, 1.6vw, 28px) 0 0; max-width: 30em;
  font-size: clamp(16px, 1.5vw, 26px); line-height: 1.35; letter-spacing: -.01em; color: var(--mute);
}
.hero__tag {
  position: relative; z-index: 2; margin: 0 0 clamp(10px, 1.2vw, 20px);
  font-size: clamp(17px, 1.7vw, 28px); line-height: 1.1; letter-spacing: -.02em; font-weight: 500;
}
.hero__tag em { color: var(--accent); }
.hero__now { display: grid; gap: 8px; text-align: right; font-size: 11px; color: var(--mute); }
.hero__now li { display: flex; justify-content: flex-end; gap: 14px; }
.hero__now b { color: var(--fg); font-weight: 500; }
.hero__now-head { color: var(--accent) !important; }

.hero__stage { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__portrait {
  position: absolute; left: 58%; bottom: 0; height: min(86vh, 1050px); width: auto; transform: translateX(-50%);
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 96%), linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: linear-gradient(to bottom, #000 55%, transparent 96%), linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
  filter: contrast(1.08);
}
.hero__dots { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dots-on .hero__portrait { opacity: 0; }

.hero__badge { position: absolute; right: var(--gut); top: 56%; width: 124px; height: 124px; z-index: 4; display: grid; place-items: center; }
.hero__badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 14s linear infinite; }
.hero__badge text { font: 500 12.5px var(--f-mono); letter-spacing: .14em; fill: var(--fg); }
.hero__badge span { font-size: 26px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__name {
  position: relative; z-index: 2; display: flex; justify-content: space-between; gap: .12em;
  font-size: clamp(60px, 13.2vw, 260px); font-weight: 900; line-height: .78; letter-spacing: -.06em;
  margin: 0; white-space: nowrap;
}
.hero__line { display: block; flex: 0 0 auto; overflow: hidden; padding-top: .06em; }
.hero__line .chars { display: inline-block; }
.hero__name .c { display: inline-block; will-change: transform; }
.hl2 .chars { -webkit-text-stroke: 0; }
.hero__meta {
  position: relative; z-index: 2; display: flex; justify-content: space-between; margin-top: 18px;
  padding-top: 14px; border-top: 1px solid var(--line); color: var(--mute); font-size: 11px;
}

/* ==========================================================================
   MANIFESTO
   ========================================================================== */
.manifesto { padding: clamp(120px, 16vw, 240px) var(--gut) clamp(80px, 10vw, 160px); }
.manifesto__text {
  font-size: clamp(30px, 4.6vw, 82px); line-height: 1.04; letter-spacing: -.04em; font-weight: 600; max-width: 18em;
}
.manifesto__text .w { opacity: .14; transition: none; }
.manifesto__text em.art { color: var(--accent-2); letter-spacing: -.01em; }
.manifesto__text code.logic { font-family: var(--f-mono); font-size: .78em; letter-spacing: -.04em; color: #7fd4ff; font-weight: 500; }
.manifesto__text strong { color: var(--accent); font-weight: 800; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(80px, 10vw, 160px); border-top: 1px solid var(--line); }
.stat { padding: 32px 24px 8px 0; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); padding-left: 24px; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat__n { font-size: clamp(64px, 8.5vw, 150px); font-weight: 300; line-height: .85; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.stat__n sup { font-size: .3em; font-weight: 500; vertical-align: top; position: relative; top: .3em; margin-left: .1em; color: var(--accent); letter-spacing: 0; }
.stat__l { color: var(--mute); }

/* ==========================================================================
   MARQUEE
   ========================================================================== */
/* Flat graph-paper strip with ruler edges. Each word has its own vector treatment;
   sizes are in em so everything scales with the track's font-size. */
.marquee { position: relative; overflow: hidden; margin: 40px 0 clamp(100px, 12vw, 200px); padding: clamp(22px, 2.4vw, 36px) 0; background-color: var(--bg-2); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23f1ede4' fill-opacity='.07'/%3E%3C/svg%3E"); color: var(--fg); }
.marquee::before, .marquee::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; border-top: 1px solid rgba(255, 91, 31, .4); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10'%3E%3Cpath d='M.5 0v10M10.5 0v4M20.5 0v6M30.5 0v4' stroke='%23ff5b1f' stroke-opacity='.55'/%3E%3C/svg%3E"); pointer-events: none; }
.marquee::before { top: 0; }
.marquee::after { bottom: 0; transform: scaleY(-1); }
.mq-defs { position: absolute; }
.marquee__track { display: flex; width: max-content; font-size: clamp(40px, 5vw, 84px); font-weight: 800; letter-spacing: -.04em; line-height: 1; text-transform: uppercase; white-space: nowrap; will-change: transform; }
.marquee__set { display: flex; flex: none; align-items: center; gap: .7em; padding-right: .7em; }
.marquee svg { overflow: visible; }
.marquee .fa { fill: var(--accent); stroke: none; }
.marquee .fb { fill: var(--bg-2); }
.marquee.is-off * { animation-play-state: paused !important; }
.mq-ico { flex: none; width: .47em; height: .47em; fill: none; stroke: var(--accent); stroke-width: 1.6; }
.mq-w { position: relative; display: inline-flex; align-items: flex-end; }

/* Design */
.mq-pencil { display: inline-block; width: .31em; height: 1.03em; margin: 0 .05em 0 .02em; transform-origin: 50% 100%; animation: mq-scrib 1.4s ease-in-out infinite; }
.mq-pencil svg { display: block; width: 100%; height: 100%; }
.mq-drop { opacity: 0; animation: mq-drop 3.2s ease-in infinite; }
.mq-ink { position: absolute; left: 0; bottom: -.25em; width: 100%; height: .25em; fill: none; }
.mq-ink path { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: mq-draw 3.2s ease-in-out infinite; }
.mq-spark { position: absolute; top: -.25em; right: -.375em; width: .47em; height: .47em; }
.mq-spark path { opacity: 0; transform-box: fill-box; transform-origin: center; animation: mq-spark 3.2s ease-out infinite; }
.mq-spark g + g path { animation-delay: .18s; }
@keyframes mq-scrib { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(5deg) translateY(-2px); } }
@keyframes mq-draw { 40%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes mq-drop { 0%, 55% { transform: translateY(0); opacity: 0; } 60% { opacity: 1; } 85% { transform: translateY(26px); opacity: 1; } 90%, 100% { transform: translateY(30px) scale(2.6, .3); opacity: 0; } }
@keyframes mq-spark { 0%, 38% { transform: scale(0) rotate(0); opacity: 0; } 46% { transform: scale(1.25) rotate(45deg); opacity: 1; } 56% { transform: scale(.85) rotate(70deg); opacity: 1; } 66% { transform: scale(1.1) rotate(90deg); opacity: 1; } 80%, 100% { transform: scale(0) rotate(135deg); opacity: 0; } }

/* Engineering */
.mq-eng { flex: none; width: 10em; height: 2.125em; fill: none; stroke: var(--accent); stroke-width: 1.6; }
.mq-guide { stroke-opacity: .45; stroke-width: 1; stroke-dasharray: 2 5; }
.mq-flow { stroke-dasharray: 6 3; animation: mq-march .9s linear infinite; }
.mq-track { stroke-width: 1.4; stroke-opacity: .8; }
.mq-link { stroke-opacity: .45; stroke-width: 1; stroke-dasharray: 2 3; }
.mq-nd { fill: var(--bg-2); animation: mq-node 3s ease-in-out infinite; }
.mq-runner { fill: var(--fg); stroke: none; }
.mq-eng__t { font-family: var(--f-sans); font-weight: 800; font-size: 64px; letter-spacing: 0; stroke: var(--fg); stroke-dasharray: 6 3; animation: mq-march .9s linear infinite; }
@keyframes mq-march { to { stroke-dashoffset: -18; } }
@keyframes mq-node { 0%, 100% { fill: var(--bg-2); } 50% { fill: var(--accent); } }

/* Motion (--amp grows with scroll speed, set from main.js) */
.mq-motion { --amp: .14em; filter: url(#mq-liquid); }
.mq-motion > span { display: inline-flex; }
.mq-motion span span { display: inline-block; animation: mq-wave 2.2s ease-in-out infinite; animation-delay: calc(var(--i) * -.14s - 2.2s + var(--lag, 0s)); }
.mq-ghost { position: absolute; left: 0; bottom: 0; color: transparent; -webkit-text-stroke: 1px var(--accent); opacity: .55; transform: translateX(var(--gx)); }
.mq-motion__main { position: relative; }
@keyframes mq-wave { 0%, 100% { transform: translateY(calc(var(--amp) * -1)) skewX(-7deg); } 50% { transform: translateY(var(--amp)) skewX(7deg); } }

/* 3D */
.mq-3d { perspective: 6.5em; }
.mq-3d span { display: inline-block; text-shadow: .016em .016em 0 #c9461a, .031em .031em 0 #c9461a, .047em .047em 0 #b33d16, .063em .063em 0 #b33d16, .078em .078em 0 #9c3512, .094em .094em 0 #9c3512, .109em .109em 0 #842c0f, .125em .125em 0 #842c0f; animation: mq-sway 4.5s ease-in-out infinite alternate; }
.mq-cube { transform-origin: 15px 15px; animation: mq-spin 6s linear infinite; }
@keyframes mq-sway { from { transform: rotateY(-24deg) rotateX(10deg); } to { transform: rotateY(24deg) rotateX(-6deg); } }
@keyframes mq-spin { to { transform: rotate(360deg); } }

/* Systems */
.mq-sys { align-items: stretch; gap: .0625em; }
.mq-sys > span { position: relative; display: flex; align-items: center; justify-content: center; width: .84em; height: 1.31em; border: 1px dashed rgba(241, 237, 228, .22); contain: strict; animation: mq-weight 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.25s); }
.mq-sys i { position: absolute; top: .05em; left: .06em; font: 400 max(10px, .17em)/1 var(--f-mono); font-style: normal; letter-spacing: 0; color: var(--accent); }
@keyframes mq-weight { 0%, 100% { font-weight: 300; } 50% { font-weight: 900; } }

/* Releases */
.mq-rel { flex-direction: column; align-items: flex-start; gap: .1em; }
.mq-rel svg { width: 5.94em; height: .53em; fill: none; stroke: var(--accent); stroke-width: 1.6; }
.mq-rel circle { fill: var(--bg-2); }
.mq-branch { stroke-opacity: .5; stroke-dasharray: 4 3; }
.mq-rel text { fill: var(--accent); stroke: none; font: 500 11px var(--f-mono); letter-spacing: 0; }

/* ==========================================================================
   WORK / CASES
   ========================================================================== */
.work { padding-bottom: 60px; }
.cases { position: relative; }
.case { position: sticky; top: 0; height: 100vh; padding: 14px var(--gut); display: flex; }
.case__card {
  position: relative; flex: 1; border-radius: clamp(22px, 2.2vw, 36px); overflow: hidden;
  background: var(--c-bg); color: var(--c-fg);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 2vw;
  padding: clamp(28px, 3.4vw, 56px); transform-origin: 50% 0%; will-change: transform;
  box-shadow: 0 -30px 80px -40px rgba(0, 0, 0, .7);
}
.case__card::before { /* subtle texture */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 85% 50%, rgba(255, 255, 255, .22), transparent 55%);
  mix-blend-mode: soft-light;
}
/* BetMakers: the platform's slate grey, deepening to black; no brand colour on the card itself */
.case__card--bm { background: linear-gradient(155deg, #3a434a 0%, #2b3238 38%, #171b1f 78%, #0e1012 100%); }
.case__card--bm::before { background: radial-gradient(70% 60% at 12% 0%, rgba(255, 255, 255, .08), transparent 60%), radial-gradient(60% 70% at 78% 55%, rgba(255, 255, 255, .06), transparent 65%); mix-blend-mode: normal; }
.case__path { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; font-size: 11px; color: var(--c-mute); }
.case__path span:last-child { color: var(--c-fg); }
.case__path i { font-style: normal; color: var(--c-mute); }
.case__logo--bm { background: #1f2e38; display: grid; place-items: center; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.case__logo--bm > img { width: 92%; height: 92%; object-fit: contain; }
.case__shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; border-radius: inherit; }
.case__info { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0; }
.case__meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--c-mute); font-size: 11px; }
.case__meta span:not(:first-child)::before { content: "/"; margin-right: 10px; opacity: .5; }
.case__meta span:first-child { color: var(--c-fg); font-weight: 600; }
.case__brand { --ts: clamp(50px, 6.6vw, 118px); display: flex; align-items: center; gap: clamp(14px, 1.4vw, 24px); margin-top: auto; padding-top: 24px; }
.case__title { font-size: var(--ts); font-weight: 800; line-height: .85; letter-spacing: -.06em; }

/* app icons, sized to the app name; PopKin and LISTඑක play their own animated marks */
.case__logo {
  position: relative; flex: 0 0 auto; width: calc(var(--ts) * .98); aspect-ratio: 1; border-radius: 23%; overflow: hidden;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .12); isolation: isolate;
}
.case__logo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case__logo.is-live > img { display: none; }
.case__logo--popkin { background: #1f5bff; }
.case__logo--popkin .i-logo { position: absolute; inset: 0; z-index: 0; background: #1f5bff; display: grid; place-items: center; }
.case__logo--popkin .i-logo > svg { width: 86%; height: auto; }
.case__logo--popkin .lg-scene { --lw: 150%; }
.case__logo--listeka { background: radial-gradient(120% 95% at 72% 8%, #c8d47f 0%, #a0b843 42%, #86a12e 100%); }
.case__logo--listeka .lk { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }

/* what I did on it */
.roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.roles li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 99px;
  background: var(--c-fg); color: var(--c-bg); font-size: 11px; font-weight: 500; letter-spacing: .02em;
}
.roles li::before {
  content: "✓"; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: var(--c-bg); color: var(--c-fg); font: 700 10px/1 var(--f-sans);
}

/* PopKin: the popkin.kids meadow, in tints of the card's sun yellow, stands up like a pop-up page */
.case__scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: inherit; container-type: size; }
/* sized from the card's height so the hills reach about halfway up; capped so the tall mobile card isn't all meadow */
.case__scene .l { --lw: clamp(max(124cqw, 1000px), 340cqh, 230cqw); position: absolute; left: 50%; bottom: 0; width: var(--lw); margin-left: calc(var(--lw) / -2); }
.case__scene .l svg { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.34, 1.4, .6, 1); }
.case__scene .l:nth-child(2) svg { transition-delay: .12s; }
.case__scene .l:nth-child(3) svg { transition-delay: .24s; }
.case__scene:not(.up) .l svg { transform: perspective(900px) rotateX(-86deg); transition: none; }
.case__scene .t-l2 { fill: #ffe07c; } .case__scene .t-l1 { fill: #ffda62; } .case__scene .t-base { fill: #ffd23f; }
.case__scene .t-d1 { fill: #fcca39; } .case__scene .t-d2 { fill: #f9c334; } .case__scene .t-d3 { fill: #f6bc2f; }
.case__scene :is(.sun, .moon) { display: none; }
.case__scene .clouds { animation: pk-drift 16s ease-in-out infinite alternate; }
.case__scene .l:nth-child(1) { animation: pk-slide 12s ease-in-out infinite alternate; --dx: -26px; }
.case__scene .l:nth-child(3) { animation: pk-slide 12s ease-in-out infinite alternate; --dx: 18px; }
/* LISTඑක + Proximity: background art drawn by card-scenes.js, a few shades off each card's colour like the meadow */
.case__art { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.case__art svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* LISTඑක: ruled paper at an angle, with a hand-written list that writes itself */
.art-paper .rules { fill: none; stroke: #ded8c7; }
.art-paper .margin { fill: none; stroke: #e5d3c6; }
.art-paper .stain { fill: none; stroke: #e1d8c2; }
.art-paper .pen { fill: none; stroke: #d6cfba; stroke-linecap: round; stroke-linejoin: round; }
.art-paper .pen--tick { stroke: #cdd0a6; }
.art-paper .script { fill: #ddd6c2; font-family: var(--f-si); font-weight: 800; }
.art-paper .ink { stroke-dasharray: 1; stroke-dashoffset: 1; }
.art-paper.up .ink { stroke-dashoffset: 0; transition: stroke-dashoffset .55s cubic-bezier(.45, 0, .2, 1) var(--d, 0s); }
.art-paper.still .ink { transition: none; }

/* Proximity: neighbours as faces, a few joined by dotted introductions */
.art-faces .fc.d0 { fill: #601a25; } .art-faces .fc.d1 { fill: #651d2a; } .art-faces .fc.d2 { fill: #6b222f; }
.art-faces .ft { fill: #5b1621; stroke: #5b1621; stroke-width: 0; }
.art-faces .ft .s { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.art-faces .lk { fill: none; stroke: #6c2330; stroke-linecap: round; stroke-dasharray: 0 11; opacity: 0; }
.art-faces .ht { fill: #712838; }
.art-faces .pop { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.art-faces.up .pop { transform: none; transition: transform .7s cubic-bezier(.34, 1.56, .64, 1) var(--d, 0s); }
.art-faces.up .lk { opacity: 1; transition: opacity .8s var(--d, 0s); animation: px-flow 2.4s linear infinite; }
.art-faces.up .bob { animation: px-bob var(--t, 6s) ease-in-out infinite alternate; }
.art-faces.still .pop, .art-faces.still .lk { transition: none; }
.art-faces.still .lk, .art-faces.still .bob { animation: none; }
/* BetMakers: racetrack lanes in faint white, so they ride the slate gradient */
.art-track .turf { fill: rgba(255, 255, 255, .022); }
.art-track .lane { fill: none; stroke: rgba(255, 255, 255, .045); }
.art-track .rail { fill: none; stroke: rgba(255, 255, 255, .075); }
.art-track .posts { fill: none; stroke: rgba(255, 255, 255, .06); stroke-linecap: round; }
.art-track .finish { fill: rgba(255, 255, 255, .07); }
.art-track .wpost { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .08); }
.art-track .dist { stroke: rgba(255, 255, 255, .09); fill: rgba(255, 255, 255, .12); font-family: var(--f-mono); }
.art-track .runner rect { fill: rgba(255, 255, 255, .065); }
.art-track .runner text { fill: rgba(255, 255, 255, .17); font-family: var(--f-mono); font-weight: 600; }
.art-track .ink { stroke-dasharray: 1; stroke-dashoffset: 1; }
.art-track :is(.posts, .finish, .wpost, .dist, .field) { opacity: 0; }
.art-track.up .ink { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.45, 0, .2, 1) var(--d, 0s); }
.art-track.up :is(.posts, .finish, .wpost, .dist) { opacity: 1; transition: opacity .8s 1.2s; }
.art-track.up .field { opacity: 1; transition: opacity .8s 1.6s; }
.art-track.still .ink, .art-track.still :is(.posts, .finish, .wpost, .dist, .field) { transition: none; }
@keyframes px-flow { to { stroke-dashoffset: -22; } }
@keyframes px-bob { from { transform: none; } to { transform: translateY(var(--dy, -6px)); } }
@keyframes pk-drift { from { transform: translateX(-30px); } to { transform: translateX(46px); } }
@keyframes pk-slide { from { transform: none; } to { transform: translateX(var(--dx, 0px)); } }
.case__tag { font-size: clamp(22px, 2.2vw, 38px); line-height: 1.05; margin-top: 14px; letter-spacing: -.01em; }
.case__desc { color: var(--c-mute); font-size: clamp(14px, 1.06vw, 17px); line-height: 1.5; max-width: 46ch; margin-top: 16px; }
.case__feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(18px, 2.2vw, 32px); padding-top: 18px; border-top: 1px solid var(--c-line); }
.case__feats li { display: flex; flex-direction: column; gap: 6px; }
.case__feats b { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.case__feats span { font-size: 12.5px; line-height: 1.4; color: var(--c-mute); }
.case__foot { margin-top: clamp(18px, 2.2vw, 32px); display: flex; flex-direction: column; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 500 11px/1 var(--f-mono); text-transform: uppercase; padding: 8px 11px; border-radius: 99px; background: var(--c-chip); border: 1px solid var(--c-line); }
.case__links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 99px;
  background: var(--c-fg); color: var(--c-bg); font-weight: 600; font-size: 14px; transition: transform .4s var(--ease), background .3s, color .3s;
}
.btn span { transition: transform .4s var(--ease); }
.btn:hover span { transform: translate(3px, -3px); }
.btn--ghost { background: transparent; color: var(--c-fg); border: 1px solid var(--c-line); }
.btn--ghost:hover { border-color: var(--c-fg); }

.case__visual { position: relative; z-index: 1; display: grid; place-items: center; perspective: 1400px; min-height: 0; }
.case__deck { position: relative; display: flex; align-items: center; justify-content: center; transform-style: preserve-3d; will-change: transform; }
.case__deck .phone.front { z-index: 3; }
.case__deck .phone.back { position: absolute; z-index: 1; filter: saturate(.95); }
.case__deck .phone.back.l { right: calc(50% + var(--pw) * .14); transform: rotate(-8deg) translateY(4%); }
.case__deck .phone.back.r { left: calc(50% + var(--pw) * .14); transform: rotate(8deg) translateY(4%); }
.case__land { position: absolute; z-index: 4; width: min(52%, 420px); right: -2%; bottom: 2%; transform: rotate(-4deg); }
.case__land .phone { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .14), 0 40px 80px -20px rgba(0, 0, 0, .55); }

/* ==========================================================================
   BRANDS
   ========================================================================== */
.brands { padding: clamp(100px, 12vw, 180px) var(--gut); }
.brands__inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 5vw; align-items: center; min-height: 80vh; }
.brands__title { display: flex; align-items: flex-end; gap: 22px; line-height: .8; }
.brands__big { font-size: clamp(120px, 17vw, 300px); font-weight: 900; letter-spacing: -.07em; color: var(--accent); line-height: .78; font-variant-numeric: tabular-nums; }
.brands__words { font-size: clamp(30px, 3.4vw, 58px); font-weight: 700; letter-spacing: -.04em; line-height: .95; padding-bottom: .15em; }
.brands__text { color: var(--mute); font-size: clamp(16px, 1.3vw, 20px); max-width: 40ch; margin-top: 36px; }
.brands__hint { margin-top: 28px; color: var(--accent); }
.brands__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(8px, 1vw, 16px); }
.tile { position: relative; aspect-ratio: 1; border-radius: 24%; will-change: transform; }
.tile img { width: 100%; height: 100%; border-radius: 24%; object-fit: cover; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8); transition: transform .5s var(--ease), filter .4s; }
.brands__grid:hover .tile img { filter: grayscale(1) brightness(.55); }
.brands__grid .tile:hover img { filter: none; transform: scale(1.28); }
.tile:hover { z-index: 3; }
.tile__name {
  position: absolute; left: 50%; bottom: calc(100% + 18px); transform: translate(-50%, 6px); opacity: 0;
  background: var(--fg); color: #0a0a0a; font: 500 11px/1 var(--f-mono); text-transform: uppercase; padding: 7px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  transition: opacity .25s, transform .4s var(--ease);
}
.tile:hover .tile__name { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   JOURNEY
   ========================================================================== */
.journey { padding: clamp(80px, 10vw, 160px) 0; }
.timeline { border-top: 1px solid var(--line); }
/* the ladder: a rail down the left, a rung and a node per year */
.ladder { position: relative; --yc: 140px; --nc: 48px; --gap: 24px; --rail: calc(var(--gut) + var(--yc) + var(--gap) + var(--nc) / 2); }
.ladder::before, .ladder__rail { content: ""; position: absolute; top: 0; bottom: 0; left: var(--rail); width: 1px; margin-left: -.5px; z-index: 2; pointer-events: none; }
.ladder::before { background: rgba(241, 237, 228, .1); }
.ladder__rail i { display: block; height: 100%; background: rgba(241, 237, 228, .45); transform-origin: top; transform: scaleY(0); }
.t-row {
  position: relative; display: grid; grid-template-columns: var(--yc) var(--nc) minmax(0, 1.25fr) minmax(0, .7fr) minmax(0, 1.1fr); gap: var(--gap); align-items: center;
  padding: 30px var(--gut); border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate;
}
.t-node { position: relative; align-self: stretch; display: grid; place-items: center; z-index: 3; }
.t-node i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid rgba(241, 237, 228, .3); transition: background .5s, border-color .5s; }
.t-node::after { /* the rung, out to the role */
  content: ""; position: absolute; left: 50%; top: 50%; height: 1px; width: calc(50% + var(--gap) - 6px); background: rgba(241, 237, 228, .3);
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease) .1s; z-index: -1;
}
.t-row.is-on .t-node i { background: var(--fg); border-color: var(--fg); }
.t-row.is-on .t-node::after { transform: scaleX(1); }
.t-year { font: 500 clamp(13px, 1.05vw, 16px)/1.2 var(--f-mono) !important; letter-spacing: .02em; color: rgba(241, 237, 228, .3); font-variant-numeric: tabular-nums; text-transform: uppercase; transition: color .6s; }
.t-row.is-on .t-year { color: var(--fg); }
.t-row::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); z-index: -1; }
.t-row:hover::before { transform: scaleY(1); }
.t-row > * { transition: color .4s, transform .6s var(--ease); }
.t-row:hover > * { color: #0a0a0a; }
.t-row:hover .t-role { transform: translateX(14px); }
.t-role { font-size: clamp(24px, 2.6vw, 44px); font-weight: 650; letter-spacing: -.04em; line-height: 1; }
.t-co { font-size: clamp(22px, 2.1vw, 34px); color: var(--accent); line-height: 1; }
.t-row:hover .t-co { color: var(--accent) !important; }
.t-desc { color: var(--mute); font-size: 15px; line-height: 1.45; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { padding: 0 var(--gut) clamp(120px, 14vw, 220px); }
.about__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 6vw; align-items: start; }
.about__left { position: sticky; top: 120px; }
.about__sig { width: min(360px, 70%); margin-top: 28px; aspect-ratio: 960 / 334; }
.about__sig img { display: block; width: 100%; height: auto; }
.about__p { color: var(--mute); font-size: clamp(16px, 1.3vw, 20px); line-height: 1.55; margin-bottom: 24px; max-width: 52ch; }
.about__p.big { color: var(--fg); font-size: clamp(22px, 2.2vw, 36px); line-height: 1.2; letter-spacing: -.025em; font-weight: 500; }
.about__p em { color: var(--accent-2); }
/* What I do: five capability columns, separated by hairlines, not boxed */
.caps { margin-top: clamp(64px, 7vw, 112px); }
.caps__head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 6vw; align-items: end; margin-bottom: 48px; }
.caps__head .kicker { margin-bottom: 0; }
.caps__lede { font-size: clamp(22px, 2.1vw, 34px); line-height: 1.15; letter-spacing: -.03em; font-weight: 500; max-width: 26ch; }
.caps__lede em { color: var(--accent); }
.caps__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cap { position: relative; padding: 30px 26px 34px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.cap:first-child { padding-left: 0; }
.cap:last-child { border-right: 0; padding-right: 0; }
.cap::before { /* accent line that runs along the top on hover */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease);
}
.cap:first-child::before { left: 0; }
.cap:hover::before { transform: scaleX(1); }
.cap__i { width: 34px; height: 34px; fill: none; stroke: var(--fg); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 44px; transition: stroke .4s, transform .6s var(--ease); }
.cap:hover .cap__i { stroke: var(--accent); transform: translateY(-4px) rotate(-6deg); }
.cap__n { color: var(--mute); margin-bottom: 12px; }
.cap__t { font-size: clamp(22px, 1.75vw, 28px); font-weight: 650; letter-spacing: -.035em; line-height: 1.05; }
.cap__d { color: var(--mute); font-size: 14.5px; line-height: 1.45; margin-top: 12px; min-height: 3em; }
.cap__tools { margin-top: 26px; display: grid; gap: 9px; }
.cap__tools li { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.cap__tools li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: rgba(241, 237, 228, .35); flex: 0 0 auto; }
.cap__tools i { font: 500 9.5px/1 var(--f-mono); font-style: normal; text-transform: uppercase; color: var(--accent); letter-spacing: .04em; }
/* six columns need room: on laptop widths they sit three across, in two rows */
@media (min-width: 901px) and (max-width: 1499px) {
  .caps__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cap:nth-child(3n+1) { padding-left: 0; }
  .cap:nth-child(3n) { border-right: 0; padding-right: 0; }
  .cap:nth-child(n+4) { border-top: 1px solid var(--line); }
  .cap__i { margin-bottom: 32px; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { position: relative; overflow: hidden; background: var(--fg); color: #0a0a0a; padding: clamp(60px, 8vw, 120px) var(--gut) 0; border-radius: clamp(24px, 3vw, 48px) clamp(24px, 3vw, 48px) 0 0; }
.contact .kicker { color: rgba(10, 10, 10, .55); }
.contact__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.contact__q { font-size: clamp(18px, 1.6vw, 24px); max-width: 22ch; text-align: right; letter-spacing: -.02em; line-height: 1.2; }
.contact__big { display: block; margin-top: clamp(30px, 5vw, 70px); font-size: clamp(64px, 12.5vw, 240px); font-weight: 850; line-height: .86; letter-spacing: -.065em; }
.contact__big .cb-line { display: block; overflow: hidden; padding-bottom: .04em; }
.contact__big .cb-line > span { display: inline-block; }
.contact__big em { color: var(--accent); letter-spacing: -.035em; padding-right: .05em; }
.cb-arrow { display: inline-block; transition: transform .7s var(--ease); color: #0a0a0a; font-family: var(--f-sans); }
.contact__big:hover .cb-arrow { transform: translateX(.18em) rotate(-35deg); }
.contact__row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: clamp(40px, 6vw, 80px); }
.email { display: inline-flex; align-items: center; gap: 18px; padding: 20px 28px; border-radius: 99px; background: #0a0a0a; color: var(--fg); font-size: clamp(16px, 1.6vw, 24px); font-weight: 500; letter-spacing: -.01em; }
.email__ico { font-size: 11px; color: var(--accent); padding: 6px 10px; border: 1px solid rgba(255, 91, 31, .5); border-radius: 99px; }
.socials { display: flex; gap: clamp(18px, 3vw, 40px); font-size: clamp(16px, 1.6vw, 24px); font-weight: 600; letter-spacing: -.01em; }
.contact__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(60px, 8vw, 110px); padding: 20px 0; border-top: 1px solid rgba(10, 10, 10, .15); color: rgba(10, 10, 10, .6); font-size: 11px; }
.contact__giant { font-size: 25.5vw; font-weight: 900; letter-spacing: -.075em; line-height: .72; margin: 10px -0.04em -.07em; color: #0a0a0a; white-space: nowrap; user-select: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .case__feats { grid-template-columns: 1fr 1fr; }
  .case__feats li:nth-child(3) { display: none; }
  .ladder { --yc: 120px; --nc: 44px; }
  .t-row { grid-template-columns: var(--yc) var(--nc) minmax(0, 1.2fr) minmax(0, .8fr); }
  .t-desc { grid-column: 3 / -1; }
}

@media (max-width: 900px), (max-height: 680px) {
  .case { position: relative; height: auto; padding: 8px var(--gut); }
  .case__card { grid-template-columns: 1fr; gap: 40px; }
  .case__brand { margin-top: 28px; }
  .case__visual { padding: 30px 0 10px; }
}

@media (max-width: 900px) {
  .mq-motion { filter: none; }
  :root { --pw: clamp(170px, 44vw, 250px); --pw-s: clamp(130px, 34vw, 200px); --fw1: 92px; --fw2: 80px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .nav__time { display: none; }
  .hero { padding-bottom: 16px; }
  .hero__top { top: 84px; flex-direction: column; }
  .hero__now { display: none; }
  .hero__portrait { height: 64vh; left: 50%; }
  .hero__glow { left: 50%; }
  .hero__name { flex-direction: column; font-size: 25vw; line-height: .8; gap: 0; }
  .hl2 { align-self: flex-end; }
  .hero__badge { width: 92px; height: 92px; right: var(--gut); bottom: auto; top: 84px; }
  .hero__badge text { font-size: 15px; }
  .hero__meta span:nth-child(2) { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sec-head--row { grid-template-columns: 1fr; gap: 0; }
  .sec-head--row .sec-sub { margin-top: 24px; }
  .case__feats { grid-template-columns: 1fr; }
  .case__feats li:nth-child(3) { display: flex; }
  .case__land { width: 64%; right: -4%; bottom: -4%; }
  .brands__inner { grid-template-columns: 1fr; gap: 60px; min-height: 0; }
  .brands__grid { gap: 8px; }
  .ladder { --rail: calc(var(--gut) + 8px); }
  .t-row { grid-template-columns: 1fr; gap: 8px; padding: 24px var(--gut) 24px calc(var(--gut) + 40px); }
  .t-node { position: absolute; left: var(--gut); top: 0; bottom: 0; width: 16px; display: block; }
  .t-node i { position: absolute; left: 3px; top: 28px; }
  .t-node::after { display: none; }
  .t-desc { grid-column: auto; }
  .about__grid { grid-template-columns: 1fr; }
  .about__left { position: relative; top: 0; }
  .caps__head { grid-template-columns: 1fr; gap: 20px; }
  .caps__grid { grid-template-columns: 1fr 1fr; }
  .cap, .cap:first-child, .cap:last-child { padding: 26px 18px 28px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .cap:nth-child(odd) { padding-right: 18px; }
  .cap:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
  .cap__i { margin-bottom: 26px; }
  .cap__d { min-height: 0; }
  .contact__top { flex-direction: column; }
  .contact__q { text-align: left; }
  .email { font-size: 15px; padding: 16px 20px; }
  .socials { font-size: 15px; }
}

@media (max-width: 480px) {
  .hero__lede { font-size: 34px; }
  .hero__sub { font-size: 16px; max-width: 21em; }
  .case__brand { --ts: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .hero__badge svg, .dot { animation: none; }
  .manifesto__text .w { opacity: 1 !important; }
  .marquee * { animation: none !important; }
  .mq-ink path { stroke-dashoffset: 0; }
  .mq-motion { filter: none; }
  .mq-ghost { display: none; }
}

/* links sit right under the icon and name, so they're seen before the next card slides over */
.case__info > .case__links { margin-top: clamp(16px, 1.6vw, 24px); }
.btn__ic { width: 15px; height: 15px; flex: 0 0 auto; margin-right: -2px; }

/* ==========================================================================
   MORE WORK — a sideways shelf after the main deck
   Smaller, darker cards than the main cases; each one is lit by its brand
   colour (--s-accent / --s-glow) instead of being painted in it, so a warm
   brand never repeats PopKin's yellow card. Without JS (or with reduced
   motion, or on phones) the track simply scrolls sideways; on desktop
   main.js adds .is-pinned and drives the rail with vertical scroll.
   ========================================================================== */
.more { position: relative; padding: clamp(60px, 8vw, 120px) 0; }
.more__pin { position: relative; }
.more__intro { padding: 0 var(--gut); margin-bottom: clamp(36px, 5vw, 64px); }
.more__intro .sec-title { font-size: clamp(44px, 5.4vw, 96px); }
.more__hint { display: inline-flex; align-items: center; gap: 10px; margin-top: 32px; color: var(--accent); }
.more__hint i { font-style: normal; display: inline-block; animation: more-nudge 1.6s var(--ease-io) infinite; }
.more__hint-m { display: none; }
@keyframes more-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(8px); } }

.more__track {
  display: flex; gap: clamp(14px, 1.6vw, 24px); padding: 0 var(--gut) 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gut); scrollbar-width: none;
}
.more__track::-webkit-scrollbar { display: none; }
.more__bar { display: none; }

.shelf__card {
  --s-fg: var(--fg); --s-mute: var(--mute); --s-line: var(--line);
  position: relative; flex: 0 0 min(86vw, 1240px); min-height: min(76vh, 720px); scroll-snap-align: start;
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(20px, 2.4vw, 40px);
  --pad: clamp(24px, 3vw, 48px); padding: var(--pad); border-radius: clamp(22px, 2.2vw, 36px); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(70% 85% at 80% 58%, var(--s-glow), transparent 64%),
    radial-gradient(60% 50% at 0% 100%, rgba(255, 255, 255, .035), transparent 70%),
    linear-gradient(160deg, #191715 0%, #111 55%, #0c0c0c 100%);
  box-shadow: inset 0 0 0 1px var(--s-line), 0 40px 90px -50px rgba(0, 0, 0, .9);
}
.shelf__card::after { /* a thin rim of the brand colour along the top */
  content: ""; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--s-accent), transparent); opacity: .7;
}
.shelf__info { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0; }
.shelf__meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--s-mute); font-size: 11px; }
.shelf__meta span:not(:first-child)::before { content: "/"; margin-right: 10px; opacity: .5; }
.shelf__meta span:first-child { color: var(--s-accent); font-weight: 600; }
.shelf__brand { --ts: clamp(36px, 3.6vw, 64px); display: flex; align-items: center; gap: clamp(12px, 1.2vw, 18px); margin-top: auto; padding-top: 24px; }
.shelf__logo { flex: 0 0 auto; width: calc(var(--ts) * 1.05); aspect-ratio: 1; border-radius: 23%; overflow: hidden; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.shelf__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shelf__title { font-size: var(--ts); font-weight: 800; line-height: .9; letter-spacing: -.05em; }
.shelf__tag { font-size: clamp(20px, 1.8vw, 30px); line-height: 1.1; margin-top: 14px; }
.shelf__tag em { color: var(--s-accent); }
.shelf__roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.shelf__roles li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--s-accent) 55%, transparent); color: var(--s-fg); font-size: 11px; letter-spacing: .02em;
}
.shelf__roles li::before {
  content: "✓"; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: var(--s-accent); color: #0c0c0c; font: 700 10px/1 var(--f-sans);
}
.shelf__desc { color: var(--s-mute); font-size: clamp(14px, 1vw, 16px); line-height: 1.5; max-width: 48ch; margin-top: 16px; }
.shelf__feats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(16px, 1.8vw, 26px); padding-top: 16px; border-top: 1px solid var(--s-line); }
.shelf__feats li { display: flex; flex-direction: column; gap: 5px; }
.shelf__feats b { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.shelf__feats span { font-size: 12.5px; line-height: 1.4; color: var(--s-mute); }
.shelf__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: clamp(16px, 1.8vw, 26px); }
.shelf__chips li { font-size: 10.5px; line-height: 1; text-transform: uppercase; padding: 7px 10px; border-radius: 99px; border: 1px solid var(--s-line); color: var(--s-mute); }

/* laptop with two phones in front, like the project's own cover */
.shelf__visual { position: relative; z-index: 1; min-height: 0; }
.shelf__laptop { position: absolute; left: -2%; width: 104%; max-width: none; height: auto; top: 46%; transform: translateY(-58%); filter: drop-shadow(0 40px 50px rgba(0, 0, 0, .55)); }
.shelf__phone { position: absolute; --w: clamp(104px, 9.6vw, 176px); }
.shelf__phone--a { right: 1%; bottom: 3%; transform: rotate(5deg); z-index: 3; }
.shelf__phone--b { right: calc(1% + var(--w) * .72); bottom: 0; transform: rotate(-7deg); z-index: 2; --w: clamp(92px, 8.4vw, 152px); }
.shelf__phone .phone__screen { background: #fff; }

.shelf__logo--round { border-radius: 50%; }

/* one picture layout per kind of asset a project has */
.shelf__visual { --sw: clamp(130px, 12.8vw, 228px); }
/* three phones fanned, like the main deck but smaller */
.vis-fan { display: grid; place-items: center; }
.vis-fan .phone { --w: var(--sw); }
.vis-fan .phone.front { z-index: 3; }
.vis-fan .phone.back { --w: calc(var(--sw) * .82); position: absolute; z-index: 1; top: 50%; }
.vis-fan .phone.back.l { right: calc(50% + var(--sw) * .16); transform: translateY(-46%) rotate(-9deg); }
.vis-fan .phone.back.r { left: calc(50% + var(--sw) * .16); transform: translateY(-46%) rotate(9deg); }
/* QuizMaster: six screens in a phone of their own era. The captures are 9:16, so the frame is built to a
   real 16:9-screen phone's proportions (body 1 : 2.07, deep top and bottom bezels with speaker slots,
   camera and side keys) and the screen never stretches. Two staggered rows: the front row whole, the back
   row peeking above and between. */
.vis-qm { display: grid; place-items: center; }
.vis-qm__set { --dw: clamp(120px, 11.4vw, 202px); --g: calc(var(--dw) * .16); position: relative; width: calc(var(--dw) * 3.5 + var(--g) * 2.5); height: calc(var(--dw) * 2.07 * 1.46); transform: rotate(-6deg); }
.vis-qm .dev { position: absolute; left: calc((var(--dw) + var(--g)) * var(--i)); top: calc(var(--dw) * 2.07 * .46); z-index: 2; }
.vis-qm .dev.back { left: calc((var(--dw) + var(--g)) * var(--i) + var(--dw) * .5 + var(--g) * .5); top: 0; z-index: 1; filter: brightness(.86); }
.dev {
  --w: var(--dw); width: var(--w); aspect-ratio: 1 / 2.07; border-radius: calc(var(--w) * .14);
  padding: calc(var(--w) * .235) calc(var(--w) * .05);
  background: linear-gradient(160deg, #44474d 0%, #1b1c20 22%, #0c0d0f 55%, #1f2125 84%, #3b3e43 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 0 0 calc(var(--w) * .013) #09090a, inset 0 0 0 calc(var(--w) * .017) rgba(255, 255, 255, .05),
    0 34px 60px -22px rgba(0, 0, 0, .75), 0 14px 24px -14px rgba(0, 0, 0, .6);
}
.dev::before, .dev::after { /* earpiece and bottom speaker */
  content: ""; position: absolute; left: 50%; width: 34%; height: calc(var(--w) * .026); transform: translateX(-50%);
  border-radius: 99px; background: #040405; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .07), 0 1px 0 rgba(255, 255, 255, .05);
}
.dev::before { top: calc(var(--w) * .105); }
.dev::after { bottom: calc(var(--w) * .1); }
.dev__cam { position: absolute; top: calc(var(--w) * .095); left: calc(var(--w) * .2); width: calc(var(--w) * .046); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #4a5c7c 0, #121826 45%, #06080d 70%); box-shadow: 0 0 0 calc(var(--w) * .008) #050506; }
.dev__keys { position: absolute; right: calc(var(--w) * -.013); top: calc(var(--w) * .42); width: calc(var(--w) * .016); height: calc(var(--w) * .16); border-radius: 0 2px 2px 0; background: linear-gradient(90deg, #1d1f23, #45484e); box-shadow: 0 calc(var(--w) * .3) 0 0 #2e3035, 0 calc(var(--w) * .46) 0 0 #2e3035; }
.dev__screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--w) * .012); overflow: hidden; background: #fff; }
.dev__screen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.dev__screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(118deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 34%); pointer-events: none; }
/* FindMyTutor: four mockups. The angled two-phone render leads, big and in front; sign in, the enrol pop-up and a
   past-paper screen fan out behind it, up and to the right. */
.vis-render__img { position: absolute; left: -18%; top: 50%; width: 112%; max-width: none; height: auto; transform: translateY(-40%); z-index: 3; filter: drop-shadow(0 40px 50px rgba(0, 0, 0, .55)); }
.vis-render__fan { position: absolute; right: 0; top: 4%; width: 74%; height: 70%; z-index: 1; }
.vis-render__fan .phone { position: absolute; top: 0; --w: calc(var(--sw) * .74); filter: brightness(.9); }
.vis-render__fan .phone:nth-child(1) { left: 0; transform: rotate(-10deg) translateY(12%); }
.vis-render__fan .phone:nth-child(2) { left: 50%; margin-left: calc(var(--w) * -.5); z-index: 2; filter: none; }
.vis-render__fan .phone:nth-child(3) { right: 0; transform: rotate(10deg) translateY(12%); }

/* background art behind a card: TinFit's lifter in black and white (the rest are scenes from shelf-scenes.js). Strongest in the top-right corner and around the picture,
   fading out before it reaches the text. */
.shelf__deco {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; color: var(--s-accent);
  -webkit-mask-image: radial-gradient(70% 80% at 100% 0%, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 72%), radial-gradient(46% 62% at 76% 56%, rgba(0, 0, 0, .55), transparent 78%);
  mask-image: radial-gradient(70% 80% at 100% 0%, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 72%), radial-gradient(46% 62% at 76% 56%, rgba(0, 0, 0, .55), transparent 78%);
}
/* scenes drawn by shelf-scenes.js: line art in the card's accent, strongest on the art side of the card */
.shelf__scene {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; color: var(--s-accent); overflow: hidden; border-radius: inherit;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .35) 36%, #000 56%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .35) 36%, #000 56%);
}
/* QuizMaster's flight plays in the band above the title, so that band stays at full strength */
.shelf__scene[data-scene="quiz"] {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 33%, transparent 46%), linear-gradient(90deg, rgba(0, 0, 0, .14) 0%, rgba(0, 0, 0, .22) 40%, #000 56%);
  mask-image: linear-gradient(180deg, #000 0%, #000 33%, transparent 46%), linear-gradient(90deg, rgba(0, 0, 0, .14) 0%, rgba(0, 0, 0, .22) 40%, #000 56%);
}
.shelf__scene svg { display: block; width: 100%; height: 100%; overflow: visible; }
.shelf__scene .sc-ink { stroke-dasharray: 1; stroke-dashoffset: 1; }
.shelf__scene.up .sc-ink { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(.45, 0, .2, 1) var(--d, 0s); }
.shelf__scene .sc-fade { opacity: 0; }
.shelf__scene.up .sc-fade { opacity: 1; transition: opacity 1.1s var(--d, 0s); }
.shelf__scene .sc-pop { transform-box: fill-box; transform-origin: 50% 100%; transform: translateY(-36px) scale(.5); opacity: 0; }
.shelf__scene.up .sc-pop { transform: none; opacity: 1; transition: transform .9s cubic-bezier(.34, 1.56, .64, 1) var(--d, 0s), opacity .35s var(--d, 0s); }
.shelf__scene.still :is(.sc-ink, .sc-fade, .sc-pop) { transition: none; }
.shelf__scene .sc-bob { animation: sc-bob var(--t, 4s) ease-in-out infinite alternate; }
.shelf__scene .sc-sway { animation: sc-sway var(--t, 7s) ease-in-out infinite alternate; }
.shelf__scene .sc-flow { animation: sc-flow 1.4s linear infinite; }
.shelf__scene .sc-flow-slow { animation: sc-flow-slow 3s linear infinite; }
.shelf__scene:not(.on) * { animation-play-state: paused; }
.shelf__scene.still * { animation: none; }
@keyframes sc-bob { from { transform: none; } to { transform: translateY(-6px); } }
@keyframes sc-sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@keyframes sc-flow { to { stroke-dashoffset: -40; } }
@keyframes sc-flow-slow { to { stroke-dashoffset: -96; } }
/* TinFit: a real lifter mid-deadlift, cut out and in black and white, standing on the card's bottom-right
   corner with the plate running off the edge. A slow push-in keeps him breathing. */
.shelf__deco--photo {
  background: url(/media/tinfit/lifter.webp) 104% 100% / auto 102% no-repeat; opacity: .4;
  transform-origin: 85% 100%; animation: deco-push 14s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, rgba(0, 0, 0, .55) 52%, #000 74%); mask-image: linear-gradient(90deg, transparent 30%, rgba(0, 0, 0, .55) 52%, #000 74%);
}
@keyframes deco-push { from { transform: none; } to { transform: scale(1.045); } }
/* three phones in a row, stepped */
.vis-steps { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.2vw, 20px); }
.vis-steps .phone { --w: calc(var(--sw) * .9); flex: 0 0 auto; }
.vis-steps .phone:nth-child(1) { transform: translateY(8%); }
.vis-steps .phone:nth-child(2) { transform: translateY(-6%); }
.vis-steps .phone:nth-child(3) { transform: translateY(14%); }
/* the project's own store screenshots, fanned like a hand of cards */
.vis-strip { display: flex; align-items: center; justify-content: center; --cw: clamp(116px, 11vw, 196px); }
.vis-strip img { flex: 0 0 auto; width: var(--cw); height: auto; aspect-ratio: 314 / 680; border-radius: calc(var(--cw) * .09); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .08); }
.vis-strip img + img { margin-left: calc(var(--cw) * -.22); }
.vis-strip img:nth-child(1) { transform: rotate(-9deg) translateY(10%); z-index: 1; }
.vis-strip img:nth-child(2) { transform: rotate(-3deg) translateY(-2%); z-index: 2; }
.vis-strip img:nth-child(3) { transform: rotate(3deg) translateY(-4%); z-index: 3; }
.vis-strip img:nth-child(4) { transform: rotate(9deg) translateY(8%); z-index: 4; }

/* desktop: pinned, the rail moves sideways as you scroll down */
.more.is-pinned { padding: 0; }
.more.is-pinned .more__pin { height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.more.is-pinned .more__rail { display: flex; align-items: center; width: max-content; will-change: transform; }
.more.is-pinned .more__intro { flex: 0 0 clamp(340px, 34vw, 580px); margin: 0; padding-right: clamp(24px, 4vw, 72px); }
.more.is-pinned .more__track { overflow: visible; padding: 0 var(--gut) 0 0; }
.more.is-pinned .shelf__card { flex-basis: min(78vw, 1240px); height: min(78vh, 760px); min-height: 0; }
.more.is-pinned .more__bar { display: block; position: absolute; left: var(--gut); right: var(--gut); bottom: clamp(18px, 3vh, 32px); height: 1px; background: var(--line); }
.more.is-pinned .more__bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

@media (max-width: 900px) {
  .more__hint-d { display: none; }
  .more__hint-m { display: inline; }
  .shelf__card { grid-template-columns: 1fr; gap: 0; min-height: 0; --pad: 22px; }
  .shelf__brand { margin-top: 28px; padding-top: 0; --ts: clamp(32px, 9vw, 46px); }
  .shelf__feats { grid-template-columns: 1fr; }
  .shelf__visual { order: -1; height: clamp(220px, 62vw, 360px); margin: -4px -6px 4px; }
  .shelf__laptop { top: 44%; }
  .shelf__phone { --w: clamp(84px, 22vw, 130px); }
  .shelf__phone--b { --w: clamp(74px, 19vw, 112px); }
  .shelf__card:only-child { flex-basis: 100%; }
  .shelf__visual { --sw: clamp(96px, 26vw, 140px); }
  .vis-qm__set { --dw: clamp(70px, 19vw, 104px); }
  .shelf__deco { -webkit-mask-image: radial-gradient(90% 55% at 70% 18%, #000, transparent 75%); mask-image: radial-gradient(90% 55% at 70% 18%, #000, transparent 75%); }
  .shelf__scene { -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 34%, rgba(0, 0, 0, .3) 56%, rgba(0, 0, 0, .14) 100%); mask-image: linear-gradient(180deg, #000 0%, #000 34%, rgba(0, 0, 0, .3) 56%, rgba(0, 0, 0, .14) 100%); }
  /* on the tall card the phones fill the top, so QuizMaster's flight weaves down behind the text, faintly */
  .shelf__scene[data-scene="quiz"] { -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 28%, rgba(0, 0, 0, .3) 36%, rgba(0, 0, 0, .3) 86%, rgba(0, 0, 0, .6) 100%); mask-image: linear-gradient(180deg, #000 0%, #000 28%, rgba(0, 0, 0, .3) 36%, rgba(0, 0, 0, .3) 86%, rgba(0, 0, 0, .6) 100%); }
  .shelf__deco--photo { background-position: 110% 0; background-size: auto clamp(260px, 72vw, 400px); transform-origin: 80% 20%; -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 30%, transparent 52%); mask-image: linear-gradient(180deg, #000 0%, #000 30%, transparent 52%); }
  .vis-strip { --cw: clamp(74px, 19vw, 104px); }
}
@media (prefers-reduced-motion: reduce) { .more__hint i, .shelf__deco--photo { animation: none; } }
