.lightbox.open {
  background:
    radial-gradient(circle at 50% 42%, rgba(240, 153, 109, .16), transparent 38%),
    linear-gradient(145deg, rgba(9, 15, 12, .93), rgba(23, 35, 29, .97));
  backdrop-filter: blur(18px);
  animation: lightbox-reveal .3s ease both;
}

.lightbox figure {
  position: relative;
  padding: 12px 12px 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 32px 80px rgba(0, 0, 0, .42);
}

.lightbox figure img {
  border-radius: 17px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .28);
}

.lightbox.slide-next figure { animation: gallery-next .52s cubic-bezier(.22, .8, .2, 1) both; }
.lightbox.slide-prev figure { animation: gallery-prev .52s cubic-bezier(.22, .8, .2, 1) both; }

.lightbox figcaption {
  align-items: center;
  padding: 6px 8px 0;
}

#lightboxCaption {
  max-width: 78%;
  color: #fffaf5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.3vw, 31px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}

#lightboxCaption::before {
  content: "Little Q moments";
  display: block;
  margin-bottom: 7px;
  color: #f1b092;
  font-family: Inter, Arial, sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.lightbox figcaption #lightboxCounter {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(5, 10, 8, .28);
  color: #f7c1a8;
  font-family: Inter, Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}

.lightbox button.lightbox-nav,
.lightbox button.lightbox-close {
  color: #fff;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(18, 28, 23, .45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  backdrop-filter: blur(10px);
}

.lightbox button.lightbox-nav:hover,
.lightbox button.lightbox-close:hover {
  border-color: #f1b092;
  background: #f1b092;
  color: #17231d;
}

.lightbox button.lightbox-close {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 29px;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.lightbox button.lightbox-close:hover { transform: rotate(6deg) scale(1.06); }

@keyframes lightbox-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gallery-next {
  from { opacity: .15; transform: translateX(34px) scale(.975); filter: blur(5px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes gallery-prev {
  from { opacity: .15; transform: translateX(-34px) scale(.975); filter: blur(5px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@media (max-width: 700px) {
  .lightbox figure { padding: 8px 8px 13px; border-radius: 19px; }
  .lightbox figure img { border-radius: 13px; }
  #lightboxCaption { max-width: 72%; font-size: 18px; }
  #lightboxCaption::before { margin-bottom: 5px; font-size: 8px; }
  .lightbox figcaption #lightboxCounter { padding: 7px 9px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox.open,
  .lightbox.slide-next figure,
  .lightbox.slide-prev figure { animation: none; }
  .lightbox button { transition: none; }
}
