/* Gallery-specific styles; the homepage keeps its existing design. */
.gallery-intro {
  text-align: center;
  padding-block: 65px 42px;
  max-width: 760px;
}
.gallery-intro h1 {
  font-size: clamp(42px, 5vw, 64px);
  margin-bottom: 22px;
}
.gallery-intro .gallery-description {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 0;
}
.work-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 65px;
  max-width: 1040px;
}
.work-photo {
  margin: 0;
}
.work-photo img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.work-photo figcaption {
  padding-top: 12px;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--sage-dark);
}
.gallery-invitation {
  border-top: 1px solid var(--line);
  text-align: center;
  padding-block: 42px 60px;
}
.gallery-invitation p {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 14px;
}
.navigation a[aria-current="page"] {
  color: var(--sage);
  text-decoration: underline;
  text-underline-offset: 6px;
}
@media (max-width: 600px) {
  .gallery-intro {
    padding-block: 45px 32px;
  }
  .work-gallery {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 40px;
  }
  .gallery-invitation {
    padding-block: 30px 45px;
  }
}

.work-photo-link {
  display: block;
  border-radius: 4px;
  cursor: zoom-in;
}
.gallery-invitation .text-link {
  display: table;
  margin-inline: auto;
  position: relative;
  padding: 5px 30px;
  text-align: center;
}
.gallery-invitation .text-link .arrow-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-open {
  overflow: hidden;
}
#work-lightbox {
  width: min(920px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
}
#work-lightbox::backdrop {
  background: rgba(26, 35, 27, 0.8);
}
.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}
.lightbox-header h2 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.5px;
}
#work-lightbox button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--cream);
  color: var(--sage-dark);
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
}
#work-lightbox button:hover {
  background: var(--sage-pale);
}
.lightbox-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  touch-action: pan-y pinch-zoom;
}
#lightbox-photo {
  max-height: calc(100dvh - 240px);
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.lightbox-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
}
#lightbox-counter {
  font-size: 13px;
  margin: 0;
  min-width: 95px;
  text-align: center;
}
#lightbox-help {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
}
@media (max-width: 600px) {
  #work-lightbox {
    padding: 16px;
  }
  .lightbox-header h2 {
    font-size: 26px;
  }
  #lightbox-photo {
    max-height: calc(100dvh - 220px);
  }
}
