:root {
  --black: #000000;
  --white: #ffffff;
  --gray: #999999;
  --media: #0d0d0d;

  --display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --text: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --nav-h: 48px;
  --edge: 25px;
  --gap: 20px;
  --gutter: 6px;
  --section-gap: 72px;
  --space-xl: 144px;
  --radius-media: 15px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
  accent-color: var(--white);
  scrollbar-color: #333333 var(--black);
}
@media (max-width: 640px) {
  :root { --edge: 16px; --gap: 12px; --space-xl: 104px; }
}

*, *::before, *::after { box-sizing: border-box; }

::selection { background: var(--white); color: var(--black); }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

/* Every interface label is the same 14px tracked uppercase index line; the serif is reserved for display. */
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 0.875rem/1.3 var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  caret-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button {
  padding: 0;
  border: 0; border-radius: 0;
  background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: inherit;
  cursor: pointer;
}
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
h3 { font: inherit; }

:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }

.lockup, .info-statement, .info-bio, .info-cta {
  font-family: var(--display);
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.text-link,
.site-nav a:hover, .site-nav a[aria-current="true"],
.filters button:hover, .filters button[aria-pressed="true"],
.index a:hover, .site-footer a:hover, .dialog-bar button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.tabular { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed; top: 0; left: var(--edge); z-index: 100;
  padding: 15px 12px;
  background: var(--white); color: var(--black);
  transform: translateY(-100%);
}
.skip-link:focus { transform: none; }

/* ---------- navigation ---------- */

/* Transparent, like a projection: two links either side, the centre left for the pinned title. */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  pointer-events: none;
}
.site-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  height: 100%;
  padding: 0 var(--edge);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.35);
}
.site-nav a { justify-self: start; padding: 15px 0; white-space: nowrap; pointer-events: auto; }
.site-nav a:nth-child(n + 3) { justify-self: end; }
.nav-short { display: none; }
@media (max-width: 640px) {
  /* Phones: the links move to a black bar at the bottom of the screen. */
  .site-header { inset: auto 0 0; background: var(--black); pointer-events: auto; }
  .site-nav { display: flex; justify-content: space-between; text-shadow: none; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  body { padding-bottom: var(--nav-h); }
  html { scroll-padding-top: 0; }
}

/* ---------- opening ---------- */

.hero {
  position: relative;
  min-height: max(560px, 100svh);
  overflow: hidden;
  isolation: isolate;
}
.hero-video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  animation: hero-settle 2.8s var(--ease-out) both;
}
@keyframes hero-settle { from { transform: scale(1.06); } }
.hero-fade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.4) 46%, var(--black) 96%);
}

/* The title: huge at the foot of the opening, then shrinks and pins to the top centre as you scroll.
   site.js sets --lockup-size once per resize and --lockup-y / --lockup-s each frame. */
.lockup {
  --lockup-size: min(27vw, 33svh);
  position: fixed; top: 0; left: 50%; z-index: 45;
  font-size: var(--lockup-size);
  line-height: 0.84;
  letter-spacing: -0.025em;
  text-align: center;
  white-space: nowrap;
  transform-origin: 50% 0;
  transform: translate3d(-50%, var(--lockup-y, calc(100svh - 96px - 1.68 * var(--lockup-size))), 0) scale(var(--lockup-s, 1));
  transition: opacity 300ms ease;
  pointer-events: none;
}
.lockup a { display: block; pointer-events: auto; }
.lockup span { display: block; }
.lockup-note {
  position: fixed; left: 50%; top: var(--note-y, 110px); z-index: 45;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
}
.is-pinned .lockup-note { opacity: 1; }
.is-lockup-away .lockup, .is-lockup-away .lockup-note { opacity: 0; }
.is-lockup-away .lockup a { pointer-events: none; }

.hero-captions {
  position: absolute; left: var(--edge); right: var(--edge); bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.hero-captions button { padding: 13px 0; }
.text-link .tabular { display: inline-block; margin-left: 0.6em; color: var(--gray); }
@media (max-width: 640px) {
  /* Phones are too narrow for a pinned description, so it sits at the top of the opening and scrolls away. */
  .lockup-note { position: absolute; top: 20px; opacity: 1; white-space: normal; width: max-content; max-width: calc(100vw - 2 * var(--edge)); }
  .hero-captions { bottom: calc(var(--nav-h) + 4px); }
}

/* Reduced motion: the title stays put at the foot of the opening instead of following the scroll. */
.is-static-lockup .lockup { position: absolute; transition: none; }
.is-static-lockup .lockup-note { position: absolute; opacity: 1; }

/* ---------- sections ---------- */

.section { padding: var(--space-xl) var(--edge) 0; }
.section-label {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  margin-bottom: var(--gap);
}
.section-label h2 { font: inherit; }
.section-label p { color: var(--gray); }
.section-label .filters { grid-column: 3 / 5; justify-content: flex-end; }
@media (max-width: 640px) {
  .section-label { display: flex; flex-wrap: wrap; gap: 0 16px; }
  .section-label p { display: none; }
  .section-label .filters { width: 100%; justify-content: flex-start; }
}

/* ---------- films ---------- */

.film-modules {
  container-type: inline-size;
  display: grid; justify-items: center;
  row-gap: var(--section-gap);
}

/* A pair of vertical films shares one rounded crop; the edge between them stays hard. */
.film-pair {
  --pane: min(calc((100svh - var(--nav-h) - 96px) * 9 / 16), calc((100cqi - var(--gutter)) / 2), 560px);
  display: grid;
  grid-template-columns: repeat(2, var(--pane));
  gap: var(--gutter);
  border-radius: var(--radius-media);
  overflow: hidden;
}
.film-pair--single { grid-template-columns: var(--pane); }
.film-wide {
  width: min(100%, calc((100svh - var(--nav-h) - 96px) * 16 / 9));
  border-radius: var(--radius-media);
  overflow: hidden;
}

.film-card { position: relative; display: block; width: 100%; text-align: left; }
.film-card:focus-visible { outline-offset: -6px; }
.film-media { position: relative; display: block; background: var(--media); }
.film-media img, .film-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.film-media video { opacity: 0; transition: opacity 400ms ease; }
.film-card.is-previewing video { opacity: 1; }

/* ---------- photographs ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0 24px; }
.filters button { padding: 13px 0; }
.is-filtered-out { display: none !important; }

/* Justified rows: each photo grows in proportion to its aspect ratio, so every row shares one height. */
.photo-list {
  --row: clamp(200px, 30vw, 440px);
  display: flex; flex-wrap: wrap;
  gap: var(--gutter);
}
.photo-list::after { content: ""; flex: 1000000 1 0; }
.photo { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * var(--row)); }
/* Hover, measured from BAM: the card eases down to 95% as its corners round off, while the photo
   inside pushes in to 110%. Long, soft ease-out both ways (half the distance every ~110ms).
   Transforms keep it on the compositor; the hover sits on .photo, which never shrinks, so the edge
   can't slip out from under the cursor. */
.photo-link {
  --hover-ease: cubic-bezier(0.25, 1, 0.5, 1);
  display: block;
  background: var(--media);
  cursor: zoom-in;
  clip-path: inset(0 round 0);
  transition: transform 900ms var(--hover-ease), clip-path 900ms var(--hover-ease);
}
.photo-link:focus-visible { outline-offset: -6px; }
.photo-link img {
  width: 100%; height: auto;
  aspect-ratio: var(--ar);
  object-fit: cover;
  transition: transform 900ms var(--hover-ease);
}
@media (hover: hover) {
  .photo-link, .photo-link img { will-change: transform; }
  .photo:hover .photo-link, .photo-link:focus-visible { transform: scale(0.95); clip-path: inset(0 round 32px); }
  .photo:hover .photo-link img, .photo-link:focus-visible img { transform: scale(1.1); }
}

/* ---------- info ---------- */

.info { padding-bottom: var(--space-xl); }
.info-statement { max-width: 11em; font-size: clamp(2.8rem, 7vw, 6.5rem); line-height: 0.98; }
.info-bio {
  max-width: 30em;
  margin-top: 40px;
  font-size: clamp(1.375rem, 2.2vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 0;
  margin-top: var(--space-xl);
}
.index > div { padding-right: var(--gap); }
.index h3 { margin-bottom: 14px; color: var(--gray); }
.index a { display: inline-block; padding: 4px 0; }
.index li:not(:has(a)) { padding: 4px 0; }
@media (max-width: 1279px) { .index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .index { grid-template-columns: 1fr; } }
.info-cta {
  max-width: 15em;
  margin-top: var(--space-xl);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.04;
}
.info-cta a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  transition: color 200ms ease;
}
.info-cta a:hover { color: var(--gray); }

/* ---------- footer ---------- */

.site-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  min-height: var(--nav-h);
  padding: 0 var(--edge);
}
.site-footer > :last-child { justify-self: end; }
.site-footer a { padding: 15px 0; }
@media (max-width: 640px) {
  .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 12px; }
  .site-footer > :nth-child(2n) { justify-self: end; }
  .site-footer > span { padding: 15px 0; }
}

/* ---------- dialogs ---------- */

dialog {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: var(--black);
  color: var(--white);
  overflow: hidden;
}
dialog::backdrop { background: var(--black); }
dialog[open] { animation: dialog-in 240ms var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; } }

.dialog-bar {
  position: absolute; inset: 0 0 auto; z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  height: var(--nav-h);
  padding: 0 var(--edge);
}
.dialog-bar > * { min-width: 0; }
.player-title, .player-sub {
  padding-right: var(--gap);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-sub { color: var(--gray); }
.dialog-nav { display: flex; gap: 24px; }
.dialog-nav button, .dialog-close { padding: 15px 0; }
.dialog-close { justify-self: end; }
@media (max-width: 640px) {
  .dialog-bar { grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; }
  .player-sub, .dialog-bar > span:empty { display: none; }
}

.player-inner {
  display: grid; place-items: center;
  height: 100%;
  padding: calc(var(--nav-h) + 8px) var(--edge) 24px;
}
.player-stage { display: grid; place-items: center; width: 100%; min-height: 0; }
.player-video {
  aspect-ratio: var(--ar, 16 / 9);
  width: min(100%, calc((100svh - var(--nav-h) - 48px) * var(--ar-num, 1.7778)));
  height: auto;
  background: var(--black);
}

/* Photo viewer */
.viewer { cursor: default; }
.viewer-stage {
  position: absolute; inset: 0;
  overflow: hidden;
  transition: transform 650ms var(--ease-out);
}
.viewer-slide {
  position: absolute; inset: 20px 110px;
  width: calc(100% - 220px); height: calc(100% - 40px);
  object-fit: contain;
}
.is-showing-all .viewer-stage { transform: translateY(-10%) scale(0.6); }

.viewer-mark {
  position: absolute; top: 10px; left: 50%; z-index: 3;
  transform: translateX(-50%);
  font: 400 50px/0.84 var(--display);
  letter-spacing: -0.025em;
  text-transform: none;
  text-align: center;
  opacity: 0.4;
  pointer-events: none;
}
.viewer-mark span { display: block; }

.viewer-zone {
  position: absolute; top: 0; bottom: 0; z-index: 2;
  width: 50%;
}
.viewer-prev { left: 0; cursor: w-resize; }
.viewer-next { right: 0; cursor: e-resize; }
.viewer-zone:focus-visible { outline-offset: -8px; }

.viewer-showall, .viewer-label, .viewer-count, .viewer-close {
  position: absolute; z-index: 4;
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.45);
}
.viewer-showall { top: 0; left: var(--edge); padding: 15px 0; }
.viewer-showall:hover, .viewer-showall[aria-expanded="true"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.viewer-label, .viewer-count { top: 50%; transform: translateY(-50%); pointer-events: none; }
.viewer-label { left: var(--edge); }
.viewer-count { right: var(--edge); }
.viewer-close {
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  min-height: 44px; padding: 0 20px;
  border: 1px solid currentColor; border-radius: 999px;
  text-shadow: none;
  background: rgba(0, 0, 0, 0.35);
  transition: background-color 200ms ease, color 200ms ease;
}
.viewer-close:hover { background: var(--white); color: var(--black); }

.viewer-strip {
  position: absolute; left: 0; right: 0; bottom: 78px; z-index: 4;
  display: flex; gap: var(--gutter);
  padding: 0 var(--edge);
  overflow-x: auto;
  scrollbar-width: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.viewer-strip::-webkit-scrollbar { display: none; }
.is-showing-all .viewer-strip { opacity: 1; pointer-events: auto; }
.viewer-thumb { flex: none; height: 92px; opacity: 0.5; transition: opacity 200ms ease; }
.viewer-thumb img { height: 100%; width: auto; }
.viewer-thumb:hover, .viewer-thumb[aria-current="true"] { opacity: 1; }
.viewer-thumb[aria-current="true"] { outline: 1px solid var(--white); outline-offset: 3px; }
.viewer-thumb:focus-visible { outline-width: 2px; }

@media (max-width: 640px) {
  .viewer-slide { inset: 64px 12px 84px; width: calc(100% - 24px); height: calc(100% - 148px); }
  .viewer-mark { font-size: 30px; }
  .viewer-label, .viewer-count { top: auto; bottom: 30px; transform: none; }
  .viewer-strip { bottom: 76px; }
  .viewer-thumb { height: 72px; }
  .is-showing-all .viewer-stage { transform: translateY(-12%) scale(0.62); }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { animation: none; }
  .lockup, .lockup-note { transition: none; }
  .film-media video { transition: none; }
  dialog[open] { animation: none; }
  .photo-link, .photo-link img, .viewer-stage, .viewer-strip { transition: none; }
}
