/* Layout: the original structure (header, featured films, categories, credits index, bio, project
   page). Home: full-screen films under a fixed stage whose texts swap per film. Categories: a
   wall that pans endlessly. The interface is black and off-white only; all colour comes from the films. */
:root {
  --black: #050505;
  --white: #f1f0eb;
  --muted: #8d8b86;
  --line: rgba(241, 240, 235, .16);

  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Newsreader", "Iowan Old Style", "Times New Roman", Georgia, serif;
  --geo: "Jost", Futura, "Century Gothic", "Avenir Next", sans-serif;

  --gutter: clamp(16px, 2vw, 28px);
  --ease: cubic-bezier(.2, .7, .15, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--black); scroll-behavior: smooth; }
body { margin: 0; background: var(--black); color: var(--white); font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; text-transform: inherit; letter-spacing: inherit; }
:focus-visible { outline: 1px solid var(--white); outline-offset: 3px; }
img, video { display: block; max-width: 100%; }

.label { font: 400 10.5px/1.25 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.muted { color: var(--muted); }
.caps { font-family: var(--sans); font-weight: 800; font-stretch: 70%; text-transform: uppercase; line-height: .86; letter-spacing: -.005em; }
.serif { font-family: var(--serif); font-weight: 250; font-optical-sizing: auto; letter-spacing: -.015em; line-height: .95; }
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 300; font-optical-sizing: auto; }

/* ── header ─────────────────────────────────────────── */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gutter) 16px;
  color: var(--white);
  pointer-events: none;
  transition: background-color .35s;
  view-transition-name: top;
}
body:not([data-view="home"]) .top, body.is-scrolled .top { background: var(--black); }
.top a, .top button { pointer-events: auto; }
.wordmark { font: 300 17px/1 var(--geo); text-transform: uppercase; letter-spacing: .34em; margin-right: -.34em; white-space: nowrap; position: relative; padding: 4px 0; }
/* hover: the menu's underline, drawn under the letters only (not the trailing tracking) */
.wordmark::after { content: ""; position: absolute; left: 0; right: .34em; bottom: -1px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.wordmark:hover::after, .wordmark:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.nav { display: flex; gap: clamp(14px, 2.2vw, 31px); }
.nav a { position: relative; padding: 4px 0; font: 500 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .22em; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: .22em;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; }

.menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--black);
}
.menu-close { align-self: flex-end; padding: 4px 0; }
.menu nav { display: grid; gap: 14px; margin: auto 0; }
.menu nav a { font: 300 clamp(30px, 9vw, 56px)/1.1 var(--geo); text-transform: uppercase; letter-spacing: .06em; }
.menu nav a[aria-current="page"] { color: var(--muted); }
.menu.is-open nav a { animation: rise .6s var(--ease) both; }
.menu.is-open nav a:nth-child(2) { animation-delay: .04s; }
.menu.is-open nav a:nth-child(3) { animation-delay: .08s; }
.menu.is-open nav a:nth-child(4) { animation-delay: .12s; }
.menu.is-open nav a:nth-child(5) { animation-delay: .16s; }
.menu.is-open nav a:nth-child(6) { animation-delay: .2s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ── home: full-screen films under a fixed stage ───── */
html.is-home { scroll-snap-type: y proximity; }
/* the footer is a resting place too, or proximity snapping pulls the page back to the last film */
html.is-home .foot { scroll-snap-align: end; }
.reel { position: relative; background: #000; }
/* the stage rides a track as tall as the reel, so it lets go with the last film instead of
   sliding over the links and footer below */
.stage-track { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  padding: calc(72px + env(safe-area-inset-top, 0px)) var(--gutter) clamp(20px, 3vw, 40px);
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .34), transparent 22%, transparent 58%, rgba(0, 0, 0, .55));
}
/* items of one slot share a single grid cell, so old and new overlap while they swap */
.slot { display: grid; align-items: end; min-width: 0; }
.slot-awards { grid-column: 1 / -1; align-self: start; align-items: start; }
.slot-title, .slot-credits { align-self: end; }
.slot-item { grid-area: 1 / 1; min-width: 0; }
.slot-item.is-leaving { pointer-events: none; }
.stage a { pointer-events: auto; }
.stage-awards { display: flex; gap: 18px; align-items: center; --award-size: 40px; }
.stage-title { margin: 0; }
.stage-title .brand { display: block; font-size: clamp(44px, min(8.4vw, calc(140vw / var(--chars, 8))), 150px); white-space: nowrap; padding-bottom: .06em; }
.stage-title .name { display: block; margin-top: .25em; font-size: clamp(18px, 2vw, 32px); }
.stage-credits { display: grid; gap: 8px; margin: 0; padding-bottom: 6px; min-width: 260px; }
.stage-credits span { display: grid; grid-template-columns: 82px auto; gap: 12px; }
.stage-credits dt, .stage-credits dd { margin: 0; }
.stage-credits dd { font: 400 11.5px/1.35 var(--mono); }
.stage-credits a:hover { text-decoration: underline; text-underline-offset: 3px; }
.line { display: block; overflow: hidden; }
.line > span { display: block; }
.slide { position: relative; display: block; height: 100svh; scroll-snap-align: start; overflow: hidden; background: #000; }
.slide-frame, .slide-frame > video, .slide-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ── section pages ──────────────────────────────────── */
.page { max-width: 1440px; margin: 0 auto; padding: calc(96px + env(safe-area-inset-top, 0px)) var(--gutter) 110px; }
.head { display: grid; grid-template-columns: .7fr 1fr .7fr; align-items: end; gap: 24px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.head p { margin: 0; }
.head h1 { margin: 0; font-size: clamp(34px, 4.6vw, 72px); text-align: center; }
.head .r { text-align: right; }
.head-solo { grid-template-columns: 1fr; }
.head-solo h1 { text-align: center; }

/* categories: a mosaic of the category's films, no gaps, scrolled vertically. The tile under the
   pointer (or, on touch, at the centre) is .is-live: its clip plays and its name comes up. */
.catpage { padding-top: calc(96px + env(safe-area-inset-top, 0px)); }
.catpage .head { margin: 0 var(--gutter); }
.mosaic { position: relative; }
.tile { position: absolute; display: block; overflow: hidden; background: #111; container-type: size; -webkit-user-drag: none; user-select: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .45s var(--ease), transform 1.1s var(--ease); -webkit-user-drag: none; pointer-events: none; }
.tile .pv { z-index: 1; transition: opacity .4s, transform 1.1s var(--ease); }
.tile:focus-visible img, .tile.is-live img { opacity: 1; transform: scale(1.04); }
.tile.is-live .pv { transform: scale(1.04); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .62)); opacity: 0; transition: opacity .4s; pointer-events: none; }
.tile:focus-visible::after, .tile.is-live::after { opacity: 1; }
.tile-awards { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; gap: 8px; --award-size: clamp(16px, 7cqh, 28px); }
.tile-info { position: absolute; left: clamp(12px, 4cqw, 22px); right: clamp(12px, 4cqw, 22px); bottom: clamp(10px, 5cqh, 22px); z-index: 3; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .6s var(--ease); }
.tile:focus-visible .tile-info, .tile.is-live .tile-info { opacity: 1; transform: none; }
.tile-name { display: block; font-size: clamp(22px, 8cqw, 64px); }
.tile-title { display: block; margin-top: 4px; font-size: clamp(14px, 3.4cqw, 22px); }
.tile-meta { display: block; margin-top: 8px; color: rgba(241, 240, 235, .78); }

/* hover previews: the clip covers its box like the still; hidden until it is actually playing */
.pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; transition: opacity .4s; pointer-events: none; }
.pv.is-on { opacity: 1; }

/* award marks, monochrome (same masking as the live site) */
.aw { display: block; flex: none; height: var(--award-size, 20px); background: var(--white); -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.aw.lum { -webkit-mask-source-type: luminance; mask-mode: luminance; }
.aw.inv { -webkit-mask-composite: source-out; mask-composite: subtract; -webkit-mask-source-type: alpha, luminance; mask-mode: alpha, luminance; }

/* ── index ──────────────────────────────────────────── */
.idx-row { display: grid; grid-template-columns: 2fr .55fr .85fr 1.35fr 1.35fr; gap: 18px; align-items: center; padding: 13px 0 12px; border-bottom: 1px solid var(--line); transition: opacity .25s; }
.idx-head { padding-top: 0; border-bottom-color: var(--white); }
.idx-head button { color: var(--muted); }
.idx-head button:hover, .idx-head button[aria-sort="ascending"], .idx-head button[aria-sort="descending"] { color: var(--white); }
.idx-body:hover .idx-row:not(:hover) { opacity: .3; }
.idx-row > span { min-width: 0; overflow-wrap: anywhere; }
.idx-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font: 600 13px/1.25 var(--sans); text-transform: uppercase; letter-spacing: .03em; }
.idx-aw { display: inline-flex; gap: 9px; --award-size: 18px; }
.idx-row .mono { font: 400 11px/1.35 var(--mono); text-transform: uppercase; color: var(--muted); }
.idx-row:hover .mono { color: var(--white); }

.peek { position: fixed; left: 0; top: 0; z-index: 15; width: 300px; aspect-ratio: 16 / 9; overflow: hidden; background: #111; pointer-events: none; opacity: 0; transition: opacity .2s; container-type: size; }
.peek.is-on { opacity: 1; }
.peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ── project ────────────────────────────────────────── */
.work { padding: calc(78px + env(safe-area-inset-top, 0px)) var(--gutter) 96px; }
.back { display: inline-block; padding: 4px 0; color: var(--muted); }
.back:hover { color: var(--white); }
.player { position: relative; width: min(100%, 1390px, calc((100svh - 150px) * 16 / 9)); aspect-ratio: 16 / 9; margin: 14px auto 0; overflow: hidden; background: #000; view-transition-name: media; }
.player > img, .player > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* color-scheme: light matches the Vimeo player page; with the site's dark scheme the browser would
   paint an opaque white backdrop behind it, showing as white bars beside films that aren't 16:9 */
/* a film whose owner blocks embedding: its clip loops under a link out to Vimeo */
.watch { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); padding: 12px 16px 11px; background: var(--white); color: var(--black); white-space: nowrap; transition: background-color .2s; }
.watch:hover { background: #fff; }
.player > iframe { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); border: 0; background: #000; color-scheme: light; }
/* campaigns with several films: the one playing sits in the player, the rest wait below as stills */
.strip { list-style: none; width: min(100%, 1390px, calc((100svh - 150px) * 16 / 9)); margin: 16px auto 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 42vw), 1fr)); gap: 18px 14px; }
.strip button { display: block; width: 100%; }
.strip-still { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111; }
.strip-still img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .3s, transform .9s var(--ease); }
.strip button:hover .strip-still img, .strip button[aria-pressed="true"] .strip-still img { opacity: 1; }
.strip button:hover .strip-still img { transform: scale(1.03); }
.strip button[aria-pressed="true"] .strip-still::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--white); }
.strip-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; }
.strip-name { display: block; margin-top: 5px; font: 300 13px/1.3 var(--geo); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); transition: color .2s; }
.strip button:hover .strip-name, .strip button[aria-pressed="true"] .strip-name { color: var(--white); }
.work-info { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 88px); max-width: 1390px; margin: 30px auto 0; padding-top: 24px; border-top: 1px solid var(--line); }
.work-title { margin: 0; }
/* film names on the project page: the wordmark's thin geometric caps */
.geo { font-family: var(--geo); font-weight: 300; text-transform: uppercase; letter-spacing: .05em; line-height: 1.02; }
.work-title .brand { display: block; font-size: clamp(28px, 3.2vw, 54px); overflow-wrap: anywhere; }
.work-title .name { display: block; margin-top: 12px; font-size: clamp(13px, 1.15vw, 17px); letter-spacing: .16em; line-height: 1.3; }
.credits { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: 0; align-self: start; }
.credits dt, .credits dd { margin: 0; padding: 11px 0 10px; border-bottom: 1px solid var(--line); }
.credits dt { padding-right: 28px; }
.credits dd { font: 500 13px/1.35 var(--sans); text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere; }
.credits .handle { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.credits .handle:hover { text-decoration-color: currentColor; }
.aw-list { display: grid; gap: 10px; --award-size: 22px; }
.aw-item { display: flex; align-items: center; gap: 12px; }
.aw-none { flex: none; width: var(--award-size); } /* keeps names aligned where an award has no mark */

/* ── bio ────────────────────────────────────────────── */
/* bio: no bold anywhere; the photo beside the text, the wordmark's light caps for the lead and lists */
.bio { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 96px); align-items: start; padding-top: 8px; }
.bio-photo { margin: 0; }
.bio-photo img { width: 100%; height: auto; }
.bio-lead { margin: 0 0 28px; font-size: clamp(20px, 2.1vw, 30px); line-height: 1.3; letter-spacing: .05em; text-wrap: balance; }
.bio-copy p { margin: 0 0 1.1em; max-width: 58ch; color: var(--muted); font-size: 15px; line-height: 1.6; }
.bio-copy p:first-child { color: var(--white); }
.spec { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: 32px 0 0; border-top: 1px solid var(--line); }
.spec dt, .spec dd { margin: 0; padding: 11px 0 10px; border-bottom: 1px solid var(--line); }
.spec dt { padding-right: 24px; }
.spec dd { font: 300 14px/1.35 var(--geo); text-transform: uppercase; letter-spacing: .08em; overflow-wrap: anywhere; }
.spec a:hover { text-decoration: underline; text-underline-offset: 3px; }

.notfound { min-height: 60svh; display: grid; place-content: center; gap: 18px; text-align: center; }

/* ── footer ─────────────────────────────────────────── */
/* the Bio already carries every contact the footer would repeat */
body[data-view="bio"] .foot { display: none; }
.foot { background: var(--black); color: var(--white); border-top: 1px solid var(--line); padding: clamp(32px, 4.5vw, 64px) var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px)); }
/* contacts: Carol and her agents side by side, all at one modest size */
.foot-contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 28px clamp(24px, 4vw, 64px); }
.foot-contacts p { margin: 0; }
.foot-contacts .label { margin-bottom: 10px; }
.foot-contacts div { min-width: 0; }
@media (min-width: 1000px) { .foot-contacts { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); } }
.foot-mail { white-space: nowrap; }
.foot-person { display: block; margin-top: 8px; font: 400 11px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; transition: color .2s; }
.foot-person:hover { color: var(--white); }
.foot-mail, .foot-agent { position: relative; display: inline-block; font: 300 clamp(17px, 1.6vw, 22px)/1.25 var(--geo); text-transform: uppercase; letter-spacing: .08em; overflow-wrap: anywhere; }
.foot-mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.foot-mail:hover::after { transform: scaleX(1); transform-origin: left; }
.foot-row { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-row a:hover, .foot-row button:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-row { align-items: center; }
.social { display: inline-flex; gap: 18px; align-items: center; }
.social a { display: block; opacity: .8; transition: opacity .2s; }
.social a:hover { opacity: 1; }
.social svg { display: block; width: 16px; height: 16px; fill: currentColor; }
.to-top { margin-left: auto; }

/* ── cursor label ───────────────────────────────────── */
.cursor { position: fixed; left: 0; top: 0; z-index: 25; padding: 5px 7px 4px; background: var(--white); color: var(--black); pointer-events: none; opacity: 0; transform: translate3d(-200px, -200px, 0); transition: opacity .2s; white-space: nowrap; }
.cursor.is-on { opacity: 1; }

/* ── page transitions ───────────────────────────────── */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }
::view-transition-group(media) { animation-duration: .62s; animation-timing-function: cubic-bezier(.2, .7, .15, 1); }
::view-transition-old(media), ::view-transition-new(media) { height: 100%; object-fit: cover; }

/* ── phone ──────────────────────────────────────────── */
@media (max-width: 800px) {
  .nav { display: none; }
  .menu-btn { display: block; padding: 4px 0; }
  .stage { grid-template-columns: minmax(0, 1fr); padding-top: calc(62px + env(safe-area-inset-top, 0px)); background: linear-gradient(rgba(0, 0, 0, .3), transparent 18%, transparent 62%, rgba(0, 0, 0, .7)); }
  .stage-awards { --award-size: 28px; gap: 12px; }
  .slot-credits { margin-top: 16px; }
  .stage-credits { min-width: 0; }
  .stage-credits span { grid-template-columns: 74px auto; }
  .stage-title .brand { font-size: clamp(40px, 12vw, 64px); white-space: normal; }
  .work-title .brand { font-size: clamp(26px, 7.4vw, 38px); }
  .page { padding-top: calc(76px + env(safe-area-inset-top, 0px)); padding-bottom: 72px; }
  .catpage { padding-top: calc(76px + env(safe-area-inset-top, 0px)); }
  .head { grid-template-columns: 1fr auto; row-gap: 10px; }
  .head p:first-child { grid-column: 1 / -1; }
  .head h1 { text-align: left; }
  .head-solo h1 { text-align: center; }
  .idx-row { grid-template-columns: minmax(0, 1fr) auto; }
  .idx-row > :nth-child(n + 3) { display: none; }
  .peek { display: none; }
  .work-info, .bio { grid-template-columns: minmax(0, 1fr); }
  .to-top { margin-left: 0; }
  .cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
  html.is-home { scroll-snap-type: none; }
}
