/* Muneeb Rehman — "Night Screening".
 * A dark screening room seen through his viewfinder. The green is his own mark (the munee.b focus
 * box on his reel title card), used for focus, active state and the viewfinder — never body text.
 * Contrast (WCAG 2.x, computed): text 16.4:1, text-2 7.4:1, text-3 5.7:1, focus 14.6:1 on --bg.
 */

@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/geist-mono.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/assets/fonts/instrument-serif.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/assets/fonts/instrument-serif-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #0B0B0C;
  --surface: #141416;
  --raised: #1D1D20;
  --line: #2C2C30;
  --text: #EEEAE3;
  --text-2: #A39E95;
  --text-3: #8F8A82;
  --focus: #45FF2A;
  --rec: #FF4D3D;
  --scrim: rgba(0, 0, 0, .65);

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-ui: 180ms;
  --t-glide: 280ms;
  --t-fade: 400ms;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1520px;
  --header-h: 72px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--focus); color: #000; }

/* Focus: the green box. The viewfinder draws a richer one around cards; this is the floor for every control. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--focus); color: #000; padding: 10px 14px; font-weight: 600;
}
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Type ────────────────────────────────────────────────────────────────── */
.mono { font-family: var(--mono); font-size: 12px; line-height: 1.5; letter-spacing: .06em; text-transform: uppercase; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); display: flex; gap: .9em; align-items: center; }
.eyebrow::before { content: ''; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.display { font-family: var(--serif); font-weight: 400; line-height: .95; letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.display em { font-style: italic; }
.h-xl { font-size: clamp(52px, 10.5vw, 168px); }
.h-l { font-size: clamp(40px, 6.4vw, 104px); }
.h-m { font-size: clamp(32px, 4vw, 60px); }
.h-s { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; }
.lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; color: var(--text); max-width: 38em; }
.muted { color: var(--text-2); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header::before { /* soft scrim so the nav reads over any frame */
  content: ''; position: absolute; inset: 0 0 -40px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  transition: opacity var(--t-fade) var(--ease);
}
.site-header.is-scrolled { background: rgba(11, 11, 12, .82); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.site-header.is-scrolled::before { opacity: 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.wordmark { display: inline-flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.wordmark__name { font-family: var(--sans); font-weight: 500; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; }
.wordmark__role { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.wordmark__box { /* his focus box, small */
  display: inline-grid; place-items: center; border: 1.5px solid var(--focus); padding: 3px 8px 4px;
  font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: .02em; text-transform: none; line-height: 1;
}

.nav { display: flex; gap: clamp(14px, 2.4vw, 36px); }
.nav a {
  position: relative; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 0; color: var(--text);
}
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--focus); transform: scaleX(0); transform-origin: left; transition: transform var(--t-glide) var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--focus); }

@media (max-width: 640px) {
  :root { --header-h: 96px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 6px; }
  .wordmark__role { display: none; }
  .nav { gap: 22px; }
  .nav a { padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh; min-height: max(100svh, 560px);
  display: grid; place-items: stretch; overflow: hidden; background: #000;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__media video { position: absolute; inset: 0; opacity: 0; transition: opacity 900ms var(--ease); }
.hero.is-playing .hero__media video { opacity: 1; }
.hero::before { /* scrim: bottom-weighted so the frame stays bright up top */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.35) 38%, rgba(0,0,0,0) 62%),
    linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 22%);
}
@media (min-width: 768px) {
  /* Scope strip: the montage is cut at 2.39:1 and shown full width with real black bars above
     and below, so it reads as cinema, not as a background. The HUD lives in the bars. */
  .hero__media { inset: 50% 0 auto 0; height: min(100%, calc(100vw / 2.39)); transform: translateY(-50%); }
  .hero::before {
    background:
      linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 30%, rgba(0,0,0,0) 55%),
      linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 25%);
  }
}

.hero__hud {
  position: relative; display: grid; grid-template-rows: auto 1fr auto auto; gap: 20px;
  padding: calc(var(--header-h) + 18px) var(--gutter) clamp(20px, 3.5vw, 40px);
  max-width: var(--max); width: 100%; margin-inline: auto;
}
.hud-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.hud-rec { display: inline-flex; align-items: center; gap: 8px; }
.hud-rec::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 10px rgba(255, 77, 61, .7); }
.hero:not(.is-playing) .hud-rec::before { background: var(--text-3); box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero.is-playing .hud-rec::before { animation: rec 1.6s steps(1) infinite; }
}
@keyframes rec { 50% { opacity: .25; } }
.hud-tc { font-variant-numeric: tabular-nums; }

.hero__title { align-self: end; }
.hero__title .display { text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero__title p { margin-top: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text); max-width: 46em; }

.hero__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 22px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid rgba(238, 234, 227, .4); background: rgba(11, 11, 12, .35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease);
}
.btn:hover { border-color: var(--focus); color: var(--focus); }
.btn--solid { background: var(--focus); color: #000; border-color: var(--focus); font-weight: 500; }
.btn--solid:hover { background: transparent; color: var(--focus); }
.btn__play { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.btn__time { color: var(--text-2); }
.btn--solid .btn__time { color: rgba(0, 0, 0, .6); }
.btn:hover .btn__time { color: inherit; }

.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(238, 234, 227, .3); border-radius: 50%; }
.icon-btn:hover { border-color: var(--focus); color: var(--focus); }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn .i-play { display: none; }
.icon-btn[aria-pressed="true"] .i-play { display: block; }
.icon-btn[aria-pressed="true"] .i-pause { display: none; }

/* chapter bar: which film the montage is showing; click to open it */
.chapters { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.chapter { display: grid; gap: 8px; padding-top: 10px; text-align: left; min-height: 44px; }
.chapter__bar { height: 2px; background: rgba(238, 234, 227, .25); position: relative; overflow: hidden; }
.chapter__bar::after { content: ''; position: absolute; inset: 0; background: var(--focus); transform: scaleX(var(--p, 0)); transform-origin: left; }
.chapter__label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter__label b { color: var(--text-3); font-weight: 400; margin-right: 8px; }
.chapter.is-active .chapter__label, .chapter:hover .chapter__label { color: var(--text); }
.chapter.is-active .chapter__label b { color: var(--focus); }
@media (max-width: 700px) {
  /* phones: the playing chapter widens to show its name; the others shrink to their number */
  .hero__foot .chapters { order: 3; display: flex; flex: 1 1 100% !important; width: 100%; min-width: 0 !important; }
  .chapter { flex: 1 1 0; min-width: 0; transition: flex-grow var(--t-glide) var(--ease); }
  .chapter.is-active { flex-grow: 4; }
  .chapter:not(.is-active) .chapter__name { display: none; }
  .chapter__label { font-size: 10px; }
  .hero__foot { gap: 14px 12px; }
}

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding-block: clamp(72px, 10vw, 160px); }
.section--tight { padding-block: clamp(48px, 6vw, 96px); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 40px; margin-bottom: clamp(36px, 5vw, 72px); }
.section-head .display { max-width: 14ch; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 10px 0; border-bottom: 1px solid var(--line); transition: color var(--t-ui), border-color var(--t-ui); }
.link-arrow::after { content: '\2192'; transition: transform var(--t-glide) var(--ease); }
.link-arrow:hover { color: var(--focus); border-color: var(--focus); }
.link-arrow:hover::after { transform: translateX(4px); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ── Cards (work) ────────────────────────────────────────────────────────── */
.card { position: relative; display: block; }
.card__link { display: block; }
.card__media {
  position: relative; overflow: hidden; background: var(--surface);
  aspect-ratio: var(--ar, 16 / 9);
}
.card__media img, .card__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fp, 50% 50%); }
.card__media img { transition: transform 1.2s var(--ease), filter var(--t-fade) var(--ease); }
.card__media video { opacity: 0; transition: opacity var(--t-fade) var(--ease); }
.card.is-previewing .card__media video { opacity: 1; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .card:hover .card__media img { transform: scale(1.03); }
}
.card__media::after { /* hairline frame */
  content: ''; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.06); pointer-events: none;
}
.card__play {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(11,11,12,.6); border: 1px solid rgba(238,234,227,.25);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(6px); transition: opacity var(--t-ui) var(--ease), transform var(--t-ui) var(--ease), border-color var(--t-ui);
}
.card:hover .card__play, .card:focus-within .card__play, .card.is-active .card__play { opacity: 1; transform: none; }
.card__play:hover { border-color: var(--focus); color: var(--focus); }
@media (hover: none) { .card__play { opacity: 1; transform: none; } }

.card__body { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding-top: 18px; align-items: baseline; }
.card__num { font-family: var(--mono); font-size: 12px; color: var(--text-3); letter-spacing: .08em; }
.card__title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.8vw, 44px); line-height: 1.02; text-wrap: balance; }
.card__slate { grid-column: 2; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.card__slate span + span::before { content: ' \00b7 '; color: var(--text-3); }
.card--sm .card__title { font-size: clamp(22px, 1.9vw, 30px); }

/* Selected work: stacked, staggered, true ratio */
.selected { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: clamp(56px, 8vw, 128px); column-gap: var(--gutter); }
.selected > .card { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .selected > .card:nth-child(4n+1) { grid-column: 1 / span 9; }
  .selected > .card:nth-child(4n+2) { grid-column: 4 / -1; }
  .selected > .card:nth-child(4n+3) { grid-column: 1 / -1; }
  .selected > .card:nth-child(4n+4) { grid-column: 2 / span 7; }
}

/* Work index: aspect-true justified rows */
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: clamp(28px, 4vw, 48px); }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2);
  transition: color var(--t-ui), border-color var(--t-ui), background-color var(--t-ui);
}
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { color: #000; background: var(--focus); border-color: var(--focus); }
.chip sup { font-size: 9px; margin-left: 4px; vertical-align: super; }

.grid { display: flex; flex-wrap: wrap; gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.grid > .card { flex: var(--ar-n, 1.78) 1 calc(var(--ar-n, 1.78) * 260px); min-width: 0; }
.grid > .card[hidden] { display: none; }
.grid::after { content: ''; flex: 10 1 0; } /* keeps the last row from stretching */
@media (max-width: 640px) { .grid > .card { flex-basis: 100%; } .grid > .card.is-vertical { flex: 0 1 calc(50% - 10px); } }

/* ── Feed rail (vertical reels) ──────────────────────────────────────────── */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 22vw, 300px); gap: clamp(14px, 2vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.rail > .card { scroll-snap-align: start; }
.rail .card__body, .is-vertical .card__body { grid-template-columns: 1fr; }
.rail .card__slate, .is-vertical .card__slate { grid-column: 1; }
[data-filter-target] > section[hidden] { display: none; }
.rail .card__title { font-size: 24px; }

/* ── Clients line ────────────────────────────────────────────────────────── */
.clients { display: flex; flex-wrap: wrap; gap: 8px clamp(22px, 3.4vw, 56px); align-items: baseline; font-family: var(--serif); font-size: clamp(30px, 4.4vw, 64px); line-height: 1.1; }
.clients li { color: var(--text); }
.clients li:nth-child(even) { font-style: italic; color: var(--text-2); }

/* ── About teaser / split ────────────────────────────────────────────────── */
.split { display: grid; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; } }
.split__media { aspect-ratio: 4 / 5; position: relative; overflow: hidden; background: var(--surface); }
.split__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--fp, 50% 50%); }
.split__text > * + * { margin-top: 24px; }

/* ── Contact band ────────────────────────────────────────────────────────── */
.contact-band { border-top: 1px solid var(--line); }
.contact-band .display { max-width: 10ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.email-big { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.email-big a { font-family: var(--serif); font-style: italic; font-size: clamp(28px, 4.6vw, 64px); line-height: 1.1; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; transition: color var(--t-ui), border-color var(--t-ui); }
.email-big a:hover { color: var(--focus); border-color: var(--focus); }
.copy-btn { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); }
.copy-btn:hover { border-color: var(--focus); color: var(--focus); }
.copy-btn[data-copied] { color: var(--focus); border-color: var(--focus); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 56px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }
.site-footer a:hover { color: var(--focus); }

/* ── Page head (inner pages) ─────────────────────────────────────────────── */
.page-head { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 120px)); padding-bottom: clamp(32px, 5vw, 64px); }
.page-head .lede { margin-top: 24px; color: var(--text-2); }

/* ── Project page ────────────────────────────────────────────────────────── */
.screen { position: relative; isolation: isolate; padding-block: calc(var(--header-h) + clamp(24px, 4vw, 56px)) clamp(32px, 4vw, 56px); }
.screen__bleed { /* ambient light from the film onto the room */
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.screen__bleed img { width: 100%; height: 100%; object-fit: cover; filter: blur(70px) saturate(1.5); opacity: .38; transform: scale(1.2); }
.screen__bleed::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(11,11,12,0) 0%, rgba(11,11,12,.6) 60%, var(--bg) 100%); }
.frame { position: relative; margin-inline: auto; width: min(100%, calc((100svh - var(--header-h) - 160px) * var(--ar-n, 1.78))); aspect-ratio: var(--ar, 16 / 9); background: #000; box-shadow: 0 40px 120px rgba(0,0,0,.6); }
.frame.is-vertical { width: min(100%, 420px); }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--fp, 50% 50%); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame__btn { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,0) 50%); }
.frame__btn > span { display: inline-flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 26px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; background: rgba(11,11,12,.55); border: 1px solid rgba(238,234,227,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: border-color var(--t-ui), color var(--t-ui); }
.frame__btn:hover > span, .frame__btn:focus-visible > span { border-color: var(--focus); color: var(--focus); }
.frame__corners span { position: absolute; width: 22px; height: 22px; border: 0 solid var(--focus); pointer-events: none; }
.frame__corners span:nth-child(1) { top: -10px; left: -10px; border-top-width: 2px; border-left-width: 2px; }
.frame__corners span:nth-child(2) { top: -10px; right: -10px; border-top-width: 2px; border-right-width: 2px; }
.frame__corners span:nth-child(3) { bottom: -10px; left: -10px; border-bottom-width: 2px; border-left-width: 2px; }
.frame__corners span:nth-child(4) { bottom: -10px; right: -10px; border-bottom-width: 2px; border-right-width: 2px; }

.slate { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.slate div { padding: 18px 20px 18px 0; }
.slate dt { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.slate dd { margin-top: 6px; font-size: 16px; }

.project-intro { display: grid; gap: clamp(28px, 4vw, 64px); padding-block: clamp(48px, 6vw, 96px); }
@media (min-width: 900px) { .project-intro { grid-template-columns: 7fr 5fr; } }
.project-intro .display { margin-bottom: 8px; }
.prose > * + * { margin-top: 1.1em; }
.prose p { color: var(--text); max-width: 40em; }
.note { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--text-3); }

.stills { display: grid; gap: clamp(12px, 1.6vw, 20px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.still { position: relative; }
.still button { display: block; width: 100%; aspect-ratio: var(--ar, 16 / 9); overflow: hidden; background: var(--surface); }
.still img { width: 100%; height: 100%; object-fit: cover; object-position: var(--fp, 50% 50%); }
.still figcaption { margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--text-3); }

.next { display: block; position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.next__inner { display: grid; gap: 24px; align-items: center; padding-block: clamp(48px, 6vw, 96px); }
@media (min-width: 900px) { .next__inner { grid-template-columns: 1fr 1fr; } }

/* ── Episodes (Alexa Stories) ────────────────────────────────────────────── */
.episodes { display: grid; gap: clamp(20px, 2vw, 28px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

/* ── Reel page ───────────────────────────────────────────────────────────── */
.reel-block + .reel-block { margin-top: clamp(64px, 8vw, 128px); }
.reel-block .frame { width: 100%; max-width: 1280px; }
.reel-block header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: 24px; max-width: 1280px; margin-inline: auto; }

/* ── About ───────────────────────────────────────────────────────────────── */
.credits { width: 100%; border-collapse: collapse; }
.credits caption { text-align: left; padding-bottom: 14px; }
.credits th, .credits td { text-align: left; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.credits th { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.credits td:first-child { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.credits td { font-size: 15px; }
@media (max-width: 640px) { .credits .hide-sm { display: none; } }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 18px; max-width: 760px; }
.form .two { display: grid; gap: 18px; }
@media (min-width: 640px) { .form .two { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field > span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.field .opt { color: var(--text-3); text-transform: none; letter-spacing: .04em; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--raised); border: 1px solid var(--line); border-radius: 0; appearance: none;
  transition: border-color var(--t-ui);
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 1px var(--focus); }
.field [aria-invalid="true"] { border-color: var(--rec); }
.form-err { color: #FF8A7D; font-size: 15px; }
.form-err a { text-decoration: underline; }
.form-done { border: 1px solid var(--focus); padding: 24px; max-width: 760px; }
.form-done strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 32px; margin-bottom: 8px; }

/* ── Player dialog ───────────────────────────────────────────────────────── */
.player { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: var(--text); }
.player::backdrop { background: #000; }
.player[open] { display: grid; grid-template-rows: auto 1fr; }
@media (prefers-reduced-motion: no-preference) {
  .player[open] { animation: player-in 360ms var(--ease); }
}
@keyframes player-in { from { opacity: 0; } }
.player__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--gutter); border-bottom: 1px solid #1a1a1c; }
.player__meta { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.player__title { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; }
.player__controls { display: flex; gap: 8px; }
.player__btn { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #2c2c30; font-size: 20px; line-height: 1; }
.player__btn:hover { border-color: var(--focus); color: var(--focus); }
.player__btn[hidden] { display: none; }
.player__stage { display: grid; place-items: center; padding: clamp(8px, 2vw, 32px); min-height: 0; }
.player__frame { position: relative; width: min(100%, calc((100dvh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; }
.player.is-vertical .player__frame { width: min(100%, calc((100dvh - 120px) * 9 / 16)); aspect-ratio: 9 / 16; }
.player__frame iframe, .player__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
html.has-player { overflow: hidden; }

/* ── Viewfinder ──────────────────────────────────────────────────────────── */
/* Registered properties so the four corners GLIDE between targets (CSS interpolates them);
   browsers without @property simply jump, which is fine. */
@property --vx { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --vy { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --vw { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --vh { syntax: '<length>'; inherits: true; initial-value: 0px; }
.vf {
  position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: 30; pointer-events: none; opacity: 0;
  transition: opacity var(--t-ui) var(--ease), --vx var(--t-glide) var(--ease), --vy var(--t-glide) var(--ease), --vw var(--t-glide) var(--ease), --vh var(--t-glide) var(--ease);
}
.vf.is-on { opacity: 1; }
.vf.no-glide { transition: opacity var(--t-ui) var(--ease); }
.vf__c { position: absolute; top: 0; left: 0; width: 22px; height: 22px; border: 0 solid var(--focus); }
.vf__c--tl { border-top-width: 2px; border-left-width: 2px; transform: translate(calc(var(--vx) - 8px), calc(var(--vy) - 8px)); }
.vf__c--tr { border-top-width: 2px; border-right-width: 2px; transform: translate(calc(var(--vx) + var(--vw) - 14px), calc(var(--vy) - 8px)); }
.vf__c--bl { border-bottom-width: 2px; border-left-width: 2px; transform: translate(calc(var(--vx) - 8px), calc(var(--vy) + var(--vh) - 14px)); }
.vf__c--br { border-bottom-width: 2px; border-right-width: 2px; transform: translate(calc(var(--vx) + var(--vw) - 14px), calc(var(--vy) + var(--vh) - 14px)); }
.vf__tag { position: absolute; top: 0; left: 0; transform: translate(calc(var(--vx) + 12px), calc(var(--vy) + 12px)); display: inline-flex; gap: 10px; align-items: center; padding: 5px 9px; background: var(--focus); color: #000; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.has-vf [data-vf-target] .card__link:focus-visible, .has-vf a[data-vf-target]:focus-visible { outline-color: transparent; }
.player.is-image .player__frame { width: auto; height: auto; aspect-ratio: auto; max-width: 100%; max-height: calc(100dvh - 120px); }
.player.is-image .player__frame img { max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; }
.vf__tag .tc { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .vf__tag { font-size: 9.5px; padding: 4px 7px; } }

/* ── Reveal ──────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
  .js [data-reveal].is-revealed { opacity: 1; transform: none; }
}

/* ── Grain (static texture, moves only when motion is welcome) ───────────── */
.grain { position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .045; background-image: url('/assets/img/grain.png'); background-size: 160px 160px; }
@media (prefers-reduced-motion: no-preference) { .grain { animation: grain 0.9s steps(4) infinite; } }
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }
@media (prefers-contrast: more) { .grain { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
