/* Supplied photography archive. A masonry flow keeps varied originals tightly composed. */
.gallery-page .gallery-grid {
  display: block;
  column-count: 3;
  column-gap: 1.35rem;
}

.gallery-page .gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.35rem;
  overflow: hidden;
  background: #0b0908;
  aspect-ratio: auto;
  border: 1px solid rgba(199, 163, 106, .24);
  break-inside: avoid;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.gallery-page .gallery-item::after { display: none; }

.gallery-page .gallery-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-page .gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: none;
}

.gallery-page .gallery-item:hover img { transform: none; }
.gallery-page .gallery-trigger:focus-visible { outline: 2px solid var(--gold); outline-offset: -5px; }

.gallery-lightbox {
  width: min(94vw, 1320px);
  max-width: none;
  max-height: 94svh;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(216, 180, 105, .7);
  background: #080706;
  color: var(--ivory);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .75);
}

.gallery-lightbox::backdrop { background: rgba(3, 2, 2, .9); }
.gallery-lightbox[open] { display: grid; place-items: center; }
.gallery-lightbox img { display: block; max-width: 100%; max-height: 88svh; width: auto; height: auto; }
.gallery-lightbox-close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(243, 236, 224, .62);
  border-radius: 50%;
  background: rgba(8, 7, 6, .75);
  color: var(--ivory);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}
.gallery-lightbox-close:hover { border-color: var(--gold); color: var(--gold); }
.gallery-lightbox-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  width: 3.1rem;
  height: 3.1rem;
  place-items: center;
  border: 1px solid rgba(243, 236, 224, .62);
  border-radius: 50%;
  background: rgba(8, 7, 6, .75);
  color: var(--ivory);
  cursor: pointer;
  font: 2.2rem/.7 Georgia, serif;
  transform: translateY(-50%);
}
.gallery-lightbox-prev { left: .85rem; }
.gallery-lightbox-next { right: .85rem; }
.gallery-lightbox-nav:hover { border-color: var(--gold); color: var(--gold); }
.gallery-lightbox-nav:disabled { visibility: hidden; }
.gallery-lightbox-nav:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gallery-lightbox-count {
  position: absolute;
  right: 0;
  bottom: -2rem;
  left: 0;
  margin: 0;
  color: rgba(243, 236, 224, .82);
  font-size: .72rem;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
}

.gallery-page .gallery-item--wide,
.gallery-page .gallery-item--square { grid-column: auto; aspect-ratio: auto; }

@media (max-width: 850px) {
  .gallery-page .gallery-grid { column-count: 2; column-gap: 1rem; }
  .gallery-page .gallery-item { margin-bottom: 1rem; }
}

@media (max-width: 560px) {
  .gallery-page .gallery-grid { column-count: 1; }
  .gallery-page .gallery-item,
  .gallery-page .gallery-item--wide,
  .gallery-page .gallery-item--square {
    grid-column: auto;
    aspect-ratio: auto;
  }
  .gallery-lightbox { width: calc(100vw - 1.5rem); }
  .gallery-lightbox img { max-height: 86svh; }
  .gallery-lightbox-nav { width: 2.75rem; height: 2.75rem; }
  .gallery-lightbox-prev { left: .55rem; }
  .gallery-lightbox-next { right: .55rem; }
}
