/* ════════════════════════════════
   PAGE — gallery.html
   ════════════════════════════════ */

/* ── HEADER ── */
.gallery-header {
  padding: 8rem 0 3rem;
  text-align: center;
  position: relative;
}

.gallery-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(166, 130, 107, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.gallery-header .section-label {
  margin-bottom: 0.75rem;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.gallery-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--warm-black);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.gallery-header .prose {
  animation: fadeUp 0.8s ease 0.7s forwards;
}

/* ── MASONRY GRID ── */
.gallery-grid-section {
  padding: 0 2rem 6rem;
}

.gallery-grid {
  columns: 3 280px;
  column-gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid a {
  display: block;
  break-inside: avoid;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 2px;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.03);
}

.gallery-grid a {
  cursor: zoom-in;
}

@media (max-width: 640px) {
  .gallery-grid {
    columns: 2 160px;
  }
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 13, 11, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 3rem 1.5rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-figure {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin-top: 1rem;
  text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: transparent;
  border: none;
  color: var(--cream);
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2.25rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 2rem;
  }

  .lightbox-close {
    font-size: 1.75rem;
  }
}
