/* ============================================================
   PICTURES PAGE
   ============================================================ */

/* ---- Page Hero — video lives only inside the hero ---- */
.pictures-hero {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 38vh;
  display: flex;
  align-items: flex-end;
  background: var(--bg);
}

.pictures-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}

.pictures-hero-text {
  position: relative;
  z-index: 1;
}

.pictures-hero-title {
  font-size: clamp(4rem, 10vw, 12rem);
  line-height: 0.88;
  color: var(--text);
}

/* ---- Photo Grid — contact-sheet style: cells touch, zero gap ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
}

.photo-cell {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg-card);
  outline: 1px solid var(--border);
}

.photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.4s ease;
  filter: grayscale(15%) brightness(0.92);
}

.photo-cell:hover img {
  transform: scale(1.04);
  filter: grayscale(0%) brightness(1);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.82);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-cell:hover .photo-overlay {
  opacity: 1;
}

.photo-caption {
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  color: #f0ebe0;
  text-transform: uppercase;
  line-height: 1.6;
}

.photo-cat-tag {
  font-size: 0.48rem;
  letter-spacing: 0.3em;
  color: #7aafc8;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(236, 242, 252, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

/* Blurred image background layer (visible on image hover) */
.lightbox-blur-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(60px) saturate(1.3);
  transform: scale(1.12);
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 0;
}

.lightbox.img-hover .lightbox-blur-bg {
  opacity: 0.55;
}

.lightbox-img,
.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-caption,
.lightbox-counter {
  position: relative;
  z-index: 1;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.5rem;
  z-index: 2;
}

.lightbox-close:hover { color: var(--text); }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 1rem;
  z-index: 2;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover { color: var(--accent-blue); }

.lightbox-caption {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 2;
}

.lightbox-counter {
  position: fixed;
  top: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

/* Hidden filter state */
.photo-cell[data-hidden="true"] {
  display: none;
}

@media (max-width: 1024px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .pictures-hero {
    min-height: 28vh;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}
