/* Impact360 — gallery composition (shared components live in site.css).
   v2 corporate restraint: a calm page — justified rows of uncropped prints in thin frosted frames, a plain video
   tile grid (letterboxed covers on navy, a flat play button, a duration badge), one frosted podcast card.
   Nothing loops or glows; reveals and hovers only. Breakpoints match the row solver in tools/pages/gallery.py:
   lg >= 1080px · md 521–1079px · sm <= 520px (everything else switches at the site's 640px). */

/* ---------------------------------------------------------------- hero: title + on-page links */
.gal-hero .page-hero-window { min-height: clamp(320px, 42vh, 460px); }
.gal-hero .page-hero-inner { min-width: 0; }
.gal-hero .page-hero-aside { padding-block-end: .35em; }
.gal-jump { display: flex; flex-wrap: wrap; gap: 4px 26px; }
.gal-jump a {
  padding-block: 8px 7px; border-block-end: 1px solid rgba(255, 255, 255, .4);
  font: 500 15.5px/1 var(--font-body); color: #fff; text-decoration: none;
  transition: border-color .25s var(--ease);
}
.gal-jump a:hover { border-color: #fff; }

/* ---------------------------------------------------------------- section headings: bold, start-aligned, a thin rule */
.gal-head, .gal-sec-head {
  margin-block-end: clamp(26px, 3vw, 44px); padding-block-end: clamp(18px, 2vw, 26px);
  border-block-end: 1px solid rgba(10, 31, 68, .14);
}
.gal-sec-title { font: 900 clamp(30px, 3.4vw, 46px)/1.1 var(--font-display); letter-spacing: -.012em; color: var(--ink); }

/* ---------------------------------------------------------------- photos: motto + tagline */
.gal-photos { padding-block: clamp(64px, 7vw, 112px) clamp(48px, 5vw, 80px); }
.gal-motto {
  width: fit-content; max-width: 100%;
  font: 800 clamp(40px, 6.2vw, 88px)/1 var(--font-display); letter-spacing: -.03em; color: var(--ink);
}
.gm-w { display: inline-block; white-space: nowrap; }
/* the full stops stay in the text (screen readers, the content check); they are set in blue and tucked against
   the word that precedes them (the Impact360 lockup: DREAM. BUILD. SCALE) */
.gal-motto strong { font-weight: inherit; color: var(--blue); margin-inline-start: -.2em; }
.gal-tag { margin-block-start: clamp(14px, 1.6vw, 22px); max-width: 44rem; }
.gal-tag-ln { display: block; font: 500 clamp(17px, 1.45vw, 21px)/1.5 var(--font-body); color: var(--ink-2); text-wrap: balance; }

/* ---------------------------------------------------------------- photos: justified rows of uncropped prints
   Each print grows with its aspect ratio from a zero basis, so every print in a row ends up the same height and the
   row is filled edge to edge; the row breaks are solved per breakpoint in gallery.py (.gal-br). Row spacing is a
   margin, not row-gap, so the zero-height break lines add nothing. */
.gal-wall { --g: 14px; --mat: 4px; --r: 14px; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; column-gap: var(--g); }
.gal-br { display: none; flex: 0 0 100%; height: 0; margin: 0; padding: 0; }
/* a thin frosted frame: a white mat with a hairline rim and a soft navy shadow (no backdrop pass, no sheen) */
.gal-print {
  flex: var(--ar) 1 0; min-width: 0; margin-block-end: var(--g);
  padding: var(--mat); border-radius: var(--r);
  background: rgba(255, 255, 255, .74);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .95), 0 0 0 1px rgba(10, 31, 68, .06), 0 14px 30px -20px rgba(10, 31, 68, .4);
  transition: translate .4s var(--ease), box-shadow .4s var(--ease);
}
.gal-link {
  position: relative; display: block; overflow: hidden;
  border-radius: calc(var(--r) - var(--mat));
  background: #e6edfb;
}
.gal-link img { width: 100%; height: auto; }
.gal-zoom {
  position: absolute; z-index: 2; bottom: 10px; inset-inline-end: 10px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ink);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 1px rgba(10, 31, 68, .08), 0 6px 14px -8px rgba(10, 31, 68, .5);
  opacity: 0; transition: opacity .25s var(--ease);
}
.gal-zoom .i { width: 16px; height: 16px; }
@media (hover: hover) {
  .gal-print:hover { translate: 0 -2px; box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px rgba(10, 31, 68, .08), 0 22px 40px -22px rgba(10, 31, 68, .5); }
  .gal-print:hover .gal-zoom { opacity: 1; }
}
.gal-link:focus-visible .gal-zoom { opacity: 1; }

/* ---------------------------------------------------------------- videos: tile grid */
.gal-videos { padding-block: clamp(40px, 4vw, 64px) clamp(56px, 6vw, 96px); }
.gal-vgrid.vtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 2.6vw, 34px) clamp(14px, 1.8vw, 22px); }
.gal-vgrid .vtile-link { position: relative; gap: 12px; border-radius: 16px; }
/* the shared 4:5 tile; a landscape cover sits whole on the navy plate (letterboxed) instead of being cropped */
.gal-vgrid .vtile-media {
  aspect-ratio: 4 / 5; border-radius: 16px; background: var(--night);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .8), 0 14px 30px -20px rgba(10, 31, 68, .45);
}
.gal-vgrid .vtile-media::after { display: none; }
.gal-vgrid .vtile:not(.vtile--portrait) .vtile-img { object-fit: contain; }
.gal-vgrid .vtile-link:hover .vtile-img { scale: 1; }
.gal-vgrid .vtile--portrait .vtile-link:hover .vtile-img { scale: 1.03; }
/* a flat play button in the tile's bottom-start corner (no frost, no rim, no sheen), so it never sits on a face
   or on the title text of a letterboxed cover */
.gal-vgrid .vtile-play {
  inset: auto; bottom: 12px; inset-inline-start: 12px; margin: 0;
  width: 48px; height: 48px; color: var(--ink); background: #fff;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .55);
  transition: transform .3s var(--ease);
}
.gal-vgrid .vtile-play::before, .gal-vgrid .vtile-play::after { display: none; }
.gal-vgrid .vtile-play .i { width: 20px; height: 20px; }
.gal-vgrid .vtile-link:hover .vtile-play { transform: scale(1.05); }
/* the duration badge in the opposite corner (gallery.py moves it onto the cover). The badge is direction: ltr
   (site.css), so its own logical insets resolve as LTR: it is placed with physical sides per page direction */
.gal-vgrid .vtile-dur {
  position: absolute; z-index: 2; bottom: 12px; right: 12px;
  padding: 7px 9px 6px; border-radius: 8px; gap: 5px;
  font: 600 12.5px/1 var(--font-display); color: #fff;
  background: rgba(10, 31, 68, .8);
}
[dir="rtl"] .gal-vgrid .vtile-dur { right: auto; left: 12px; }
.gal-vgrid .vtile-dur .i { width: 13px; height: 13px; }
.gal-vgrid .vtile-meta { padding-inline: 2px; }
.gal-vgrid .vtile-title { font: 700 17px/1.35 var(--font-display); color: var(--ink); }

/* ---------------------------------------------------------------- podcast: one frosted card */
.gal-pod { padding-block: 0 clamp(72px, 8vw, 128px); }
.gal-pod-card {
  --tint-a: rgba(255, 255, 255, .8); --tint-b: rgba(255, 255, 255, .66);
  max-width: 860px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(16px, 2vw, 24px); border-radius: 24px;
}
.gal-pod-art { display: block; border-radius: 14px; }
.gal-pod-img { width: 100%; height: auto; border-radius: inherit; box-shadow: 0 0 0 1px rgba(10, 31, 68, .08); }
.gal-pod-copy { min-width: 0; padding-block: 8px; padding-inline-end: clamp(8px, 3vw, 40px); }
.gal-pod-title { font: 800 clamp(40px, 4.8vw, 68px)/1 var(--font-display); letter-spacing: -.03em; color: var(--ink); }
.gal-pod-cta { margin-block-start: clamp(18px, 2.4vw, 30px); }

/* ---------------------------------------------------------------- the viewer: a plain navy room (the shared
   lightbox's ambient light and spring buttons are turned off on this page) */
.page-gallery .lightbox::before { display: none; }
.page-gallery .lightbox::backdrop { background: rgba(10, 31, 68, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.page-gallery .lb-stage img, .page-gallery .lb-stage video {
  background: var(--night); border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 30px 70px -30px rgba(0, 0, 0, .7);
}
.page-gallery .lb-cap { font: 500 15.5px/1.5 var(--font-body); }
.page-gallery .lb-btn {
  background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); transition: background .25s var(--ease);
}
.page-gallery .lb-btn:hover { transform: none; background: rgba(255, 255, 255, .26); }

/* ---------------------------------------------------------------- breakpoints (row solver: lg / md / sm) */
@media (min-width: 1080px) {
  .br-lg { display: block; }
}
@media (max-width: 1079px) {
  .gal-wall { --g: 10px; --mat: 3px; --r: 12px; }
}
@media (min-width: 521px) and (max-width: 1079px) {
  .br-md { display: block; }
}
@media (min-width: 641px) and (max-width: 1079px) {
  .gal-vgrid.vtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; }
}
@media (max-width: 520px) {
  .br-sm { display: block; }
  .gal-wall { --g: 8px; --mat: 3px; --r: 10px; }
}
@media (max-width: 640px) {
  .gal-zoom { display: none; }
  .gal-hero .page-hero-aside { width: 100%; }
  .gal-jump { gap: 0 20px; }
  .gal-jump a { font-size: 15px; }
  .gal-motto { font-size: clamp(38px, 12vw, 54px); }
  .gal-tag-ln { font-size: 17px; }
  .gal-vgrid.vtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .gal-vgrid .vtile-media { border-radius: 12px; }
  .gal-vgrid .vtile-play { width: 48px; height: 48px; }
  .gal-vgrid .vtile-play .i { width: 19px; height: 19px; }
  .gal-vgrid .vtile-dur { bottom: 8px; right: 8px; padding: 6px 7px 5px; font-size: 12px; }
  [dir="rtl"] .gal-vgrid .vtile-dur { right: auto; left: 8px; }
  .gal-vgrid .vtile-play { bottom: 8px; inset-inline-start: 8px; }
  .gal-vgrid .vtile-title { font-size: 15.5px; }
  .gal-pod-card { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 14px 14px 22px; border-radius: 20px; }
  .gal-pod-art { max-width: 300px; }
  .gal-pod-copy { padding: 0 6px; }
  .gal-pod-title { font-size: clamp(38px, 11vw, 48px); }
  .gal-pod-cta { margin-block-start: 16px; }
}

@media (prefers-reduced-transparency: reduce) {
  .gal-print { background: #fff; }
}
@media (forced-colors: active) {
  .gal-print, .gal-vgrid .vtile-media, .gal-pod-img { border: 1px solid CanvasText; }
  .gal-motto strong { color: CanvasText; }
}

/* YouTube podcast cards: a small kicker (format · show) above the title */
.gal-pod-kicker { margin: 0 0 6px; font: 600 13.5px/1.4 var(--font-body); color: var(--blue); }
.gal-pod-card:has(.gal-pod-kicker) .gal-pod-title { font-size: clamp(28px, 2.9vw, 42px); line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
