:root {
  --bg: #fbf6ec;
  --surface: #ffffff;
  --ink: #1d1a2e;
  --muted: #5d5870;
  --brass: #f2b632;
  --accent: #c8362b;
  --line: #e7dcc6;
  --header-bg: #5b2a9e;
  --header-ink: #fbf6ec;
  --blue: #3a7bd5;
  --blue-text: #3a7bd5;                /* h1s and h2s */
  --stripe: rgba(58, 123, 213, .45);   /* blue pinstripes over the purple header */
  --radius: 12px;
  --display: "Alfa Slab One", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15131f;
    --surface: #1f1c2c;
    --ink: #f1ece2;
    --muted: #b1abbd;
    --accent: #ff7a6b;
    --line: #34304a;
    --header-bg: #3d1c70;
    --blue: #2f62b0;
    --blue-text: #6fa3ec;
    --stripe: rgba(58, 123, 213, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* header: logo (home link) + tagline + nav
   mobile:  [logo][tagline]      desktop: [logo][tagline]
            [nav pills.......]            [logo][nav pills]   (logo hangs below the bar) */
header.site {
  background:
    repeating-linear-gradient(135deg, transparent 0 26px, var(--stripe) 26px 29px),
    var(--header-bg);
  color: var(--header-ink);
  border-bottom: 6px solid var(--blue);
  position: relative; z-index: 2;
}
header.site .bar {
  max-width: 60rem; margin: 0 auto; padding: 10px 16px;
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  grid-template-areas: "logo tagline" "nav nav";
  column-gap: 12px;
}
.brand {
  grid-area: logo; display: block; line-height: 0;
  background: #fff; border-radius: 50%; padding: 3px;   /* white disc behind the logo */
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform .15s ease;
}
.brand img { width: 76px; height: auto; }
.brand:hover { transform: rotate(-4deg) scale(1.04); }
.tagline {
  grid-area: tagline; color: var(--header-ink); text-decoration: none;
  font-family: var(--display); font-size: clamp(1.05rem, 4.6vw, 1.45rem); line-height: 1.15;
}
header.site nav {
  grid-area: nav; display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px;
}
header.site nav a {
  color: var(--header-ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 7px 12px; border-radius: 999px;
}
header.site nav a:hover { background: rgba(255,255,255,.12); }
header.site nav a[aria-current] { background: var(--brass); color: #1d1a2e; }
.menu-toggle { display: none; }

/* mobile: nav collapses behind a hamburger button (only when JS is on; otherwise the pills just show) */
@media (max-width: 759px) {
  .js header.site .bar { grid-template-columns: auto 1fr auto; grid-template-areas: "logo tagline toggle" "nav nav nav"; }
  .js .menu-toggle {
    grid-area: toggle; display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 48px; padding: 0 11px;
    background: none; border: 2px solid rgba(255,255,255,.35); border-radius: 10px; cursor: pointer;
  }
  .menu-toggle span { display: block; height: 3px; border-radius: 2px; background: var(--header-ink); transition: transform .2s ease, opacity .2s ease; }
  .open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }   /* bars turn into an X */
  .open .menu-toggle span:nth-child(2) { opacity: 0; }
  .open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .js header.site:not(.open) nav { display: none; }
  .js header.site nav { flex-direction: column; gap: 4px; margin-top: 12px; padding-bottom: 6px; }
  .js header.site nav a { font-size: 1.15rem; padding: 12px 16px; border-radius: 10px; }   /* big, thumb-friendly rows */
}

@media (min-width: 760px) {
  header.site .bar {
    grid-template-areas: "logo tagline" "logo nav";
    column-gap: 20px; padding-top: 14px; padding-bottom: 12px;
  }
  .brand { align-self: start; margin-bottom: -46px; box-shadow: 0 4px 10px rgba(0,0,0,.3); }  /* badge hangs over the blue stripe */
  .brand img { width: 140px; }
  .tagline { font-size: 1.75rem; align-self: end; }
  header.site nav { margin-top: 6px; margin-left: -12px; align-self: start; }
}

/* main */
main { max-width: 46rem; margin: 0 auto; padding: 24px 16px 48px; }
h1, h2, h3, summary { font-family: var(--display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: .2em 0 .5em; color: var(--blue-text); }
h2 { font-size: 1.6rem; margin: 1.6em 0 .5em; color: var(--blue-text); }
h3 { font-size: 1.3rem; margin: 1.4em 0 .4em; }
h4, h5 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.crumb { margin: 0; font-size: .9rem; }
.crumb a { color: var(--muted); }
.crumb a::before { content: "← "; }
.date { color: var(--muted); margin-top: -.6em; font-size: .9rem; }
.content > :first-child { margin-top: 0; }
.content img { display: block; margin: 1.2em auto; border-radius: var(--radius); }
blockquote { margin: 1em 0; padding: .2em 1em; border-left: 4px solid var(--blue); color: var(--muted); }
pre, .verse {
  white-space: pre-wrap; font: inherit; font-size: .95rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
ul, ol { padding-left: 1.3em; }
li { margin: .15em 0; }

/* collapsible sections (home page, performances) */
details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 12px 0; padding: 0 16px;
}
details > summary {
  cursor: pointer; list-style: none; padding: 14px 0; font-size: 1.25rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; font-family: var(--body); font-weight: 700; color: var(--blue-text); font-size: 1.4rem; }
details[open] > summary::after { content: "–"; }
details[open] { padding-bottom: 8px; }
details.year ul ul { margin: 0 0 .4em; }

/* pdf/chart links read as buttons-ish */
a[href$=".pdf"] { font-weight: 600; }
a[href$=".pdf"]::before {
  content: "PDF"; font: 700 .65rem/1 var(--body); letter-spacing: .05em;
  background: var(--accent); color: #fff; border-radius: 4px; padding: 3px 5px; margin-right: 6px;
  vertical-align: 2px;
}

/* video embeds */
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.2em 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* people gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 1.4em 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); margin: 0; display: block; }
.page-photos .gallery img { aspect-ratio: 1; }
.gallery figcaption { text-align: center; font-weight: 600; font-size: .95rem; margin-top: 4px; }

/* archive index */
.archive-list { list-style: none; padding: 0; }
.archive-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.archive-list time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* home page "latest" card */
body.page-home .content > h2:first-child {
  margin-top: 0;
}

footer.site { border-top: 1px solid var(--line); padding: 20px 16px 32px; text-align: center; color: var(--muted); font-size: .95rem; }
footer.site a { color: inherit; }

@media (min-width: 760px) {
  main { padding-top: 64px; }  /* clear the hanging logo badge */
  body.page-home main { padding-top: 40px; }
}

/* full-bleed hero photo (set with "hero:" in a page's front matter): full width at any
   screen size, but never taller than it is at the content width (46rem); wider screens
   crop top and bottom. --hero-ratio is height/width of the image (before-parade.webp is 1600x757). */
.hero { background: var(--header-bg); container-type: inline-size; --hero-ratio: calc(757 / 1600); }
.hero img {
  display: block; width: 100%; max-width: none;
  height: min(100cqi * var(--hero-ratio), 46rem * var(--hero-ratio));
  object-fit: cover; object-position: 50% 28%;  /* keep faces, lose sky and pavement */
}

/* callout box, e.g. <p class="notice">…</p> in content */
.notice {
  background: color-mix(in srgb, var(--brass) 22%, var(--surface));
  border-left: 5px solid var(--brass);
  border-radius: var(--radius); padding: 12px 16px; font-weight: 600;
}

/* numbered process steps, e.g. <section class="stage"><h3><span>Stage 1</span> …</h3>… */
.stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 16px 0; overflow: hidden;
}
.stage > h3 {
  margin: 0; padding: 12px 16px; background: var(--header-bg); color: var(--header-ink);
  font-size: 1.1rem;
}
.stage > h3 span {
  display: block; font: 700 .72rem/1.4 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--brass);
}
.stage > ul, .stage > p { margin: 12px 16px; }
