*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}
:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --gold: #c9a84c;
  --gold2: #f0d080;
  --pink: #e85d8a;
  --text: #ffffff;
  --dim: rgba(240,236,228,0.45);
  --border: rgba(201,168,76,0.18);
}

html { scroll-behavior: smooth; }

body {
  background: var(--text);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(201,168,76,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(232,93,138,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── HEADER ── */
.gallery-header {
  position: relative;
  text-align: center;
  padding: 80px 20px 60px;
  z-index: 1;
}

.gallery-header::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gold));
}

.gallery-hed {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.35em;
  color: transparent;
  background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 50%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-transform: uppercase;
  display: inline-block;
  animation: fadeDown 1s ease both;
}

.gallery-hed-line {
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto 0;
  animation: expandLine 1.2s ease 0.5s both;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes expandLine {
  from { width: 0; opacity: 0; }
  to   { width: 80px; opacity: 1; }
}

/* ── GALLERY SECTION ── */
.gallery {
  position: relative;
  z-index: 1;
  padding: 0 40px 100px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── GRID ── */
.image-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ── IMAGE CARD ── */
.image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);

  opacity: 0;
  transform: translateY(40px) scale(0.97);
  animation: cardReveal 0.7s ease both;
}

@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(232,93,138,0.1));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
}

.image:hover::before { opacity: 1; }

.image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image:hover img { transform: scale(1.08); }

/* Overlay on hover */
.image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 2;
}

.image:hover .image-overlay { opacity: 1; }

.zoom-icon {
  width: 54px; height: 54px;
  border: 1px solid rgba(201,168,76,0.7);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  background: rgba(10,10,15,0.5);
  transform: scale(0.7);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.image:hover .zoom-icon {
  transform: scale(1);
}

.zoom-icon svg { width: 22px; height: 22px; }

/* Gold corner accents */
.image::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid transparent;
  border-image: linear-gradient(135deg, rgba(201,168,76,0.5), transparent 40%, transparent 60%, rgba(232,93,138,0.4)) 1;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 3;
  pointer-events: none;
}

.image:hover::after { opacity: 1; }

/* Stagger delays */
.image:nth-child(1)  { animation-delay: 0.1s; }
.image:nth-child(2)  { animation-delay: 0.18s; }
.image:nth-child(3)  { animation-delay: 0.26s; }
.image:nth-child(4)  { animation-delay: 0.34s; }
.image:nth-child(5)  { animation-delay: 0.42s; }
.image:nth-child(6)  { animation-delay: 0.50s; }
.image:nth-child(7)  { animation-delay: 0.58s; }
.image:nth-child(8)  { animation-delay: 0.66s; }
.image:nth-child(9)  { animation-delay: 0.74s; }
.image:nth-child(n+10) { animation-delay: 0.82s; }

/* ── LIGHTBOX ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,10,0.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  backdrop-filter: blur(12px);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 88vw;
  max-height: 84vh;
  object-fit: contain;
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.1),
    0 40px 80px rgba(0,0,0,0.8),
    0 0 60px rgba(201,168,76,0.06);
  transform: scale(0.88);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34,1.2,0.64,1), opacity 0.35s;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
  opacity: 1;
}

/* Close */
.lb-close {
  position: fixed;
  top: 24px; right: 28px;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  background: rgba(18,18,26,0.8);
  color: var(--gold);
  font-size: 22px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
  z-index: 10000;
}
.lb-close:hover {
  background: var(--gold);
  color: var(--bg);
  transform: rotate(90deg);
}

/* Nav arrows */
.lb-nav {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px;
  border: 1px solid var(--border);
  background: rgba(18,18,26,0.7);
  color: var(--gold);
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
  z-index: 10000;
  user-select: none;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-nav:hover {
  background: var(--gold);
  color: var(--bg);
}

/* Counter */
.lb-counter {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--dim);
  letter-spacing: 0.3em;
  z-index: 10000;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--dim);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  grid-column: 1/-1;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .gallery { padding: 0 16px 80px; }
  .image-container { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  .lb-nav { width: 40px; height: 40px; font-size: 16px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

@media (max-width: 480px) {
  .image-container { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery { padding: 0 10px 60px; }
}
