/* ---------- Photos page ---------- */
.nav a[aria-current="page"] { color: var(--burgundy); border-bottom: 1px solid var(--gold); }

.photo-head { margin-bottom: 40px; }
.photo-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.photo-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-dark);
  box-shadow: 0 4px 14px rgba(38, 10, 24, 0.12);
  cursor: zoom-in;
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.photo-tile:hover img { transform: scale(1.04); }
.photo-tile:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.photo-note {
  max-width: 640px;
  margin: 44px auto 0;
  text-align: center;
  font-size: 1rem;
  color: #4a2536;
}

/* ---------- Full-size viewer ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr;
  background: #18060f;
  color: var(--cream);
}
.lightbox[hidden] { display: none; }
.lightbox-open { overflow: hidden; }

.lightbox__bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 22px;
}
.lightbox__count {
  margin-right: auto;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--gold-light);
}
.lightbox__download { padding: 10px 26px; }
.lightbox__download.is-busy { opacity: 0.6; pointer-events: none; }

.lightbox__btn {
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}
.lightbox__btn:hover { opacity: 1; }
.lightbox__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lightbox__close { font-size: 2.4rem; padding: 0 8px 4px; }
.lightbox__nav { font-size: 3.6rem; padding: 0 18px 10px; align-self: center; }
.lightbox__nav:disabled { opacity: 0.2; cursor: default; }

.lightbox__stage {
  margin: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 20px;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .photo-tile img { transition: none; }
}

@media (max-width: 720px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .photo-head { margin-bottom: 28px; }

  /* Arrows overlay the photo so it can use the full width */
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__stage { grid-column: 1; grid-row: 2; padding: 0 0 20px; }
  .lightbox__nav {
    grid-row: 2;
    grid-column: 1;
    z-index: 1;
    font-size: 2.8rem;
    padding: 12px 12px 18px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
  }
  .lightbox__nav--prev { justify-self: start; }
  .lightbox__nav--next { justify-self: end; }
}

/* ---------- Event gallery ---------- */
.photo-jump { margin: 0; font-size: 1rem; }
.photo-grid { grid-auto-flow: dense; }
.photo-tile--tall { grid-row: span 2; aspect-ratio: auto; }
#step-repeat, #gallery { scroll-margin-top: 70px; }
.photo-tile--tall img { position: absolute; inset: 0; }
