/* =====================================================================
   BASE STYLES - layout, components, animations.
   Colours and fonts come from css/themes.css; you rarely need to edit
   this file. Sizes use clamp() so everything scales from phone to 4K.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: var(--scheme); }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
  transition: background .5s ease, color .5s ease;
}
body.locked { overflow: hidden; }
img, video { display: block; max-width: 100%; }
img { filter: var(--img-filter); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; }

:root {
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1520px;
  --nav-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.8, 0, .2, 1);
  --radius: 2px;
}

/* ---------- Typography ---------- */
.display { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: .95; }
.italic { font-style: var(--display-italic); }
.eyebrow {
  font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 12px; margin: 0 0 clamp(18px, 2.5vw, 32px);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.h1 { font-size: clamp(44px, 7.4vw, 124px); margin: 0; }
.h2 { font-size: clamp(36px, 5.4vw, 88px); margin: 0; }
.h3 { font-size: clamp(26px, 3vw, 44px); margin: 0; line-height: 1.05; }
.lead { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(24px, 3.1vw, 50px); line-height: 1.18; letter-spacing: -0.01em; margin: 0; }
/* light backgrounds: use a smaller optical size so Bodoni / Fraunces hairlines stay visible, and one weight step up */
.display, .lead, .menu a, .footer .giant, .comp .r .v { font-variation-settings: "opsz" 28; -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision; }
[data-scheme="light"] .display, [data-scheme="light"] .lead, [data-scheme="light"] .menu a { font-variation-settings: "opsz" 22; font-weight: calc(var(--display-weight) + 100); }
.body { font-size: clamp(16px, 1.15vw, 19px); line-height: 1.7; color: var(--fg2); max-width: 62ch; }
.small { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.accent { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: clamp(80px, 12vw, 180px); position: relative; }
.section.tight { padding-block: clamp(56px, 8vw, 120px); }
.band { background: var(--bg2); transition: background .5s ease; }
.hair { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 16px 40px; align-items: end; grid-template-columns: 1fr; margin-bottom: clamp(40px, 6vw, 96px); }
@media (min-width: 900px) { .section-head { grid-template-columns: 1.3fr 1fr; } .section-head .body { justify-self: end; max-width: 46ch; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 18px 30px; border: 1px solid var(--fg); border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1;
  position: relative; overflow: hidden; isolation: isolate; transition: color .4s var(--ease), border-color .4s;
  -webkit-tap-highlight-color: transparent;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1; border-radius: inherit; }
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: translateY(0); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.solid::before { background: var(--fg); }
.btn.solid:hover { color: var(--bg); border-color: var(--fg); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(6px); }
.link-ul { position: relative; padding-bottom: 2px; }
.link-ul::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.link-ul:hover::after, .link-ul.on::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Progress bar, grain, cursor ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); z-index: 90; pointer-events: none; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 80; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px; animation: grain .9s steps(3) infinite; }
@keyframes grain { 0%,100% { background-position: 0 0; } 33% { background-position: 80px -40px; } 66% { background-position: -60px 90px; } }
.cursor-ring, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 200; border-radius: 50%; opacity: 0; }
.cursor-ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid var(--accent); display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, opacity .4s; }
.cursor-ring span { font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--on-accent); opacity: 0; transition: opacity .2s; }
.cursor-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; background: var(--accent); }
/* the normal pointer is never hidden; the ring is decoration only */

/* ---------- Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: grid; place-items: center; transition: transform 1s var(--ease-io); }
.preloader.done { transform: translateY(-101%); }
.preloader .letters { display: flex; gap: .02em; clip-path: inset(-0.5em -0.5em 0 -0.5em); padding-inline: .06em; font-size: clamp(64px, 14vw, 180px); color: var(--fg); }
.preloader .letters span { display: block; transform: translateY(110%); animation: rise .9s var(--ease) forwards; }
.preloader .letters span:nth-child(2) { animation-delay: .08s; }
.preloader .letters span:nth-child(3) { animation-delay: .16s; }
.preloader .letters span:nth-child(4) { animation-delay: .24s; }
.preloader .letters span.i { color: var(--accent); font-style: var(--display-italic); }
.preloader .bar { position: absolute; left: 50%; bottom: 12vh; width: 120px; height: 1px; margin-left: -60px; background: var(--line); overflow: hidden; }
.preloader .bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: load 1.6s var(--ease) .2s forwards; transform: scaleX(0); }
@keyframes rise { to { transform: translateY(0); } }
@keyframes load { to { transform: scaleX(1); } }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h); display: flex; align-items: center; transition: background .5s, backdrop-filter .5s, border-color .5s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav .logo { font-family: var(--font-display); font-size: 24px; line-height: 1; letter-spacing: .18em; text-transform: uppercase; font-variation-settings: "opsz" 24; }
.nav .logo span { font-style: var(--display-italic); color: var(--accent); }
.nav .links { display: none; margin-inline: auto 12px; gap: 36px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.nav .links a.on { color: var(--accent); }
.nav .tools { display: flex; align-items: center; gap: 18px; }
/* frosted pills so the controls read over photos */
.langs, .langcycle, .toggle { background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-color: color-mix(in srgb, var(--fg) 22%, transparent); box-shadow: 0 2px 14px rgba(0,0,0,.18); }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langs button { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; padding: 7px 10px; border-radius: 999px; color: var(--fg2); transition: background .3s, color .3s; }
.langs button.on { background: var(--fg); color: var(--bg); }
.langcycle { display: none; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }
@media (max-width: 639px) { .nav .langs { display: none; } .langcycle { display: inline-flex; } }
.menu .langs { margin-top: 40px; justify-self: start; }
.toggle { width: 48px; height: 26px; border: 1px solid var(--line); border-radius: 999px; position: relative; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); transition: transform .5s var(--ease); }
.toggle.alt i { transform: translateX(22px); }
.burger { display: inline-flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.burger i { display: block; width: 28px; height: 1px; background: var(--fg); transition: transform .4s var(--ease), opacity .3s; }
.burger.open i:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger.open i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (min-width: 1000px) { .nav .links { display: flex; } .burger { display: none; } }

.menu { position: fixed; inset: 0; z-index: 95; background: var(--bg); display: grid; align-content: center; padding: var(--gutter); clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-io); }
.menu.open { clip-path: inset(0 0 0 0); }
.menu a { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(44px, 11vw, 96px); line-height: 1.05; display: block; opacity: 0; transform: translateY(30px); transition: opacity .6s var(--ease), transform .6s var(--ease), color .3s; }
.menu.open a { opacity: 1; transform: none; }
.menu a:nth-child(1) { transition-delay: .25s; } .menu a:nth-child(2) { transition-delay: .32s; } .menu a:nth-child(3) { transition-delay: .39s; } .menu a:nth-child(4) { transition-delay: .46s; }
.menu a:hover, .menu a.on { color: var(--accent); }
.menu .meta { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 24px 40px; font-size: 13px; color: var(--muted); }
.menu .meta a { font-size: clamp(22px, 6vw, 36px); word-break: break-word; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: clip; display: flex; flex-direction: column; justify-content: flex-end; }
.hero .media { position: absolute; inset: 0; }
.hero .media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transform: scale(1.08) translateY(calc(var(--hp, 0) * 60px)); transform-origin: 50% 30%; will-change: transform; }
.hero.kb .media img { animation: kenburns 14s var(--ease) forwards; }
@keyframes kenburns { from { scale: 1.14; } to { scale: 1.04; } }
.hero .media::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(to top, var(--bg) 0%, color-mix(in oklab, var(--bg) 55%, transparent) 28%, transparent 62%),
  linear-gradient(to right, color-mix(in oklab, var(--bg) 45%, transparent), transparent 55%); }
.hero .top { position: absolute; top: calc(var(--nav-h) + 24px); left: 0; right: 0; }
.hero .top .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.hero .eyebrow { margin: 0; color: var(--fg2); }
.hero .tagline { max-width: 32ch; text-align: right; font-size: 14px; line-height: 1.6; color: var(--fg2); display: none; }
@media (min-width: 760px) { .hero .tagline { display: block; } }
.hero .bottom { position: relative; padding-bottom: clamp(28px, 4vw, 56px); }
.hero .bottom .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero .name { font-size: clamp(118px, 24vw, 360px); line-height: .82; margin: 0 0 0 -0.04em; padding-right: .12em; clip-path: inset(-0.5em -0.5em 0 -0.3em); font-variation-settings: "opsz" 64; }
[data-scheme="light"] .hero .name { font-weight: var(--display-weight); font-variation-settings: "opsz" 56; }
.hero .name span.i { font-style: var(--display-italic); color: var(--accent); }
.hero .name span { display: inline-block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
.hero .name span:nth-child(2) { transition-delay: .07s; } .hero .name span:nth-child(3) { transition-delay: .14s; } .hero .name span:nth-child(4) { transition-delay: .21s; }
.ready .hero .name span { transform: translateY(0); }
.hero .ring { width: clamp(120px, 14vw, 190px); aspect-ratio: 1; position: relative; flex: none; display: none; }
@media (min-width: 640px) { .hero .ring { display: block; } }
.hero .ring svg { width: 100%; height: 100%; animation: spin 24s linear infinite; }
.hero .ring text { font-family: var(--font-body); font-size: 10px; letter-spacing: 0; text-transform: uppercase; fill: var(--fg2); font-weight: 600; }
.hero .ring .center { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-style: var(--display-italic); font-size: 28px; color: var(--accent); }
@keyframes spin { to { rotate: 360deg; } }
.hero .scroll { position: absolute; right: calc(var(--gutter) - 6px); top: 50%; translate: 0 -50%; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); display: none; align-items: center; gap: 14px; }
.hero .scroll span { writing-mode: vertical-rl; }
.hero .scroll i { width: 1px; height: 56px; background: var(--line); position: relative; overflow: hidden; }
.hero .scroll i::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: drop 1.8s var(--ease) infinite; }
@keyframes drop { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@media (min-width: 1000px) { .hero .scroll { display: flex; flex-direction: column; } }
.hero .hero-cta { margin-bottom: 1.2em; display: none; }
@media (min-width: 900px) { .hero .hero-cta { display: inline-flex; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-anim .reveal { opacity: 1; transform: none; transition: none; }
.words .w { display: inline-block; opacity: .15; transition: opacity .6s ease; }
.words .w.on { opacity: 1; }

/* ---------- Intro ---------- */
.intro .grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .intro .grid { grid-template-columns: 7fr 4fr; gap: 80px; align-items: end; } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats.two { grid-template-columns: repeat(2, 1fr); }
.stat { padding: clamp(28px, 3vw, 48px) 0; border-bottom: 1px solid var(--line); }
.stat + .stat { }
@media (max-width: 759px) { .stats { column-gap: 20px; } .stat .l { font-size: 11px; letter-spacing: .14em; } }
@media (min-width: 760px) { .stat { padding-right: 24px; } .stat + .stat { padding-left: 32px; border-left: 1px solid var(--line); } }
.stat .n { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(48px, 5.4vw, 92px); line-height: 1; letter-spacing: -0.03em; }
.stat .n sup { font-size: .45em; color: var(--accent); vertical-align: top; margin-left: 2px; }
.stat .l { margin-top: 12px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- Photo frames ---------- */
.ph { position: relative; overflow: hidden; background: var(--bg2); border-radius: var(--radius); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .8s ease; opacity: 0; }
.ph img.ld { opacity: 1; }
.ph:has(img.ld) { background: transparent; }
.ph.zoom:hover img, .wipe.in.zoom:hover img { transform: scale(1.04); }
.ph .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 18px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent); opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease); display: flex; justify-content: space-between; gap: 12px; }
.ph:hover .cap { opacity: 1; transform: none; }
/* curtain reveal: a panel in the card colour slides up and out when the photo scrolls into view */
.wipe::after { content: ""; position: absolute; inset: -1px; background: var(--bg2); z-index: 3; transform: translateY(0); transition: transform 1.3s var(--ease-io); pointer-events: none; }
.wipe.in::after { transform: translateY(-101%); }
.wipe img { transform: scale(1.06); }
.wipe.in img { transform: scale(1); }

/* ---------- Archive collage ---------- */
.archive .grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 1.6vw, 24px); grid-auto-rows: clamp(40px, 5vw, 80px); }
.archive .item { grid-column: span 6; grid-row: span 5; transform: translateY(calc(var(--drift, 0) * var(--speed, 0) * 1px)); will-change: transform; }
@media (min-width: 900px) {
  .archive .item:nth-child(1) { grid-column: 1 / span 4; grid-row: 1 / span 7; --speed: -.08; }
  .archive .item:nth-child(2) { grid-column: 6 / span 3; grid-row: 2 / span 5; --speed: .06; }
  .archive .item:nth-child(3) { grid-column: 10 / span 3; grid-row: 1 / span 6; --speed: -.04; }
  .archive .item:nth-child(4) { grid-column: 2 / span 3; grid-row: 9 / span 5; --speed: .05; }
  .archive .item:nth-child(5) { grid-column: 5 / span 5; grid-row: 8 / span 7; --speed: -.06; }
  .archive .item:nth-child(6) { grid-column: 10 / span 3; grid-row: 8 / span 5; --speed: .08; }
  .archive .item:nth-child(7) { grid-column: 7 / span 3; grid-row: 16 / span 5; --speed: -.05; }
}
.archive .item .ph { height: 100%; }
.archive .quote { align-self: center; grid-column: 1 / span 5; grid-row: 16 / span 5; display: none; padding-right: 10%; }
@media (min-width: 900px) { .archive .quote { display: block; } }

/* ---------- Series (horizontal) ---------- */
.series { position: relative; }
.series .head { padding-bottom: clamp(32px, 4vw, 56px); display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hscroll { position: relative; }
.hscroll .sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.hscroll .track { display: flex; gap: clamp(40px, 6vw, 120px); padding-inline: var(--gutter); will-change: transform; }
.chapter { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); flex: none; }
.chapter .title { flex: none; width: clamp(200px, 22vw, 340px); }
.chapter .title .roman { font-family: var(--font-display); font-size: 14px; letter-spacing: .3em; color: var(--accent); margin-bottom: 20px; }
.chapter .title h3 { font-size: clamp(36px, 4.4vw, 72px); line-height: .95; }
.chapter .title .n { margin-top: 24px; font-size: 12px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.chapter .ph { flex: none; height: min(66svh, 720px); }
.chapter .ph:nth-of-type(odd) { aspect-ratio: 3 / 4; }
.chapter .ph:nth-of-type(even) { aspect-ratio: 4 / 5; height: min(54svh, 600px); align-self: flex-start; margin-top: 6svh; }
.chapter .ph:nth-of-type(3n) { aspect-ratio: 2 / 3; align-self: flex-end; margin-bottom: 4svh; }
.hbar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 32px; height: 1px; background: var(--line); }
.hbar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.hint { position: absolute; right: var(--gutter); bottom: 44px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 899px) {
  .hscroll { height: auto !important; }
  .hscroll .sticky { position: static; height: auto; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-inline-start: var(--gutter); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hscroll .sticky::-webkit-scrollbar { display: none; }
  .hscroll .track { transform: none !important; gap: 32px; }
  .chapter { scroll-snap-align: start; gap: 16px; }
  .chapter .title { width: 150px; }
  .chapter .title h3 { font-size: 32px; }
  .chapter .ph { height: 62svh; margin: 0 !important; align-self: center !important; }
  .hbar, .hint { display: none; }
}

/* ---------- Motion (video strip) ---------- */
.motion .row { display: flex; gap: clamp(12px, 1.6vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.motion .row::-webkit-scrollbar { display: none; }
.motion .row { scroll-padding-inline: var(--gutter); --fl: 0px; --fr: 72px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); }
.reels-ui { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); margin-top: clamp(16px, 2vw, 28px); }
.rbar { flex: 1; height: 1px; background: var(--line); position: relative; }
.rbar i { position: absolute; left: 0; top: -1px; height: 3px; width: 30%; background: var(--accent); border-radius: 2px; }
.rcount { font-size: 11px; letter-spacing: .2em; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rcount b { color: var(--fg); font-weight: 600; }
.rnav { display: flex; gap: 8px; }
.rbtn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 18px; line-height: 1; transition: background .3s, color .3s, border-color .3s, opacity .3s; }
.rbtn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rbtn:disabled { opacity: .28; cursor: default; }
.reels.fits .reels-ui { display: none; }
.reels.fits .row { -webkit-mask-image: none; mask-image: none; }
.reel { flex: none; width: clamp(200px, 22vw, 300px); aspect-ratio: 9 / 16; scroll-snap-align: start; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg2); }
.reel video, .reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel video { opacity: 0; transition: opacity .6s; }
.reel.playing video { opacity: 1; }
.reel .t { position: absolute; left: 14px; right: 14px; bottom: 14px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.6); display: flex; justify-content: space-between; align-items: center; }
.reel .t i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity .4s; }
.reel.playing .t i { opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Clients ---------- */
.clients .cols { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .clients .cols { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.clients h4 { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; font-weight: 600; }
.clients ul { list-style: none; margin: 0; padding: 0; }
.clients li { padding: 14px 0; border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(20px, 1.8vw, 28px); line-height: 1.1; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; transition: padding-left .4s var(--ease), color .3s; }
.clients li:last-child { border-bottom: 1px solid var(--line); }
.clients li:hover { padding-left: 12px; color: var(--accent); }
.clients li small { font-family: var(--font-body); font-size: 11px; letter-spacing: .14em; color: var(--muted); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; padding-block: clamp(20px, 2.2vw, 30px); border-block: 1px solid var(--line); }
.marquee .in { display: inline-flex; align-items: center; gap: 1.6em; animation: marquee 48s linear infinite; font-family: var(--font-body); font-weight: 500; font-size: clamp(12px, 1.1vw, 15px); letter-spacing: .32em; text-transform: uppercase; color: var(--fg2); line-height: 1; }
.marquee:hover .in { animation-play-state: paused; }
.marquee .in i { color: var(--accent); font-style: normal; font-size: 1.2em; letter-spacing: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: clip; text-align: center; }
.cta .strip { position: absolute; inset: 0; display: flex; justify-content: center; gap: 3vw; opacity: .16; pointer-events: none; align-items: center; }
[data-scheme="light"] .cta .strip { opacity: .22; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 60% 70% at 50% 50%, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent 100%); }
.cta .inner { z-index: 2; }
.cta .strip .ph { width: 18vw; aspect-ratio: 3 / 4; flex: none; transform: translateY(calc(var(--drift, 0) * var(--speed) * 1px)); }
.cta .strip .ph:nth-child(1) { --speed: .12; } .cta .strip .ph:nth-child(2) { --speed: -.08; margin-top: 10vw; } .cta .strip .ph:nth-child(3) { --speed: .05; } .cta .strip .ph:nth-child(4) { --speed: -.1; margin-top: 12vw; } .cta .strip .ph:nth-child(5) { --speed: .09; }
.cta .inner { position: relative; }
.cta .big { font-size: clamp(44px, 8vw, 136px); line-height: .95; }
.cta .big em { font-style: var(--display-italic); color: var(--accent); }
.cta .body { margin: 32px auto 0; text-align: center; }
.cta .actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.footer { padding: clamp(48px, 6vw, 88px) 0 32px; overflow: clip; border-top: 1px solid var(--line); }
.footer .giant { font-size: clamp(88px, 19vw, 300px); line-height: .85; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); opacity: .07; text-align: center; margin: 0 0 24px; user-select: none; }
.footer .row { position: relative; background: var(--bg); }
.footer .row { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; padding-top: 32px; border-top: 1px solid var(--line); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.footer .row nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer .row a:hover { color: var(--accent); }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 120px)); }
.page-head .h1 { line-height: .9; }

/* ---------- Portfolio ---------- */
.filters { position: sticky; top: var(--nav-h); z-index: 50; background: color-mix(in oklab, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 14px 0; border-block: 1px solid var(--line); }
.filters .wrap { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filters .wrap::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; display: inline-flex; gap: 10px; align-items: center; transition: background .3s, color .3s, border-color .3s; }
.pill small { color: var(--muted); font-weight: 500; letter-spacing: .05em; }
.pill.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill.on small { color: inherit; opacity: .7; }
.masonry { columns: 1; column-gap: clamp(12px, 1.8vw, 28px); padding-top: clamp(32px, 4vw, 56px); }
@media (min-width: 560px) { .masonry { columns: 2; } }
@media (min-width: 1000px) { .masonry { columns: 3; } }
@media (min-width: 1500px) { .masonry { columns: 4; } }
.tile { break-inside: avoid; margin-bottom: clamp(12px, 1.8vw, 28px); display: block; width: 100%; text-align: left; transition: opacity .5s, transform .5s var(--ease); }
.tile.hide { display: none; }
.tile .ph { aspect-ratio: var(--ar, 3 / 4); }
.tile figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tile figure { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 400; background: color-mix(in oklab, var(--bg) 94%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; pointer-events: none; transition: opacity .4s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox .bar, .lightbox .foot { position: relative; z-index: 2; }
.lightbox .bar { display: flex; justify-content: space-between; align-items: center; padding: 20px var(--gutter); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.lightbox .bar button { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; display: inline-flex; gap: 10px; align-items: center; }
.lightbox .stage { position: relative; display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.lightbox .stage img, .lightbox .stage video { max-width: 100%; max-height: calc(100svh - 160px); width: auto; height: auto; object-fit: contain; opacity: 0; transform: scale(.98); transition: opacity .5s, transform .6s var(--ease); }
.lightbox.open .stage img.ld, .lightbox.open .stage video { opacity: 1; transform: none; }
.lightbox .side { position: absolute; top: 0; bottom: 0; width: 50%; }
.lightbox .side.prev { left: 0; } .lightbox .side.next { right: 0; }
.lightbox .foot { display: flex; justify-content: space-between; gap: 16px; padding: 20px var(--gutter) 28px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg2); }
.lightbox .arrows { display: flex; gap: 24px; }
.lightbox .arrows button { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.lightbox .arrows button:hover { color: var(--accent); }

/* ---------- About ---------- */
.story { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .story { grid-template-columns: 5fr 6fr; gap: 8vw; } .story .sticky { position: sticky; top: calc(var(--nav-h) + 24px); } }
.story .text p { margin: 0 0 1.4em; }
.story .text p:first-of-type::first-letter { font-family: var(--font-display); font-size: 3.6em; float: left; line-height: .8; margin: .08em .12em 0 0; color: var(--accent); }
.story .ph { aspect-ratio: 4 / 5; }
.approach { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: 1fr; }
@media (min-width: 700px) { .approach { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .approach { grid-template-columns: repeat(4, 1fr); } }
.approach .card { background: var(--bg); padding: clamp(28px, 3vw, 44px); transition: background .4s; }
.approach .card:hover { background: var(--bg2); }
.approach .card .i { font-family: var(--font-display); font-size: 13px; letter-spacing: .3em; color: var(--accent); margin-bottom: 40px; }
.approach .card h4 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(22px, 2vw, 30px); margin: 0 0 14px; line-height: 1.1; }
.approach .card p { margin: 0; color: var(--fg2); font-size: 15px; line-height: 1.65; }
.covers { display: grid; gap: clamp(16px, 2.4vw, 32px); grid-template-columns: repeat(2, 1fr); perspective: 1400px; }
@media (min-width: 900px) { .covers { grid-template-columns: repeat(4, 1fr); } }
.cover { aspect-ratio: 3 / 4; transform-style: preserve-3d; transition: transform .6s var(--ease), box-shadow .6s; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.cover:hover { box-shadow: 0 50px 90px -40px rgba(0,0,0,.7); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 48%, transparent 60%); mix-blend-mode: screen; opacity: 0; transition: opacity .5s; pointer-events: none; }
.cover:hover::after { opacity: 1; }
.stage-list { list-style: none; margin: 0; padding: 0; counter-reset: ev; }
.stage-list li { display: grid; grid-template-columns: 48px 1fr auto; gap: 20px; align-items: baseline; padding: clamp(18px, 2vw, 28px) 0; border-top: 1px solid var(--line); transition: padding-left .4s var(--ease); }
.stage-list li:last-child { border-bottom: 1px solid var(--line); }
.stage-list li:hover { padding-left: 16px; }
.stage-list li:hover .name { color: var(--accent); }
.stage-list .k { font-family: var(--font-display); font-size: 13px; letter-spacing: .2em; color: var(--accent); }
.stage-list .name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(26px, 3.4vw, 54px); line-height: 1; transition: color .3s; }
.stage-list .role { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-align: right; }
@media (max-width: 639px) { .stage-list li { grid-template-columns: 36px 1fr; row-gap: 10px; } .stage-list .role { grid-column: 2; text-align: left; } .stage-list li:hover { padding-left: 0; } }
.comp { display: grid; gap: 0 48px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .comp { grid-template-columns: repeat(2, 1fr); } }
.comp .r { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comp .r .k { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.comp .r .v { font-family: var(--font-display); font-size: clamp(22px, 2vw, 30px); }
.comp .r .v.muted { font-family: var(--font-body); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.comp-actions { margin-top: 40px; }
.direct .comp-link { display: inline-block; margin-top: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* ---------- Book ---------- */
.book { display: grid; gap: 56px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .book { grid-template-columns: 5fr 6fr; gap: 7vw; align-items: start; } .book .sticky { position: sticky; top: calc(var(--nav-h) + 24px); } }
.book .ph { aspect-ratio: 4 / 5; max-height: 70svh; }
.form .field { position: relative; margin-bottom: 36px; }
.form label { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.form input, .form textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; font: inherit; font-size: 18px; color: var(--fg); border-radius: 0; transition: border-color .3s; }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form .types { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.form .types .pill { cursor: pointer; }
.form .row2 { display: grid; gap: 0 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form .row2 { grid-template-columns: 1fr 1fr; } }
.form .ok { padding: 48px 0; }
.direct { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; }
.direct a { font-family: var(--font-display); font-size: clamp(20px, 1.8vw, 28px); }
.direct a:hover { color: var(--accent); }

/* ---------- Design panel (Shift + D) ---------- */
.dpanel { position: fixed; right: 16px; bottom: 16px; z-index: 500; width: min(340px, calc(100vw - 32px)); background: var(--bg2); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); font-size: 12px; display: none; }
.dpanel.open { display: block; }
.dpanel h5 { margin: 0 0 14px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); display: flex; justify-content: space-between; }
.dpanel h5 button { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.dpanel .g { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.dpanel select, .dpanel input { width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; font: inherit; font-size: 12px; }
.dpanel .swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.dpanel .swatches button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); }
.dpanel pre { margin: 12px 0 0; padding: 10px; background: var(--bg); border-radius: 6px; font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; color: var(--fg2); user-select: all; }
.dpanel .hintt { color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .wipe { opacity: 1; transform: none; clip-path: none; }
  .wipe::after { display: none; } .wipe img { transform: none; }
  .words .w { opacity: 1; }
}
@media print { .nav, .progress, .grain, .cursor-ring, .cursor-dot, .preloader, .dpanel, .footer .giant { display: none !important; } }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form button[type=submit][disabled] { opacity: .65; cursor: progress; }
