/* Denver Municipal Band — site.css
   Mobile-first. One file, no framework. Colors live in the :root tokens so a
   new palette is a few-line change. */

@font-face {
  font-family: Raleway;
  src: url(/assets/fonts/raleway-latin.woff2) format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  /* palette (matches the current WordPress site) */
  --text: #555;
  --heading: #444;
  --link: #3e3d3d;
  --dark: #3e3d3d;
  --dark-text: #fff;
  --accent: #ffc0cb;
  --accent-text: #2b2b2b;
  --bg: #fff;
  --footer-bg: #000;
  --footer-text: #fff;
  --overlay: rgb(0 0 0 / 0.55);

  --font: Raleway, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 68rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(3rem, 8vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font: 400 clamp(1.0625rem, 0.98rem + 0.4vw, 1.1875rem)/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
}
img, iframe { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.65rem); font-weight: 700; }
p, ul, ol { margin: 0 0 1.1em; }
p { text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { color: #000; }
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 3px; }
.skip { position: absolute; left: 0.5rem; top: -4rem; z-index: 100; background: #fff; color: #000; padding: 0.6rem 1rem; }
.skip:focus { top: 0.5rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.narrow { max-width: 50rem; }
.center { text-align: center; }
.center.narrow, .narrow.center { margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section > .wrap > :last-child { margin-bottom: 0; }

/* ---------- header ---------- */
.probe { position: absolute; top: 0; left: 0; width: 1px; height: 80px; pointer-events: none; }
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 50; color: #fff; }
.js .site-header { position: fixed; transition: background-color 0.25s, box-shadow 0.25s; }
.site-header.is-stuck, .site-header:has(:popover-open) {
  background: #fff; color: var(--text); box-shadow: 0 2px 14px rgb(0 0 0 / 0.2);
}
.bar { display: flex; align-items: center; justify-content: center; min-height: 4.25rem; gap: 1rem; }
.is-stuck .bar, .site-header:has(:popover-open) .bar { justify-content: space-between; }
.logo { display: none; }
.is-stuck .logo, .site-header:has(:popover-open) .logo { display: block; }
.logo img { width: clamp(9rem, 22vw, 12.5rem); }

.nav-toggle {
  display: none; margin-left: auto; padding: 0.6rem 1rem; min-height: 2.75rem;
  font: 700 1rem var(--font); color: inherit; background: none;
  border: 2px solid currentColor; border-radius: 2rem; cursor: pointer;
}
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.15rem; }
nav a {
  display: block; padding: 0.7rem 0.8rem; color: inherit; text-decoration: none;
  font-size: 0.9375rem; font-weight: 500; border-radius: 3px;
}
nav a:hover, nav a[aria-current] { text-decoration: underline; text-underline-offset: 0.35em; color: inherit; }
nav a.donate { background: var(--accent); color: var(--accent-text); font-weight: 700; }
nav a.donate:hover { text-decoration: none; filter: brightness(0.95); }

@media (max-width: 52.99rem) {
  .nav-toggle { display: block; }
  .site-header .bar { justify-content: space-between; }
  .site-header .logo { display: none; }
  .site-header:has(:popover-open) .logo, .is-stuck .logo { display: block; }
  nav[popover] {
    position: fixed; inset: 0 0 auto 0; margin: 0; width: 100%; max-height: 100dvh; overflow: auto;
    padding: 4.5rem var(--gutter) 1.5rem; border: 0; background: #fff; color: var(--text);
    box-shadow: 0 8px 20px rgb(0 0 0 / 0.25);
  }
  nav[popover] ul { flex-direction: column; gap: 0; }
  nav[popover] a { font-size: 1.15rem; padding: 0.9rem 0.5rem; border-bottom: 1px solid #eee; }
  nav[popover] a.donate { margin-top: 0.75rem; text-align: center; border-radius: 2rem; border: 0; }
  .site-header:has(:popover-open) .nav-toggle { position: relative; z-index: 2; }
}
@media (min-width: 53rem) {
  nav[popover] { display: block !important; position: static; inset: auto; margin: 0; padding: 0; border: 0;
    width: auto; height: auto; overflow: visible; background: none; color: inherit; }
}

/* ---------- hero + page banners ---------- */
.hero, .banner { position: relative; isolation: isolate; display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden; }
.hero > img, .banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before, .banner::before { content: ""; position: absolute; inset: 0; background: var(--overlay); z-index: -1; }
.hero { min-height: 100vh; min-height: 100svh; padding: 6rem var(--gutter) 4rem; }
.hero h1, .banner h1 { color: #fff; margin: 0 0 0.4em; text-shadow: 0 1px 8px rgb(0 0 0 / 0.5); }
.hero .lead { font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem); font-weight: 400; max-width: 34rem; margin: 0 auto 1.8rem; }
.banner { padding: clamp(7rem, 16vw, 11rem) var(--gutter) clamp(3rem, 9vw, 7rem); }
.banner h1 { margin: 0; }
.btns { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

.btn {
  display: inline-block; padding: 0.75em 1.7em; min-height: 2.75rem; text-align: center;
  font: 700 1rem/1.3 var(--font); text-decoration: none; color: var(--link);
  border: 2px solid currentColor; border-radius: 3rem; background: transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn--light { color: #fff; }
.btn--solid, .dark a.btn--solid { background: #fff; color: var(--link); border-color: #fff; }
.btn--solid:hover, .dark a.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* ---------- content blocks ---------- */
.dark { background: var(--dark); color: var(--dark-text); position: relative; isolation: isolate; }
.dark h2, .dark h3 { color: var(--dark-text); }
.dark a { color: inherit; }
.bgimg { background: var(--dark) center / cover no-repeat; }
.bgimg::before { content: ""; position: absolute; inset: 0; background: var(--overlay); z-index: -1; }
.bg-impact { background-image: url(/assets/img/impact-bg.webp); }
.bg-impact::before { background: rgb(62 61 61 / 0.88); }
.bg-mission { background-image: url(/assets/img/mission-bg-800.webp); }
.bg-about { background-image: url(/assets/img/about-bg.webp); }
.bg-program { background-image: url(/assets/img/banner-program-800.webp); }
.bg-gives { background-image: url(/assets/img/donate-gives-800.webp); }
.bg-gives::before { background: rgb(0 0 0 / 0.78); }
@media (min-width: 50rem) {
  .bg-mission { background-image: url(/assets/img/mission-bg-1600.webp); }
  .bg-program { background-image: url(/assets/img/banner-program-1376.webp); }
  .bg-gives { background-image: url(/assets/img/donate-gives-1400.webp); }
}

.stats { list-style: none; padding: 0; font-size: 1.2em; }
.stats li { margin: 0 0 0.8em; }
.stats li::before { content: "\266A\00a0"; }
.stats-lead { font-weight: 800; font-size: 1.25em; }

.cols { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }
.cols > * { min-width: 0; }
@media (min-width: 48rem) {
  .cols-2 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cols-4 { grid-template-columns: repeat(4, 1fr); }
  .cols-split { grid-template-columns: 1fr 1fr; align-items: center; }
}
@media (min-width: 40rem) and (max-width: 47.99rem) { .cols-4 { grid-template-columns: repeat(2, 1fr); } }
.cols-edu { align-items: center; }
@media (min-width: 56rem) { .cols-edu { grid-template-columns: 1fr 1.4fr 1fr; } }
.cols img { margin-inline: auto; border-radius: 3px; }
.mission h3 { color: #fff; }
.mission p { margin: 0; }

.yt { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: 3px; }
.yt a, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt a::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4.5rem; height: 3.2rem; translate: -50% -50%;
  background: #e00 linear-gradient(#fff, #fff) no-repeat; border-radius: 0.9rem;
  clip-path: none;
}
.yt a::before {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -35% -50%; z-index: 1;
  border-left: 1.2rem solid #fff; border-block: 0.75rem solid transparent;
}
.yt a::after { background: #e00; }
.yt a:hover::after, .yt a:focus-visible::after { background: #c00; }

.embed { width: 100%; height: clamp(26rem, 80vw, 40rem); border: 1px solid #ddd; }

.cards { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .cards.cards-4 { grid-template-columns: repeat(4, 1fr); } .cards.cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { border: 1px solid #e3e3e3; border-radius: 6px; padding: 1.25rem; background: #fff; display: flex; flex-direction: column; }
.card h3 { margin-top: 0; }
.card img { margin-bottom: 1rem; width: 100%; border-radius: 3px; }
.card .price { margin: auto 0 0; font-weight: 800; color: var(--heading); font-size: 1.2em; }

.checks { columns: 14rem; column-gap: 2rem; padding-left: 1.2rem; }
.checks li { break-inside: avoid; margin-bottom: 0.3em; }
.names { list-style: none; padding: 0; columns: 15rem; column-gap: 2rem; }
.names li { break-inside: avoid; margin-bottom: 0.35em; }

.float-img { margin: 0 0 1.5rem; }
.history-imgs { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: center; margin: 1.5rem 0; }
.history-imgs img { border-radius: 3px; }
.timeline { list-style: none; margin: 2rem 0 0; padding: 0 0 0 1.4rem; border-left: 3px solid var(--accent); }
.timeline li { position: relative; margin-bottom: 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.4rem - 8px); top: 0.55em; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--dark); }
.timeline h3 { margin: 0 0 0.2em; font-size: 1.3rem; }
.timeline p { margin: 0; }

.gallery { display: grid; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); list-style: none; padding: 0; }
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery a:hover img { transform: scale(1.04); }
dialog#lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96dvh; }
dialog#lightbox::backdrop { background: rgb(0 0 0 / 0.88); }
dialog#lightbox img { max-width: 96vw; max-height: 90dvh; width: auto; margin: auto; border-radius: 3px; }
dialog#lightbox button { display: block; margin: 0.5rem auto 0; padding: 0.5rem 1.5rem; font: 700 1rem var(--font); border-radius: 2rem; border: 0; cursor: pointer; }

.back { margin-top: 2rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding-block: 3rem 2rem; }
.site-footer h2 { font-size: 1.15rem; color: #fff; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 1rem; }
.site-footer a { color: #fff; }
.site-footer p { font-size: 1rem; }
.logos { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: center; }
.logos img { background: #fff; padding: 4px; border-radius: 3px; }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.social a { display: block; padding: 0.55rem 1.1rem; border: 1px solid #777; border-radius: 2rem; text-decoration: none; font-size: 1rem; }
.social a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.copyright { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid #333; font-size: 0.9rem; text-align: center; }
@media (min-width: 56rem) { .footer-cols { grid-template-columns: 1.3fr 0.8fr 1.4fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .nav-toggle, .hero > img, .banner > img { display: none; }
  .hero, .banner { min-height: 0; padding: 1rem 0; color: #000; }
  .hero h1, .banner h1 { color: #000; text-shadow: none; }
}
