/* Gallery — masonry wall + lightbox. Builds on editorial.css. */

.gly-head { padding-top: clamp(7.5rem, 11vw, 10rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.gly-head__title { max-width: 12ch; }
.gly-head__title .ed-accent { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
.gly-head__foot { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--ed-rule); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; }
.gly-head__foot .ed-text { margin: 0; max-width: 36rem; }
.gly-head__count { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ed-gold-bright); }
.gly-albums { margin-top: 1.6rem; }
.gly-albums .vdo-filter { color: #f4f1ea; border-color: rgba(255, 255, 255, 0.2); text-decoration: none; }
.gly-albums .vdo-filter.is-active { background: #f4f1ea; color: #111; }

.gly-wall { padding-top: 0; }
.gly-grid { columns: 4 260px; column-gap: clamp(0.6rem, 1vw, 1rem); }
.gly-tile {
  display: block;
  margin-bottom: clamp(0.6rem, 1vw, 1rem);
  break-inside: avoid;
  overflow: hidden;
  border-radius: 3px;
  background: #1a1a1a;
}
.gly-tile img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.88) brightness(0.92);
  transition: transform 1s var(--ed-ease), filter 0.5s ease;
}
.gly-tile:hover img, .gly-tile:focus-visible img { transform: scale(1.035); filter: none; }
.gly-tile:focus-visible { outline: 2px solid var(--ed-gold-bright); outline-offset: 3px; }

/* Lightbox */
.gly-locked, .gly-locked body { overflow: hidden; }
.gly-box {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(3.5rem, 6vw, 5rem) clamp(1rem, 6vw, 6rem);
  background: rgba(8, 8, 8, 0.96);
}
.gly-box[hidden] { display: none; }
.gly-box img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.gly-box__btn {
  position: absolute;
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(13, 13, 13, 0.6);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.gly-box__btn:hover { border-color: var(--ed-gold-bright); color: var(--ed-gold-bright); }
.gly-box__close { top: 1.2rem; right: 1.2rem; font-size: 1.7rem; line-height: 1; }
.gly-box__prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.gly-box__next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.gly-box__count { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); margin: 0; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.7); }

@media (max-width: 700px) {
  .gly-grid { columns: 2; }
  .gly-box__prev, .gly-box__next { top: auto; bottom: 0.9rem; transform: none; }
}
