/* ---- Gallery lightbox — Sapphire Penthouse ---------------------------- */

/* teaser photos become interactive */
.gallery__grid .photo { cursor: pointer; overflow: hidden; }
.gallery__grid .photo .photo__img { transition: transform .5s cubic-bezier(.16,1,.3,1); display: block; }
@media (hover: hover) {
  .gallery__grid .photo:hover .photo__img { transform: scale(1.05); }
}

/* penthouse page: room & dining photos become interactive */
.room, .dspot { overflow: hidden; }
.room img, .dspot img { cursor: pointer; transition: transform .5s cubic-bezier(.16,1,.3,1); display: block; }
@media (hover: hover) {
  .room:hover img, .dspot:hover img { transform: scale(1.05); }
}

/* the "see all photos" trigger (a button that reads like a link) */
.gallery__all {
  font: inherit; cursor: pointer; background: none; border: none;
  color: var(--sapphire); font-size: .95rem; letter-spacing: .01em;
  padding: .4rem .25rem;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--brass-line);
  transition: text-decoration-color .18s ease;
}
.gallery__all:hover { text-decoration-color: var(--brass); }
.gallery__all:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

/* ---- lightbox overlay ------------------------------------------------- */
.lb {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center;
  background: rgba(16, 26, 44, .97);
  opacity: 0; transition: opacity .28s ease;
}
.lb.is-open { display: flex; opacity: 1; }

.lb__stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.lb__img {
  max-width: 94vw; max-height: 82vh; width: auto; height: auto;
  object-fit: contain; background: #0d1627;
  box-shadow: 0 12px 44px rgba(0, 0, 0, .45);
}
.lb__cap {
  color: rgba(251, 249, 243, .9);
  font-family: var(--font-display); font-style: italic;
  font-size: 1.02rem; text-align: center; max-width: 60ch; padding: 0 1rem;
}
.lb__count {
  position: absolute; top: 1.15rem; left: 1.35rem;
  color: rgba(251, 249, 243, .6);
  font-size: .78rem; letter-spacing: .14em; font-variant-numeric: tabular-nums;
}

.lb__btn {
  position: absolute; background: none; border: none; line-height: 1;
  color: rgba(251, 249, 243, .85); cursor: pointer;
  transition: color .18s ease; -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center;
}
.lb__btn:hover { color: var(--brass); }
.lb__btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
.lb__close { top: .5rem; right: .8rem; font-size: 2.4rem; width: 3rem; height: 3rem; }
.lb__nav   { top: 50%; transform: translateY(-50%); font-size: 3rem; width: 3.4rem; height: 4.6rem; }
.lb__prev  { left: .3rem; }
.lb__next  { right: .3rem; }

@media (max-width: 640px) {
  .lb__nav { font-size: 2.2rem; width: 2.8rem; height: 3.6rem; }
  .lb__close { font-size: 2rem; width: 2.6rem; height: 2.6rem; }
  .lb__img { max-height: 74vh; max-width: 96vw; }
  .lb__cap { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__grid .photo .photo__img, .lb { transition: none; }
}
