/* ===================================================================
   AtlantaTCG — One-Year Anniversary photo gallery (/1yearanniversary/gallery)
   Built from the "1 year done 02.svg" handoff: cream confetti splash header
   (same authored art as the anniversary page), square photo wall, and a
   full-screen viewer with a bottom thumb strip. Loaded ONLY on this page.
   CSP-safe: no inline <style>.
   NOTE: the page lives one path level deep and uses <base href="/">, so
   every url() here is written root-absolute.
   =================================================================== */

:root{
  --gal-bg:#E9E4D6;                 /* flyer paper (matches the anniversary page) */
  --gal-gold:var(--orange);         /* #E0A526 */
  --gal-gold-deep:var(--gold-deep); /* #B9831A */
  --gal-purple:var(--magenta);      /* #6E3FA3 */
  --gal-purple-deep:var(--brand-purple-deep);
  --gal-blue:var(--blue);           /* #3A6BB0 */
}

/* same paper + faint ray-fan/glow texture as the anniversary page */
body:has(.gal-page){
  background-color:var(--gal-bg);
  background-image:
    radial-gradient(circle at 8% 12%, rgba(110,63,163,.11), rgba(110,63,163,0) 22%),
    radial-gradient(circle at 92% 7%, rgba(58,107,176,.11), rgba(58,107,176,0) 22%),
    radial-gradient(circle at 90% 62%, rgba(224,165,38,.13), rgba(224,165,38,0) 22%),
    radial-gradient(circle at 6% 82%, rgba(90,62,34,.10), rgba(90,62,34,0) 22%),
    repeating-conic-gradient(from 0deg at 50% 40%, rgba(58,40,23,.016) 0deg 1deg, rgba(255,255,255,.016) 1deg 2deg);
  background-attachment:fixed;
}
/* phones: fixed-attachment repaints the viewport every scroll frame */
@media(max-width:700px){body:has(.gal-page){background-attachment:scroll}}
.gal-page{background:transparent;color:var(--ink);overflow:hidden}
.gal-wrap{width:min(1180px,92vw);margin:0 auto}

/* ============================================================== HERO */
.gal-hero{position:relative;text-align:center;
  padding:clamp(44px,7vw,84px) 0 clamp(90px,13vw,180px)}
/* the authored 1440×1024 confetti field, static markup (no JS needed);
   slice-fit so it fills the band edge-to-edge at any viewport */
.gal-confetti{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.gal-confetti svg{display:block;width:100%;height:100%}
.gal-confetti .cf{transform-box:fill-box;transform-origin:center}
/* idle life: dots/streamers bob, stars twinkle — transform/opacity only,
   parked by JS (.gal-still) whenever the hero is off screen */
.gal-confetti .cf-dt,.gal-confetti .cf-sq{animation:gal-cf-bob 7.5s ease-in-out infinite}
.gal-confetti .cf-st{animation:gal-cf-twinkle 4.5s ease-in-out infinite}
.gal-confetti .cf:nth-child(4n)  {animation-delay:-3.2s}
.gal-confetti .cf:nth-child(4n+1){animation-delay:-1.1s}
.gal-confetti .cf:nth-child(4n+2){animation-delay:-5.4s}
.gal-confetti .cf:nth-child(4n+3){animation-delay:-2.3s}
.gal-still .cf{animation:none!important}
@keyframes gal-cf-bob{
  0%,100%{transform:translateY(0) rotate(0deg)}
  50%{transform:translateY(-5px) rotate(2.5deg)}}
@keyframes gal-cf-twinkle{
  0%,100%{opacity:.55;transform:scale(.86)}
  50%{opacity:1;transform:scale(1.14)}}

.gal-hero-inner{position:relative;z-index:2}
.gal-hero .wordmark{display:inline-block;font-size:clamp(26px,4vw,40px);line-height:1;
  margin:0 0 18px;letter-spacing:.5px}
.gal-title{font-family:'Bungee','Bungee Fallback',sans-serif;line-height:.9;margin:0 0 18px;
  font-size:clamp(38px,6.4vw,80px);letter-spacing:-1px;-webkit-text-stroke:3px var(--ink)}
.gal-title .t-gold{display:table;margin-inline:auto;color:var(--gal-gold);
  text-shadow:3px 3px 0 var(--gal-gold-deep),6px 6px 0 var(--ink)}
.gal-title .t-purple{display:table;margin-inline:auto;color:var(--gal-purple);
  text-shadow:3px 3px 0 var(--gal-purple-deep),6px 6px 0 var(--ink)}
.gal-sub{font-size:clamp(1rem,1.5vw,1.15rem);font-weight:700;line-height:1.5;
  max-width:46ch;margin:0 auto 30px;color:#231C12}
.gal-cta{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
  font-family:'Bungee','Bungee Fallback',sans-serif;font-size:clamp(14px,1.5vw,17px);
  letter-spacing:.6px;color:#fff;background:var(--gal-blue);
  padding:16px 30px;min-height:54px;border-radius:14px;border:3px solid var(--ink);
  box-shadow:5px 5px 0 var(--ink);
  transition:transform .16s cubic-bezier(.2,.7,.3,1),box-shadow .16s}
.gal-cta:hover,.gal-cta:focus-visible{transform:translate(-1px,-2px);box-shadow:6px 6px 0 var(--ink)}
.gal-cta:active{transform:translate(2px,2px);box-shadow:2px 2px 0 var(--ink)}

/* ========================================================= PHOTO WALL */
.gal-grid-sec{position:relative;z-index:2;padding:0 0 clamp(70px,9vw,110px)}
.gal-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:22px;
  list-style:none;margin:0;padding:0}
/* fixed square frames; photos cover-fill (edges crop in the thumb — the
   viewer shows the whole shot). aspect-ratio reserves the space, so the
   wall never shifts as lazy images arrive. */
.gal-thumb{display:block;width:100%;aspect-ratio:1/1;padding:0;cursor:pointer;
  background:var(--photo-bg,#ddd6c6);border:3px solid var(--ink);border-radius:12px;
  overflow:hidden;box-shadow:4px 4px 0 rgba(0,0,0,.28);
  transition:transform .16s cubic-bezier(.2,.7,.3,1),box-shadow .16s}
.gal-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.gal-thumb:hover,.gal-thumb:focus-visible{transform:translate(-2px,-3px);box-shadow:6px 6px 0 rgba(0,0,0,.34)}
.gal-thumb:focus-visible{outline:3px solid var(--gal-blue);outline-offset:2px}
.gal-thumb:active{transform:translate(1px,1px);box-shadow:2px 2px 0 rgba(0,0,0,.3)}

@media(max-width:980px){.gal-grid{grid-template-columns:repeat(3,1fr);gap:16px}}
@media(max-width:620px){.gal-grid{grid-template-columns:repeat(2,1fr);gap:12px}}

/* ============================================================= VIEWER */
html.gal-lock,html.gal-lock body{overflow:hidden}
.gal-lb{position:fixed;inset:0;z-index:9999;display:flex;flex-direction:column;
  background:rgba(14,23,42,.95)}
.gal-lb[hidden]{display:none}
.gal-lb-stage{position:relative;flex:1;min-height:0;margin:0;
  display:flex;align-items:center;justify-content:center;padding:54px 68px 10px}
/* whole photo always visible in the viewer — no cropping here */
.gal-lb-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;
  border-radius:10px;box-shadow:0 10px 40px rgba(0,0,0,.5)}
.gal-lb-x{position:absolute;top:14px;right:16px;z-index:3;cursor:pointer;
  font-family:'Rubik','Rubik Fallback',sans-serif;font-weight:900;font-size:19px;line-height:1;
  color:#0E172A;background:var(--gal-gold);border:2px solid #0E172A;border-radius:999px;
  width:42px;height:42px;box-shadow:3px 3px 0 rgba(0,0,0,.5);
  transition:transform .16s cubic-bezier(.2,.7,.3,1)}
.gal-lb-x:hover,.gal-lb-x:focus-visible{transform:translateY(-1px)}
.gal-lb-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;cursor:pointer;
  font-family:'Rubik','Rubik Fallback',sans-serif;font-weight:900;font-size:30px;line-height:1;
  color:#0E172A;background:rgba(251,245,233,.92);border:2px solid #0E172A;border-radius:999px;
  width:52px;height:52px;box-shadow:3px 3px 0 rgba(0,0,0,.5);
  transition:transform .16s cubic-bezier(.2,.7,.3,1),background .14s}
.gal-lb-nav:hover,.gal-lb-nav:focus-visible{background:var(--gal-gold)}
.gal-lb-nav.prev{left:14px}
.gal-lb-nav.next{right:14px}
.gal-lb-nav:hover{transform:translateY(-50%) translateY(-1px)}
/* footer: counter + thumb strip so you always know where you are */
.gal-lb-foot{flex:0 0 auto;padding:8px 12px calc(14px + env(safe-area-inset-bottom));
  text-align:center}
.gal-lb-count{display:inline-block;font-family:'Bungee','Bungee Fallback',sans-serif;
  font-size:13px;letter-spacing:.8px;color:#FBF5E9;margin:0 0 10px}
.gal-lb-strip{display:flex;gap:8px;overflow-x:auto;padding:4px 4px 8px;
  scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.gal-lb-dot{flex:0 0 58px;width:58px;height:58px;padding:0;cursor:pointer;
  border:2px solid rgba(251,245,233,.35);border-radius:8px;overflow:hidden;
  background:#1d2942;opacity:.62;transition:opacity .14s,border-color .14s}
.gal-lb-dot img{display:block;width:100%;height:100%;object-fit:cover}
.gal-lb-dot:hover,.gal-lb-dot:focus-visible{opacity:1}
.gal-lb-dot.is-on{opacity:1;border-color:var(--gal-gold);box-shadow:0 0 0 2px rgba(224,165,38,.45)}

@media(max-width:640px){
  .gal-lb-stage{padding:52px 8px 8px}
  /* on phones the side arrows would cover the photo — swipe + the strip
     do the driving; arrows shrink into the bottom corners of the stage */
  .gal-lb-nav{top:auto;bottom:6px;transform:none;width:44px;height:44px;font-size:24px}
  .gal-lb-nav:hover{transform:translateY(-1px)}
  .gal-lb-dot{flex-basis:48px;width:48px;height:48px}
}

/* =============================================== REDUCED MOTION */
@media(prefers-reduced-motion:reduce){
  .gal-confetti .cf{animation:none!important}
  .gal-cta,.gal-thumb,.gal-lb-x,.gal-lb-nav,.gal-lb-dot{transition:none}
}
