/* ============================================================
   Gallery — albums, masonry grid, lightbox
   ============================================================ */

.albums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.album-card { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--ink-2); }
.album-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.album-card:hover img, .album-card:focus-visible img { transform: scale(1.04); }
.album-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,9,18,0) 45%, rgba(12,9,18,0.88) 100%); }
.album-card .meta { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; }
.album-card .meta .when { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.album-card .meta h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); text-transform: uppercase; margin-top: 6px; }
.album-card .meta .count { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

.album { scroll-margin-top: 90px; }
.album + .album { margin-top: clamp(64px, 9vw, 120px); }
.album-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.album-head p { color: var(--muted); max-width: 620px; margin-top: 10px; }
.album-head .credit { font-size: 0.8rem; color: var(--muted-2); letter-spacing: 0.06em; }

.masonry { columns: 3 280px; column-gap: 14px; }
.masonry button { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: var(--ink-2); cursor: zoom-in; break-inside: avoid; border-radius: var(--radius); overflow: hidden; }
.masonry img { width: 100%; height: auto; display: block; transition: opacity .3s, transform .6s var(--ease); }
.masonry button:hover img { transform: scale(1.02); }
.masonry button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.lightbox { position: fixed; inset: 0; z-index: 10000; background: rgba(8,6,12,0.96); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 110px); object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox .lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(248,241,231,0.25); background: rgba(20,16,30,0.7); color: var(--cream); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-btn:hover { border-color: var(--gold); color: var(--gold); }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-close { right: 20px; top: 20px; }
.lightbox .lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; letter-spacing: 0.24em; color: var(--muted); }

@media (max-width: 760px) {
  .albums { grid-template-columns: 1fr; }
  .masonry { columns: 2 140px; column-gap: 8px; }
  .masonry button { margin-bottom: 8px; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 14px; transform: none; }
  .lightbox .lb-count { bottom: 30px; }
}
