:root {
  --maroon: #9d3034;
  --maroon-dark: #712126;
  --beige: #fdf7c1;
  --gold: var(--beige);
  --cream: var(--beige);
  --paper: #fffdf7;
  --ink: #191514;
  --muted: #6f6661;
  --line: rgba(113, 33, 38, 0.14);
  --shadow: 0 22px 60px rgba(113, 33, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
button,
input,
select,
textarea {
  font-family: "Poppins", Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px max(20px, calc((100vw - 1320px) / 2));
  background: var(--maroon);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 110px;
}

.brand-logo {
  width: 110px;
  height: 60px;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

.desktop-nav a:hover,
.footer a:hover {
  color: var(--beige);
}

.site-header .nav-button,
.mobile-nav .mobile-button {
  border-color: var(--beige);
  background: var(--beige);
  color: var(--maroon);
}

.nav-button,
.button,
.mobile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid var(--maroon);
  border-radius: 16px;
  background: var(--maroon);
  color: #fff;
  font-weight: 400;
  letter-spacing: 0;
  text-align: center;
}

.button-gold {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--maroon-dark);
}

.button-outline {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
}

.button > span {
  margin-left: 8px;
  font-size: 1.1em;
  line-height: 1;
}

.mobile-nav {
  display: none;
}

.mobile-nav summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 10px 14px;
  font-weight: 400;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav div {
  position: absolute;
  right: 20px;
  top: 70px;
  display: grid;
  gap: 8px;
  min-width: 220px;
  padding: 14px;
  background: var(--maroon);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.mobile-nav a {
  padding: 10px 12px;
  font-weight: 600;
}

.hero {
  position: relative;
  min-height: clamp(520px, calc(100svh - 214px), 660px);
  display: grid;
  align-items: start;
  overflow: hidden;
  background: var(--maroon);
  color: #fff;
}

.hero-video,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  object-fit: cover;
  opacity: 0;
  transition: opacity 400ms ease;
}

.hero-video.is-ready {
  opacity: 1;
}

.hero-overlay {
  z-index: 1;
  background: rgba(65, 15, 18, 0.76);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.55fr);
  gap: 64px;
  align-items: end;
  padding: 72px 0 40px;
}

.hero-main {
  min-width: 0;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 46px;
  margin-bottom: 24px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--maroon);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1320px;
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 6.25vw, 5.4rem);
  font-weight: 700;
  line-height: 0.93;
}

h1 span {
  display: block;
}

.hero-title-white {
  color: #fff;
}

.hero-title-beige {
  color: var(--beige);
  white-space: nowrap;
}

h2 {
  margin-bottom: 18px;
  color: var(--maroon-dark);
  font-size: clamp(1.7rem, 3.8vw, 3.2rem);
  line-height: 1.02;
  text-transform: uppercase;
}

h3 {
  color: var(--maroon-dark);
  line-height: 1.15;
}

.hero-summary {
  max-width: 100%;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 400;
  white-space: nowrap;
}

.hero-summary strong {
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.countdown {
  padding: 0;
}

.countdown-grid {
  display: grid;
  grid-template-columns: minmax(86px, 1.25fr) auto minmax(56px, 1fr) auto minmax(56px, 1fr) auto minmax(56px, 1fr);
  gap: 7px;
  align-items: start;
  margin: 0;
}

.countdown-unit {
  min-width: 0;
  text-align: center;
}

.countdown-unit > span:last-child {
  display: block;
  margin-top: 9px;
  color: var(--beige);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown-value {
  display: grid;
  min-height: 74px;
  place-items: center;
  border: 1px solid rgba(253, 247, 193, 0.36);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(35, 7, 9, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--beige);
  font-size: clamp(1.7rem, 2.8vw, 2.65rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.countdown-separator {
  padding-top: 18px;
  color: rgba(253, 247, 193, 0.4);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
}

.quick-facts {
  background: var(--maroon-dark);
  color: #fff;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: space-between;
}

.fact-grid article {
  min-height: 126px;
  padding: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.fact-grid article:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.impact-grid span,
.panel-number {
  display: block;
  color: var(--gold);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
}

.fact-grid article > span {
  display: block;
  color: var(--gold);
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.fact-grid p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0;
}

.fact-date sup {
  font-size: 0.55em;
  line-height: 0;
  vertical-align: super;
}

.impact-grid p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.section {
  padding: 86px 0;
}

.section-light {
  background: var(--cream);
}

.section-white {
  background: var(--paper);
}

.section-maroon {
  background: var(--maroon);
  color: #fff;
}

.section-maroon h2,
.cta h2 {
  color: #fff;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 54px;
  align-items: start;
}

.reverse {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  align-items: center;
}

.copy-block {
  color: var(--muted);
  font-size: 1rem;
}

.copy-block p:last-child {
  margin-bottom: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-head h2 {
  max-width: 760px;
  margin-bottom: 0;
}

.section-head > a {
  color: var(--maroon);
  font-weight: 700;
  text-transform: uppercase;
}

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.distance-card,
.packages article,
.donation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(113, 33, 38, 0.07);
}

.distance-card {
  position: relative;
  min-height: 290px;
  padding: 30px;
}

.distance-card.featured {
  border-color: rgba(244, 197, 66, 0.8);
  box-shadow: var(--shadow);
}

.distance-card small {
  position: absolute;
  top: 20px;
  right: 20px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--maroon-dark);
  padding: 5px 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.distance-card span {
  display: block;
  margin-bottom: 24px;
  color: var(--maroon);
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1;
}

.distance-card p,
.packages p,
.donation-card p {
  color: var(--muted);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.impact-grid article {
  min-height: 160px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.impact-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.impact-points p {
  margin: 0;
  border-radius: 8px;
  background: var(--gold);
  color: var(--maroon-dark);
  padding: 18px;
  font-weight: 700;
}

.panel {
  border-radius: 8px;
  background: var(--maroon-dark);
  color: #fff;
  padding: 34px;
}

.panel p:last-child {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(113, 33, 38, 0.07);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--maroon-dark);
  color: #fff;
  font-size: 0.84rem;
  text-transform: uppercase;
}

td:first-child {
  color: var(--maroon-dark);
  font-weight: 700;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.packages {
  grid-template-columns: repeat(3, 1fr);
}

.packages article {
  min-height: 210px;
  padding: 26px;
}

.packages h3 {
  margin: 10px 0 28px;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.packages strong {
  color: var(--maroon);
  font-size: 1.45rem;
}

.donation-card {
  padding: 30px;
}

.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}

.amounts span,
.partner-grid span,
.campus-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  padding: 13px 14px;
  font-weight: 600;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.partner-grid span {
  display: grid;
  min-height: 104px;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-align: center;
}

.campus-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.cta {
  background: var(--maroon);
  color: #fff;
  padding: 96px 0;
}

.cta-inner {
  max-width: 860px;
}

.cta p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.footer {
  background: var(--maroon-dark);
  color: #fff;
  padding: 58px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 38px;
}

.footer h2,
.footer h3 {
  color: var(--gold);
}

.footer p,
.footer a {
  display: block;
  color: rgba(255, 255, 255, 0.74);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 920px) {
  .desktop-nav,
  .nav-button {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 42px;
    align-items: start;
  }

  .countdown {
    width: min(650px, 100%);
    padding: 0;
  }

  .hero-summary {
    max-width: 650px;
    white-space: normal;
  }

  .fact-grid,
  .impact-grid,
  .partner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact-grid {
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }

  .split,
  .reverse {
    grid-template-columns: 1fr;
  }

  .card-grid.three,
  .packages {
    grid-template-columns: 1fr 1fr;
  }

  .impact-points,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 70px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 90px;
    height: 54px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding: 62px 0;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 7.5vw, 2.35rem);
  }

  .hero-summary {
    white-space: normal;
  }

  .countdown-grid {
    grid-template-columns: minmax(64px, 1.25fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 4px;
  }

  .countdown-value {
    min-height: 60px;
    font-size: 1.4rem;
  }

  .countdown-separator {
    padding-top: 14px;
    font-size: 1.5rem;
  }

  .countdown-unit > span:last-child {
    font-size: 0.58rem;
    letter-spacing: 0.04em;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button,
  .nav-button {
    width: 100%;
  }

  .fact-grid,
  .impact-grid,
  .card-grid.three,
  .packages,
  .partner-grid,
  .campus-list,
  .amounts {
    grid-template-columns: 1fr;
  }

  .fact-grid article,
  .fact-grid article:last-child {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    display: block;
  }

  .section-head > a {
    display: inline-block;
    margin-top: 14px;
  }

  .distance-card,
  .packages article,
  .donation-card,
  .panel {
    padding: 24px;
  }
}

/* Run registration */
#register { scroll-margin-top: 100px; }
.registration-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.registration-form { background: #fff; padding: 32px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.registration-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.registration-fields label { display: grid; gap: 8px; color: var(--maroon-dark); font-weight: 600; }
.registration-fields input, .registration-fields select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid #a69a96; border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 1rem; }
.registration-fields small { font-weight: 400; color: var(--muted); }
.registration-fields .full-width { grid-column: 1 / -1; }
.registration-form .button { cursor: pointer; font-size: 1rem; }
.registration-form :focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; }
.registration-payment { margin-top: 30px; padding: 28px; border-radius: 16px; background: var(--maroon-dark); color: #fff; }
.registration-payment h3 { color: var(--beige); }
.registration-payment output { display: block; font-size: 1.8rem; font-weight: 700; color: var(--beige); }
.registration-payment ul { padding-left: 20px; }
.registration-payment p:last-child { margin-bottom: 0; font-size: .85rem; }
.fee-note { margin-top: 20px; color: var(--muted); font-size: .85rem; }
#registration-status { margin: 18px 0 0; color: var(--maroon-dark); overflow-wrap: anywhere; }
@media (max-width: 920px) { .registration-layout { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 620px) { .registration-fields { grid-template-columns: 1fr; } .registration-form, .registration-payment { padding: 22px; } }

.form-payment { display: grid; gap: 6px; padding: 20px; border-radius: 10px; background: var(--cream); color: var(--maroon-dark); }
.form-payment output { font-size: 1.65rem; font-weight: 700; }
.registration-form button:disabled { opacity: .65; cursor: default; }

.age-pricing { margin-bottom: 22px; padding: 18px; background: var(--cream); border-radius: 10px; color: var(--maroon-dark); }
.age-pricing p { margin: 8px 0; }
.participant-card { min-width: 0; margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; }
.participant-card legend { padding: 0 8px; color: var(--maroon-dark); font-weight: 700; }
.participant-card .registration-fields { margin: 10px 0 20px; }
.participant-fee { margin-bottom: 0; color: var(--maroon-dark); font-weight: 600; }
.participant-add, .participant-remove { min-height: 44px; padding: 10px 16px; border: 1px solid var(--maroon); border-radius: 8px; background: #fff; color: var(--maroon-dark); cursor: pointer; font-size: .9rem; }
.participant-remove { margin-top: 14px; }
.participant-add:disabled { opacity: .5; cursor: default; }

/* Registration popup */
body.registration-open { overflow: hidden; }
.registration-dialog { width: min(840px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.3); overflow-y: auto; }
.registration-dialog::backdrop { background: rgba(35, 7, 9, .72); backdrop-filter: blur(4px); }
.registration-dialog-header { display: flex; align-items: start; gap: 20px; justify-content: space-between; padding: 28px 32px 20px; background: var(--maroon); color: #fff; }
.registration-dialog-header .eyebrow { color: var(--beige); }
.registration-dialog-header h2 { color: #fff; font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 12px; }
.registration-dialog-header p:last-child { margin-bottom: 0; }
.registration-close { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--maroon-dark); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.registration-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.registration-dialog .registration-form { border: 0; border-radius: 0; box-shadow: none; }
@media (max-width: 620px) { .registration-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); } .registration-dialog-header { padding: 22px; } }

[hidden] { display: none !important; }
.registration-switch { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 10px; }
.registration-switch legend { color: var(--maroon-dark); font-weight: 600; }
.registration-switch label { flex: 1; min-width: 180px; padding: 12px; background: var(--cream); border-radius: 8px; cursor: pointer; }
.registration-switch label:has(input:checked) { background: var(--maroon); color: #fff; }
.registration-switch input { accent-color: var(--maroon-dark); }
.group-counts, .group-shirt-sizes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.group-counts label, .group-shirt-sizes label { display: grid; gap: 6px; font-weight: 600; color: var(--maroon-dark); }
.group-counts small { font-weight: 400; }
.group-counts input, .group-shirt-sizes input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #a69a96; border-radius: 8px; padding: 10px; font-size: 1rem; }
#group-allocation { color: var(--maroon-dark); }
@media (max-width: 620px) { .group-counts { grid-template-columns: 1fr; } .group-shirt-sizes { grid-template-columns: repeat(2,minmax(0,1fr)); } }

.registration-form .receipt-button { display: flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; margin: 16px 0 24px; font-size: 0.9rem; font-weight: 400; }
.registration-form .receipt-button:hover { background: var(--cream); }
