/* ===== GALLERY HERO BANNER ===== */
.gallery-hero {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  overflow: hidden;
}
.gallery-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 8, 0.1) 0%,
    rgba(10, 10, 8, 0.3) 50%,
    rgba(10, 10, 8, 0.85) 100%
  );
}
.gallery-hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0 clamp(2rem, 5vw, 6rem) clamp(2rem, 5vh, 4rem);
  z-index: 2;
}
.gallery-hero-eyebrow {
  font-family: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-accent);
  opacity: 0.85;
  margin-bottom: 0.8rem;
}
.gallery-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.gallery-hero-title span {
  font-family: var(--font-serif-tc);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  color: var(--color-text-muted);
  display: block;
  margin-top: 0.5rem;
  letter-spacing: 0.15em;
  text-wrap: pretty;
}

/* ===== BACK LINK ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.2rem;
  margin: 2rem clamp(2rem, 5vw, 6rem);
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  border: 1px solid rgba(200, 168, 130, 0.25);
  border-radius: 999px;
  transition: all 0.3s;
}
.back-link:hover { color: var(--color-accent); border-color: var(--color-accent); background: rgba(200, 168, 130, 0.06); }
.back-link svg { width: 16px; height: 16px; }

/* ===== MASONRY GALLERY ===== */
.gallery-section {
  padding: 0 clamp(2rem, 5vw, 6rem) 4rem;
}
.gallery-grid {
  columns: 3;
  column-gap: 1rem;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.gallery-item img {
  width: 100%;
  display: block;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(200, 168, 130, 0.06);
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.03);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 10, 8, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  cursor: zoom-out;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
  transform: scale(0.9);
  transition: transform 0.4s ease;
}
.lightbox.active img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10000;
  width: 44px; height: 44px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
}
.lightbox-close:hover { color: var(--color-accent); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  transition: color 0.3s;
  z-index: 10000;
}
.lightbox-nav:hover { color: var(--color-accent); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .gallery-grid { columns: 2; }
}
@media (max-width: 768px) {
  .gallery-grid { columns: 1; gap: 0.5rem; }
  .gallery-item { margin-bottom: 0.5rem; }
  .gallery-hero { height: 50vh; min-height: 300px; }
  .gallery-hero-title { font-size: clamp(2rem, 8vw, 4rem); }
  .lightbox-nav { font-size: 1.5rem; padding: 0.5rem; min-height: 44px; min-width: 44px; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}
@media (max-width: 480px) {
  .gallery-hero-title { font-size: 2rem; }
  .gallery-section { padding: 0 1.2rem 3rem; }
  .back-link { margin: 1.5rem 1.2rem; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .gallery-item { opacity: 1; transform: none; }
}
