
/* =========================================
   FOUNTAIN OF HOPE — IMMERSIVE PHOTO TOUR
========================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #111a14;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility .45s ease;
}

.lightbox.open {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.lightbox figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(8,14,10,.85), transparent 35%),
    linear-gradient(180deg, rgba(8,14,10,.55), transparent 25%);
}

.lightbox figure img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  padding: 65px 90px 100px;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity .45s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}

.lightbox.open figure img {
  opacity: 1;
  transform: scale(1);
}

.lightbox figure figcaption {
  position: absolute;
  z-index: 3;
  left: 7%;
  bottom: 65px;
  margin: 0;
  color: white;
  font: 400 clamp(25px, 4vw, 48px) var(--serif);
  text-align: left;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  color: white;
  background: #17211b55;
  font-size: 28px;
  transition: background .3s, border-color .3s, transform .3s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--deep);
}

.lightbox-close {
  top: 35px;
  right: 6%;
  font-size: 30px;
}

.lightbox-prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.08);
}

/* TOUR HEADER */

.tour-header {
  position: absolute;
  z-index: 4;
  top: 42px;
  left: 6%;
  color: #e9e5d9;
  font-size: 9px;
  letter-spacing: 3px;
  pointer-events: none;
}

/* COUNTER */

.tour-counter {
  position: absolute;
  z-index: 4;
  right: 6%;
  bottom: 70px;
  color: white;
  font-size: 10px;
  letter-spacing: 3px;
}

.tour-counter strong {
  color: var(--gold);
  font-weight: 500;
}

/* PROGRESS */

.tour-progress {
  position: absolute;
  z-index: 4;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: #ffffff30;
}

.tour-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width .35s ease;
}

/* PHOTO THUMBNAILS */

.tour-thumbnails {
  position: absolute;
  z-index: 5;
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tour-thumbnail {
  width: 48px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  opacity: .45;
  overflow: hidden;
  transition: opacity .3s, border-color .3s, transform .3s;
}

.tour-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tour-thumbnail.active {
  opacity: 1;
  border-color: var(--gold);
  transform: translateX(-5px);
}

.tour-thumbnail:hover {
  opacity: 1;
}

/* MOBILE */

@media(max-width: 800px) {
  .lightbox figure img {
    padding: 80px 12px 125px;
    object-fit: contain;
  }

  .lightbox figure figcaption {
    left: 7%;
    bottom: 65px;
    font-size: 26px;
    max-width: 70%;
  }

  .lightbox-close {
    top: 22px;
    right: 6%;
    width: 42px;
    height: 42px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    top: auto;
    bottom: 20px;
  }

  .lightbox-prev {
    left: 7%;
  }

  .lightbox-next {
    right: 7%;
  }

  .tour-header {
    top: 35px;
    left: 7%;
    font-size: 7px;
    letter-spacing: 2px;
  }

  .tour-counter {
    right: 7%;
    bottom: 35px;
    font-size: 8px;
  }

  .tour-thumbnails {
    display: none;
  }
}

@media(prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox figure img,
  .tour-progress span {
    transition: none;
  }
}
