/* gallery.html ONLY — stats band = affidavit.html 1054–1091 live render inside <main>
   Ports affidavit.css: 3588–3636 (article-card shell), 3639–3658 (__caption),
   4556–4587 (glass-caption + main pill pass). Scoped as .gallery-stats-band ≈ main */

/* Band HEIGHT locked in career-page-body-sections.css — do not set section padding here */

/* --- Grid (affidavit 514–525) --- */
html[data-gallery-page] main#gallery-page-body .gallery-stats-band .grid {
  display: grid;
  gap: 14px;
  width: 100%;
  align-items: start;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* --- article-card shell: 3588 base + 4559 main nullify (bg/border/shadow) --- */
html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
  margin: 0;
  width: 100%;
  height: auto;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    filter 0.28s ease;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card:hover .glass-caption {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.76);
  box-shadow:
    0 44px 86px rgba(72, 27, 130, 0.24),
    0 18px 34px rgba(72, 27, 130, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 rgba(72, 27, 130, 0.12);
}

/* --- glass-caption (affidavit 4556–4558) --- */
html[data-gallery-page] main#gallery-page-body .gallery-stats-band .glass-caption {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 10px 12px !important;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(72, 27, 130, 0.14), transparent 34%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(250, 248, 255, 0.72) 52%, rgba(245, 240, 252, 0.62)),
    rgba(255, 255, 255, 0.44);
  box-shadow:
    0 34px 70px rgba(72, 27, 130, 0.2),
    0 14px 30px rgba(72, 27, 130, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -2px 0 rgba(72, 27, 130, 0.1);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .glass-caption::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.04) 42%, rgba(255, 255, 255, 0.16));
  pointer-events: none;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .glass-caption > * {
  position: relative;
  z-index: 2;
}

/* --- article-card__caption: 3639 structure + 4564/4571 main pill pass --- */
html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-grow: 0;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  border-radius: 14px;
  padding: 6px 8px !important;
  flex: 0 0 auto !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.88) 0%, rgba(250, 248, 255, 0.8) 52%, rgba(245, 240, 252, 0.74) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(245, 240, 252, 0.46)),
    rgba(255, 255, 255, 0.38);
  box-shadow:
    0 24px 48px rgba(72, 27, 130, 0.16),
    0 12px 24px rgba(72, 27, 130, 0.08),
    0 18px 36px rgba(72, 27, 130, 0.12),
    0 8px 18px rgba(72, 27, 130, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(72, 27, 130, 0.08);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    filter 0.28s ease;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card__caption::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 54%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
  pointer-events: none;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card__caption:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.74);
  box-shadow:
    0 32px 56px rgba(72, 27, 130, 0.18),
    0 14px 26px rgba(72, 27, 130, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(72, 27, 130, 0.11);
  filter: brightness(1.02);
}

/* --- h3 + p raised pills (affidavit 4564–4571, 4581) --- */
html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3,
html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card p {
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  margin: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(245, 240, 252, 0.46)),
    rgba(255, 255, 255, 0.38);
  box-shadow:
    0 18px 36px rgba(72, 27, 130, 0.12),
    0 8px 18px rgba(72, 27, 130, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(72, 27, 130, 0.08);
  backdrop-filter: blur(18px) saturate(142%);
  -webkit-backdrop-filter: blur(18px) saturate(142%);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    filter 0.28s ease;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3::before,
html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card p::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 54%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
  pointer-events: none;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3 {
  width: fit-content;
  max-width: 100%;
  border-radius: 18px;
  padding: 6px 10px !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: clamp(2.1rem, 4.2vw, 2.85rem) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  color: #2e0c5e !important;
  text-transform: none !important;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3.odometer {
  display: inline-block;
  vertical-align: middle;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3 .odometer-value {
  color: #2e0c5e !important;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card p {
  width: fit-content;
  max-width: 100%;
  border-radius: 14px;
  padding: 4px 8px !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #275c53 !important;
  line-height: 1.4 !important;
}

html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3:hover,
html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card p:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.74);
  box-shadow:
    0 32px 56px rgba(72, 27, 130, 0.18),
    0 14px 26px rgba(72, 27, 130, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(72, 27, 130, 0.11);
  filter: brightness(1.02);
}

@media (max-width: 1080px) {
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .glass-caption {
    padding: 10px 12px !important;
    gap: 6px;
  }

  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .grid--4 {
    grid-template-columns: 1fr;
  }

  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3 {
    width: 100%;
  }
}

@media (max-width: 540px) {
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card:hover .glass-caption {
    transform: translateY(-6px);
  }
}

@media (max-width: 480px) {
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card__caption,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card p {
    padding: 6px 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .glass-caption,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card__caption,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card p {
    transition: none !important;
  }

  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card:hover .glass-caption,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card__caption:hover,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card h3:hover,
  html[data-gallery-page] main#gallery-page-body .gallery-stats-band .article-card p:hover {
    transform: none !important;
  }
}