@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #f3f3f0;
  --fg: #141413;
  --mute: #6a6a66;
  --line: #d9d9d4;
  --frame: #e4e4e0;
  --gap-x: 14px;
  --gap-y: 30px;
  --pad: clamp(16px, 3.2vw, 44px);
  color-scheme: light;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.shell { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }

/* Top bar */
.top {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}
.mark {
  font-size: 24px;
  font-weight: 860;
  font-stretch: 125%;
  letter-spacing: -.02em;
  line-height: 1;
}
.tagline { margin: 0; color: var(--mute); font-size: 13px; }
.top-contact {
  margin-left: auto;
  font-size: 13px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.top-contact:hover { color: var(--mute); }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: var(--gap-y) var(--gap-x);
}
.card { grid-column: span 2; min-width: 0; }
.card[data-orient="h"] { grid-column: span 3; }
.card[data-wide] { grid-column: 1 / -1; }
.card[data-wide] .frame { aspect-ratio: 21 / 9; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-4 .card { grid-column: span 1; }

.card-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.frame {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--frame);
  transition: opacity .35s ease;
}
.card[data-orient="h"] .frame { aspect-ratio: 16 / 9; }
.frame img,
.frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}
.frame video { opacity: 0; transition: opacity .3s ease; }
.frame.live video { opacity: 1; }

.cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 10px;
}
.cap-title { font-size: 14px; font-weight: 500; letter-spacing: -.005em; }
.cap-time { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }

/* Pointer devices: the hovered video stays bright, the rest step back. */
@media (hover: hover) and (pointer: fine) {
  .grid:has(.card-btn:hover) .card:not(:has(.card-btn:hover)) .frame { opacity: .32; }
}

.section-audio { margin-top: clamp(72px, 10vw, 128px); }
.section-title {
  margin: 0 0 22px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.noscript { color: var(--mute); }

/* Footer */
.foot { margin-top: clamp(72px, 9vw, 120px); }
.foot-body {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--line);
  padding-block: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 32px);
}
.archive {
  display: inline-flex;
  align-items: baseline;
  gap: .28em;
  width: fit-content;
  font-size: clamp(30px, 5.4vw, 72px);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -.03em;
  line-height: 1;
  text-wrap: balance;
}
.archive span { font-weight: 400; transition: transform .2s ease; }
.archive:hover span { transform: translate(.08em, -.08em); }
.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
}
.contacts a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 500;
}
.contacts a:hover { color: var(--mute); }
.copy { margin: 0; color: var(--mute); font-size: 12px; white-space: nowrap; }

/* Viewer */
.viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  --fg: #ecebe7;
  --mute: #8d8c88;
  color: var(--fg);
  color-scheme: dark;
  overflow: hidden;
}
.viewer::backdrop { background: #000; }
.viewer-inner {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.viewer-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px var(--pad);
  min-height: 72px;
}
.film-title { margin: 0; font-size: 15px; font-weight: 500; }
.film-count { color: var(--mute); font-size: 12px; font-variant-numeric: tabular-nums; }
.close {
  margin-left: auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #3a3a39;
  border-radius: 50%;
  background: none;
}
.close svg { width: 20px; height: 20px; }
.close:hover, .viewer-nav button:hover { background: #ffffff14; }
.stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad);
}
.stage video { width: 100%; height: 100%; object-fit: contain; background: transparent; }
.stage:fullscreen { background: #000; padding: 0; }
.stage:-webkit-full-screen { background: #000; padding: 0; width: 100%; height: 100%; }

/* Harder to save: no long-press menu, no dragging the video out, no selecting. */
video, .frame img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.frame video, .frame img { pointer-events: none; }

/* Watermark over the playing video. It moves now and then, so it can't be cropped out of a recording. */
.mark-overlay {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
  color: #fff;
  opacity: .34;
  font-size: clamp(12px, 1.4vw, 16px);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: .04em;
  white-space: nowrap;
  text-shadow: 0 1px 2px #0008;
  transition: opacity .6s ease;
}
.mark-overlay:empty { display: none; }
.fs {
  margin-left: auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #3a3a39;
  border-radius: 50%;
  background: none;
}
.fs svg { width: 18px; height: 18px; }
.fs:hover { background: #ffffff14; }
.fs:not([hidden]) + .close { margin-left: 0; }
.playback-note {
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 14px;
  background: #1a1a19f0;
  font-size: 13px;
  text-align: center;
  width: max-content;
  max-width: 90%;
}
.playback-note a { text-decoration: underline; text-underline-offset: 3px; }
.viewer-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 14px var(--pad) 18px;
}
.viewer-nav button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #3a3a39;
  border-radius: 999px;
  background: none;
  font-size: 13px;
}
.viewer-nav svg { width: 18px; height: 18px; }

/* Tablet and phone */
@media (max-width: 760px) {
  :root { --gap-x: 8px; --gap-y: 22px; }
  .top { min-height: 60px; gap: 14px; }
  .mark { font-size: 21px; }
  .grid, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { grid-column: span 1; }
  .card[data-orient="h"] { grid-column: span 2; }
  .card[data-wide] .frame { aspect-ratio: 16 / 9; }
  .cap { padding-top: 8px; }
  .cap-title { font-size: 13px; }
  .foot-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .copy { padding-bottom: 0; }
  .viewer-top { min-height: 60px; padding-block: 8px; }
  .stage { padding: 0; }
  .viewer-nav { padding-block: 10px 12px; }
}
@media (max-width: 360px) {
  .tagline { font-size: 12px; }
  .top-contact { font-size: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .viewer-top { min-height: 48px; padding-block: 2px; }
  .viewer-nav { padding-block: 4px 6px; }
  .viewer-nav button, .close { min-height: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
