/* =========================================================
   Section · 06 Gallery — filters, photo grid and the photo viewer.
   ========================================================= */

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--edge); background: var(--surface);
  font: 500 13px var(--mono); color: var(--text);
  transition: background-color .2s, color .2s, border-color .2s, transform .35s var(--servo);
}
.filters button span { font-size: 11px; color: var(--muted); }
.filters button:hover { border-color: var(--ink); transform: translateY(-1px); }
.filters button.is-on { background: var(--ink); border-color: var(--ink); color: var(--accent-light); }
.filters button.is-on span { color: var(--accent-light); }
.filters button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shots { columns: 3 260px; column-gap: 16px; margin: 0; padding: 0; list-style: none; }
.shot { break-inside: avoid; margin-bottom: 16px; }
.shot[hidden] { display: none; }
.shot.is-pop { animation: shot-in .55s var(--servo) both; }
.shot__btn {
  position: relative; isolation: isolate;
  display: block; width: 100%; padding: 0;
  border: 0; border-radius: 20px; overflow: hidden;
  background: var(--steel); cursor: zoom-in;
}
.shot__btn img, .shot__btn video {   /* tall phone shots are cropped in the grid; the lightbox shows them whole */
  display: block; width: 100%; height: auto; max-height: 500px; object-fit: cover;
  transition: transform .8s var(--mech);
}
.shot__btn:hover img, .shot__btn:hover video { transform: scale(1.04); }
/* videos added from the admin page: a play badge over the first frame */
.shot__play {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  display: grid; place-items: center; width: 40px; height: 40px; padding-left: 3px;
  border-radius: 50%; background: rgba(46, 49, 146, .84); color: var(--accent-light); font-size: 14px;
}
.shot__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shot__cap {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 14px; border-radius: 14px;
  background: rgba(46, 49, 146, .84);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #F3F2ED; text-align: left; font: 500 14px/1.3 var(--sans);
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .45s var(--servo);
}
.shot__btn:hover .shot__cap, .shot__btn:focus-visible .shot__cap { opacity: 1; transform: none; }
@media (hover: none) { .shot__cap { opacity: 1; transform: none; } }
.shot__tag { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
@keyframes shot-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(13, 14, 53, .95); color: #F3F2ED;
}
.lightbox::backdrop { background: rgba(13, 14, 53, .6); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in .3s ease-out; }
.lightbox__fig { display: grid; justify-items: center; gap: 14px; margin: 0; padding: 72px 80px 56px; max-width: 100%; }
.lightbox__fig img, .lightbox__fig video {
  width: auto; height: auto; max-width: min(1200px, 100%); max-height: calc(100dvh - 170px);
  border-radius: 16px; object-fit: contain; -webkit-user-select: none; user-select: none;
}
.lightbox__fig figcaption { font: 500 13px var(--mono); letter-spacing: .04em; color: rgba(238, 240, 255, .75); text-align: center; }
.lightbox__count { position: absolute; top: 26px; left: 26px; font: 500 12px var(--mono); letter-spacing: .14em; color: rgba(238, 240, 255, .6); }
.lightbox__btn {
  position: absolute; display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06);
  font: 500 18px/1 var(--sans); color: #fff;
  transition: background-color .2s, color .2s, border-color .2s;
}
.lightbox__btn:hover { background: var(--ink); border-color: var(--accent-light); color: var(--accent-light); }
.lightbox__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lightbox__close { top: 14px; right: 16px; }
.lightbox__prev, .lightbox__next { top: 50%; translate: 0 -50%; }
.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }
@media (max-width: 640px) {
  .lightbox__fig { padding: 70px 12px 96px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 24px; translate: none; }
  .lightbox__prev { left: calc(50% - 60px); }
  .lightbox__next { right: calc(50% - 60px); }
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.is-locked, .is-locked body { overflow: hidden; }
