@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("/assets/fonts/AlteHaasGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Alte Haas Grotesk";
  src: url("/assets/fonts/AlteHaasGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --fg: #000;
  --muted: #6b6b6b;
  --faint: #b5b5b5;
  --bg: #fff;
  --font: "Alte Haas Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nav-size: clamp(16px, 1.15vw, 22px);
  --body-size: clamp(16px, 1.1vw, 20px);
  --lead-size: clamp(20px, 1.55vw, 28px);
  --pad: clamp(20px, 1.8vw, 34px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scrollbar-gutter: stable; }

html, body { background: var(--bg); color: var(--fg); }

body {
  font-family: var(--font);
  font-synthesis: none;
  font-weight: 400;
  font-size: var(--body-size);
  line-height: 1.25;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  user-select: text;
  -webkit-user-select: text;
}

::selection { background: #000; color: #fff; }

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  z-index: 10;
  pointer-events: none;
}

.site-header > * { pointer-events: auto; }

.home-link {
  justify-self: start;
  font-size: var(--nav-size);
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 150ms ease;
}

.home-link:hover { opacity: 0.55; }

.is-home .home-link { visibility: hidden; }

.nav {
  display: flex;
  gap: clamp(80px, 14vw, 270px);
  font-size: var(--nav-size);
  font-weight: 400;
}

.nav a { display: inline-grid; transition: opacity 150ms ease; }
/* Reserve bold width so the nav doesn't shift between pages */
.nav a::after {
  content: attr(data-label);
  font-weight: 700;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}
.nav a:hover { opacity: 0.55; }
.nav a[aria-current="page"] { font-weight: 700; }
.nav a[aria-current="page"]:hover { opacity: 1; }

/* ---------- Landing ---------- */

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 120px var(--pad);
}

.intro {
  max-width: 780px;
  text-align: left;
}

.intro .name {
  font-size: var(--lead-size);
  font-weight: 700;
  margin-bottom: 0.15em;
}

.intro .lead {
  font-size: var(--lead-size);
  font-weight: 400;
  line-height: 1.22;
}

.definition {
  margin-top: 1.6em;
  max-width: 540px;
  color: var(--muted);
  line-height: 1.45;
}

.definition .term { margin-bottom: 4px; }
.definition .term span { font-weight: 700; }

.clients {
  position: absolute;
  right: var(--pad);
  bottom: var(--pad);
  text-align: right;
}

.clients-label {
  color: var(--muted);
  font-size: calc(var(--nav-size) * 0.8);
  font-weight: 400;
  margin-bottom: 8px;
}

.clients ul {
  list-style: none;
  font-size: calc(var(--nav-size) * 1.1);
  font-weight: 700;
  line-height: 1.12;
}

/* ---------- Work ---------- */

.page {
  padding: 140px var(--pad) 120px;
  max-width: 1720px;
  margin: 0 auto;
}

.filters {
  display: flex;
  gap: 28px;
  font-size: var(--nav-size);
  font-weight: 400;
  margin-bottom: 40px;
}

.filters button {
  font: inherit;
  background: none;
  border: 0;
  color: var(--faint);
  cursor: pointer;
  padding: 0;
  transition: color 150ms ease;
}

.filters button:hover { color: var(--fg); }
.filters button[aria-pressed="true"] { color: var(--fg); font-weight: 700; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px var(--pad);
}

@media (max-width: 1200px) and (min-width: 821px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card { cursor: pointer; }
.card[hidden] { display: none; }

.media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b0b0b;
  overflow: hidden;
}

.media img,
.media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}

.card:hover .media img,
.card:hover .media video { transform: scale(1.02); }

.media .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #444;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.meta .title { font-weight: 700; }
.meta .cat { color: var(--muted); font-weight: 400; white-space: nowrap; }

.desc {
  margin-top: 6px;
  color: var(--muted);
  max-width: 62ch;
  font-size: calc(var(--body-size) * 0.88);
  line-height: 1.35;
}

/* ---------- Project view ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  display: none;
  overflow-y: auto;
  padding: 96px var(--pad) 120px;
}

.lightbox.open { display: block; }

.lightbox .inner { max-width: 1480px; margin: 0 auto; }

.lb-head { max-width: 880px; margin-bottom: 40px; }
.lb-head .meta { margin-top: 0; }
.lb-head .desc { font-size: var(--body-size); max-width: none; color: var(--fg); margin-top: 10px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--pad);
  align-items: start;
}

.gallery .item { grid-column: span 12; background: #0b0b0b; }
.gallery .item.half { grid-column: span 6; }
.gallery .item.third { grid-column: span 4; }
.gallery .item.quarter { grid-column: span 3; }

.gallery img,
.gallery video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 86vh;
  object-fit: contain;
  background: #0b0b0b;
}

.lightbox .close {
  position: fixed;
  top: 28px;
  right: var(--pad);
  font: inherit;
  font-size: var(--nav-size);
  font-weight: 400;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 2;
  padding: 6px 12px;
  margin: -6px -12px;
  background: var(--bg);
}

.lightbox .close:hover { opacity: 0.55; }

/* ---------- About / Contact ---------- */

.split {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 2.2vw, 44px);
  padding: 110px var(--pad) 80px;
}

.about-text {
  width: min(460px, 100%);
  font-size: clamp(16px, 1.05vw, 19.5px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.about-text p + p { margin-top: 1.05em; }

.about-photo {
  width: min(496px, 42vw);
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(1);
  display: block;
}

.contact {
  width: min(520px, 100%);
}

.contact dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 48px;
  row-gap: 14px;
  font-size: var(--lead-size);
}

.contact dt { color: var(--muted); font-weight: 400; }
.contact dd { text-align: right; position: relative; }

.contact dd a { border-bottom: 1px solid transparent; transition: border-color 150ms ease; }
.contact dd a:hover { border-color: currentColor; }

.copy-note {
  position: absolute;
  left: 100%;
  top: 50%;
  translate: 0 -50%;
  margin-left: 12px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.6em;
  font-weight: 400;
  opacity: 0;
  transition: opacity 200ms ease;
}

.copy-note.show { opacity: 1; }

/* ---------- Mobile ---------- */

@media (max-width: 820px) {
  .site-header { height: 64px; grid-template-columns: auto 1fr; gap: 16px; }
  .nav { gap: 20px; justify-self: end; }
  .landing { place-items: start; align-content: center; padding: 120px var(--pad) 48px; }
  .intro { padding-bottom: 48px; }
  .clients { position: static; text-align: left; }
  .grid { grid-template-columns: 1fr; gap: 48px; }
  .gallery .item.half, .gallery .item.third { grid-column: span 12; }
  .gallery .item.quarter { grid-column: span 6; }
  .page { padding-top: 96px; }
  .split { flex-direction: column; align-items: flex-start; justify-content: flex-start; padding-top: 100px; }
  .about-text { width: 100%; }
  .about-photo { width: 100%; }
  .contact dl { column-gap: 28px; font-size: 20px; }
  .copy-note { left: auto; right: 0; top: 100%; translate: none; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Project page: Going Nowhere ---------- */
/* Video and bar are sized together so both fit on screen at any display size */

.project-page { height: 100svh; overflow: hidden; }

.gn {
  --bar-h: clamp(96px, 8vw, 150px);
  height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 96px var(--pad) 24px;
}

.gn-inner {
  width: min(100%, 1680px, calc((100svh - 96px - 24px - var(--bar-h)) * 16 / 9));
}

.gn-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  overflow: hidden;
}

.gn-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gn-video iframe { opacity: 0; transition: opacity 600ms ease; }
.gn-video iframe.is-playing { opacity: 1; }

.gn-bar {
  display: grid;
  grid-template-columns: clamp(56px, 4.6vw, 96px) minmax(0, 58%) 1fr;
  column-gap: clamp(14px, 1.2vw, 24px);
  align-items: center;
  min-height: var(--bar-h);
}

.gn-logo { display: flex; flex-direction: column; align-items: center; color: #000; }
.gn-logo img { width: 100%; height: auto; display: block; }
.gn-logo span {
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(5px, 0.4vw, 9px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: 0.2em;
}

.gn-desc {
  font-size: clamp(14px, 0.95vw, 20px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.gn-desc a { text-decoration: underline; text-underline-offset: 0.12em; }
.gn-desc a:hover { opacity: 0.55; }

.gn-player {
  position: relative;
  justify-self: end;
  text-align: right;
  text-transform: uppercase;
  font-size: clamp(15px, 1.05vw, 22px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.gn-label { font-weight: 700; }

.gn-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55em;
  margin-top: 0.3em;
}

.gn-controls button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  height: 0.7em;
  color: #000;
}

.gn-controls svg { height: 100%; width: auto; fill: currentColor; display: block; }
.gn-controls button:hover { opacity: 0.55; }

#gn-toggle { width: 0.5em; }
#gn-toggle .i-play { display: none; }
#gn-toggle.is-paused .i-play { display: block; }
#gn-toggle.is-paused .i-pause { display: none; }

.gn-credit {
  position: absolute;
  right: 0;
  top: 100%;
  white-space: nowrap;
  margin-top: 0.5em;
  font-size: 0.5em;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.gn-credit a:hover { color: var(--fg); }

@media (max-width: 820px) {
  .gn { align-items: flex-start; padding: 88px var(--pad) 24px; }
  .gn-inner { width: 100%; }
  .gn-bar {
    grid-template-columns: 64px 1fr;
    column-gap: 16px;
    row-gap: 24px;
    padding-top: 20px;
    align-items: start;
  }
  .gn-logo span { font-size: 6px; }
  .gn-desc { font-size: 15px; }
  .gn-player { grid-column: 1 / -1; font-size: 16px; }
}

/* ---------- Vimeo player (custom controls, no Vimeo UI) ---------- */

.vp {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.vp iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vp .vp-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.vp.is-started .vp-thumb { opacity: 0; }

/* Covers the video so clicks never reach Vimeo */
.vp-hit { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.vp-ambient .vp-hit { cursor: default; }

.vp-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 14px 12px;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.vp.is-active .vp-ui { opacity: 1; pointer-events: auto; }

.vp-ui button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.vp-ui button:hover { opacity: 0.7; }

.vp-play { display: grid; place-items: center; width: 12px; height: 14px; }
.vp-play svg { height: 14px; width: auto; fill: currentColor; }
.vp-play .i-pause { display: none; }
.vp.is-playing .vp-play .i-pause { display: block; }
.vp.is-playing .vp-play .i-play { display: none; }

.vp-bar {
  position: relative;
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.vp-bar::after { content: ""; position: absolute; inset: -9px 0; }

.vp-fill {
  height: 100%;
  background: #fff;
  transform-origin: left center;
  transform: scaleX(0);
}

.vp-time { font-variant-numeric: tabular-nums; opacity: 0.85; }

.vp-mute, .vp-fs { display: grid; place-items: center; width: 18px; height: 18px; }
.vp-mute svg, .vp-fs svg { width: 18px; height: 18px; display: block; }
.vp-mute .i-off { display: none; }
.vp.is-muted .vp-mute .i-off { display: block; }
.vp.is-muted .vp-mute .i-on { display: none; }

.vp:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }

@media (max-width: 820px) {
  .vp-ui { gap: 10px; font-size: 12px; }
  .vp-time { display: none; }
}

/* ---------- Work index previews (archive) ---------- */

.archive-page.is-dark { --bg: #000; --fg: #fff; --muted: #8a8a8a; }

.archive { padding: 110px var(--pad) 220px; }

.ar-filters {
  display: flex;
  gap: 28px;
  margin-bottom: 40px;
  font-size: var(--nav-size);
}

.ar-filters button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.ar-filters button[aria-pressed="true"] { color: var(--fg); font-weight: 700; }
.ar-filters button[data-filter="other"] { margin-left: 0; }
.ar-mode { margin-left: auto; color: var(--muted); font-size: 0.8em; }

/* Option 1: grid of small tiles */
.ar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  justify-content: start;
  gap: 40px 36px;
  max-width: min(1100px, 70vw);
}

.ar-tile { display: block; }
.ar-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e9e9e9;
  transition: opacity 200ms ease;
}
.is-dark .ar-tile img { background: #151515; }
.ar-tile .ar-num { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 700; }

/* Option 2: list of projects */
.ar-list { border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent); }
.ar-row {
  display: grid;
  grid-template-columns: 48px 120px minmax(0, 1.2fr) minmax(0, 1fr) 80px;
  gap: 24px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  font-size: 16px;
}
.ar-row img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #e9e9e9; }
.is-dark .ar-row img { background: #151515; }
.ar-row .ar-title { font-weight: 700; }
.ar-row .ar-num { font-weight: 700; }
.ar-row .ar-roles, .ar-row .ar-type { color: var(--muted); }
.ar-row .ar-type { text-align: right; }
.ar-list:hover .ar-row { opacity: 0.45; }
.ar-list .ar-row:hover { opacity: 1; }
.ar-row, .ar-row img { transition: opacity 200ms ease; }

/* Big hover title at the bottom, filled with the hovered image */
.ar-hover {
  position: fixed;
  left: var(--pad);
  right: var(--pad);
  bottom: 12px;
  margin: 0;
  padding: 0.08em 0 0.18em;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  color: transparent;
  background-color: var(--fg);
  background-size: cover;
  background-position: center;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.ar-hover.is-on { opacity: 1; }
.ar-hover em { font-style: normal; opacity: 0.45; }

@media (max-width: 820px) {
  .ar-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .ar-row { grid-template-columns: 32px 88px 1fr; }
  .ar-row img { width: 88px; }
  .ar-row .ar-roles, .ar-row .ar-type { display: none; }
  .ar-hover { display: none; }
}
