/* ============== GALLERY PAGE STYLES ============== */

/* Top padding so header doesn't cover the intro */
.gallery-page .site-main { padding-top: 120px; }

.gallery-intro {
  padding: var(--s-16) 0 var(--s-12);
}

.gallery-section {
  padding: 0 0 var(--s-24);
}

/* Masonry via CSS columns. Simple, robust, no JS required. */
.gallery-grid {
  column-count: 3;
  column-gap: var(--s-4);
}
@media (max-width: 1024px) {
  .gallery-grid { column-count: 2; }
}
@media (max-width: 640px) {
  .gallery-grid { column-count: 1; }
}

.gallery-loading {
  color: var(--bone-2);
  text-align: center;
  padding: var(--s-16) 0;
  font-style: italic;
}

.gallery-item {
  display: block;
  position: relative;
  width: 100%;
  margin: 0 0 var(--s-4);
  break-inside: avoid;
  background: oklch(0.06 0.01 250);
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid oklch(1 0 0 / 0.06);
  transition: transform 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.gallery-item:hover {
  transform: translateY(-2px);
  border-color: oklch(from var(--gold) l c h / 0.35);
  box-shadow: 0 12px 32px oklch(0 0 0 / 0.4);
}

.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.gallery-item .gi-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--s-6) var(--s-4) var(--s-3);
  background: linear-gradient(to top, oklch(0 0 0 / 0.85), oklch(0 0 0 / 0));
  color: var(--bone);
  font-size: var(--text-xs);
  letter-spacing: 0.01em;
  line-height: 1.45;
  opacity: 0;
  transition: opacity 250ms var(--ease);
  pointer-events: none;
}
.gallery-item:hover .gi-overlay,
.gallery-item:focus-visible .gi-overlay {
  opacity: 1;
}

.gallery-item .gi-video-badge {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  background: oklch(0.06 0.01 250 / 0.85);
  color: var(--gold);
  border: 1px solid oklch(from var(--gold) l c h / 0.4);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.gallery-item .gi-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.gallery-item .gi-play svg {
  width: 56px;
  height: 56px;
  fill: oklch(1 0 0 / 0.92);
  filter: drop-shadow(0 4px 12px oklch(0 0 0 / 0.5));
  transition: transform 250ms var(--ease);
}
.gallery-item:hover .gi-play svg { transform: scale(1.08); }

/* ============== LIGHTBOX ============== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-8) var(--s-4);
  background: oklch(0.03 0.005 250 / 0.96);
  backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }

.lightbox-stage {
  flex: 1 1 auto;
  max-width: min(1400px, 96vw);
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.lightbox-stage img,
.lightbox-stage video {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.6);
}

.lightbox-caption {
  margin: var(--s-5) auto 0;
  max-width: 72ch;
  color: var(--bone);
  text-align: center;
  font-size: var(--text-sm);
  line-height: 1.6;
  padding: 0 var(--s-4);
}
.lightbox-count {
  margin: var(--s-2) 0 0;
  color: var(--bone-2);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: oklch(0.06 0.01 250 / 0.85);
  color: var(--bone);
  border: 1px solid oklch(1 0 0 / 0.14);
  cursor: pointer;
  font-family: inherit;
  transition: background 200ms, border-color 200ms, color 200ms, transform 200ms;
}
.lightbox-close {
  top: var(--s-4);
  right: var(--s-4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
}
.lightbox-prev { left: var(--s-4); }
.lightbox-next { right: var(--s-4); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: oklch(0.1 0.02 250 / 0.92);
  border-color: oklch(from var(--gold) l c h / 0.55);
  color: var(--gold);
}
.lightbox-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(2px); }

@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
  .lightbox-stage,
  .lightbox-stage img,
  .lightbox-stage video {
    max-height: 60vh;
  }
}

/* Lock body scroll when lightbox is open */
body.lightbox-open {
  overflow: hidden;
}
