.gallery {
  background: var(--ink-990);
  padding: 6rem 0;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .gallery {
    padding: 8rem 0;
  }
}

.gallery__header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.gallery__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-400);
  font-size: 0.8125rem;
  margin: 0 0 1rem;
}
.gallery__eyebrow-icon {
  width: 2.25rem;
  height: 2.25rem;
}
.gallery__title {
  font-weight: 600;
  font-size: 3rem;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}
@media (min-width: 1024px) {
  .gallery__title {
    font-size: 3.75rem;
  }
}
.gallery__title-accent {
  font-style: italic;
  font-size: 3rem;
}
@media (min-width: 1024px) {
  .gallery__title-accent {
    font-size: 3.75rem;
  }
}

.gallery__ig-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--ink-700);
  color: var(--ink-100);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 350ms var(--ease-silk);
}
.gallery__ig-icon {
  flex-shrink: 0;
  transition: transform 350ms var(--ease-silk);
}
.gallery__ig-link:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  box-shadow: 0 10px 25px -8px rgba(220, 39, 67, 0.5);
}
.gallery__ig-link:hover .gallery__ig-icon {
  transform: rotate(-8deg) scale(1.1);
}

.gallery__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 2.5rem;
}
.gallery__filter {
  background: transparent;
  border: 1px solid var(--ink-700);
  color: var(--ink-300);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 300ms ease;
}
.gallery__filter:hover {
  color: #fff;
  border-color: var(--gold-500);
}
.gallery__filter.is-active {
  color: var(--ink-990);
  background: var(--gold-400);
  border-color: var(--gold-400);
}

.gallery__empty {
  text-align: center;
  color: var(--ink-400);
  padding: 3rem 1.5rem 0;
}

.gallery__wall {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.gallery__wall > .gallery__row:not(:last-child) {
  margin-bottom: 1rem;
}
.gallery__row {
  display: flex;
  gap: 1rem;
  width: max-content;
}
/* The wall now carries far more tiles than the shared marquee timing (in
   style.css) was tuned for, so the same duration dragged a lot more content
   past in the same time and read as fast/jerky — slow it down here, scoped
   to the gallery only, rather than touching the shared base speed that
   Testimonials also uses. */
.gallery__row--slow { animation-duration: 140s; }
.gallery__row--reverse { animation-duration: 150s; }
.gallery__row[hidden] {
  display: none;
}
.gallery__row-group {
  display: flex;
  gap: 1rem;
  padding-right: 1rem;
  flex-shrink: 0;
}

.gallery__tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  width: 260px;
  height: 360px;
  border-radius: 0.75rem;
  border: 1px solid rgba(38, 38, 44, 0.6);
}
@media (min-width: 640px) {
  .gallery__tile {
    width: 320px;
    height: 440px;
  }
}

.gallery__tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1500ms var(--ease-silk);
}
.gallery__tile:hover .gallery__tile-img {
  transform: scale(1.05);
}

.gallery__tile-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 3, 5, 0.92), rgba(3, 3, 5, 0.15) 55%, transparent 75%);
}

.gallery__tile-count {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: rgba(212, 160, 23, 0.8);
  font-size: 0.75rem;
  font-weight: 500;
}

.gallery__tile-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
}
.gallery__tile-tag {
  display: block;
  color: var(--gold-400);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.25rem;
}
.gallery__tile-label {
  font-style: italic;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.25;
}

.gallery__lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 3, 5, 0.97);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.gallery__lightbox.is-open {
  display: flex;
}
.gallery__lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--ink-200);
  transition: color 300ms ease;
}
.gallery__lightbox-close:hover {
  color: var(--gold-400);
}
.gallery__lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-200);
  transition: all 300ms ease;
}
.gallery__lightbox-nav:hover {
  color: var(--ink-990);
  background: var(--gold-400);
  border-color: var(--gold-400);
}
.gallery__lightbox-nav--prev {
  left: 1rem;
}
.gallery__lightbox-nav--next {
  right: 1rem;
}
@media (min-width: 768px) {
  .gallery__lightbox-nav--prev {
    left: 2rem;
  }
  .gallery__lightbox-nav--next {
    right: 2rem;
  }
}
.gallery__lightbox-content {
  max-width: 48rem;
  max-height: 85vh;
}
.gallery__lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}
.gallery__lightbox-meta {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gallery__lightbox-tag {
  display: block;
  color: var(--gold-400);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.25rem;
}
.gallery__lightbox-label {
  font-style: italic;
  color: #fff;
  font-size: 1.25rem;
}
.gallery__lightbox-count {
  color: var(--ink-300);
  font-size: 0.75rem;
}
