/* Gallery page: filter tabs, framed pictures and clips, and the lightbox. Built on base.css. */

/* page heading stamp: a 32 px sprite at 2x in a slot */
.ga-stamp{display:grid;justify-items:center;gap:9px}
.ga-stamp img{display:block;width:72px;height:72px;padding:3px;border:1px solid var(--line2);background:var(--line);image-rendering:pixelated}
.ga-stamp small{font:700 10.5px/1 var(--disp);letter-spacing:.18em;text-transform:uppercase;color:var(--muted)}

.filter-tabs{margin-top:24px}

/* ---------- grid of framed pictures and clips (js/gallery-ui.js) ---------- */
.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:20px}
.gallery-item{display:flex;flex-direction:column;min-width:0;padding:3px;border:1px solid var(--line2);background:var(--bg);cursor:pointer}
.gallery-item:hover{border-color:var(--gold)}
.gallery-item:focus-visible{outline:2px solid var(--gold2);outline-offset:2px}
.g-media{position:relative;aspect-ratio:16/10;overflow:hidden;background:#0d0905}
.g-media img,.g-media video{display:block;width:100%;height:100%;object-fit:cover}
/* the wordmark and the crest are shown whole (the wordmark's black ground is screened away,
   as in the menu); the concept sheets keep the head in view */
.g-media img[src*="web-banner"]{object-fit:contain;padding:0 7%;mix-blend-mode:screen}
.g-media img[src*="discordcrown"]{object-fit:contain;padding:12px}
.g-media img[src*="/concepts/"]{object-position:50% 0}

/* clips have no still yet: a striped field with a squared play marker */
.is-clip .g-media{background:repeating-linear-gradient(135deg,rgba(202,164,77,.07) 0 1px,transparent 1px 7px),linear-gradient(180deg,#1b1309 0,#110b06 100%)}
.play-icon{position:absolute;left:50%;top:50%;width:60px;height:60px;margin:-30px 0 0 -30px;display:grid;place-items:center;background:rgba(13,9,5,.92);border:1px solid var(--gold);color:var(--gold2);pointer-events:none}
.play-icon svg{width:20px;height:20px;margin-left:3px}
.gallery-item:hover .play-icon{background:var(--gold);color:var(--ink)}

/* caption strip under each frame */
.g-cap{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:46px;margin-top:3px;padding:9px 12px 10px 14px;background:linear-gradient(180deg,#281c0c 0,#181008 100%);border-top:1px solid rgba(242,222,161,.14)}
.g-cap .caption{min-width:0;font:600 15.5px/1.3 var(--disp);color:var(--text);overflow-wrap:anywhere}
.gallery-item:hover .caption{color:var(--gold2)}
.g-cap .tag{flex:none}
.gallery-empty{grid-column:1/-1;border:1px solid var(--line);background:var(--panel)}

/* ---------- lightbox: squared frame on a dark backdrop ---------- */
.lightbox{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;padding:24px 86px;background:rgba(10,7,4,.95);cursor:pointer}
.lightbox.active{display:flex}
.lightbox-content{display:flex;flex-direction:column;max-width:100%;max-height:100%;border:1px solid var(--line2);background:var(--panel);cursor:default}
.lightbox-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;padding:6px 6px 6px 16px;border-bottom:1px solid var(--line);border-top:1px solid rgba(242,222,161,.14);background:linear-gradient(180deg,#281c0c 0,#181008 100%)}
.lightbox-caption{display:flex;align-items:center;gap:12px;min-width:0;font:600 17px/1.25 var(--disp);color:var(--text);overflow-wrap:anywhere}
.lightbox-caption::before{content:"";flex:none;width:7px;height:16px;background:var(--gold)}
.lightbox-stage{display:flex;justify-content:center;padding:4px;background:var(--bg)}
.lightbox-stage img{display:block;width:auto;height:auto;max-width:calc(100vw - 182px);max-height:calc(100vh - 112px);max-height:calc(100dvh - 112px)}
.lightbox-stage video{display:block;width:min(1180px,calc(100vw - 182px));height:auto;max-height:calc(100vh - 112px);max-height:calc(100dvh - 112px);background:var(--bg)}
.lightbox-close,.lightbox-nav{display:grid;place-items:center;padding:0;background:rgba(13,9,5,.92);border:1px solid var(--line2);border-radius:0;color:var(--gold2);cursor:pointer}
.lightbox-close:hover,.lightbox-nav:hover{border-color:var(--gold);color:#fff}
.lightbox-close{flex:none;width:40px;height:40px;background:var(--panel2)}
.lightbox-nav{position:absolute;top:50%;width:50px;height:76px;margin-top:-38px}
.lightbox-prev{left:20px}
.lightbox-next{right:20px}
.lightbox button svg{width:16px;height:16px;pointer-events:none}

@media (max-width:1100px){
  .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
}

/* ---------- phone ---------- */
@media (max-width:900px){
  .ga-stamp-wrap{display:none}
  .filter-tabs{margin-top:18px}
  .filter-tabs .tab{height:36px;padding:0 12px;font-size:12px}
  .gallery-grid{margin-top:16px}
  .g-cap .caption{font-size:15px}
  .lightbox{padding:10px 10px 78px}
  .lightbox-content{width:100%}
  .lightbox-bar{min-height:48px;padding:5px 5px 5px 12px}
  .lightbox-caption{font-size:15.5px;gap:10px}
  .lightbox-stage img{max-width:calc(100vw - 30px);max-height:calc(100vh - 146px);max-height:calc(100dvh - 146px)}
  .lightbox-stage video{width:calc(100vw - 30px);max-height:calc(100vh - 146px);max-height:calc(100dvh - 146px)}
  .lightbox-nav{top:auto;bottom:14px;width:64px;height:50px;margin-top:0}
  .lightbox-prev{left:10px}
  .lightbox-next{right:10px}
}
@media (max-width:600px){
  .gallery-grid{grid-template-columns:minmax(0,1fr);gap:14px}
}
