:root {
  --cream: #f4ecd8;
  --paper: #fff8e8;
  --red: #c82924;
  --red-dark: #8f1816;
  --blue: #17457d;
  --blue-dark: #0e2b50;
  --ink: #202225;
  --muted: #5f625f;
  --line: #252525;
  --white: #fffdf5;
  --logo-cream: #f4f0e5;
  --shadow: 0 16px 36px rgba(26, 24, 20, 0.14);
  --radius: 8px;
  --max: 1180px;
  --header-height: 78px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at 20% 15%, rgba(200, 41, 36, 0.08), transparent 22rem),
    radial-gradient(circle at 85% 5%, rgba(23, 69, 125, 0.08), transparent 20rem),
    linear-gradient(90deg, rgba(32, 34, 37, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(32, 34, 37, 0.022) 1px, transparent 1px),
    var(--cream);
  background-size: auto, auto, 34px 34px, 34px 34px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.026) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 7px);
  opacity: 0.32;
  mix-blend-mode: multiply;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--red);
}

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 20;
  transform: translateY(-180%);
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--blue-dark);
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(1rem, 3vw, 2rem);
  background: rgba(244, 236, 216, 0.95);
  border-bottom: 4px solid var(--line);
  box-shadow: 0 8px 0 rgba(23, 69, 125, 0.08);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--logo-cream);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.55rem 0.8rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--white);
  background: var(--blue);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--red);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 3px;
  margin: 4px auto;
  background: var(--white);
}

.section,
.section-band {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 2rem);
}

.section > *,
.section-band > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  margin-bottom: clamp(1.5rem, 4vw, 2.8rem);
}

.section-heading h2,
.hero h1 {
  margin: 0;
  max-width: 980px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading p {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: clamp(1.3rem, 3.4vw, 2.7rem);
  padding-bottom: clamp(1.8rem, 4vw, 3.2rem);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: clamp(70px, 10vw, 130px);
  height: clamp(70px, 10vw, 130px);
  border: 4px solid var(--line);
  background:
    repeating-linear-gradient(-35deg, var(--red) 0 18px, var(--white) 18px 32px, var(--blue) 32px 48px);
  transform: rotate(-8deg);
  opacity: 0.16;
}

.hero::before {
  left: clamp(1rem, 7vw, 5rem);
  top: clamp(1rem, 8vw, 4rem);
}

.hero::after {
  right: clamp(1rem, 7vw, 5rem);
  bottom: clamp(1rem, 6vw, 3.5rem);
  transform: rotate(8deg);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(920px, 100%);
  padding: clamp(1.1rem, 3vw, 2.2rem);
  text-align: center;
  border: 4px solid var(--line);
  background:
    linear-gradient(135deg, rgba(200, 41, 36, 0.12), transparent 34%),
    var(--paper);
  box-shadow: 8px 8px 0 var(--blue);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.8rem, 2vw, 1.35rem);
  margin-bottom: 1.2rem;
  padding: 0.65rem clamp(0.95rem, 2.4vw, 1.45rem) 0.65rem 0.75rem;
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--logo-cream);
  box-shadow: 6px 6px 0 rgba(32, 34, 37, 0.2);
}

.hero-kicker .eyebrow {
  margin: 0;
  color: var(--red);
  text-align: left;
  line-height: 1.18;
}

.hero-meta {
  position: relative;
  display: grid;
  gap: 0.28rem;
  padding: 0.2rem 0 1.1rem;
}

.hero-meta span {
  display: block;
  font-size: clamp(0.92rem, 1.35vw, 1.06rem);
  white-space: nowrap;
}

.hero-meta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.18rem;
  width: min(100%, 230px);
  height: 0.42rem;
  background:
    radial-gradient(circle, var(--red) 0 2px, transparent 2.5px) 100% 50% / 14px 10px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 0 35% / 72% 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 10% 82% / 68% 2px no-repeat;
  opacity: 0.9;
}

.hero-meta::before {
  content: "*";
  position: absolute;
  right: 1.1rem;
  bottom: -0.18rem;
  color: var(--blue);
  font-size: 1rem;
  line-height: 1;
}

.hero-logo-mark {
  width: clamp(190px, 27vw, 260px);
  display: block;
  background: var(--logo-cream);
}

.hero-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: saturate(0.98) contrast(1.01);
}

.hero-lead {
  max-width: 780px;
  margin: 1.1rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.05rem;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--line);
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  cursor: pointer;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--line);
}

.button-primary {
  color: var(--white);
  background: var(--red);
}

.button-primary:hover {
  color: var(--white);
  background: var(--red-dark);
}

.button-ghost {
  color: var(--ink);
  background: var(--white);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: start;
}

.big-copy {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.18;
  font-weight: 900;
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  border: 4px solid var(--line);
  background: var(--white);
}

.fact-strip article {
  padding: 1rem;
  border-right: 3px solid var(--line);
}

.fact-strip article:last-child {
  border-right: 0;
}

.fact-strip span,
.label {
  display: block;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-strip strong {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(1.05rem, 1.9vw, 1.45rem);
  line-height: 1.15;
}

.team-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 4vw, 2rem);
  align-items: start;
  margin-top: clamp(2rem, 5vw, 3.2rem);
}

.team-photo {
  margin: 0;
  padding: 0.65rem 0.65rem 1rem;
  border: 3px solid var(--line);
  background: var(--white);
  box-shadow: 8px 8px 0 rgba(32, 34, 37, 0.2);
  transform: rotate(-2deg);
}

.team-photo-offset {
  margin-top: 1.4rem;
  transform: rotate(2deg);
}

.team-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 2px solid var(--line);
  filter: saturate(0.92) contrast(1.04);
}

.team-photo figcaption {
  margin-top: 0.75rem;
  font-weight: 900;
  text-align: center;
}

.section-paper {
  background:
    linear-gradient(90deg, rgba(23, 69, 125, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(23, 69, 125, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  border-top: 4px solid var(--line);
  border-bottom: 4px solid var(--line);
}

.race-form {
  padding: clamp(1rem, 3vw, 2rem);
  border: 4px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.spam-check {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row label,
.checkbox {
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  padding: 0.78rem 0.85rem;
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: #fffefa;
}

textarea {
  resize: vertical;
}

.checkbox {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0.5rem 0 1.3rem;
}

.checkbox input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 0.15rem;
  accent-color: var(--red);
}

.privacy-note {
  margin: -0.35rem 0 1.3rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.form-status {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: var(--blue-dark);
  font-weight: 900;
}

.form-status.is-error {
  color: var(--red);
}

.race-form .button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.registration-board {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--blue-dark);
  color: var(--white);
  box-shadow: 8px 8px 0 rgba(32, 34, 37, 0.22);
}

.registration-board h3,
.registrations-page h1,
.registration-page-actions h2 {
  margin: 0 0 0.6rem;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.registration-board p {
  margin: 0;
}

.registration-board .button {
  justify-self: start;
}

.registration-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.registration-list-full {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.registration-item,
.empty-state {
  padding: 0.9rem 1rem;
  color: var(--ink);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.registration-item h4 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.registration-item p {
  margin: 0;
}

.registration-people {
  font-weight: 900;
}

.registration-meta,
.registration-message {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.registration-page-actions {
  margin-bottom: 1.5rem;
}

.cards-grid,
.band-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.cards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-card,
.band-card,
.contact-card,
.result-card {
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 7px 7px 0 rgba(32, 34, 37, 0.18);
}

.info-card,
.band-card,
.contact-card {
  padding: 1.1rem;
}

.band-card {
  overflow: hidden;
}

.band-card img {
  width: calc(100% + 2.2rem);
  max-width: none;
  height: 180px;
  margin: -1.1rem -1.1rem 1rem;
  object-fit: cover;
  border-bottom: 4px solid var(--line);
  filter: grayscale(12%) contrast(1.12) saturate(0.9);
}

.band-card a {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--blue);
  font-weight: 900;
}

.info-card h3,
.band-card h3,
.contact-card h3,
.result-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  line-height: 1.12;
  text-transform: uppercase;
}

.info-card p,
.band-card p,
.contact-card p,
.result-card p {
  margin: 0;
}

.accordion {
  margin-top: 2rem;
  border: 4px solid var(--line);
  background: var(--white);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  border: 0;
  border-bottom: 3px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}

.accordion-trigger::after {
  content: "+";
  font-size: 1.5rem;
}

.accordion-trigger[aria-expanded="true"]::after {
  content: "-";
}

.accordion-panel {
  padding: 1rem;
  border-bottom: 3px solid var(--line);
}

.accordion-panel:last-child {
  border-bottom: 0;
}

.clean-list {
  margin: 0;
  padding-left: 1.2rem;
}

.clean-list li + li {
  margin-top: 0.45rem;
}

.section-blue {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(200, 41, 36, 0.34), transparent 38%),
    var(--blue-dark);
  border-top: 4px solid var(--line);
  border-bottom: 4px solid var(--line);
}

.section-blue .eyebrow,
.section-blue .label {
  color: #ffd7d4;
}

.section-blue .band-card {
  color: var(--ink);
  background: var(--paper);
}

.program-teaser {
  max-width: 760px;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--ink);
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 7px 7px 0 rgba(32, 34, 37, 0.22);
}

.program-teaser h3 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.08;
  text-transform: uppercase;
}

.program-teaser p {
  margin: 0;
  font-weight: 800;
}

.source-note {
  margin-top: 1rem;
  color: #ffd7d4;
  font-size: 0.9rem;
  font-weight: 800;
}

.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  min-height: 220px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--white);
  text-decoration: none;
  border: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--blue);
  box-shadow: 7px 7px 0 rgba(32, 34, 37, 0.18);
}

.gallery-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(25%) contrast(1.12);
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(14, 43, 80, 0.88));
}

.gallery-card span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 1rem;
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
}

.gallery-placeholder {
  background:
    repeating-linear-gradient(-12deg, rgba(255, 253, 245, 0.14) 0 10px, transparent 10px 20px),
    var(--blue);
}

.gallery-placeholder::after {
  display: none;
}

.muted {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1rem, 4vw, 2rem);
  color: var(--white);
  background: var(--ink);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--white);
}

@media (max-width: 980px) {
  :root {
    --header-height: 70px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .band-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-strip,
  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: var(--paper);
    border-bottom: 4px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    border-radius: var(--radius);
  }

  .brand span {
    font-size: 0.9rem;
  }

  .hero-content {
    box-shadow: 7px 7px 0 var(--blue);
  }

  .hero-kicker {
    flex-direction: column;
    align-items: center;
  }

  .hero-kicker .eyebrow {
    text-align: center;
  }

  .hero-meta::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .form-grid,
  .cards-grid,
  .band-grid,
  .contact-grid,
  .fact-strip,
  .team-photos,
  .photo-grid {
    grid-template-columns: 1fr;
  }

  .fact-strip article {
    border-right: 0;
    border-bottom: 3px solid var(--line);
  }

  .fact-strip article:last-child {
    border-bottom: 0;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .section,
  .section-band {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }
}
