/* Gallery page: the cutting-room look, a bin of finished videos. */
.gallery-page { padding-bottom: 0; }
.gal { max-width: 1440px; margin: 0 auto; padding: 104px var(--gutter) 0; }
.gal-head { max-width: 760px; }
.gal-head h1 { font-size: clamp(56px, 7vw, 120px); }
.gal-head p { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 60ch; }
.gal-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 36px 0 22px; }
.gal-filters button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--bg-2); color: var(--ink-2); font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.gal-filters button:hover { border-color: var(--ink-2); color: var(--ink); }
.gal-filters button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #121216; }
.gal-filters .n { opacity: .6; font-weight: 400; }

.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-auto-flow: dense; gap: 14px; }
.gcard { position: relative; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: inherit; font: inherit; transition: border-color .15s, transform .15s; }
.gcard:hover, .gcard:focus-visible { border-color: var(--pic); }
.gcard.wide { grid-column: span 2; }
.gcard.tall { grid-row: span 2; }
.gthumb { position: relative; background: #000; overflow: hidden; flex: 1; min-height: 0; }
.gcard .gthumb { aspect-ratio: 16 / 9; }
.gcard.tall .gthumb { aspect-ratio: auto; height: 100%; }
.gcard.sq .gthumb { aspect-ratio: 1; }
.gthumb img, .gthumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gthumb video { opacity: 0; transition: opacity .25s; }
.gthumb video.on { opacity: 1; }
.gplay { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(14, 15, 17, .82); font: 700 12.5px/1 var(--sans); color: #fff; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.gplay b { width: 26px; height: 26px; border-radius: 50%; background: var(--pic); color: #121216; display: grid; place-items: center; }
.gplay svg { width: 11px; height: 11px; margin-left: 2px; }
.gcard:hover .gplay, .gcard:focus-visible .gplay { opacity: 1; transform: none; }
.gmeta { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.gmeta .row1 { display: flex; align-items: center; gap: 8px; font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }
.gmeta .row1 .grow { flex: 1; }
.gmeta b { display: block; margin-top: 8px; font: 800 22px/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; color: var(--ink); }
.gmeta p { margin-top: 6px; font-size: 13.5px; color: var(--dim); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-story { --c: #9583FF; } .cat-ad { --c: #FF4B3E; } .cat-launch { --c: #F2B33D; } .cat-explainer { --c: #2FD3B2; } .cat-local { --c: #4CD08A; }
.dotc { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--pic)); flex: none; }
.gal-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 4px; }
.gal-loading { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: center; padding: 60px; }
.gal-loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); animation: gdot 1s infinite alternate; }
.gal-loading span:nth-child(2) { animation-delay: .2s; } .gal-loading span:nth-child(3) { animation-delay: .4s; }
@keyframes gdot { to { background: var(--pic); } }

.gal-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 56px 0 0; padding: 28px 30px; }
.gal-cta h2 { font-size: clamp(36px, 4vw, 60px); }
.gal-cta p { margin-top: 8px; color: var(--ink-2); }
.gallery-page .foot { margin-top: 56px; }

/* The lightbox: watch with sound */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(8, 9, 10, .86); }
.lb[hidden] { display: none; }
.lb-in { position: relative; width: min(1180px, 100%); max-height: calc(100svh - 48px); display: grid; grid-template-columns: minmax(0, 1fr) 320px; overflow: hidden; }
.lb-in.portrait { width: min(860px, 100%); grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
.lb-player { background: #000; display: grid; place-items: center; min-height: 0; }
.lb-player video { display: block; width: 100%; max-height: calc(100svh - 48px); background: #000; }
.lb-meta { display: flex; flex-direction: column; gap: 12px; padding: 24px 22px; border-left: 1px solid var(--line); overflow: auto; }
.lb-cat { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }
.lb-meta h2 { font-size: 40px; }
.lb-meta p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.lb-prompt { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--well); }
.lb-prompt .mono { color: var(--dim); text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
.lb-prompt p { margin-top: 6px; font: 400 13px/1.5 var(--mono); color: var(--ink); }
.lb-meta .btn { align-self: flex-start; margin-top: auto; }
.lb-x { position: absolute; z-index: 2; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(14, 15, 17, .86); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.lb-x svg { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .gal { padding: 84px 16px 0; }
  .gal-grid { grid-template-columns: 1fr; }
  .gcard.wide { grid-column: auto; } .gcard.tall { grid-row: auto; }
  .gcard.tall .gthumb { aspect-ratio: 9 / 16; height: auto; max-height: 80svh; }
  .gal-cta { flex-direction: column; align-items: flex-start; }
  .lb { padding: 0; }
  .lb-in, .lb-in.portrait { grid-template-columns: 1fr; max-height: 100svh; height: 100svh; border-radius: 0; overflow: auto; }
  .lb-meta { border-left: 0; border-top: 1px solid var(--line); }
  .lb-player video { max-height: 70svh; }
}
@media (prefers-reduced-motion: reduce) { .gal-loading span { animation: none; } }
