/* ==========================================================================
   Gallery (pages/gallery.php, pg-exhibit / pg-album) and an album
   (pages/gallery-album.php, ga-). An exhibition: albums as large panels with
   the title over the photograph; inside an album, a composed grid — the first
   photograph as a feature, the rest at one ratio — opening the existing
   keyboard lightbox (content-di.js). Image reveals: animations.css.
   ========================================================================== */

/* --- Albums ---------------------------------------------------------------- */
.pg-exhibit { gap: 1.25rem; }
.pg-exhibit--1 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) {
  .pg-exhibit--2 { grid-template-columns: 1.15fr 1fr; }
  .pg-exhibit--3 { grid-template-columns: 1.3fr 1fr; grid-auto-rows: minmax(0, 1fr); }
  .pg-exhibit--3 .pg-album:first-child { grid-row: span 2; }
}
.pg-album {
  position: relative;
  min-height: clamp(20rem, 38vw, 34rem);
  border: 0;
  border-radius: 24px;
  background: #08172f;
  color: #fff;
  isolation: isolate;
  box-shadow: 0 40px 80px -56px rgb(8 23 47 / 0.75);
  transition: transform 300ms var(--ease-out-expo, ease), box-shadow 300ms ease;
}
.pg-album .dx-album-cover { position: absolute; inset: 0; z-index: -2; aspect-ratio: auto; }
.pg-album .dx-album-cover img { transition: transform 1200ms var(--ease-out-expo, ease); }
.pg-album::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(5 15 34 / 0.05) 30%, rgb(5 15 34 / 0.88)); }
.pg-album:hover .dx-album-cover img { transform: scale(1.05); }
.pg-album:hover { transform: translateY(-3px); }
.pg-album:focus-visible { outline: 3px solid var(--color-ndi-gold-500); outline-offset: 4px; }
.pg-album .dx-album-body { margin-top: auto; gap: 0.5rem; padding: clamp(1.5rem, 3vw, 2.25rem); }
.pg-album .dx-card-kicker { color: var(--color-ndi-gold-300); }
.pg-album .dx-album-title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.pg-album-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / 0.18); font-size: 0.9rem; color: var(--color-ndi-mist); }
.pg-album-go { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; color: #fff; }
.pg-album-go svg { transition: transform 200ms ease; }
.pg-album:hover .pg-album-go svg { transform: translateX(4px); }

/* --- One album ------------------------------------------------------------- */
.ga-cover .po-frame-img { --po-ratio: 4 / 3; }
.ga-photos { background: var(--color-ndi-panel); }
.ga-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 820px) { .ga-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1200px) { .ga-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ga-grid > li:first-child { grid-column: span 2; grid-row: span 2; }
.ga-tile { height: 100%; display: flex; flex-direction: column; }
.ga-tile .dx-photo-link { flex: 1; position: relative; aspect-ratio: 4 / 3; border-radius: 16px; }
.ga-grid > li:first-child .dx-photo-link { aspect-ratio: auto; min-height: 100%; }
.ga-tile .dx-photo-link img { position: absolute; inset: 0; }
.ga-tile .dx-photo-link:focus-visible { outline: 3px solid var(--color-ndi-gold-500); outline-offset: 3px; }
.ga-tile figcaption { margin-top: 0.5rem; font-weight: 600; color: var(--color-ndi-ink-700); }

@media (prefers-reduced-motion: reduce) {
  .pg-album, .pg-album .dx-album-cover img, .pg-album-go svg { transition: none; }
  .pg-album:hover, .pg-album:hover .dx-album-cover img { transform: none; }
}
