/* ===============================================
   ISUZU MIGORI — GALLERY
   Simple photo groups: a plain heading per group and a
   three-column masonry where photos keep their natural
   shape. Captions live in the lightbox. Tokens: theme.css
   =============================================== */

/* ── Photo groups ── */
.gx-group { padding: clamp(48px, 6vw, 80px) 0 0; }

.gx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.gx-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  text-transform: uppercase;
  color: var(--ink);
}
.gx-head p {
  margin: 0;
  max-width: 620px;
  font-size: .9rem;
  color: var(--ink-muted);
}

/* ── Masonry ── */
.gx-masonry {
  columns: 3 280px;
  column-gap: 16px;
}
.gx-item {
  margin: 0 0 16px;
  break-inside: avoid;
}
.gx-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--panel);
}
.gx-open img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .6s var(--ease);
}
.gx-hover {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 16px 14px;
  background: linear-gradient(0deg, rgba(11, 29, 46, .75), rgba(11, 29, 46, 0));
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-align: left;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .3s ease;
}
.gx-open:hover img,
.gx-open:focus-visible img { transform: scale(1.03); }
.gx-open:hover .gx-hover,
.gx-open:focus-visible .gx-hover { opacity: 1; }

/* Touch screens have no hover: keep titles quietly visible */
@media (hover: none) {
  .gx-hover { opacity: 1; font-size: .9rem; padding: 22px 12px 10px; }
}

/* ── Closing CTA ── */
/* margin-top gives the last photo group breathing room above the band */
.gx-cta { position: relative; margin-top: clamp(56px, 7vw, 96px); background: var(--navy); overflow: hidden; }
.gx-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  padding-block: clamp(40px, 6vw, 64px);
}
.gx-cta .eyebrow { color: var(--gold); margin-bottom: 8px; }
.gx-cta h2 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.8rem); text-transform: uppercase; color: #FFFFFF; }
.gx-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Lightbox ── */
.gx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  background: rgba(6, 15, 25, .96);
  animation: gxFade .25s ease;
}
.gx-lightbox[hidden] { display: none; }
@keyframes gxFade { from { opacity: 0; } to { opacity: 1; } }
.gx-lb-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-height: 100vh;
  padding: 56px 0 24px;
}
.gx-lb-stage img {
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: var(--radius);
  animation: gxZoom .35s var(--ease);
}
.gx-lb-stage img.is-loading { visibility: hidden; }
@keyframes gxZoom { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.gx-lb-stage figcaption {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
}
.gx-lb-chapter {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}
.gx-lb-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  color: #FFFFFF;
}
.gx-lb-count { margin-top: 6px; font-size: .75rem; color: rgba(255,255,255,.45); }
.gx-lb-nav,
.gx-lb-close {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
  justify-self: center;
  transition: background .2s, border-color .2s;
}
.gx-lb-nav .fi, .gx-lb-close .fi { font-size: 22px; }
.gx-lb-nav:hover, .gx-lb-close:hover { background: var(--brand-red); border-color: var(--brand-red); }
.gx-lb-close { position: absolute; top: 16px; right: 16px; }
body.gx-locked { overflow: hidden; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .gx-masonry { columns: 2; column-gap: 10px; }
  .gx-item { margin-bottom: 10px; }
  .gx-head { padding-bottom: 10px; }
  .gx-lightbox { grid-template-columns: 1fr; }
  .gx-lb-nav { position: absolute; bottom: 20px; }
  .gx-lb-prev { left: calc(50% - 64px); }
  .gx-lb-next { right: calc(50% - 64px); }
  .gx-lb-stage { padding: 64px 12px 96px; }
  .gx-lb-stage img { max-height: calc(100vh - 260px); }
}
