/*
 * No-Mad Nation — global styles.
 *
 * Design rule from the plan: theme in the atmosphere, clarity in the substance.
 * Grit (texture, dark banners, condensed display type) belongs to full-bleed
 * banner sections. Trust surfaces — mission, stats, giving, legal — sit on
 * solid backgrounds at AA contrast or better. Grit never costs legibility.
 *
 * PALETTE: sampled from the crewe emblem (nomad_logo.jpg).
 *   oxide lettering  #9a3b18  ->  --brand-rust
 *   flame mid        #c94418  ->  --brand-rust-bright
 *   ember deep       #5c1608  ->  --brand-rust-deep
 *   flame hot        #e44800  ->  --brand-flame
 *   plate / bones    #787878  ->  --steel-*
 * --brand-hazard is the one addition: the emblem carries no yellow, but CTAs
 * need a value that separates from rust on dark ground. It reads as the hot
 * core of the same fire. Every color routes through these tokens.
 *
 * STRUCTURE: global rules first, then a section per component. There is no
 * scoping mechanism, so generic selectors are namespaced under their component
 * root (.hero .inner, .site-footer .socials, .events .date, and so on). Keep
 * that discipline when adding rules — several of these names collide otherwise.
 */

/* ---------- fonts ----------
   Self-hosted fontsource woff2 files. Latin and latin-ext only; the site is
   English. */

@font-face {
  font-family: 'Oswald Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url("../fonts/oswald-latin-wght-normal.22c3b00d2e65.woff2") format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Oswald Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url("../fonts/oswald-latin-ext-wght-normal.192877db9c16.woff2") format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* --- Brand: sampled from the emblem --- */
  --brand-rust: #9a3b18;
  --brand-rust-bright: #c94418;
  --brand-rust-deep: #5c1608;
  --brand-flame: #e44800;
  --brand-hazard: #f2a11b;

  /* --- Wasteland neutrals --- */
  --sand-50: #faf6f0;
  --sand-100: #f1e9dd;
  --sand-200: #ddd0bd;
  --steel-400: #787878;
  --steel-600: #5a5a5a;
  --bone: #dcdcdc;
  --char-800: #262420;
  --char-900: #171613;
  --char-950: #0d0c0a;

  /* --- Semantic --- */
  --bg: var(--sand-50);
  --bg-alt: var(--sand-100);
  --bg-dark: var(--char-900);
  --bg-dark-alt: var(--char-800);
  --fg: #1c1a17;
  --fg-muted: #55504a;
  --fg-on-dark: #f4efe7;
  --fg-on-dark-muted: #bdb5a8;
  --rule: #d6cab6;
  --rule-dark: #3a3730;

  /* CTA accent — reserved for actions so buttons never get lost in the grit */
  --accent: var(--brand-hazard);
  --accent-fg: #221a06;

  --link: var(--brand-rust-deep);
  --link-on-dark: var(--brand-hazard);

  --font-display: 'Oswald Variable', 'Oswald', Impact, sans-serif;
  --font-body: 'Inter Variable', 'Inter', system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --radius: 4px;

  --shadow: 0 1px 2px rgb(23 22 19 / 0.08), 0 8px 24px rgb(23 22 19 / 0.08);

  color-scheme: light;
}

/* ---------- reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

img,
picture,
svg {
  max-width: 100%;
  display: block;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(a):focus-visible,
:where(button):focus-visible {
  outline: 3px solid var(--brand-hazard);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- typography ---------- */

h1,
h2,
h3,
h4,
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
}

h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
}

p {
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-rust);
  margin-bottom: 0.85rem;
}

.on-dark .eyebrow {
  color: var(--brand-hazard);
}

.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.6;
  color: var(--fg-muted);
}

.on-dark .lede {
  color: var(--fg-on-dark-muted);
}

/* Body copy blocks. */
.prose p + p {
  margin-top: 1.15rem;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: var(--section-y);
}

.section-alt {
  background: var(--bg-alt);
}

.on-dark {
  background: var(--bg-dark);
  color: var(--fg-on-dark);
}

.on-dark h1,
.on-dark h2,
.on-dark h3 {
  color: var(--fg-on-dark);
}

.on-dark a {
  color: var(--link-on-dark);
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head.centered {
  margin-inline: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* ---------- texture ----------
   Banner-only grit. CSS-generated so nothing depends on a heavy image, and it
   sits behind nothing but large display type. */

.grit {
  position: relative;
  isolation: isolate;
}

.grit::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(
      115deg,
      rgb(255 255 255 / 0.022) 0 2px,
      transparent 2px 5px
    ),
    radial-gradient(
      ellipse 70% 55% at 18% 12%,
      rgb(201 68 24 / 0.26),
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 60% at 88% 85%,
      rgb(228 72 0 / 0.16),
      transparent 68%
    );
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.65rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  background: #ffb92e;
}

.btn-secondary {
  background: var(--brand-rust);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--brand-rust-bright);
}

.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-ghost:hover {
  background: rgb(255 255 255 / 0.1);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* ---------- cards ---------- */

.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand-rust);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--fg-muted);
  font-size: 0.975rem;
}

.card .card-cta {
  margin-top: auto;
  padding-top: 1.15rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.on-dark .card {
  background: var(--bg-dark-alt);
  border-color: var(--rule-dark);
}

.on-dark .card p {
  color: var(--fg-on-dark-muted);
}

.card-cta {
  color: var(--link);
  text-decoration: none;
}

.card-cta:hover {
  text-decoration: underline;
}

.on-dark .card-cta {
  color: var(--brand-hazard);
}

/* ---------- utilities ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--char-950);
  color: var(--fg-on-dark);
  border-bottom: 3px solid var(--brand-rust);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.site-header .brand {
  color: var(--fg-on-dark);
  text-decoration: none;
  flex: none;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a:not(.btn) {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--fg-on-dark);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:not(.btn):hover {
  color: var(--brand-hazard);
  border-bottom-color: var(--brand-hazard);
}

.site-nav a[aria-current='page'] {
  color: var(--brand-hazard);
  border-bottom-color: var(--brand-hazard);
}

.nav-cta .btn {
  padding: 0.6rem 1.15rem;
  font-size: 0.88rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--rule-dark);
  border-radius: var(--radius);
  padding: 0.6rem;
  width: 2.9rem;
  height: 2.9rem;
  cursor: pointer;
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: var(--fg-on-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.bars {
  position: relative;
  margin-inline: auto;
}

.bars::before,
.bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.bars::before {
  top: -6px;
}

.bars::after {
  top: 6px;
}

[aria-expanded='true'] .bars {
  background: transparent;
}

[aria-expanded='true'] .bars::before {
  transform: translateY(6px) rotate(45deg);
}

[aria-expanded='true'] .bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 60rem) {
  .menu-toggle {
    display: block;
    order: 3;
  }

  .site-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    border-top: 1px solid var(--rule-dark);
    padding-block: 0.75rem 1.25rem;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav li {
    border-bottom: 1px solid var(--rule-dark);
  }

  .site-nav a:not(.btn) {
    padding: 0.95rem 0.25rem;
    font-size: 1.05rem;
  }

  .nav-cta {
    border-bottom: 0;
    margin-top: 1rem;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .site-header .bar {
    flex-wrap: wrap;
    padding-block: 0.75rem;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--char-950);
  color: var(--fg-on-dark-muted);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 3px solid var(--brand-rust);
}

.site-footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.site-footer .brand-col {
  grid-column: span 2;
  min-width: min(100%, 20rem);
}

@media (max-width: 55rem) {
  .site-footer .brand-col {
    grid-column: auto;
  }
}

.site-footer .brand-col .logo {
  color: var(--fg-on-dark);
  margin-bottom: 1.1rem;
}

.site-footer .mission-short {
  font-size: 0.925rem;
  line-height: 1.6;
  max-width: 42ch;
}

.site-footer .col h2 {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  color: var(--fg-on-dark);
  margin-bottom: 1rem;
}

.site-footer .col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.94rem;
}

.site-footer .socials {
  flex-direction: row !important;
  gap: 1.25rem !important;
  margin-top: 1.25rem !important;
}

.site-footer a {
  color: var(--fg-on-dark-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand-hazard);
  text-decoration: underline;
}

.site-footer .legal {
  border-top: 1px solid var(--rule-dark);
  padding-block: 1.75rem 2.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.site-footer .legal strong {
  color: var(--fg-on-dark);
}

.site-footer .legal p {
  max-width: 68ch;
}

.site-footer .copyright {
  flex: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  border-bottom: 3px solid var(--brand-rust);
  background: var(--char-900);
}

/* --- moving background --- */

.hero .media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  /* Poster doubles as the interior-banner background and as the still shown
     when the video is suppressed. */
  background: var(--char-950) url("../hero-flames.c1bfc78c25ef.jpg") center / cover no-repeat;
}

.hero .flames {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/*
 * Legibility scrim. The footage is bright orange and constantly moving, so
 * the heading needs a floor it can rely on frame to frame — heavier on the
 * left, where the text sits, easing off toward the emblem.
 */
.hero .scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgb(13 12 10 / 0.94) 0%,
      rgb(13 12 10 / 0.88) 38%,
      rgb(13 12 10 / 0.66) 70%,
      rgb(13 12 10 / 0.58) 100%
    ),
    linear-gradient(to bottom, rgb(13 12 10 / 0.4), rgb(13 12 10 / 0.62));
}

@media (max-width: 52rem) {
  /* Stacked layout puts text across the full width, so the horizontal
     falloff would leave the last lines sitting on bare fire. */
  .hero .scrim {
    background:
      linear-gradient(to bottom, rgb(13 12 10 / 0.74), rgb(13 12 10 / 0.9));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .flames {
    display: none;
  }
}

/* --- layout --- */

.hero .inner {
  max-width: 60rem;
}

.hero-home .inner {
  padding-block: clamp(4.5rem, 12vw, 8.5rem);
}

.hero-page .inner {
  padding-block: clamp(3rem, 7vw, 4.75rem);
}

/* Heading left, emblem right-justified against the wrapper edge. */
.hero .has-aside {
  max-width: var(--wrap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.hero .has-aside .content {
  flex: 1 1 28rem;
  min-width: 0;
}

/* The emblem track carries the width; the image just fills it. Sizing the
   image instead makes the track's width depend on the image and the image's
   max-width depend on the track, which collapses the emblem at some widths.
   flex:none so the text column absorbs the remaining space. */
.hero .emblem {
  flex: none;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  max-width: 100%;
}

/* 50% up from the previous clamp(15rem, 32vw, 24rem). */
.hero-home .emblem {
  width: clamp(22.5rem, 48vw, 36rem);
}

.hero-page .emblem {
  width: clamp(9rem, 20vw, 15rem);
}

@media (max-width: 52rem) {
  .hero .has-aside {
    flex-direction: column;
    align-items: flex-start;
  }

  /* The row-layout flex-basis would become a *height* here and pad the
     banner out by ~28rem. Reset it. */
  .hero .has-aside .content {
    flex: 0 1 auto;
    width: 100%;
  }

  /* Emblem first on narrow screens so the brand leads the page. Right
     justification is a two-column idea; stacked, it reads better flush
     left with the heading. */
  .hero .emblem {
    order: -1;
    margin-left: 0;
    justify-content: flex-start;
  }
}

.hero h1 {
  max-width: 20ch;
  text-shadow: 0 2px 18px rgb(13 12 10 / 0.85);
}

.hero .lede {
  margin-top: 1.35rem;
  max-width: 54ch;
  text-shadow: 0 1px 10px rgb(13 12 10 / 0.9);
}

.hero .btn-row {
  margin-top: 2rem;
}

/* ==========================================================================
   Logo
   ========================================================================== */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

/* Transparent art: no box, just a shadow so the emblem separates from
   whatever is moving behind it. */
.logo .badge {
  flex: none;
  width: auto;
  filter: drop-shadow(0 3px 10px rgb(13 12 10 / 0.75));
}

.logo .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo .wordmark-main {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.logo .wordmark-sub {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-on-dark-muted);
  margin-top: 0.4rem;
  font-family: var(--font-body);
}

/* --- sizes --- */

.logo-header .badge {
  height: 2.9rem;
}

.logo-header .wordmark-main {
  font-size: 1.32rem;
}

/* Sizing lives on the .emblem track in the hero partial, not here: deriving
   the container's width from the image and then constraining the image
   against that container is circular, and collapses the emblem at some
   widths. */
.logo-hero,
.logo-banner {
  width: 100%;
}

.logo-hero {
  flex-direction: column;
  align-items: flex-end;
  gap: 1.1rem;
}

.logo-hero .badge {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 26px rgb(13 12 10 / 0.9));
}

.logo-hero .wordmark-main {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

/* Interior banners: same emblem, sized to sit beside the heading rather
   than stack above it, so the banner stays short. */
.logo-banner .badge {
  width: 100%;
  height: auto;
}

.logo-footer .badge {
  height: 3.4rem;
}

.logo-footer .wordmark-main {
  font-size: 1.4rem;
}

/* ==========================================================================
   Mission block
   ========================================================================== */

.mission {
  background: var(--bg);
}

.mission .layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.mission blockquote {
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--fg);
  border-left: 4px solid var(--brand-rust);
  padding-left: clamp(1.1rem, 2.5vw, 1.75rem);
  text-wrap: pretty;
}

.mission .hook h2 {
  margin-bottom: 1rem;
}

.mission .hook p {
  color: var(--fg-muted);
}

.mission .hook p + p {
  margin-top: 1rem;
}

.mission .hook strong {
  color: var(--fg);
}

/* ==========================================================================
   Stat row
   ========================================================================== */

.stats {
  background: var(--char-800);
}

.stats dl {
  margin: 0;
}

.stats .stat {
  text-align: center;
  padding-inline: 0.5rem;
}

.stats dt {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--brand-hazard);
}

.stats dd {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-on-dark-muted);
}

/* ==========================================================================
   Photo strip
   ========================================================================== */

.photos {
  background: var(--char-800);
}

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}

.strip .tile {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule-dark);
}

.strip .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip .placeholder {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(
      45deg,
      rgb(255 255 255 / 0.035) 0 12px,
      transparent 12px 24px
    ),
    var(--char-900);
  color: var(--steel-400);
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ==========================================================================
   Partner row
   ========================================================================== */

.partners .logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.partners .logos img {
  max-height: 3.5rem;
  width: auto;
}

.partners .logos span,
.partners .logos a {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
}

.partners .cta-center {
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   Event list
   ========================================================================== */

.events {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.events .event {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 45rem) {
  .events .event {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.events .when {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.events .date {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-rust);
}

.events .where {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* Optional photo, under the date and place. The column is already there, so
   an entry without one simply looks like every entry did before. */
.events .thumb {
  display: block;
  margin-top: 0.75rem;
  border: 1px solid var(--rule);
}

.events .thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 45rem) {
  .events .thumb {
    max-width: 14rem;
  }
}

.events .what h3 {
  margin-bottom: 0.45rem;
}

/* Each card's title links to that event's own page. Underlined in the rule
   colour so it reads as a link without turning every heading rust. */
.events .what h3 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 2px;
}

.events .what h3 a:hover,
.events .what h3 a:focus-visible {
  color: var(--link);
  text-decoration-color: currentColor;
}

.events .what p {
  color: var(--fg-muted);
}

.events .what .more {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* The empty state is a sibling of .events, not a child, so it is namespaced
   under the section instead. */
.events-section .empty {
  border-left: 4px solid var(--brand-rust);
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--bg-alt);
  max-width: 60ch;
}

.events-section.section-alt .empty {
  background: #fff;
}

.events-section .empty p {
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Event calendar
   ========================================================================== */

.event-calendar-section .cal-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cal-nav button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--link);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cal-nav button:hover,
.cal-nav button:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.cal-nav .cal-current {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-rust);
}

.cal {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.cal th,
.cal td {
  border: 1px solid var(--rule);
}

.cal th {
  padding: 0.45rem 0.3rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.cal th abbr {
  text-decoration: none;
}

.cal td.day {
  vertical-align: top;
  height: 5.5rem; /* acts as min-height on a table cell */
  padding: 0.4rem 0.45rem;
}

.cal .daynum {
  display: inline-grid;
  place-items: center;
  min-width: 1.5em;
  min-height: 1.5em;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
}

.cal .today .daynum {
  background: var(--brand-rust);
  border-radius: 50%;
  color: var(--fg-on-dark);
}

.cal .outside {
  background: var(--bg-alt);
}

.cal .outside .daynum {
  color: var(--steel-400);
}

.cal .day-events {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cal .day-events li + li {
  margin-top: 0.25rem;
}

.cal .day-events a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 2px;
}

.cal .day-events a:hover,
.cal .day-events a:focus-visible {
  color: var(--link);
  text-decoration-color: currentColor;
}

.cal .outside .day-events a {
  color: var(--fg-muted);
}

@media (max-width: 45rem) {
  .cal td.day {
    height: 3.6rem;
    padding: 0.2rem;
  }

  .cal th {
    padding: 0.3rem 0.1rem;
    font-size: 0.62rem;
  }

  .cal .daynum {
    font-size: 0.7rem;
  }

  .cal .day-events {
    font-size: 0.62rem;
  }
}

/* ==========================================================================
   Event detail page
   ========================================================================== */

/* Leads the event's own page, between the banner and the facts. Bounded by
   height rather than width so a portrait photo cannot push the page down. */
.event-photo {
  margin: 0;
  background: var(--bg-dark);
  border-bottom: 3px solid var(--brand-rust);
}

.event-photo img {
  display: block;
  width: 100%;
  max-height: min(60vh, 34rem);
  object-fit: cover;
}

.event-page .gone {
  border-left: 4px solid var(--brand-rust);
  padding: clamp(1rem, 2.5vw, 1.4rem) clamp(1.1rem, 3vw, 1.6rem);
  background: var(--bg-alt);
  color: var(--fg-muted);
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.event-page .facts {
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--rule);
}

.event-page .fact {
  display: grid;
  grid-template-columns: minmax(6rem, 9rem) 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 45rem) {
  .event-page .fact {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

.event-page .fact dt {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-rust);
}

.event-page .fact dd {
  margin: 0;
}

.event-page .back {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Event recap: the photo set on an event's own page
   ========================================================================== */

/* Everything namespaced under .event-gallery / .recent-parades: .tile, .date,
   .name and .shot would all collide with the gallery strip and the schedule
   otherwise. */

.event-gallery {
  background: var(--bg-alt);
  border-top: 1px solid var(--rule);
}

.event-gallery .shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* 11rem rather than the strip's 15rem: a set runs to dozens of photos, and
     two columns on a phone halves the scroll without making them unreadable. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.event-gallery .shot {
  margin: 0;
}

.event-gallery .shot a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-dark);
}

.event-gallery .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms ease-out;
}

@media (prefers-reduced-motion: no-preference) {
  .event-gallery .shot a:hover img,
  .event-gallery .shot a:focus-visible img {
    transform: scale(1.03);
  }
}

/* The note at the top of a past event. `.gone` alone apologises for the event
   being over; with photos it is an introduction, so it loses the muted tone. */
.event-page .gone.recap {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* The back link sits in its own band after the gallery, so it needs less room
   above it than a full section. */
.event-page.tail {
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
}

/* ==========================================================================
   Recent parades — past events with photos, on the Events page
   ========================================================================== */

.recent-parades {
  background: var(--bg-alt);
  /* "Why we parade" below is also on the alt background; without this the two
     read as one very tall section. */
  border-bottom: 1px solid var(--rule);
}

.recent-parades .recaps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.recent-parades .recap a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.recent-parades .shot {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-dark);
}

.recent-parades .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-parades .label {
  display: block;
  margin-top: 0.7rem;
}

.recent-parades .title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.recent-parades .meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.recent-parades .recap a:hover .title,
.recent-parades .recap a:focus-visible .title {
  color: var(--link);
}

/* ==========================================================================
   CTA banner
   ========================================================================== */

.cta {
  background: var(--brand-rust-deep);
  border-block: 3px solid var(--brand-rust);
}

.cta .inner {
  max-width: 48rem;
  text-align: center;
}

.cta .lede {
  margin-top: 1.1rem;
  color: rgb(255 255 255 / 0.88);
}

.cta .btn-row {
  justify-content: center;
}

/* ==========================================================================
   About page — leadership
   ========================================================================== */

.officers {
  list-style: none;
  margin: 0;
  padding: 0;
}

.officers .officer {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.15rem 0;
  border-top: 3px solid var(--brand-rust);
}

.officers .name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.officers .role {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-grid .details {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: minmax(7rem, auto) 1fr;
  gap: 0.85rem 1.5rem;
}

.contact-grid .details dt {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-top: 0.15rem;
}

.contact-grid .details dd {
  margin: 0;
}

.contact-grid .socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-grid .org-card {
  background: var(--bg-alt);
  border-top: 3px solid var(--brand-rust);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
}

.contact-grid .org-card h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.contact-grid .org-card p + p {
  margin-top: 1rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Join page
   ========================================================================== */

.join-form .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem 1.5rem;
}

.join-form .field label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.join-form .field input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.join-form .field input:focus {
  outline: 2px solid var(--brand-hazard);
  outline-offset: 1px;
  border-color: var(--brand-rust);
}

.join-form .has-error input {
  border-color: var(--brand-rust);
}

.join-form .error,
.join-form .form-errors {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--brand-rust);
}

.join-form .form-errors {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--brand-rust);
  background: var(--bg-alt);
}

.join-form .form-errors ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.join-form .btn-row {
  margin-top: 1.75rem;
}

/* ==========================================================================
   Support page
   ========================================================================== */

.legal-note {
  font-size: 0.92rem;
  color: var(--fg-muted);
  border-left: 3px solid var(--rule);
  padding-left: 1.1rem;
}
