/* Gallery page: from the Claude Design comp (Gallery.dc.html) */

/* ---------- Hero ---------- */
.gallery-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 104px 40px 72px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.gallery-hero h1 {
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.12;
  text-wrap: pretty;
}

.gallery-hero p {
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 58ch;
  align-self: center;
}

/* ---------- Grid ---------- */
.gallery-grid {
  padding-bottom: 112px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 300px;
  /* dense so the two single-cell holes left by the span pattern get backfilled
     by the last two tiles */
  grid-auto-flow: dense;
  gap: 24px;
}

.gal-item {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--blush);
}

.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gal-item.is-clickable { cursor: zoom-in; }
.gal-item:hover img { transform: scale(1.04); }

/* Spans from the comp */
.gal-1 { grid-column: span 2; grid-row: span 2; }
.gal-5 { grid-row: span 2; }
.gal-8 { grid-column: span 2; }

/* Crop anchoring, per frame */
.gal-4 img { object-position: center 62%; }
.gal-6 img { object-position: center 42%; }
.gal-7 img { object-position: center 58%; }
.gal-8 img { object-position: center 55%; }
.gal-10 img { object-position: center 26%; }
.gal-11 img { object-position: center 58%; }

@media (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 260px;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .gallery-hero { padding: 72px 24px 48px; }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
    gap: 16px;
    padding-bottom: 80px;
  }
  .gal-1, .gal-8 { grid-column: auto; }
  .gal-1, .gal-5 { grid-row: span 2; }
}

/* ---------- Virtual tour ---------- */
.gallery-video {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}

.gallery-video-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gallery-video h2 { font-size: clamp(28px, 4vw, 38px); }

.video-frame {
  width: 100%;
  height: 540px;
  background: var(--ink);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  justify-content: center;
}

.video-mark {
  width: 74px;
  height: 74px;
  border: 1px solid var(--rose-muted);
  border-radius: 50%;
  position: relative;
}
.video-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-left: 17px solid var(--rose);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

.video-note {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose-muted);
}

@media (max-width: 860px) {
  .video-frame { height: 340px; }
}

@media (max-width: 640px) {
  .gallery-video { padding: 72px 24px; }
  .video-frame { height: 240px; }
  .video-mark { width: 60px; height: 60px; }
}

/* ---------- CTA ---------- */
.gallery-cta {
  max-width: 780px;
  margin: 0 auto;
  padding: 96px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: center;
}

.gallery-cta h2 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.25;
  text-wrap: pretty;
}

.gallery-cta p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--muted);
}

@media (max-width: 640px) {
  .gallery-cta { padding: 72px 24px; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(23, 16, 18, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 72px;
}
.lightbox[hidden] { display: none; }

.lb-stage {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 168px);
  width: auto;
  object-fit: contain;
}

.lb-caption {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--rose-muted);
  text-align: center;
  max-width: 62ch;
}

.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  font-family: var(--sans);
  line-height: 1;
  padding: 12px 18px;
  opacity: 0.75;
  transition: opacity 0.25s ease;
}
.lightbox button:hover { opacity: 1; }

.lb-close { top: 14px; right: 18px; font-size: 34px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 46px; }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 46px; }

@media (max-width: 640px) {
  .lightbox { padding: 56px 16px; }
  .lb-img { max-height: calc(100vh - 176px); }
  .lb-prev, .lb-next { font-size: 36px; padding: 10px 8px; }
}
