/* ===========================================================================
   Art Gallery: "The Salon". A tab per campaign over a masonry wall, every
   piece at its own shape, title and artist rising on hover, an artist
   filter, and a full-screen viewer (gallery.js). Without the script the
   campaigns stack, each under its own heading, captions showing.
   =========================================================================== */

.wp-site-blocks:has(> .wam-page.wam-ag) { background: #0f0f16; }
.wam-page.wam-ag {
  --ag-panel: #171824;
  --ag-faint: rgba(255, 255, 255, 0.56);
  --ag-pink: #ff5fa8;
  position: relative;
  isolation: isolate;
  background: radial-gradient(900px 460px at 50% -10%, rgba(255, 95, 168, 0.24), transparent 70%), #0f0f16;
  padding-bottom: clamp(64px, 8vw, 100px);
  color: var(--wam-white);
}
.wam-ag .wp-block-group > * { margin-block: 0; }
.wam-ag p { margin: 0; }
.wam-ag [hidden] { display: none !important; }
.wam-ag-wrap { max-width: 1240px; margin-inline: auto; padding-inline: 24px; display: grid; gap: 22px; }

.wam-ag-hero { display: grid; gap: 6px; padding-top: clamp(44px, 6vw, 60px); animation: wam-rise 0.8s var(--wam-ease) both; }
.wam-ag .wam-ag-eyebrow { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.wam-ag .wam-ag-eyebrow a { color: var(--ag-pink); text-decoration: none; }
.wam-ag .wam-ag-eyebrow a:hover { text-decoration: underline; }
.wam-ag .wam-ag-h1 { margin: 0; color: var(--wam-white); font: 800 clamp(2.2rem, 5vw, 3.4rem)/1.05 var(--wam-font); letter-spacing: -0.01em; }
.wam-ag .wam-ag-lede { max-width: 60ch; color: var(--wam-faded); }
.wam-ag .wam-ag-stats { color: var(--ag-faint); font-size: 0.86rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.wam-ag-salon { display: grid; gap: 34px; }
.wam-ag-campaign { display: grid; gap: 14px; scroll-margin-top: 90px; }
.wam-ag .wam-ag-camp-title { margin: 0; color: var(--wam-white); font: 800 1.6rem/1.15 var(--wam-font); }

/* Controls, built by gallery.js */
.wam-ag-controls { display: grid; gap: 10px; }
.wam-ag-tabs, .wam-ag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wam-ag-tab, .wam-ag-chip { margin: 0; border: 0; cursor: pointer; font-family: var(--wam-font); transition: background-color 0.2s ease, color 0.2s ease; }
.wam-ag-tab { padding: 10px 16px; border-radius: 14px; background: var(--ag-panel); box-shadow: inset 0 0 0 1px var(--wam-line); color: var(--wam-faded); font-size: 0.95rem; font-weight: 700; }
.wam-ag-tab small { margin-left: 6px; color: var(--ag-faint); font-size: 0.8em; font-weight: 600; font-variant-numeric: tabular-nums; }
.wam-ag-tab:hover { color: var(--wam-white); }
.wam-ag-tab[aria-selected="true"] { background: var(--wam-white); color: #10101a; box-shadow: none; }
.wam-ag-tab[aria-selected="true"] small { color: #55556a; }
.wam-ag-chip { padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--wam-line); color: var(--wam-faded); font-size: 0.86rem; font-weight: 600; }
.wam-ag-chip:hover { color: var(--wam-white); }
.wam-ag-chip[aria-pressed="true"] { background: var(--ag-pink); color: var(--wam-white); box-shadow: none; }
.wam-ag-tab:focus-visible, .wam-ag-chip:focus-visible, .wam-ag .wam-ag-piece:focus-visible { outline: 2px solid var(--wam-gold); outline-offset: 3px; }
.wam-ag.is-tabbed .wam-ag-camp-title { display: none; }
.wam-ag .wam-ag-empty { padding: 26px; border-radius: 16px; background: var(--ag-panel); color: var(--ag-faint); text-align: center; }

/* The wall */
.wam-ag .wam-ag-wall { columns: 4 230px; column-gap: 14px; }
.wam-ag .wam-ag-wall > .wam-ag-piece { margin: 0 0 14px; }
.wam-ag .wam-ag-piece {
  position: relative;
  display: block;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 14px;
  background: #1d1e2b;
}
.wam-ag .wam-ag-piece > img { display: block; width: 100%; max-width: 100%; height: auto; transition: transform 0.6s var(--wam-ease); }
.wam-ag .wam-ag-piece figcaption {
  margin: 0;
  padding: 10px 12px;
  color: var(--wam-faded);
  font: 400 0.78rem/1.35 var(--wam-font);
  text-align: left;
}
.wam-ag .wam-ag-piece figcaption strong { color: var(--wam-white); font-size: 0.92rem; font-weight: 700; }
.wam-ag.is-tabbed .wam-ag-piece { cursor: zoom-in; }
.wam-ag.is-tabbed .wam-ag-piece figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.86));
  color: rgba(255, 255, 255, 0.75);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s var(--wam-ease);
  pointer-events: none;
}
@media (hover: hover) {
  .wam-ag.is-tabbed .wam-ag-piece:hover > img { transform: scale(1.04); }
  .wam-ag.is-tabbed .wam-ag-piece:hover figcaption { opacity: 1; transform: none; }
}
.wam-ag.is-tabbed .wam-ag-piece:focus-visible figcaption { opacity: 1; transform: none; }
@media (hover: none) { .wam-ag.is-tabbed .wam-ag-piece figcaption { opacity: 1; transform: none; } }

/* The viewer, appended to body by gallery.js */
.wam-ag-lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  align-items: center;
  padding: 20px;
  background: rgba(6, 6, 10, 0.94);
  font-family: var(--wam-font);
  color: var(--wam-white);
}
.wam-ag-lb[hidden] { display: none; }
.wam-ag-lb figure { margin: 0; display: grid; justify-items: center; gap: 10px; min-width: 0; }
.wam-ag-lb img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: 12px; }
.wam-ag-lb figcaption { text-align: center; }
.wam-ag-lb figcaption b { display: block; font-size: 1.1rem; }
.wam-ag-lb figcaption span { color: rgba(255, 255, 255, 0.6); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.wam-ag-lb button {
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(23, 24, 36, 0.9);
  color: var(--wam-white);
  font: 400 1.5rem/1 var(--wam-font);
  cursor: pointer;
}
.wam-ag-lb button:hover { background: #262838; }
.wam-ag-lb button:focus-visible { outline: 2px solid var(--wam-gold); outline-offset: 3px; }
.wam-ag-lb .wam-ag-lb-x { position: absolute; top: 16px; right: 16px; }
html.wam-ag-locked { overflow: hidden; }

@media (max-width: 760px) {
  .wam-ag .wam-ag-wall { columns: 2 140px; column-gap: 10px; }
  .wam-ag .wam-ag-wall > .wam-ag-piece { margin-bottom: 10px; }
  .wam-ag-lb { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 10px; }
  .wam-ag-lb button { width: 40px; height: 40px; font-size: 1.2rem; }
}
@media (max-width: 640px) { .wam-ag-wrap { padding-inline: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .wam-ag *, .wam-ag *::before, .wam-ag *::after, .wam-ag-lb * { animation: none !important; transition-duration: 0.01ms !important; }
}
