/* Archivo is a variable font: one file with weight AND width axes.
   Display type uses the expanded width, body text the normal width. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* Two rooms: the home and About pages are light and quiet (like a printed
   index), project and Finishing pages go dark so the video is the brightest
   thing on screen. app.js switches data-theme as you move between them. */
:root {
  --bg: #e8e8e8;
  --ink: #151515;
  --muted: #5c5c5c;
  --line: rgba(0, 0, 0, 0.18);
  --panel: #dcdcdc;
  --gutter: 40px;
  --max: 1480px;
  --gap: 20px;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;

  /* Slate colors: one per production company, in order of first appearance. */
  --tone-0: #2b3f8c;
  --tone-1: #a2382c;
  --tone-2: #2c6a4f;
  --tone-3: #9a6a12;
  --tone-4: #1f6670;
  --tone-5: #4a4a4a;
}
:root[data-theme="dark"] {
  --bg: #0d0d0d;
  --ink: #f2f2f2;
  --muted: #9b9b9b;
  --line: rgba(255, 255, 255, 0.16);
  --panel: #171717;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
/* keep the footer at the bottom of short pages */
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; width: 100%; }

a { color: inherit; text-underline-offset: 3px; }
img, video { max-width: 100%; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
#app:focus { outline: none; }
.noscript { padding: 24px var(--gutter); }

/* Type ---------------------------------------------------------------- */
h1, h2, h3 { margin: 0; text-wrap: balance; }
.display {
  font-stretch: 125%;
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.display.xl { font-size: clamp(40px, 8vw, 128px); }
.display.lg { font-size: clamp(34px, 5.4vw, 84px); }
.display.md { font-size: clamp(30px, 4.4vw, 68px); }

h2 { font-stretch: 112%; font-weight: 600; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-stretch: 105%; font-weight: 600; font-size: 16px; line-height: 1.35; }
main p { margin: 0 0 14px; }

/* Header / footer ----------------------------------------------------- */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 0;
}
.brand { font-stretch: 118%; font-weight: 650; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.bar nav { display: flex; gap: 28px; font-size: 15px; }
.bar nav a { text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.bar nav a:hover, .bar nav a[aria-current="page"] { border-bottom-color: currentColor; }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 112px; }

.foot { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 40px; }
.contact {
  display: block;
  margin-bottom: 64px;
  font-stretch: 125%;
  font-weight: 650;
  font-size: clamp(24px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.foot-row { padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Home hero ----------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding: 72px 0 64px;
}
.hero .display { grid-column: 1 / -1; transform-origin: 0 50%; }
.hero .lede { grid-column: 8 / -1; margin-top: 44px; }
.lede { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; }

/* One quiet moment on first load: the title "desqueezes", like anamorphic
   footage being stretched back out to its true width. */
@keyframes desqueeze {
  from { transform: scaleX(0.52); opacity: 0; }
  55% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
.hero.intro .display { animation: desqueeze 0.95s cubic-bezier(0.16, 0.84, 0.24, 1) backwards; }

.work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.work-head h2 { font-stretch: 100%; font-weight: 500; font-size: 15px; letter-spacing: 0; }
.work-head .count { color: var(--muted); font-size: 15px; }

/* Work tiles ---------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px var(--gap);
  margin-top: 36px;
}
.card { display: block; text-decoration: none; }
.card.feature { margin-bottom: 0; }

.media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  /* no picture yet: a near-black title card, like a frame of black before the cut */
  background: radial-gradient(130% 130% at 25% 15%, #2b2b2b 0%, #0e0e0e 70%);
  color: #fff;
}
/* The strip along the bottom is the clip color label: one color per production
   company, the way an editor color-codes clips in a timeline. */
.media::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  height: 5px;
  background: var(--tone, var(--tone-5));
}
.feature .media { aspect-ratio: 21 / 9; }

/* If the last tile would sit alone in its row, it becomes a closing row:
   the tile on the left, its title set large on the right. */
.grid .card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
}
.grid .card:last-child:nth-child(odd) .cap { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-end; gap: 12px; margin: 0; }
.grid .card:last-child:nth-child(odd) .cap .t {
  font-stretch: 125%;
  font-weight: 650;
  font-size: clamp(26px, 3.6vw, 54px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.grid .card:last-child:nth-child(odd) .cap .c { font-size: 15px; }

.tone-0 { --tone: var(--tone-0); }
.tone-1 { --tone: var(--tone-1); }
.tone-2 { --tone: var(--tone-2); }
.tone-3 { --tone: var(--tone-3); }
.tone-4 { --tone: var(--tone-4); }
.tone-5 { --tone: var(--tone-5); }

.thumb-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover .thumb-img { transform: scale(1.035); }

/* film grain on the colored slates (never on your own frames) */
.grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.has-img .grain { display: none; }

.play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  transition: opacity 0.25s;
}
.play::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 19px;
  border-left: 17px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}
.has-img .play { opacity: 0; }
.card:hover .has-img .play, .card:focus-visible .has-img .play { opacity: 1; }
.has-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
.card:hover .has-img::after { background: rgba(0, 0, 0, 0.28); }

/* source-timecode readout + playhead, like a viewer in an edit suite */
.tc {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 3;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.head {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
}
@keyframes scrub { from { left: 0; } to { left: calc(100% - 2px); } }
@media (hover: hover) {
  .card:hover .head { opacity: 1; animation: scrub 8s linear infinite; }
}
@media (hover: none) { .tc { display: none; } }

.cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin-top: 12px; }
.cap .t { font-stretch: 108%; font-weight: 600; font-size: 17px; line-height: 1.25; letter-spacing: -0.01em; }
.cap .c { color: var(--muted); font-size: 14px; }
.card:hover .cap .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.feature .cap .t { font-size: clamp(20px, 2.2vw, 30px); font-stretch: 118%; font-weight: 650; letter-spacing: -0.02em; }
.feature .cap .c { font-size: 15px; }

/* Project page -------------------------------------------------------- */
.project { padding-top: 48px; }
.back { display: inline-block; margin-bottom: 28px; font-size: 15px; }
.project-head { margin-bottom: 36px; }

.frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
video { display: block; width: 100%; background: #000; }
.frame-empty {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.meta {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 32px;
  margin-top: 48px;
}
.credits { grid-column: 1 / 6; margin: 0; display: grid; grid-template-columns: minmax(7.5rem, 10rem) 1fr; border-top: 1px solid var(--line); align-content: start; }
.credits dt, .credits dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.credits dt { color: var(--muted); padding-right: 16px; }
.meta > div { grid-column: 7 / -1; font-size: 18px; }
.copy p { max-width: 56ch; }
.links { margin-top: 18px; }
.gallery { margin-top: 48px; }
.gallery figure { margin: 0 0 24px; }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }

.next { display: block; margin-top: 112px; padding-top: 28px; border-top: 1px solid var(--line); text-decoration: none; }
.next .lbl { display: block; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.next .ttl {
  display: block;
  font-stretch: 125%;
  font-weight: 650;
  font-size: clamp(26px, 4.4vw, 68px);
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.next:hover .ttl { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }

/* About --------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 48px; margin-top: 56px; }
main > section:first-child > .display.lg { margin-top: 72px; }
.about-text { grid-column: 1 / 8; margin: 0; font-size: clamp(22px, 2.5vw, 36px); line-height: 1.22; letter-spacing: -0.02em; font-weight: 450; }
.about-grid.solo .about-text { grid-column: 1 / 10; }
.about-side { grid-column: 9 / -1; display: grid; gap: 40px; align-content: start; }
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.list-title { margin-bottom: 12px; font-stretch: 100%; font-weight: 400; font-size: 15px; letter-spacing: 0; color: var(--muted); }
.plain { margin: 0; padding: 0; list-style: none; }
.plain li { padding: 10px 0; border-top: 1px solid var(--line); }
.plain li:last-child { border-bottom: 1px solid var(--line); }

/* Finishing ----------------------------------------------------------- */
.section { margin-top: 104px; }
.section h2 { margin-bottom: 12px; }
.section .copy { color: var(--muted); }
.items, .ba-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--gap); margin-top: 32px; }
.item { margin: 0; }
.item h3 { margin-top: 12px; }
.item p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.article { display: block; text-decoration: none; }
.slate {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--panel);
  border: 1px solid var(--line);
  font-stretch: 125%;
  font-weight: 650;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.03em;
}
.article:hover h3, .article:hover .go { text-decoration: underline; text-underline-offset: 3px; }
.article .go { display: inline-block; margin-top: 8px; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.reel-link { margin-top: 28px; font-size: 16px; }

/* Before / after slider ---------------------------------------------- */
.ba { margin: 0; --pos: 50%; }
.ba-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; user-select: none; -webkit-user-select: none; }
.ba-stage:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); pointer-events: none; }
.ba-handle { position: absolute; top: 50%; left: var(--pos); width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); pointer-events: none; }
.ba-handle::before, .ba-handle::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -5px; border: 5px solid transparent; }
.ba-handle::before { left: 6px; border-right-color: #000; }
.ba-handle::after { right: 6px; border-left-color: #000; }
.ba-tag { position: absolute; bottom: 12px; padding: 3px 9px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 13px; line-height: 1.4; pointer-events: none; }
.ba-tag-l { left: 12px; }
.ba-tag-r { right: 12px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba figcaption { margin-top: 12px; font-stretch: 105%; font-weight: 600; font-size: 16px; }

/* Smaller screens ----------------------------------------------------- */
@media (max-width: 900px) {
  .hero .lede { grid-column: 5 / -1; }
  .meta { grid-template-columns: minmax(0, 1fr); }
  .credits, .meta > div { grid-column: 1 / -1; }
  .about-text, .about-grid.solo .about-text, .about-side { grid-column: 1 / -1; }
  .about-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}

@media (max-width: 700px) {
  :root { --gutter: 20px; --gap: 14px; }
  body { font-size: 16px; }
  .bar { padding-top: 20px; }
  .bar nav { gap: 18px; font-size: 14px; }
  .hero { padding: 56px 0 56px; }
  .hero .lede { grid-column: 1 / -1; margin-top: 28px; }
  .grid, .items, .ba-grid { grid-template-columns: minmax(0, 1fr); }
  .grid { gap: 28px; }
  .feature .media { aspect-ratio: 16 / 9; }
  .grid .card:last-child:nth-child(odd) { display: block; }
  .grid .card:last-child:nth-child(odd) .cap { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; margin-top: 12px; }
  .grid .card:last-child:nth-child(odd) .cap .t { font-stretch: 108%; font-weight: 600; font-size: 17px; line-height: 1.25; letter-spacing: -0.01em; }
  .grid .card:last-child:nth-child(odd) .cap .c { font-size: 14px; }
  .project { padding-top: 32px; }
  .about-side { grid-template-columns: minmax(0, 1fr); }
  main > section:first-child > .display.lg { margin-top: 48px; }
  .section { margin-top: 72px; }
  .next { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero.intro .display { animation: none; }
  .thumb-img { transition: none; }
  .card:hover .thumb-img { transform: none; }
  .card:hover .head { animation: none; opacity: 0; }
}
