/* ============================================================
   Gallery — "Warm-dark gallery wall"
   A moody, edge-to-edge photo wall on a deep warm-dark ground
   so the photographs glow. Scoped with .ga- prefix.
   ============================================================ */

.ga-main {
  /* deep warm-dark ground: near --ink / --night with a warm tint */
  --ga-bg: #14100c;
  --ga-bg-2: #1a1410;
  --ga-line: rgba(194, 146, 47, .16);     /* antique gold hairlines */
  background:
    radial-gradient(120% 80% at 50% -10%, #241a12 0%, var(--ga-bg-2) 42%, var(--ga-bg) 100%);
  color: var(--ice, #e8d7b8);
}

/* ---------- 1. Header band ---------- */
.ga-band {
  position: relative;
  padding-block: clamp(7.5rem, 12vw, 10.5rem) clamp(2.4rem, 5vw, 3.6rem);
  text-align: center;
  border-block-end: 1px solid var(--ga-line);
  overflow: hidden;
}
.ga-band::before {
  /* faint parchment texture wash + warm vignette */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(184, 71, 46, .12), transparent 60%),
    url("../img/gen/texture.jpg");
  background-size: cover;
  opacity: .10;
  mix-blend-mode: screen;
  pointer-events: none;
}
.ga-band-inner {
  position: relative;
  max-width: 56rem;
  margin-inline: auto;
}
.ga-kicker {
  color: var(--gold, #c2922f);
}
.ga-title {
  font-family: var(--f-serif, "Spectral", serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-block: .5rem .7rem;
  color: var(--snow, #faf3e6);
}
.ga-sub {
  font-family: var(--f-cormorant, "Cormorant Garamond", serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  color: rgba(232, 215, 184, .82);
  max-width: 42rem;
  margin-inline: auto;
}

/* ---------- 2. The wall ---------- */
.ga-wall {
  padding: clamp(1.1rem, 3vw, 2.4rem);
  padding-block-end: clamp(4rem, 8vw, 7rem);
}

/* CSS columns masonry — preserves varied natural heights */
.ga-grid {
  column-count: 4;
  column-gap: clamp(.7rem, 1.4vw, 1.1rem);
}
.ga-item {
  break-inside: avoid;
  position: relative;
  margin-block-end: clamp(.7rem, 1.4vw, 1.1rem);
  border-radius: 6px;
  overflow: hidden;
  cursor: zoom-in;
  background: #0d0a07;
  box-shadow:
    0 1px 0 rgba(255, 245, 225, .04) inset,
    0 14px 34px -22px rgba(0, 0, 0, .9);
  transition: transform .5s var(--ease, cubic-bezier(.22,.61,.36,1)),
              box-shadow .5s var(--ease, cubic-bezier(.22,.61,.36,1));
}
.ga-item::after {
  /* thin gold frame line, sits above image */
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--ga-line);
  border-radius: 6px;
  pointer-events: none;
  z-index: 3;
}
.ga-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  /* let the photographs glow: gentle lift on the warm-dark wall */
  filter: saturate(1.02) contrast(1.01);
  transition: transform .7s var(--ease, cubic-bezier(.22,.61,.36,1)),
              filter .5s var(--ease, cubic-bezier(.22,.61,.36,1));
}

/* ---------- Caption overlay ---------- */
.ga-item figcaption {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 2;
  padding: 1.3rem .95rem .85rem;
  font-family: var(--f-display, "Commissioner", sans-serif);
  text-align: start;
  color: var(--snow, #faf3e6);
  background: linear-gradient(to top,
    rgba(8, 6, 4, .92) 0%,
    rgba(8, 6, 4, .55) 55%,
    rgba(8, 6, 4, 0) 100%);
  /* desktop: hidden until hover */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease, ease), transform .4s var(--ease, ease);
}
.ga-item figcaption span {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .005em;
}
.ga-item figcaption small {
  display: block;
  margin-block-start: .3rem;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--gold, #c2922f);
  opacity: .9;
}

/* ---------- Hover (desktop, fine pointer) ---------- */
@media (hover: hover) and (pointer: fine) {
  .ga-item:hover {
    transform: translateY(-4px);
    box-shadow:
      0 1px 0 rgba(255, 245, 225, .06) inset,
      0 26px 50px -22px rgba(0, 0, 0, .95);
    z-index: 4;
  }
  .ga-item:hover::after {
    border-color: rgba(194, 146, 47, .42);
  }
  .ga-item:hover img {
    transform: scale(1.045);
    filter: saturate(1.08) contrast(1.04) brightness(1.03);
  }
  .ga-item:hover figcaption {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive columns ---------- */
@media (max-width: 1200px) {
  .ga-grid { column-count: 3; }
}
@media (max-width: 920px) {
  .ga-grid { column-count: 2; }
}
@media (max-width: 560px) {
  .ga-grid { column-count: 1; }
  /* mobile: caption always visible */
  .ga-item figcaption {
    position: static;
    opacity: 1;
    transform: none;
    background: var(--ga-bg-2, #1a1410);
    padding: .85rem .9rem 1rem;
  }
  .ga-item { cursor: pointer; }
}

/* Touch / coarse pointer without the small-screen single column:
   keep captions readable since there is no hover. */
@media (hover: none) and (min-width: 561px) {
  .ga-item figcaption {
    opacity: 1;
    transform: none;
    background: linear-gradient(to top,
      rgba(8, 6, 4, .94) 0%,
      rgba(8, 6, 4, .35) 70%,
      rgba(8, 6, 4, 0) 100%);
  }
}
