:root {
  --black: #050505;
  --white: #f7f7f5;
  --pad: clamp(6px, 0.55vw, 10px);
  --header: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: clamp(24px, 4vw, 64px);
  background: #fff;
  color: #0a0a0a;
  transition: opacity 520ms cubic-bezier(.22,.61,.36,1), visibility 520ms;
}
.gate-brand h1 { margin: 0; font-size: clamp(21px, 2vw, 34px); line-height: 1; letter-spacing: .04em; }
.gate-brand p { margin: 8px 0 0; font-size: 10px; letter-spacing: .24em; }
.gate-form { align-self: center; justify-self: center; width: min(420px, 100%); text-align: center; }
.gate-form label { display: block; margin-bottom: 16px; font-size: 10px; letter-spacing: .2em; }
.gate-entry { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid #111; }
.gate-entry input { width: 100%; border: 0; outline: 0; padding: 14px 0; background: transparent; color: #0a0a0a; -webkit-text-fill-color: #0a0a0a; caret-color: #0a0a0a; font-size: 16px; letter-spacing: .18em; }
.gate-entry button { border: 0; padding: 0 0 0 28px; background: transparent; color: #0a0a0a; cursor: pointer; font-size: 10px; letter-spacing: .16em; }
.gate-status { min-height: 16px; margin: 10px 0 0; font-size: 10px; letter-spacing: .08em; }

.site { opacity: 0; transition: opacity 620ms cubic-bezier(.22,.61,.36,1); }
body.unlocked .gate { opacity: 0; visibility: hidden; pointer-events: none; }
body.unlocked .site { opacity: 1; }
body.locked { overflow: hidden; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header);
  display: grid;
  place-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,.86), rgba(0,0,0,.35), transparent);
  mix-blend-mode: normal;
}
.wordmark { display: grid; place-items: center; line-height: 1; }
.wordmark span { font-size: clamp(18px, 2.1vw, 31px); letter-spacing: .08em; }
.wordmark small { margin-top: 7px; font-size: 8px; letter-spacing: .28em; }
.menu-toggle { position: absolute; right: 18px; top: 20px; width: 36px; height: 28px; border: 0; background: none; cursor: pointer; }
.menu-toggle span:not(.sr-only) { position: absolute; left: 5px; width: 26px; height: 2px; background: #fff; transition: transform .3s, top .3s; }
.menu-toggle span:first-child { top: 8px; }
.menu-toggle span:nth-child(2) { top: 17px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 13px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 13px; transform: rotate(-45deg); }
.site-menu { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; gap: 22px; background: rgba(0,0,0,.96); text-align: center; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.site-menu a { font-size: clamp(32px, 6vw, 88px); letter-spacing: .04em; }
.site-menu.open { opacity: 1; visibility: visible; }

.reel { position: relative; height: 100svh; min-height: 580px; overflow: hidden; background: #111; }
.reel-poster,
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.76); }
.reel-poster { z-index: 1; opacity: 1; transition: opacity 240ms ease; }
.reel video { z-index: 2; opacity: 0; transition: opacity 240ms ease; }
.reel.is-playing .reel-poster { opacity: 0; }
.reel.is-playing video { opacity: 1; }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--pad); padding: var(--pad); background: var(--black); }
.work-column { display: grid; align-content: start; gap: var(--pad); }
.project { position: relative; aspect-ratio: 16/10; overflow: hidden; cursor: pointer; background: #161616; isolation: isolate; }
.project::after { content: ""; position: absolute; inset: 12px; z-index: 4; border: 1px solid transparent; pointer-events: none; transition: inset 360ms cubic-bezier(.2,.7,.2,1), border-color 240ms; }
.project--wide { aspect-ratio: 16/9; }
.project--tall { aspect-ratio: 4/5; }
.project--full { grid-column: 1 / -1; aspect-ratio: 16/7; }
.project img, .project video { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 400ms; }
.project-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.78), transparent 58%); transition: opacity .35s; }
.project-title { position: absolute; z-index: 2; left: clamp(18px,2vw,34px); bottom: clamp(18px,2vw,32px); display: grid; gap: 3px; font-size: clamp(17px,1.8vw,29px); line-height: 1.05; transition: letter-spacing 420ms cubic-bezier(.2,.7,.2,1), transform 420ms cubic-bezier(.2,.7,.2,1); }
.project-title strong { font-weight: 400; }
.project-title span { font-weight: 400; }
.project-credit { position: absolute; z-index: 3; right: 20px; top: 18px; margin: 0; font-size: 9px; letter-spacing: .15em; opacity: 0; transform: translateY(-5px); transition: opacity .32s, transform .32s; }
.project:hover img { transform: scale(1.025); filter: brightness(.72); }
.project:hover::after, .project:focus-visible::after { inset: 8px; border-color: #fff; }
.project:hover .project-title, .project:focus-visible .project-title { letter-spacing: .05em; transform: translateX(4px); }
.project:hover .project-credit { opacity: 1; transform: translateY(0); }

footer { min-height: 52svh; padding: clamp(38px,6vw,96px); display: grid; align-content: end; gap: 12px; background: var(--white); color: #090909; }
footer p { margin: 0 0 auto; font-size: 10px; letter-spacing: .22em; }
footer a { font-size: clamp(15px,1.6vw,24px); line-height: 1; letter-spacing: .05em; overflow-wrap: anywhere; }
footer span { margin-top: 52px; font-size: 9px; letter-spacing: .16em; }

.film-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: #000; color: #fff; }
.film-dialog::backdrop { background: #000; }
.film-dialog video, .film-dialog iframe { width: 100%; height: 100%; object-fit: contain; border: 0; }
.film-close { position: fixed; z-index: 2; top: 20px; right: 22px; border: 0; background: rgba(0,0,0,.65); color: #fff; padding: 10px 12px; font-size: 9px; letter-spacing: .18em; cursor: pointer; }
.film-loading { position: fixed; z-index: 1; left: 50%; top: 50%; margin: 0; transform: translate(-50%,-50%); font-size: 10px; letter-spacing: .2em; opacity: 0; transition: opacity .2s; pointer-events: none; }
.film-dialog.loading .film-loading { opacity: 1; }

@media (max-width: 760px) {
  :root { --header: 58px; }
  .site-header { justify-items: start; padding-left: 14px; }
  .wordmark { justify-items: start; }
  .wordmark span { font-size: 15px; }
  .wordmark small { font-size: 7px; }
  .work-grid { display: flex; flex-direction: column; }
  .work-column { display: contents; }
  .project { order: var(--mobile-order); }
  .project, .project--wide, .project--tall, .project--full { aspect-ratio: 4/3; }
  .project-title { font-size: 18px; }
  .project-credit { opacity: 1; transform: none; }
  footer { min-height: 44svh; }
}

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