/* ============================================================================
   PHOTOGRAPHY — a curated exhibition. An art-directed wall with intentional
   asymmetry and long silences of space, then a room-sized lightbox.
   ============================================================================ */

.exhibition { padding-block: var(--section); position: relative; }
.exhibition__intro { margin-bottom: clamp(3.5rem, 9vh, 8rem); }
.exhibition__heading {
  font-family: var(--f-display); font-weight: var(--w-thin);
  font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 18ch; margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}
.exhibition__note { color: var(--c-ink-dim); }

/* ── The wall — a hung exhibition, not a grid of thumbnails ──────────────────── */
.exhibition__wall {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: var(--gutter);
  row-gap: clamp(3rem, 9vh, 8rem);
  align-items: start;
}

/* Layout-driven, not position-driven, so any order of photos composes well.
   "wide" photographs break full-bleed and set the rhythm of the room. */
.plate { position: relative; }
.plate--wide { grid-column: 1 / -1; }
.plate--tall, .plate--reg { grid-column: span 1; }

.plate__img {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--c-void-2);
  transition: transform var(--d-3) var(--e-out);
}
.plate--tall .plate__img { aspect-ratio: 4 / 5; }
.plate--wide .plate__img { aspect-ratio: 16 / 9; }
.plate--reg  .plate__img { aspect-ratio: 1 / 1; }

/* The frame inside scales; the plate clips. */
.plate__img { position: relative; }
.plate__img > * { position: absolute; inset: 0; }
.plate__img::after { transition: transform var(--d-4) var(--e-out); }
.plate:hover .plate__img::before,
.plate:hover .plate__img::after { transform: scale(1.05); }
.plate__img { will-change: transform; }
.plate:hover .plate__img { transform: scale(1.012); }

.plate__cap {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-top: 1rem;
}
.plate__cap-title { font-family: var(--f-sans); font-size: var(--fs-small); color: var(--c-ink); letter-spacing: -0.01em; }
.plate__cap-meta { color: var(--c-ink-mute); white-space: nowrap; }
.plate:hover .plate__cap-title { color: var(--c-ink); }

/* Reveal: plates rise and clip open. */
.plate { opacity: 0; transform: translateY(2.5rem); }
.plate.is-in { opacity: 1; transform: none; transition: opacity var(--d-3) var(--e-out), transform var(--d-3) var(--e-out); }

@media (max-width: 52rem) {
  .exhibition__wall { grid-template-columns: 1fr; }
  .plate { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .plate--tall .plate__img { aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
  .plate { opacity: 1; transform: none; }
  .plate:hover .plate__img, .plate:hover .plate__img::before, .plate:hover .plate__img::after { transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: var(--z-lightbox);
  display: grid; place-items: center;
  padding: clamp(3rem, 8vh, 6rem) clamp(3rem, 10vw, 8rem);
}
.lightbox[hidden] { display: none; }
.lightbox__scrim {
  position: absolute; inset: 0;
  background: rgba(4,5,6,0.985);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity var(--d-2) var(--e-out);
}
.lightbox.is-open .lightbox__scrim { opacity: 1; }

.lightbox__figure {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 1.25rem;
  max-width: 100%;
  opacity: 0; transform: scale(0.98);
  transition: opacity var(--d-2) var(--e-out), transform var(--d-3) var(--e-out);
}
.lightbox.is-open .lightbox__figure { opacity: 1; transform: none; }

.lightbox__img {
  display: block;
  width: min(86vw, 72rem);
  height: min(78vh, 46rem);
  max-width: 100%;
  overflow: hidden;
  transition: transform var(--d-3) var(--e-out);
}
.lightbox__img.is-zoomed { transform: scale(1.6); cursor: zoom-out; }
/* A real photograph is shown whole (never cropped) in the lightbox. */
.lightbox__img[style*="--img"] { background-size: contain !important; background-repeat: no-repeat; background-position: center; }

.lightbox__cap {
  display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap; justify-content: center;
  color: var(--c-ink-dim);
}
.lightbox__cap-title { font-family: var(--f-display); font-style: italic; font-weight: var(--w-thin); font-size: var(--fs-lede); color: var(--c-ink); }
.lightbox__cap-meta { display: inline-flex; gap: 1.25rem; }
.lightbox__cap-meta span { position: relative; }
.lightbox__cap-meta span + span::before {
  content: ""; position: absolute; left: -0.7rem; top: 50%;
  width: 2px; height: 2px; border-radius: 50%; background: currentColor; transform: translateY(-50%); opacity: 0.6;
}

.lightbox__close {
  position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); z-index: 2;
  color: var(--c-ink); mix-blend-mode: difference;
}
.lightbox__close svg { transition: transform var(--d-2) var(--e-out); }
.lightbox__close:hover svg { transform: rotate(90deg); }

.lightbox__nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 3.5rem; height: 3.5rem; display: grid; place-items: center;
  color: var(--c-ink); font-size: 1.4rem; opacity: 0.5;
  transition: opacity var(--d-1) var(--e-out);
}
.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: clamp(0.5rem, 3vw, 2rem); }
.lightbox__nav--next { right: clamp(0.5rem, 3vw, 2rem); }
@media (max-width: 40rem) {
  .lightbox { padding: 4rem 1rem; }
  .lightbox__img { width: 92vw; height: 62vh; }
  .lightbox__nav { top: auto; bottom: 1rem; transform: none; }
}
