/* =====================================================================
   Portfolio — minimal, visual-heavy.
   Change the whole look from the tokens below. Light is the default;
   the dark set is ready for a toggle (data-theme="dark" on <html>).
   ===================================================================== */
:root {
  --bg: #efefed;
  --surface: #e4e4e1;
  --line: rgba(17, 17, 17, 0.1);
  --line-strong: rgba(17, 17, 17, 0.28);
  --text: #111111;
  --muted: #6e6d69;
  --dim: #a4a29d;
  --accent: #ff5a1f;      /* the site's signal orange: button hovers, selection, cursor labels, focus */
  --accent-ink: #0a0a0b;
  --ph-base: #1b1b1e;
  --stage-bg: radial-gradient(80% 70% at 50% 45%, #fbfbf9 0%, #d9d9d5 80%);

  --radius: 14px;
  --radius-lg: 24px;
  --wrap: 1440px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --nav-h: 64px;

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0a0b;
  --surface: #141417;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.3);
  --text: #f3f1ec;
  --muted: #a3a09a;
  --dim: #66645f;
  --accent: #ff5a1f;
  --accent-ink: #0a0a0b;
  --ph-base: #141417;
  --stage-bg: radial-gradient(80% 70% at 50% 45%, #22222a 0%, #0e0e10 70%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.menu-open, html.lightbox-open { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, iframe, canvas { 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 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: 11.5px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; }
.label { color: var(--muted); margin: 0 0 20px; }
.eyebrow { color: var(--accent); margin: 0 0 20px; }
.section { padding-block: clamp(88px, 12vw, 168px); }
section { scroll-margin-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head .label { margin: 0; }
.section-title { margin: 0; font-size: clamp(40px, 6vw, 96px); line-height: 0.92; letter-spacing: -0.045em; font-weight: 700; }
.section-title sup { margin-left: 8px; font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); vertical-align: top; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; z-index: 999; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }

.play-ico { display: inline-block; width: 0; height: 0; border-left: 9px solid currentColor; border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; }

/* ---------- Media slots + placeholders ---------- */
.slot { position: relative; overflow: hidden; background: var(--ph-base); aspect-ratio: var(--ratio, 16 / 9); }
.slot.fill { position: absolute; inset: 0; aspect-ratio: auto; }
.ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(110% 90% at 12% 8%, color-mix(in srgb, var(--c) 80%, transparent) 0%, transparent 55%),
    radial-gradient(90% 90% at 92% 100%, color-mix(in srgb, var(--c2) 70%, transparent) 0%, transparent 60%),
    var(--ph-base);
}
.ph::before { /* viewport grid */
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px; background-position: center;
  -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 85%); mask-image: radial-gradient(circle at center, #000 30%, transparent 85%);
}
.ph-label { position: relative; padding: 0 8%; text-align: center; font-size: clamp(26px, 4.4vw, 68px); line-height: 0.95; font-weight: 800; letter-spacing: -0.05em; color: #fff; opacity: 0.85; mix-blend-mode: overlay; }
.ph-hint {
  position: absolute; left: 12px; bottom: 12px; right: 12px; width: fit-content; max-width: calc(100% - 24px);
  padding: 5px 8px; border-radius: 6px; font-size: 10px; letter-spacing: 0.04em; text-transform: none;
  color: rgba(255, 255, 255, 0.75); background: rgba(0, 0, 0, 0.45); overflow-wrap: anywhere;
}
.slot > img, .slot > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; filter: grayscale(1) contrast(0.85) blur(8px); transform: scale(1.04);
  transition: opacity 0.6s, filter 1.4s var(--ease), transform 1.4s var(--ease);
}
.slot.loaded > img, .slot.loaded > video { opacity: 1; }
.slot.loaded.in > img, .slot.loaded.in > video, .no-motion .slot > img, .no-motion .slot > video { filter: none; transform: none; }
.slot[data-mode="controls"] > video { object-fit: contain; background: #000; filter: none; transform: none; }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 900; background: var(--bg); clip-path: inset(0 0 0 0); display: flex; align-items: flex-end; padding-bottom: clamp(32px, 6vh, 64px); }
.loader-row { display: flex; justify-content: space-between; color: var(--muted); }
.loader-num { font-size: clamp(96px, 22vw, 320px); font-weight: 700; letter-spacing: -0.06em; line-height: 0.85; margin: 12px 0 24px; font-variant-numeric: tabular-nums; }
.loader-bar { height: 2px; background: var(--line); }
.loader-bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 80; color: #fff; mix-blend-mode: difference;
  transition: transform 0.5s var(--ease);
}
.nav.is-hidden { transform: translateY(-100%); }
.menu-open .nav { mix-blend-mode: normal; transform: none; }
.brand, .nav-mid, .nav-link, .theme-btn { transition: opacity 0.3s; }
.menu-open .brand, .menu-open .nav-mid, .menu-open .nav-link, .menu-open .theme-btn { opacity: 0; pointer-events: none; }
.theme-btn { position: relative; width: 20px; height: 20px; border: 1.5px solid currentColor; border-radius: 50%; overflow: hidden; }
.theme-btn span { position: absolute; inset: 0; background: currentColor; clip-path: inset(0 0 0 50%); transition: clip-path 0.5s var(--ease); }
[data-theme="dark"] .theme-btn span { clip-path: inset(0 50% 0 0); }
.theme-anim, .theme-anim * { transition: background-color 0.5s, color 0.5s, border-color 0.5s !important; }
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--nav-h); gap: 16px; }
.brand { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; justify-self: start; }
.nav-mid { display: flex; gap: 24px; color: rgba(255, 255, 255, 0.7); }
.nav-right { display: flex; align-items: center; gap: 20px; justify-self: end; }
.nav-link { font-size: 15px; }
.nav-link:hover { opacity: 0.7; }
.menu-btn { display: inline-flex; align-items: center; gap: 12px; height: 38px; padding: 0 6px 0 16px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; font-size: 14px; }
.menu-btn-icon { display: grid; place-content: center; gap: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: background 0.25s; }
.menu-btn { transition: border-color 0.25s; }
.menu-btn:hover { border-color: var(--accent); }
.menu-btn:hover .menu-btn-icon { background: var(--accent); }
.menu-btn-icon i { display: block; width: 11px; height: 1.5px; background: #000; transition: transform 0.4s var(--ease); }
.menu-open .menu-btn-icon i:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-open .menu-btn-icon i:last-child { transform: translateY(-2.75px) rotate(-45deg); }
@media (max-width: 900px) { .nav-mid { display: none; } .nav-inner { grid-template-columns: 1fr auto; } }
@media (max-width: 520px) { .nav-link { display: none; } }

/* ---------- Multi-level drawer menu ---------- */
.drawer { --dw: clamp(260px, 23vw, 340px); position: fixed; inset: 0; z-index: 70; visibility: hidden; transition: visibility 0s 0.75s; }
.menu-open .drawer { visibility: visible; transition: visibility 0s; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(10, 10, 11, 0.45); opacity: 0; transition: opacity 0.6s var(--ease); }
.menu-open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: var(--dw); overflow-y: auto;
  display: flex; flex-direction: column; padding: 22px 22px 18px; border-radius: 8px;
  background: var(--bg); color: var(--text);
  transform: translateX(calc(-100% - 12px)); transition: transform 0.75s var(--ease-io);
}
.drawer-main { z-index: 2; }
.menu-open .drawer-main { transform: none; }
.drawer-sub { z-index: 1; left: calc(var(--dw) + 12px); width: clamp(220px, 18vw, 280px); opacity: 0; pointer-events: none; transition: transform 0.6s var(--ease-io), opacity 0.35s; }
.menu-open .drawer-sub.on { transform: none; opacity: 1; pointer-events: auto; }
.drawer-list { display: flex; flex-direction: column; gap: 1px; }
.drawer-list a { display: flex; align-items: center; padding: 3px 0; font-size: clamp(22px, 1.9vw, 28px); letter-spacing: -0.025em; color: var(--dim); transition: color 0.25s; }
.drawer-sub .drawer-list a { font-size: 15px; padding: 4px 0; letter-spacing: -0.01em; }
.drawer-list a::before { content: "•"; display: inline-block; width: 0; overflow: hidden; opacity: 0; transition: width 0.3s var(--ease), opacity 0.3s; }
.drawer-list a:hover, .drawer-list a.is-active, .drawer-list a[aria-current] { color: var(--text); }
.drawer-list a:hover::before, .drawer-list a.is-active::before { width: 0.65em; opacity: 1; }
.drawer-list > li, .dr-fade { opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
.menu-open .drawer-main .drawer-list > li, .menu-open .dr-fade { opacity: 1; transform: none; transition-delay: calc(0.3s + var(--d, 0) * 50ms); }
.drawer-sub.on .drawer-list > li { opacity: 1; transform: none; transition-delay: calc(0.12s + var(--d, 0) * 35ms); }
.drawer-explore { margin-top: 16px; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.drawer-explore:hover { color: var(--text); }
.drawer-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 28px; }
.drawer-thumbs .slot { border-radius: 6px; }
.drawer-thumbs .ph-label { font-size: 18px; }
.drawer-thumbs span { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.drawer-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 20px; font-size: 10px; color: var(--muted); }
.drawer-socials { display: contents; }
.drawer-foot a:hover { color: var(--text); }
.drawer-back { display: none; }
@media (max-width: 700px) {
  .drawer-panel { width: calc(100% - 12px); padding-top: calc(var(--nav-h) + 6px); }
  .drawer-sub { left: 6px; z-index: 3; transform: translateX(calc(100% + 12px)); }
  .drawer-back { display: inline-flex; align-self: flex-start; margin-bottom: 16px; font-size: 11px; color: var(--muted); }
  .menu-open .nav { color: var(--text); }
  .menu-open .menu-btn { border-color: var(--line-strong); }
  .menu-open .menu-btn-icon { background: var(--text); }
  .menu-open .menu-btn-icon i { background: var(--bg); }
}

/* ---------- Cursor ---------- */
/* the system pointer is hidden while the custom one is active */
html.custom-cursor, html.custom-cursor * { cursor: none !important; }
/* dot: inverts whatever is under it (white on dark, black on light) */
.cursor-dot { position: fixed; left: 0; top: 0; z-index: 950; pointer-events: none; mix-blend-mode: difference; }
.cursor-dot::before {
  content: ""; position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; opacity: 0; transition: opacity 0.2s, transform 0.3s var(--ease);
}
.cursor-dot.on::before { opacity: 1; }
.cursor-dot.hover::before { transform: scale(2.6); }
.cursor-dot.has-label::before { opacity: 0; }
.cursor { position: fixed; left: 0; top: 0; z-index: 951; pointer-events: none; }
.cursor-label {
  position: absolute; left: 0; top: 0; padding: 9px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink); font-weight: 500;
  transform: translate(-50%, -50%) scale(0); transition: transform 0.35s var(--ease);
}
.cursor.has-label .cursor-label { transform: translate(-50%, -50%) scale(1); }

/* ---------- Scroll timeline ---------- */
.timeline {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 14px;
  padding: 10px var(--gutter); color: #fff; mix-blend-mode: difference; pointer-events: none;
}
.tl-tc, .tl-fps { font-variant-numeric: tabular-nums; opacity: 0.8; }
.tl-track { position: relative; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.25); }
.tl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #fff; }
.tl-fill::after { content: ""; position: absolute; right: -1px; top: -5px; width: 2px; height: 11px; background: #fff; }
@media (max-width: 600px) { .tl-fps { display: none; } }

/* ---------- 1. Hero ---------- */
.hero { position: relative; height: 230vh; }
.no-motion .hero { height: auto; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 1400px; }
.no-motion .hero-pin { position: relative; }
.hero-frame { position: absolute; inset: 0; overflow: hidden; background: #000; transform-origin: 50% 70%; will-change: transform; cursor: pointer; }
.hero-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(10, 10, 11, 0.35) 0%, transparent 30%, transparent 55%, rgba(10, 10, 11, 0.75) 100%); }
.hero-play {
  position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 500; opacity: 0; pointer-events: none;
}
.no-motion .hero-play { opacity: 1; }
/* 3D handheld hero (hero.js) */
.hero.is-3d { height: 250vh; }
/* 3D hero opens on black; the reel frame is warped by hero.js from full screen into the PSP screen */
.hero.is-3d .hero-pin { background: #000; perspective: none; }
.hero.is-3d .hero-frame { inset: auto; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; z-index: 2; background: #000; will-change: transform, opacity; }
.hero.is-3d .hero-frame.uses-canvas > :not(canvas) { display: none; }
.hero.is-3d .hero-frame > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.hero.is-3d .hero-frame .fill, .hero.is-3d .hero-frame video { width: 100%; height: 100%; object-fit: cover; }
.hero.is-3d .hero-shade, .hero.is-3d .hero-play { display: none; }
.hero.is-3d .hero-copy { z-index: 3; }

/* minimal UI in the hero's black space: crop marks, registration targets, hints, scroll gauge */
.hero-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; color: rgba(255, 255, 255, 0.72); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-ui > span { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; white-space: nowrap; }
.hx-crop { width: 14px; height: 14px; border: 0 solid rgba(255, 255, 255, 0.55); }
.hx-crop.tl { border-top-width: 1px; border-left-width: 1px; }
.hx-crop.tr { border-top-width: 1px; border-right-width: 1px; margin-left: -14px; }
.hx-crop.br { border-bottom-width: 1px; border-right-width: 1px; margin: -14px 0 0 -14px; }
.hx-crop.bl { border-bottom-width: 1px; border-left-width: 1px; margin-top: -14px; }
.hx-reg { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.hx-reg svg { display: block; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, 0.6); stroke-width: 1; }
.hx-tag > span { display: block; transform: translateX(-100%); color: rgba(255, 255, 255, 0.45); }
.hx-hint > span { display: flex; align-items: center; gap: 10px; transform: translateY(-50%); }
.hx-hint.drag > span { transform: translate(-100%, -50%); }
.hx-hint.screen > span { transform: translateX(-50%); }
.hx-hint i { display: block; width: 28px; height: 1px; background: #ff5a1f; }
.hx-scroll { position: absolute; right: clamp(16px, 2.6vw, 36px); top: 50%; transform: translateY(-50%); display: grid; justify-items: center; gap: 10px; color: rgba(255, 255, 255, 0.6); font-size: 10px; transition: opacity 0.3s; }
.hx-track { position: relative; width: 1px; height: clamp(90px, 18vh, 160px); background: rgba(255, 255, 255, 0.18); }
.hx-track b { position: absolute; inset: 0; background: #ff5a1f; transform-origin: 50% 0; transform: scaleY(0); }
.hx-track em { position: absolute; left: -3px; width: 7px; height: 1px; background: rgba(255, 255, 255, 0.45); }
.hx-pct { font-variant-numeric: tabular-nums; color: #fff; }
@media (max-width: 700px) { .hx-hint, .hx-tag { display: none; } }

/* comic bursts during the button mash */
.comic-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.comic { position: absolute; width: 132px; height: 132px; margin: -66px 0 0 -66px; display: grid; place-items: center; will-change: transform, opacity; }
.comic svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.comic span { position: relative; font-family: "Inter Tight", system-ui, sans-serif; font-weight: 800; font-style: italic; font-size: 25px; letter-spacing: -0.02em; color: #fff; text-transform: uppercase; -webkit-text-stroke: 1.6px #0a0a0b; paint-order: stroke fill; text-shadow: 3px 3px 0 #0a0a0b; transform: rotate(var(--r, -8deg)); white-space: nowrap; }
.hero-gl { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; touch-action: pan-y; }
.hero-copy { position: absolute; left: 0; right: 0; bottom: clamp(48px, 9vh, 96px); margin-inline: auto; z-index: 2; pointer-events: none; color: #fff; }
.hero-title { margin: 0; max-width: 13ch; font-size: clamp(44px, 8.4vw, 136px); line-height: 0.92; letter-spacing: -0.05em; font-weight: 700; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.wi { display: inline-block; }
.hero-meta { display: flex; justify-content: space-between; margin-top: 28px; color: rgba(255, 255, 255, 0.75); }

/* ---------- 2. Intro ---------- */
.intro-text { margin: 0; max-width: 22ch; font-size: clamp(32px, 5vw, 76px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 600; }
.intro-text .w { overflow: visible; }


/* ---------- 3. What I do: pinned card deck ----------
   One card stays put; scrolling slides the next card up from the card's
   bottom edge while the current one shrinks, lifts and tilts back. */
.services-pin {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  gap: clamp(20px, 3.5vh, 40px); padding-block: calc(var(--nav-h) + 8px) clamp(28px, 6vh, 64px);
}
.services-pin .section-head { margin-bottom: 0; }
.deck-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr); gap: clamp(20px, 4vw, 64px); align-items: end; }
.deck {
  position: relative; justify-self: end; width: min(100%, calc(60vh * 1.6)); aspect-ratio: 16 / 10;
  perspective: 1600px; clip-path: inset(-100vh -100vw 0 -100vw);
}
.deck-card { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; background: var(--ph-base); transform-origin: 50% 100%; will-change: transform; }
.deck-card > .slot .ph-label { display: none; }
.deck-label { position: absolute; z-index: 2; left: 16px; top: 14px; color: #fff; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; pointer-events: none; }
.deck-card.is-model .deck-label { color: var(--text); }
.deck-pill {
  position: absolute; z-index: 2; left: 50%; bottom: 14px; translate: -50% 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.32); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font-size: 10px;
}
.deck-dashes { display: flex; gap: 4px; }
.deck-dashes i { width: 10px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); }
.deck-dashes i.on { width: 22px; background: #fff; }

/* left column: the whole list of disciplines; the current one is big and open */
.deck-info { position: relative; container-type: inline-size; }
.deck-list { list-style: none; margin: 0; padding: 0; }
.deck-info-item { border-top: 1px solid var(--line); }
.deck-info-item:last-child { border-bottom: 1px solid var(--line); }
.deck-li {
  display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 11px 0; text-align: left;
  color: var(--dim); transition: color 0.35s var(--ease);
}
.deck-li:hover, .deck-info-item.on .deck-li { color: var(--text); }
.deck-num { margin: 0; min-width: 2ch; font-size: 11px; color: inherit; transition: color 0.35s; }
.deck-info-item.on .deck-num { color: #ff5a1f; }
/* the active title grows in place (transform only, so nothing around it moves) */
.deck-title {
  /* capped by the column's width (cqi) so even the longest title still fits once enlarged */
  display: inline-block; margin: 0; font-size: min(clamp(17px, 1.5vw, 22px), 6.2cqi); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600;
  white-space: nowrap; transform-origin: 0 70%; transition: transform 0.5s var(--ease);
}
.deck-info-item.on .deck-title { transform: scale(1.32); }
/* one panel under the list: the current description + link cross-fade in place
   (all stacked in one grid cell, so the panel is always as tall as the longest one) */
.deck-details { display: grid; margin-top: 22px; }
.deck-detail { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.25s, transform 0.35s var(--ease); }
.deck-detail.on { opacity: 1; transform: none; pointer-events: auto; transition: opacity 0.45s var(--ease) 0.1s, transform 0.55s var(--ease) 0.1s; }
.deck-desc { margin: 0 0 16px; max-width: 32ch; color: var(--muted); }
.link-arrow { display: inline-flex; gap: 8px; padding: 11px 17px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.link-arrow:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Without scroll animation the cards simply list out */
.deck.static { aspect-ratio: auto; width: 100%; clip-path: none; display: grid; gap: 14px; }
.deck.static .deck-card { position: relative; aspect-ratio: 16 / 10; }
.deck-info.static .deck-li { cursor: default; }

@media (max-width: 860px) {
  .deck-wrap { grid-template-columns: 1fr; align-items: start; }
  .deck { order: -1; width: 100%; aspect-ratio: 16 / 11; justify-self: stretch; }
  .deck-li { padding: 7px 0; }
  .deck-title { font-size: min(15px, 6.2cqi); }
  .deck-details { margin-top: 14px; }
  .deck-desc { margin-bottom: 10px; font-size: 14px; }
  .deck-detail .link-arrow { padding: 8px 14px; font-size: 13px; }
}

/* 3D model stage */
.model-stage {
  position: absolute; inset: 0; cursor: grab; touch-action: pan-y;
  background: var(--stage-bg);
}
.model-stage.dragging { cursor: grabbing; }
.model-stage canvas { width: 100%; height: 100%; }
.model-stage .ph-hint { position: absolute; }
.model-stage.has-model .ph-hint { display: none; }
.model-tip { position: absolute; right: 14px; top: 14px; color: var(--muted); }

/* ---------- Shared buttons ---------- */
.btn-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 15px; font-weight: 500; cursor: pointer;
  transition: transform 0.35s var(--ease), opacity 0.2s, background 0.25s, color 0.25s;
}
.btn-pill:hover { transform: translateY(-2px); background: var(--accent); color: var(--accent-ink); }
.btn-pill sup { font-family: var(--mono); font-size: 9px; opacity: 0.7; }
.round-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 15px; transition: background 0.25s, color 0.25s; }
.round-btn { transition: background 0.25s, color 0.25s, border-color 0.25s; }
.round-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.nav-link.is-current { text-decoration: underline; text-underline-offset: 5px; }
.card-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.playing .card-loop { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 4. Homepage: drifting bento ---------- */
/* the section is one full screen: heading on top, the strip fills everything below it */
.bento-sec {
  --bgap: 10px; height: 100vh; height: 100svh; min-height: 560px; display: flex; flex-direction: column;
  padding-block: calc(var(--nav-h) + 16px) clamp(18px, 3vh, 32px);
}
.bento-sec .section-head { margin-bottom: clamp(16px, 2.6vh, 30px); }
.bento-ctrl { display: flex; align-items: center; gap: 10px; }
.bento-ctrl .label { margin-right: 6px; }
.bento { flex: 1 1 0; min-height: 0; container-type: size; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.bento.dragging { cursor: grabbing; }
.bento.dragging .tile { pointer-events: none; }
.bento-track { display: flex; gap: var(--bgap); width: max-content; height: 100%; will-change: transform; }
/* two rows that exactly fill the strip's height (fallback: from the viewport height) */
.bento-set { --u: calc((100svh - 260px) / 2); display: grid; grid-template-rows: repeat(2, var(--u)); grid-auto-columns: var(--u); gap: var(--bgap); }
@supports (container-type: size) { .bento-set { --u: calc((100cqh - var(--bgap)) / 2); } }
.tile { position: relative; display: block; min-width: 0; border-radius: 10px; overflow: hidden; background: var(--ph-base); -webkit-user-drag: none; }
.tile-media { position: absolute; inset: 0; transition: transform 0.9s var(--ease); }
.tile:hover .tile-media { transform: scale(1.04); }
.tile .ph-label { display: none; }
.tile .ph-hint { top: 10px; bottom: auto; }
.tile-meta {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding: 32px 12px 10px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.45)); pointer-events: none;
}
.tile-title { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.tile[data-size="L"] .tile-title { font-size: 22px; }
.tile-meta { padding: 40px 16px 14px; }
.tile-cat { font-size: 10px; opacity: 0.75; text-align: right; }
.tile[data-size="S"] .tile-cat { display: none; }
.bento-foot { display: flex; justify-content: center; margin-top: clamp(16px, 2.6vh, 30px); }
@media (max-width: 760px) {
  .bento-ctrl .label { display: none; }
}

/* ---------- Work page: flip filter ---------- */
.work-page { min-height: 100vh; padding-top: calc(var(--nav-h) + 16px); padding-bottom: 140px; }
.work-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(16px, 2.4vw, 28px); }
.ff-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.ff-tab { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--muted); transition: background 0.25s, color 0.25s; }
.ff-tab sup { margin-left: 3px; font-family: var(--mono); font-size: 9px; color: var(--dim); }
.ff-tab:hover { color: var(--text); }
.ff-tab[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.ff-tab[aria-pressed="true"] sup { color: inherit; opacity: 0.7; }
.work-count { margin: 0; display: flex; align-items: baseline; gap: 6px; font-size: clamp(40px, 5vw, 72px); line-height: 0.9; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.work-count .mono { font-size: 10px; letter-spacing: 0.06em; color: var(--muted); }
.ff-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wcard { position: relative; display: block; min-width: 0; }
.wcard[hidden] { display: none !important; }
.wcard-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 8px; background: var(--ph-base); }
.wcard-media .ph-label { font-size: clamp(22px, 2.4vw, 36px); }
.wcard-media .ph-hint { top: 10px; bottom: auto; }
.wcard-text { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; gap: 2px; color: #fff; pointer-events: none; }
.wcard-title { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; transition: transform 0.4s var(--ease); }
.wcard-desc, .wcard-meta { display: none; }
.ff-grid.is-list { grid-template-columns: 1fr; gap: 0; border-bottom: 1px solid var(--line); }
.ff-grid.is-list .wcard { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.ff-grid.is-list .wcard-media { width: 64px; aspect-ratio: 1; border-radius: 6px; }
.ff-grid.is-list .wcard-media .ph-hint, .ff-grid.is-list .wcard-media .ph-label { display: none; }
.ff-grid.is-list .wcard-text { position: static; color: var(--text); }
.ff-grid.is-list .wcard-title { font-size: clamp(17px, 1.5vw, 21px); }
.ff-grid.is-list .wcard-desc { display: block; font-size: 14px; color: var(--muted); }
.ff-grid.is-list .wcard-meta { display: block; color: var(--dim); text-align: right; }
.ff-grid.is-list .wcard:hover .wcard-title { transform: translateX(6px); }
.view-pill {
  position: fixed; z-index: 55; right: var(--gutter); bottom: 44px; display: flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: rgba(17, 17, 17, 0.08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
[data-theme="dark"] .view-pill { background: rgba(255, 255, 255, 0.1); }
.view-pill button { width: 36px; height: 28px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); transition: background 0.25s, color 0.25s; }
.view-pill button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
@media (max-width: 1100px) { .ff-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .ff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ff-grid.is-list .wcard { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .ff-grid.is-list .wcard-media { width: 56px; }
  .ff-grid.is-list .wcard-desc, .ff-grid.is-list .wcard-meta { display: none; }
}

/* ---------- Inquire page ---------- */
.inq-hero { padding-top: calc(var(--nav-h) + clamp(56px, 10vw, 140px)); padding-bottom: clamp(56px, 8vw, 112px); }
.inq-title { margin: 0 0 28px; max-width: 11ch; font-size: clamp(52px, 9vw, 150px); line-height: 0.88; letter-spacing: -0.055em; font-weight: 700; }
.inq-title em { font-style: normal; color: var(--dim); }
.inq-lead { margin: 0 0 32px; max-width: 40ch; font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); }
.inq-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.inq-contact .socials { margin-top: 0; }

/* Process list: active bar + vertical image push */
.proc-sec { border-top: 1px solid var(--line); }
.proc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.proc-heading { margin: 0 0 clamp(28px, 4vw, 48px); font-size: clamp(32px, 3.6vw, 54px); line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
.steps { position: relative; border-left: 1px solid var(--line); }
.step { padding: 12px 0 14px 22px; }
.step-btn { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; }
.step-num { min-width: 2.2em; color: var(--dim); font-size: 10px; }
.step-title { font-size: clamp(20px, 1.9vw, 28px); letter-spacing: -0.025em; font-weight: 500; color: var(--dim); transition: color 0.4s, transform 0.6s var(--ease); }
.step.on .step-title { color: var(--text); transform: translateX(6px); }
.step-text { margin: 6px 0 0 calc(10px + 2.2em + 6px); max-width: 42ch; font-size: 14.5px; color: var(--dim); transition: color 0.4s; }
.step.on .step-text { color: var(--muted); }
.step-bar { position: absolute; left: -1px; top: 0; width: 2px; height: 0; background: var(--text); transition: transform 0.6s var(--ease), height 0.6s var(--ease); }
.proc-media { position: sticky; top: calc(var(--nav-h) + 24px); justify-self: end; width: min(100%, 520px, calc(76vh * 0.8)); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 10px; background: var(--ph-base); }
.proc-img { position: absolute; inset: 0; }
.proc-img .ph-label { font-size: clamp(28px, 3vw, 48px); }
.no-motion .proc-img { opacity: 0; }
.no-motion .proc-img.on { opacity: 1; }
@media (max-width: 860px) {
  .proc-layout { grid-template-columns: 1fr; }
  .proc-media { order: -1; z-index: 2; top: calc(var(--nav-h) + 8px); justify-self: stretch; width: 100%; aspect-ratio: 16 / 10; }
}

/* Inquiry form */
.form-sec { border-top: 1px solid var(--line); }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 112px); }
.form-intro p:not(.label) { max-width: 34ch; color: var(--muted); }
.inq-form { position: relative; display: grid; gap: 24px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > .mono, .field > legend { padding: 0; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  background: transparent; color: var(--text); font: inherit; font-size: 17px; outline: none; transition: border-color 0.2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.chip-check span:hover { border-color: var(--accent); }
.chip-check input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.inq-form .btn-pill { justify-self: start; }
.form-status { min-height: 1.5em; margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 0; text-transform: none; }
.form-status a, .contact-mail-inline { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .form-layout, .field-row { grid-template-columns: 1fr; } }

/* ---------- 6. About + image trail ---------- */
.about { position: relative; overflow: clip; border-top: 1px solid var(--line); }
/* the image trail covers the whole section: over the big title, under the About text */
.trail-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.about-grid { position: relative; z-index: 3; }
.trail-zone { position: relative; height: min(92vh, 860px); display: grid; place-items: center; overflow: hidden; text-align: center; }
.trail-title { position: relative; z-index: 1; margin: 0; font-size: clamp(56px, 12vw, 200px); line-height: 0.86; letter-spacing: -0.06em; font-weight: 700; pointer-events: none; }
.trail-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; color: var(--muted); }
.trail-zone.static { height: auto; padding-block: clamp(88px, 12vw, 168px) 0; }
.trail-zone.static .trail-hint { display: none; }
.trail-item {
  position: absolute; width: clamp(64px, 6.2vw, 112px); aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; pointer-events: none;
  display: grid; place-items: end start; padding: 6px;
  background: radial-gradient(120% 90% at 20% 10%, var(--c, #3355ff) 0%, #141417 75%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  animation: trail 1.15s var(--ease) forwards;
}
.trail-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trail-item .mono { position: relative; font-size: 9px; color: rgba(255, 255, 255, 0.8); }
@keyframes trail {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(calc(var(--s) * 0.4)); }
  12% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s)); }
  55% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(var(--s)); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)) scale(0.15); }
}
.about-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.about-portrait .slot { border-radius: var(--radius); }
.about-lead { margin: 0 0 28px; font-size: clamp(26px, 3vw, 44px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 500; }
.about-body p { margin: 0 0 16px; max-width: 58ch; color: var(--muted); font-size: 18px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-portrait { max-width: 320px; } }

/* ---------- 7. Clients + testimonial ---------- */
.clients { padding-block: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { padding-inline: clamp(20px, 3vw, 48px); font-size: clamp(32px, 5vw, 72px); font-weight: 700; letter-spacing: -0.04em; color: var(--dim); white-space: nowrap; transition: color 0.3s; }
.marquee-track span:hover { color: var(--text); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.testimonial { margin-top: clamp(56px, 8vw, 112px); margin-bottom: 0; }
.testimonial blockquote { margin: 0 0 24px; max-width: 28ch; font-size: clamp(26px, 3.4vw, 52px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; }
.testimonial figcaption { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; color: var(--muted); }

/* ---------- 8. Contact ---------- */
.contact { border-top: 1px solid var(--line); padding-bottom: clamp(120px, 14vw, 200px); }
.contact-title { margin: 0 0 48px; max-width: 10ch; font-size: clamp(56px, 11vw, 184px); line-height: 0.86; letter-spacing: -0.06em; font-weight: 700; }
.contact-title em { font-style: normal; color: var(--dim); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; }
.contact-mail { display: inline-block; padding-bottom: 6px; border-bottom: 2px solid var(--accent); font-size: clamp(22px, 3.2vw, 44px); letter-spacing: -0.03em; overflow-wrap: anywhere; transition: color 0.2s; }
.contact-mail:hover { color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 48px; }
.socials a { color: var(--muted); font-size: 17px; transition: color 0.2s; }
.socials a::after { content: " ↗"; }
.socials a:hover { color: var(--text); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 26px 52px; color: var(--dim); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer a:hover { color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 960; display: grid; place-items: center; padding: var(--gutter); background: rgba(5, 5, 6, 0.95); color: #fff; --line: rgba(255, 255, 255, 0.2); --muted: #a3a09a; --text: #fff; }
.lightbox[hidden] { display: none; }
.lightbox-frame { width: min(1440px, 100%); aspect-ratio: 16 / 9; max-height: 100%; overflow: hidden; border-radius: 10px; background: #000; }
.lightbox-frame iframe, .lightbox-frame video { width: 100%; height: 100%; border: 0; }
.lightbox-msg { height: 100%; display: grid; place-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--muted); }
.lightbox-msg p { margin: 0; }
.lightbox-msg p:first-child { color: var(--text); font-size: 22px; }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; font-size: 16px; }
.lightbox-close { transition: background 0.25s, color 0.25s, border-color 0.25s; }
.lightbox-close:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* =====================================================================
   Case study page
   ===================================================================== */
.block { margin-block: clamp(72px, 10vw, 160px); }
.cs-h2 { margin: 0 0 20px; font-size: clamp(28px, 3.6vw, 56px); line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
.cs-caption { margin: 12px 0 0; color: var(--dim); }
.back { display: inline-block; margin-bottom: 28px; color: rgba(255, 255, 255, 0.75); transition: color 0.2s; }
.back:hover { color: var(--accent); }

.cs-hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; display: flex; align-items: flex-end; }
.cs-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 11, 0.4) 0%, transparent 35%, rgba(10, 10, 11, 0.85) 100%); pointer-events: none; }
.cs-hero-copy { position: relative; z-index: 1; padding-bottom: clamp(48px, 8vh, 88px); color: #fff; }
.cs-cats { margin: 0 0 16px; color: rgba(255, 255, 255, 0.8); }
.cs-cats a:hover { text-decoration: underline; }
.cs-title { margin: 0; font-size: clamp(48px, 9vw, 152px); line-height: 0.9; letter-spacing: -0.055em; font-weight: 700; }
.cs-hero-meta { margin: 20px 0 0; color: rgba(255, 255, 255, 0.75); }
.cs-notfound { min-height: 80vh; padding-top: calc(var(--nav-h) + 96px); }
.cs-notfound .back { color: var(--muted); }

.cs-film .slot, .cs-film-poster, .cs-embed { border-radius: var(--radius); overflow: hidden; }
.cs-film-poster { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; }
.cs-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.cs-embed { aspect-ratio: 16 / 9; background: #000; }
.cs-embed iframe { width: 100%; height: 100%; border: 0; }

.cs-overview { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: clamp(24px, 4vw, 64px); }
.cs-lead { margin: 0 0 20px; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; }
.cs-overview-text p:not(.cs-lead), .cs-text p, .cs-stage-text p { margin: 0 0 16px; max-width: 60ch; color: var(--muted); font-size: 18px; }
.cs-meta { margin: 0; display: grid; gap: 18px; align-content: start; }
.cs-meta dt { color: var(--dim); }
.cs-meta dd { margin: 4px 0 0; }

.cs-text { display: grid; grid-template-columns: 1fr 3fr; gap: clamp(24px, 4vw, 64px); }

.cs-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.cs-stage-text { position: sticky; top: calc(var(--nav-h) + 24px); }
.cs-stage.flip .cs-stage-text { order: 2; }
.cs-stage-media { display: grid; gap: 14px; grid-template-columns: 1fr; }
.cs-stage-media.n2 { grid-template-columns: 1fr 1fr; }
.cs-stage-media.n3 { grid-template-columns: 1fr 1fr; }
.cs-stage-media.n3 > :first-child { grid-column: 1 / -1; }
.cs-stage-media .slot { border-radius: 10px; }

.cs-pipe-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; }
.pipe-stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.pipe-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s var(--ease); }
.pipe-layer.on { opacity: 1; }
.pipe-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0 14px; margin-top: 14px; }
.pipe-tabs button { position: relative; display: flex; gap: 10px; align-items: baseline; padding: 14px 0 0; text-align: left; color: var(--dim); font-size: 16px; border-top: 1px solid var(--line); transition: color 0.3s; }
.pipe-tabs button[aria-selected="true"] { color: var(--text); }
.pipe-progress { position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--accent); }
.pipe-tabs button[aria-selected="true"] .pipe-progress { width: 100%; transition: width 2.6s linear; }
.pipe.manual .pipe-tabs button[aria-selected="true"] .pipe-progress { transition: none; }

.compare { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.compare-layer { position: absolute; inset: 0; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; translate: -1px 0; background: var(--accent); pointer-events: none; }
.compare-handle span { position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 18px; }
.compare-tag { position: absolute; top: 14px; padding: 6px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.5); pointer-events: none; }
.compare-tag.l { left: 14px; }
.compare-tag.r { right: 14px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(.compare-range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.cs-media .slot { border-radius: var(--radius); }
.cs-media.size-full .slot { border-radius: 0; }
.cs-media.size-full .cs-caption { padding-inline: var(--gutter); }
.cs-media.size-inset { max-width: 980px; }
figure.block { margin-inline: auto; }

.cs-gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-gallery.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-gallery figure { margin: 0; min-width: 0; }
.cs-gallery .wide { grid-column: 1 / -1; }
.cs-gallery .slot { border-radius: 10px; }

.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 28px; }
.cs-stats div { display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.cs-stat { font-size: clamp(48px, 7vw, 112px); line-height: 0.9; letter-spacing: -0.05em; font-weight: 700; color: var(--text); }

.cs-quote blockquote { margin: 0 0 24px; max-width: 26ch; font-size: clamp(28px, 4vw, 60px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 500; }
.cs-quote figcaption { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; color: var(--muted); }

.cs-shotlist { display: grid; grid-template-columns: 1fr 3fr; gap: clamp(24px, 4vw, 64px); }
.shots li { display: grid; grid-template-columns: 5em 1fr auto; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); }
.shots li:last-child { border-bottom: 1px solid var(--line); }
.shots .mono:first-child { color: var(--accent); }
.shots a { color: var(--muted); }
.shots a:hover { color: var(--text); }

.cs-credits { display: grid; grid-template-columns: 1fr 3fr; gap: clamp(24px, 4vw, 64px); }
.cs-credits dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px 24px; }
.cs-credits dt { color: var(--dim); }
.cs-credits dd { margin: 4px 0 0; }

/* Lens rail */
.cs-more { margin-bottom: 0; border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 96px); }
.lens { --lw: clamp(170px, 21vw, 320px); position: relative; height: calc(var(--lw) * 1.25 + 8px); overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lens.dragging { cursor: grabbing; }
.lens.dragging .lens-item { pointer-events: none; }
.lens-item { position: absolute; left: 0; top: 50%; width: var(--lw); aspect-ratio: 4 / 5; will-change: transform; -webkit-user-drag: none; }
.lens-media { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; background: var(--ph-base); }
.lens-media .ph-label { font-size: clamp(22px, 2.6vw, 40px); }
.lens-media img { -webkit-user-drag: none; }
.lens-foot { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
.lens-caption { min-width: 14em; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.lens-caption span:first-child { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.lens-caption .mono { color: var(--dim); }
@media (max-width: 760px) { .lens { --lw: 44vw; } }

.next { display: block; padding-block: clamp(64px, 9vw, 140px); }
.next .mono { color: var(--muted); }
.next-title { display: block; margin-top: 14px; font-size: clamp(44px, 8vw, 132px); line-height: 0.9; letter-spacing: -0.055em; font-weight: 700; transition: color 0.3s; }
.next:hover .next-title { color: var(--muted); }

@media (max-width: 860px) {
  .cs-overview, .cs-text, .cs-stage, .cs-shotlist, .cs-credits { grid-template-columns: 1fr; }
  .cs-stage-text { position: static; }
  .cs-stage.flip .cs-stage-text { order: 0; }
  .cs-gallery, .cs-gallery.cols-3 { grid-template-columns: 1fr; }
  .shots li { grid-template-columns: 4em 1fr; }
  .shots li > :last-child { grid-column: 2; }
}

/* ---------- Page transition clone ---------- */
.page-clone { overflow: hidden; pointer-events: none; }
.page-clone .slot { position: absolute; inset: 0; aspect-ratio: auto; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in, .no-motion .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .slot > img, .slot > video { filter: none; transform: none; }
}
