:root {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --fg: #fafafa;
  --fg-2: #a3a3a3;
  --fg-3: #737373;
  --line: rgba(250, 250, 250, 0.12);
  --accent: #6366f1;
  --gutter: clamp(16px, 4vw, 56px);
  --sans: "Inter", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-2); }
.eyebrow { margin: 0 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
  mix-blend-mode: difference;
}
.nav-brand { font-weight: 600; letter-spacing: -0.01em; }
.nav-brand span { color: var(--fg-2); font-weight: 400; }
.nav-links { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 14px; }
.nav-links a { opacity: 0.75; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

/* pills */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--fg); color: var(--bg); font-weight: 500; font-size: 15px;
  transition: transform 0.3s var(--ease), background 0.2s;
}
.pill:hover { transform: translateY(-2px); }
.pill.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.pill.ghost:hover { box-shadow: inset 0 0 0 1px var(--fg-2); }

/* hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(10,10,10,0.55) 38%, rgba(10,10,10,0.1) 70%, rgba(10,10,10,0.35) 100%);
}
.hero-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(48px, 9vh, 96px); }
.hero-title {
  margin: 0; font-weight: 600;
  font-size: clamp(4.5rem, 17vw, 17rem); line-height: 0.84; letter-spacing: -0.055em;
}
.hero-sub { max-width: 30ch; margin: 20px 0 28px; font-size: clamp(17px, 1.6vw, 21px); color: var(--fg-2); }
.hero-note { position: absolute; right: var(--gutter); bottom: clamp(48px, 9vh, 96px); margin: 0; text-align: right; max-width: 22ch; }

/* index */
.index, .reel { padding: clamp(80px, 12vw, 160px) var(--gutter) 0; }
.index-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 20px; }
.index-head h2 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.index-head p { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 28px; }
.filter {
  height: 34px; padding: 0 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line); transition: all 0.2s;
}
.filter:hover { color: var(--fg); }
.filter.is-active { background: var(--fg); color: var(--bg); box-shadow: none; }

.groups { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 96px); }
.group[hidden] { display: none; }
.group-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: baseline;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.group-head h3 { margin: 0; font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 600; letter-spacing: -0.02em; }
.group-head p { grid-column: 1; margin: 0; max-width: 52ch; color: var(--fg-2); font-size: 15px; }
.group-head .mono { grid-column: 2; grid-row: 1; }
.group-empty { margin: 0; padding: 28px 0; border-bottom: 1px solid var(--line); color: var(--fg-3); }
.eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.eyebrow a:hover { color: var(--fg); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-bottom: 1px solid var(--line); }
.row[hidden] { display: none; }
.row a {
  position: relative; display: grid; align-items: center;
  grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) 140px 32px;
  gap: 16px; padding: clamp(20px, 2.6vw, 34px) 0;
}
.row-num { color: var(--fg-3); }
.row-title { font-size: clamp(1.6rem, 3.6vw, 3.2rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; transition: transform 0.5s var(--ease); }
.row-sub { color: var(--fg-2); }
.row-meta { text-align: right; }
.row-arrow { font-size: 22px; text-align: right; transition: transform 0.4s var(--ease); }
.row a:hover .row-title { transform: translateX(12px); }
.row a:hover .row-arrow { transform: translateX(6px); }
.row-preview {
  position: absolute; z-index: 5; pointer-events: none;
  top: 50%; left: 52%; width: 300px; aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden; background: var(--bg-2);
  opacity: 0; transform: translate(-50%, -46%) scale(0.92) rotate(-2deg);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.row-preview.portrait { width: 170px; aspect-ratio: 9 / 16; }
.row-preview video { width: 100%; height: 100%; object-fit: cover; }
.row a:hover .row-preview { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); }

/* clips */
.clip { margin: 0; }
.clip-frame { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-2); aspect-ratio: var(--ar); }
.clip-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.clip figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; font-size: 14px; color: var(--fg-2); }
.clip figcaption span:first-child { color: var(--fg); }

.reel-grid {
  display: grid; gap: clamp(20px, 3vw, 40px) clamp(16px, 2vw, 28px);
  grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end;
}
.reel-grid .clip.landscape, .reel-grid .clip.square { grid-column: span 8; }
.reel-grid .clip.portrait { grid-column: span 4; }

/* work page */
.work { padding: clamp(110px, 16vh, 170px) var(--gutter) 0; }
.work-head { padding-bottom: clamp(28px, 4vw, 48px); }
.work-title { margin: 0; font-size: clamp(3.5rem, 12vw, 11rem); font-weight: 600; letter-spacing: -0.055em; line-height: 0.86; }
.work-sub { margin: 16px 0 0; font-size: clamp(18px, 2vw, 24px); color: var(--fg-2); }
.work-hero .clip.landscape, .work-hero .clip.square { max-width: 100%; }
.work-hero .clip.portrait { max-width: min(460px, 100%); }
.work-hero .clip.portrait .clip-frame { max-height: 82svh; }
.work-body {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px);
  padding: clamp(48px, 7vw, 96px) 0; border-bottom: 1px solid var(--line);
}
.work-summary { margin: 0; font-size: clamp(20px, 2.1vw, 28px); line-height: 1.35; letter-spacing: -0.015em; max-width: 34ch; }
.facts { margin: 0; display: grid; gap: 18px; align-content: start; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.facts dd { margin: 0; }
.actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 10px; }
.cuts { padding-top: clamp(56px, 8vw, 110px); }
.cuts h2 { margin: 0 0 24px; }
.cut-grid {
  display: grid; gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px);
  grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start;
}
.cut-grid > .clip.landscape, .cut-grid > .clip.square { grid-column: span 6; }
.cut-grid > .clip.portrait { grid-column: span 3; }
.cut-links { grid-column: span 12; display: none; }
.cut-grid > .clip + .cut-links { display: flex; gap: 16px; margin: -16px 0 0; font-size: 14px; color: var(--fg-2); grid-column: auto / span 6; }
.cuts.process .clip-frame { opacity: 0.9; }
.next {
  display: flex; align-items: baseline; gap: 20px; margin-top: clamp(80px, 12vw, 160px);
  padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line);
}
.next-title { font-size: clamp(2rem, 6vw, 5rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; flex: 1; transition: transform 0.5s var(--ease); }
.next:hover .next-title { transform: translateX(14px); }
.next > span:last-child { font-size: clamp(24px, 3vw, 40px); }

/* footer */
.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: clamp(80px, 12vw, 160px); padding: 28px var(--gutter) 36px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--fg-2);
}
.foot a { color: var(--fg); }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); filter: blur(8px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.is-in [data-reveal], [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
.is-in [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.is-in [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.is-in [data-reveal]:nth-child(4) { transition-delay: 0.24s; }

@media (max-width: 900px) {
  .row a { grid-template-columns: 36px minmax(0, 1fr) 24px; gap: 4px 12px; }
  .row-sub { grid-column: 2; font-size: 14px; }
  .row-meta { display: none; }
  .row-arrow { grid-row: 1; grid-column: 3; }
  .row-preview { display: none; }
  .reel-grid .clip.landscape, .reel-grid .clip.square { grid-column: span 12; }
  .reel-grid .clip.portrait { grid-column: span 6; }
  .work-body { grid-template-columns: 1fr; }
  .actions { grid-column: 1; }
  .cut-grid > .clip.landscape, .cut-grid > .clip.square, .cut-grid > .clip + .cut-links { grid-column: span 12; }
  .cut-grid > .clip.portrait { grid-column: span 6; }
  .hero-note { display: none; }
}
@media (max-width: 520px) {
  .nav-links a:not(:first-child):not(:nth-child(2)) { display: none; }
  .reel-grid .clip.portrait, .cut-grid > .clip.portrait { grid-column: span 12; max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
}
