/* notimeturner.com /gallery/ — builds on home.css tokens */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-links a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent-text); }

/* Hero banner */
.g-hero { position: relative; overflow: hidden; isolation: isolate; min-height: min(62svh, 620px); display: flex; align-items: flex-end; padding: calc(var(--nav-h) + 48px) 0 56px; }
.g-hero-media { position: absolute; inset: -14% 0; z-index: -2; will-change: translate; }
.g-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.g-hero-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 15% 100%, rgba(160, 21, 163, .5), transparent 70%), linear-gradient(180deg, rgba(10, 10, 10, .45), rgba(10, 10, 10, .3) 40%, var(--bg)); }
.g-title { margin: 0; font: 400 clamp(4.5rem, 14vw, 10rem)/.85 var(--display); letter-spacing: .02em;
  text-shadow: 1px 1px 0 #d580d8, 2px 2px 0 #c14bc4, 3px 3px 0 #b02fb3, 4px 4px 0 #a015a3, 5px 5px 0 #880a80, 6px 6px 0 #6b0565, 10px 14px 28px rgba(0, 0, 0, .7); }
.g-sub { margin: .75rem 0 0; color: #fff; font-size: 1.15rem; max-width: 40ch; }

/* Filters */
.g-body { padding: 24px 0 clamp(72px, 9vw, 120px); }
.g-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 600 .95rem/1 var(--body); color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  transition: color .2s, background-color .2s, border-color .2s, transform .2s var(--ease-out);
}
.chip span { margin-left: 6px; opacity: .7; font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip[aria-pressed="true"] { color: var(--on-accent); background: linear-gradient(135deg, var(--purple), var(--magenta)); border-color: transparent; box-shadow: 0 8px 22px -10px var(--glow); }

/* Masonry via columns; each tile reserves its own space (width/height attrs) so nothing shifts */
.g-grid { columns: 3 320px; column-gap: 18px; }
.g-item { break-inside: avoid; margin: 0 0 18px; }
.g-item[hidden] { display: none; }
.g-link { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 24px 40px -28px rgba(0, 0, 0, .9); cursor: zoom-in; }
.g-link img { width: 100%; height: auto; transition: transform .6s var(--ease-out), filter .3s; }
.g-link:hover img { transform: scale(1.04); }
.g-link:hover { box-shadow: 0 0 0 1px rgba(224, 140, 226, .55), 0 30px 60px -28px var(--glow); }
.g-tag {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 10px; border-radius: 999px;
  font: 600 .75rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: #fff;
  background: rgba(10, 10, 10, .65); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease-out);
}
.g-link:hover .g-tag, .g-link:focus-visible .g-tag { opacity: 1; transform: none; }
.g-grid .reveal { transform: perspective(900px) translateY(40px) rotateX(10deg); transform-origin: 50% 100%; }
.g-grid .reveal.is-in { transform: none; }

/* Lightbox */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 5, 8, .96); color: #fff; overflow: hidden; }
.lightbox::backdrop { background: rgba(0, 0, 0, .7); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in .25s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: calc(100vw - 32px); }
.lb-img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); transition: opacity .2s; }
.lb-img.is-loading { opacity: .35; }
.lb-caption { color: var(--muted); font-size: .95rem; text-align: center; padding: 0 64px; }
.lb-count { color: var(--accent-text); font-weight: 700; margin-left: 8px; font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #fff; transition: background-color .2s, transform .2s var(--ease-out); }
.lb-btn:hover { background: rgba(160, 21, 163, .6); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }
@media (max-width: 700px) { .lb-prev, .lb-next { top: auto; bottom: 14px; translate: none; } .lb-img { max-height: calc(100dvh - 160px); } }

@media (prefers-reduced-motion: reduce) {
  .g-grid .reveal { transform: none; }
  .g-link:hover img { transform: none; }
}
