/* videografic — form · space · time */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ecebe6;
  --paper-2: #e3e1db;
  --ink: #121212;
  --ink-2: #4a4946;
  --red: #d11f19;

  --font: "Outfit", "Helvetica Neue", Arial, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --track: 0.32em;                 /* the letterspaced caps from the card */
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
::selection { background: var(--red); color: var(--paper); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6em 1em;
}
.skip:focus { top: 12px; }

/* ---------- shared pieces ---------- */

.triad li {
  text-transform: uppercase;
  letter-spacing: var(--track);
  font-weight: 400;
  font-size: clamp(.95rem, 1.35vw, 1.25rem);
  line-height: 1.75;
}
.triad--small li { font-size: .8rem; line-height: 1.9; }

.rule {
  display: block;
  width: 2.2rem; height: 2px;
  background: var(--ink);
  margin: 1.4rem 0;
}

/* ---------- header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  padding-top: max(18px, env(safe-area-inset-top));
  color: #fff;
  mix-blend-mode: difference;       /* reads black on paper, white on dark media */
  pointer-events: none;
}
.site-header a { pointer-events: auto; }

.wordmark {
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.site-header.is-past .wordmark { opacity: 1; transform: none; }

.header-contact {
  display: inline-flex; align-items: center; gap: .6em;
  text-transform: uppercase; letter-spacing: var(--track);
  font-size: .75rem;
}
.header-contact .dot {
  width: .6em; height: .6em; border-radius: 50%;
  background: #2ee0e6;              /* inverts to brand red under difference blend */
}

/* ---------- intro ---------- */

.intro {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  overflow: hidden;
  display: flex; justify-content: flex-end; align-items: center;
  padding: calc(80px + 4vh) var(--gutter) 12vh;
}

.intro-slab, .outro-slab {
  position: absolute; top: 0; height: 100%;
  fill: var(--ink);
}
.intro-slab {
  left: 0;
  width: min(33vw, 72vh);
  transform-origin: top left;
}

.intro-circle, .outro-circle {
  position: absolute;
  border-radius: 50%;
  background: var(--red);
}
.intro-circle {
  left: calc(min(33vw, 72vh) * .72);
  top: 7vh;
  width: clamp(96px, 15vw, 240px);
  aspect-ratio: 1;
}

.intro-body { position: relative; width: min(100%, 44rem); }

.intro-mark {
  margin: 0 0 clamp(1.5rem, 4vh, 3rem);
  font-weight: 600;
  font-size: clamp(3.2rem, 10.5vw, 10rem);
  line-height: .9;
  letter-spacing: -0.045em;
}
.intro-body .triad, .intro-body .rule, .intro-lede { margin-left: clamp(0rem, 8vw, 7rem); }
.intro-lede {
  max-width: 26rem;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 300;
}

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 4vh;
  display: flex; align-items: center; gap: .9rem;
  text-transform: uppercase; letter-spacing: var(--track); font-size: .7rem;
}
.scroll-cue i {
  display: block; width: 1px; height: 44px; background: var(--ink);
  transform-origin: top;
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; }
}

/* intro entrance */
.intro-slab   { transform: translateX(-100%); transition: transform 1.1s var(--ease); }
.intro-circle { transform: scale(0); transition: transform .9s var(--ease) .45s; }
.intro-body > * { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.ready .intro-slab, .ready .intro-circle { transform: none; }
.ready .intro-body > * { opacity: 1; transform: none; }
.ready .intro-body > :nth-child(2) { transition-delay: .7s; }
.ready .intro-body > :nth-child(3) { transition-delay: .8s; }
.ready .intro-body > :nth-child(4) { transition-delay: .9s; }
.ready .intro-body > :nth-child(1) { transition-delay: .55s; }

/* ---------- work ---------- */

.work { background: var(--paper); }

.item { position: relative; margin: 0; }
.cell { position: relative; }

/* Two images side by side: widths follow each aspect ratio, so heights match. */
.item--pair { display: flex; }
.item--pair .cell { flex: var(--r, 1) 1 0; min-width: 0; }

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio, 16/9);
  max-height: 100vh; max-height: 100svh;
  overflow: hidden;
  background: var(--paper-2);
}
.frame > img, .frame > video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  opacity: 0;
  transition: transform 1.6s var(--ease), opacity 1s var(--ease);
}
.item.in .frame > img, .item.in .frame > video { transform: none; opacity: 1; }

.cap {
  position: absolute; inset: auto 0 0 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 1.25rem;
  padding: 4.5rem var(--gutter) clamp(1rem, 3vh, 2rem);
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.42), rgba(0,0,0,0));
  opacity: 0; transform: translateY(8px);
  transition: opacity .8s var(--ease) .35s, transform .8s var(--ease) .35s;
}
.item.in .cap { opacity: 1; transform: none; }

.cap-idx, .cap-year {
  font-size: .72rem; letter-spacing: var(--track); text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.cap-idx { display: flex; align-items: center; gap: .7rem; }
.cap-idx::after { content: ""; width: 1.6rem; height: 1px; background: currentColor; }
.cap-main { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1.1rem; }
.cap-title { font-weight: 500; font-size: clamp(1.05rem, 1.6vw, 1.4rem); letter-spacing: -0.01em; }
.cap-meta { font-size: .72rem; letter-spacing: var(--track); text-transform: uppercase; opacity: .85; }

.noscript { padding: 4rem var(--gutter); }

/* ---------- outro / contact ---------- */

.outro {
  position: relative;
  overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  padding: clamp(6rem, 14vh, 10rem) var(--gutter) 2rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.outro-slab {
  right: 0;
  width: min(22vw, 48vh);
  transform: scaleX(-1);
}
.outro-circle {
  right: calc(min(22vw, 48vh) * .78);
  bottom: 14vh;
  width: clamp(64px, 8vw, 130px);
  aspect-ratio: 1;
}

.outro-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 1.5rem; row-gap: 4rem;
  max-width: calc(100% - min(22vw, 48vh));
}
.outro-title {
  grid-column: 1 / -1;
  font-weight: 500;
  font-size: clamp(2rem, 5.2vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.people {
  grid-column: 1 / span 7;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2.5rem;
}
.person-name { font-weight: 500; font-size: clamp(1.4rem, 2vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.1; }
.person-role {
  margin: .55rem 0 1.1rem;
  text-transform: uppercase; letter-spacing: var(--track); font-size: .72rem; color: var(--ink-2);
}
.person a, .studio a { display: block; width: fit-content; }
.person a, .studio address a {
  background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease), color .2s;
}
.person a:hover, .studio address a:hover { background-size: 100% 1px; color: var(--red); }

.studio { grid-column: 9 / span 4; }
.studio .rule { margin: 1.1rem 0; }
.studio address { font-style: normal; line-height: 1.7; }

.colophon {
  position: relative;
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 5rem;
  max-width: calc(100% - min(22vw, 48vh));
  padding-top: 1.2rem;
  border-top: 1px solid rgba(18,18,18,.18);
  font-size: .72rem; letter-spacing: var(--track); text-transform: uppercase; color: var(--ink-2);
}
.colophon a:hover { color: var(--red); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .people { grid-column: 1 / -1; }
  .studio { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .intro { align-items: flex-end; padding-bottom: 14vh; }
  .intro-slab { width: 42vw; height: 58%; }
  .intro-circle { left: 30vw; top: 12vh; width: 26vw; }
  .intro-body .triad, .intro-body .rule, .intro-lede { margin-left: 0; }
  .scroll-cue { bottom: 3vh; }

  .frame { aspect-ratio: 4/5; }         /* full-bleed feels better taller on phones */
  .item--pair { flex-direction: column; }   /* pairs stack */
  .item--pair .cell { flex: none; }
  .cap { grid-template-columns: 1fr auto; padding-top: 3.5rem; }
  .cap-idx { display: none; }

  .outro-slab { width: 28vw; height: 40%; }
  .outro-circle { right: 20vw; bottom: auto; top: 30%; width: 16vw; }
  .outro-grid, .colophon { max-width: 100%; }
  .colophon { flex-direction: column; }
}

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