.gallery-hero {
  min-height: 72vh;
  padding-bottom: 2rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.hero-sub {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--muted);
  max-width: 34rem;
  position: relative;
  z-index: 1;
}

.scroll-hint {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-hint {
    animation: bob 2.2s ease-in-out infinite;
  }

  @keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
  }
}

/* Parallax rows */
.gallery {
  position: relative;
  padding-bottom: 6rem;
}

.row-wrap {
  position: relative;
  overflow: hidden;
  padding: 7vh 0;
}

.row-wrap::before,
.row-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(4rem, 12vw, 10rem);
  z-index: 2;
  pointer-events: none;
}

.row-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.row-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

.row {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  padding: 0 3rem;
  will-change: transform;
}

/* Cards */
.art-card {
  flex-shrink: 0;
  width: clamp(320px, 38vw, 480px);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.3s;
}

.art-card:hover {
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.art-frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--accent-light);
}

.art-frame img,
.art-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform 0.5s ease, filter 0.4s ease;
  filter: saturate(0.92);
}

.art-card:hover .art-frame img,
.art-card:hover .art-frame video {
  transform: scale(1.06);
  filter: saturate(1);
}

.art-card figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.95rem;
}

.art-card figcaption strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
}

.art-card figcaption span {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 10, 10, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(6px);
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox {
    animation: fade-in 0.2s ease;
  }

  @keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

.lightbox[hidden] {
  display: none;
}

.lightbox-stage {
  max-width: min(1100px, 92vw);
  text-align: center;
}

.lightbox-stage img,
.lightbox-stage video {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #e8e4df;
}

.lightbox-caption strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

@media (max-width: 600px) {
  .gallery {
    padding-bottom: 3rem;
  }

  .row-wrap {
    overflow: visible;
    padding: 4vh 0;
  }

  .row-wrap::before,
  .row-wrap::after {
    display: none;
  }

  .row {
    flex-direction: column;
    width: auto;
    gap: 1rem;
    padding: 0 1.25rem;
  }

  .art-card {
    width: 100%;
  }

  .art-card figcaption {
    padding: 0.7rem 0.85rem 0.8rem;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 2rem;
  }
}
