.site-nav a[aria-current="page"] {
  color: var(--amber);
  text-decoration-color: currentColor;
}

.gallery-intro, .gallery-section {
  padding-block: clamp(2.75rem, 5vw, 5rem);
}

.gallery-intro h1 {
  margin-top: .85rem;
  font-size: clamp(2.7rem, 6vw, 5.75rem);
  letter-spacing: -.055em;
}

.gallery-intro h1 em, .gallery-intro a, .gallery-intro a:hover {
  color: var(--gold);
}

.gallery-intro a:hover {
  text-decoration-thickness: 2px;
}

.gallery-jump {
  display: inline-block;
  margin-top: .9rem;
}

.gallery-description {
  max-width: 62ch;
  margin-top: .75rem;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: clamp(.65rem, 1.5vw, 1.4rem);
  margin-top: clamp(1.2rem, 3vw, 2.25rem);
  align-items: start;
}

.photo-gallery-pair {
  max-width: 55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-gallery a {
  display: block;
  cursor: zoom-in;
}

.photo-gallery img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.photo-gallery .photo-fit-full {
  object-fit: contain;
  background: var(--cream);
}

.photo-gallery figcaption {
  font-size: .9rem;
  line-height: 1.3;
  letter-spacing: .025em;
  text-transform: none;
}

body:has(.photo-viewer[open]) {
  overflow: hidden;
}

.photo-viewer {
  width: min(56rem, calc(100% - 1.25rem));
  max-height: calc(100vh - 1.25rem);
  max-height: calc(100dvh - 1.25rem);
  padding: clamp(.75rem, 2.5vw, 1.5rem);
  border: 1px solid var(--line);
  color: var(--chocolate);
  background: var(--paper);
}

.photo-viewer::backdrop {
  background: rgb(56 37 28 / 88%);
}

.photo-viewer-top, .photo-viewer-controls, .photo-viewer-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem .75rem;
}

.photo-viewer-top h2 {
  font-size: clamp(1.25rem, 3vw, 1.85rem);
}

.photo-viewer .button {
  margin-top: 0;
  cursor: pointer;
}

.photo-viewer figure {
  margin-block: .75rem;
}

.photo-viewer img {
  width: 100%;
  height: min(60vh, 38rem);
  height: min(60dvh, 38rem);
  object-fit: contain;
  background: var(--cream);
}

.photo-viewer-caption {
  margin-top: .5rem;
  color: var(--muted);
  font-size: 1rem;
}

@media (width > 64rem) {
  .photo-gallery-cestas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  .photo-gallery {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  }
}

@media (max-width: 23rem) {
  .photo-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}
