/* ============================================
   Leaves — unlisted gallery.
   Site tokens; scoped to this page.
   ============================================ */

.gallery-container { max-width: 1040px; }

.gallery-note {
  color: var(--color-muted);
  font-style: italic;
  margin-top: var(--space-md);
}

/* Masonry via CSS columns — keeps mixed portrait/landscape from gapping. */
.plates {
  columns: 3;
  column-gap: var(--space-md);
}

.plate {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 320ms ease, transform 320ms ease;
}

.plate img {
  display: block;
  width: 100%;
  height: auto;
}

@media (hover: hover) {
  .plate:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
}

.plate:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(12, 10, 8, 0.93);
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 2px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-lg);
  font-family: var(--font-sans);
  font-size: 1.9rem;
  line-height: 1;
  color: #E8E0D4;
  background: none;
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 200ms ease;
}

.lightbox-close:hover { opacity: 1; }

@media (max-width: 900px) { .plates { columns: 2; } }
@media (max-width: 560px) { .plates { columns: 1; } }

/* --- Epigraph --- */
.gallery-epigraph {
  margin-top: var(--space-lg);
  padding-left: var(--space-md);
  border-left: 1px solid var(--color-border);
  max-width: 46ch;
}

.gallery-epigraph p {
  font-style: italic;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.gallery-epigraph cite {
  font-family: var(--font-sans);
  font-style: normal;
  font-variant: all-small-caps;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--color-muted);
}
