:root {
  --page: #fafbfc;
  --surface: #ffffff;
  --ink: #14161a;
  --body: #33383f;
  --muted: #656b74;
  --line: #dee1e6;
  --line-strong: #c4c9d0;
  --accent: #b02f3c;
  --accent-dark: #8f2530;
  --radius: 8px;
  --page-width: min(1040px, calc(100vw - 2.5rem));
  --anchor-offset: 4.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
}

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

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

.shell {
  width: var(--page-width);
  margin: 0 auto;
}

/* Header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: var(--page-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

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

.brand-mark {
  width: auto;
  height: 1.9rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Hero */

.hero {
  padding: 3.25rem 0 3rem;
}

.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  align-items: start;
  gap: 2.5rem;
}

.hero-text {
  min-width: 0;
}

.hero-logo {
  width: 100%;
  height: auto;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0.6rem 0 0;
  font-size: clamp(2.5rem, 6.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-lead {
  margin: 1.4rem 0 0;
  font-size: 1.14rem;
  line-height: 1.7;
}

.hero-lead + .hero-lead {
  margin-top: 1rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.6rem 2rem;
  margin: 2rem 0;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat {
  position: relative;
  padding-left: 1rem;
  font-size: 0.98rem;
}

.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
}

.button:hover,
.button:focus-visible {
  background: var(--accent-dark);
}

/* Sections */

main {
  padding-bottom: 0.5rem;
}

section[id] {
  scroll-margin-top: var(--anchor-offset);
}

.section-card,
.gallery-section {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.65rem, 3.4vw, 2.2rem);
  line-height: 1.15;
}

.section-head p {
  margin: 0.8rem 0 0;
  max-width: 62ch;
}

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Prose links */

.hero-lead a,
.section-head p a,
.content-block a,
.conduct-card a,
.event-card p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Shared card surface */

.schedule-card,
.content-block,
.conduct-card,
.primer-card,
.event-card,
.resource-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Weekly schedule */

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

.schedule-card {
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
}

.schedule-card h3 {
  margin: 0.4rem 0 0;
  font-size: 1.35rem;
}

.schedule-card p {
  margin: 0.75rem 0 0;
}

.schedule-meta {
  display: grid;
  margin-top: 1.35rem;
}

.schedule-meta div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.schedule-meta strong {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.schedule-meta span {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.schedule-actions {
  margin-top: auto;
  padding-top: 1.5rem;
}

.schedule-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 700;
}

.schedule-link:hover,
.schedule-link:focus-visible {
  background: var(--ink);
  color: #fff;
}

.schedule-note {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.schedule-note strong {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.schedule-note p {
  margin: 0;
}

/* First timers */

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

.content-block {
  padding: 1.6rem;
}

.content-block h3 {
  margin: 0;
  font-size: 1.2rem;
}

.content-block p {
  margin: 0.75rem 0 0;
}

.content-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.content-list li {
  position: relative;
  padding-left: 1rem;
}

.content-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* Rules, glossary, events */

.conduct-grid,
.primer-grid,
.events-grid {
  display: grid;
  gap: 1.25rem;
}

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

.primer-grid {
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.events-grid {
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
}

.conduct-card,
.primer-card,
.event-card {
  padding: 1.35rem;
}

.conduct-card h3,
.primer-card h3,
.event-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.event-card h3 {
  margin-top: 0.3rem;
}

.conduct-card p,
.primer-card p,
.event-card p {
  margin: 0.6rem 0 0;
  font-size: 1rem;
}

.conduct-card p + p {
  margin-top: 0.8rem;
}

/* Featured event */

.event-feature {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.event-feature-photo img {
  width: 100%;
  height: auto;
}

.event-feature h3 {
  margin: 0.3rem 0 0;
  font-size: 1.45rem;
}

.event-feature p {
  margin: 0.6rem 0 0;
  max-width: 62ch;
}

/* Calendar */

.calendar-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.calendar-frame iframe {
  display: block;
  width: 100%;
  height: clamp(460px, 65vh, 620px);
  border: 0;
}

/* Gallery */

.gallery-stage {
  position: relative;
}

.gallery-viewport {
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.gallery-viewport::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  margin: 0;
  scroll-snap-align: start;
  min-height: clamp(21rem, 55vw, 34rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  max-height: clamp(19rem, 51vw, 31.5rem);
  object-fit: contain;
  border-radius: 6px;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 1px 3px rgba(20, 22, 26, 0.08);
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  border-color: var(--ink);
}

.gallery-arrow-prev {
  left: 1rem;
}

.gallery-arrow-next {
  right: 1rem;
}

/* Resources */

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

.resource-card {
  padding: 1.6rem;
}

.resource-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.resource-card p {
  margin: 0.65rem 0 0;
}

.resource-links,
.roadtrip-links {
  display: grid;
  margin-top: 1.1rem;
}

.resource-links a,
.roadtrip-links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.resource-links a:first-child,
.roadtrip-links a:first-child {
  border-top: 0;
  padding-top: 0;
}

.resource-links strong,
.roadtrip-links strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.resource-links a:hover strong,
.roadtrip-links a:hover strong,
.resource-links a:focus-visible strong,
.roadtrip-links a:focus-visible strong {
  color: var(--accent);
}

.resource-links div span,
.roadtrip-links div span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.resource-links > a > span,
.roadtrip-links > a > span {
  flex: 0 0 auto;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* History */

.history-grid {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.history-logo {
  width: 100%;
  height: auto;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.history-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.history-video {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.history-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* Footer */

footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
}

.footer-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.footer-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive */

@media (max-width: 900px) {
  :root {
    --anchor-offset: 7.5rem;
  }

  .hero-head,
  .schedule-grid,
  .resource-grid,
  .history-grid,
  .history-media,
  .conduct-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-head {
    gap: 1.5rem;
  }

  .hero-logo {
    order: -1;
    width: clamp(170px, 42vw, 240px);
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav {
    width: calc(100vw - 2.5rem);
    flex-wrap: nowrap;
    gap: 1.1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .history-logo {
    max-width: 260px;
  }
}

@media (max-width: 640px) {
  :root {
    --page-width: min(1040px, calc(100vw - 2rem));
  }

  body {
    font-size: 1rem;
  }

  .hero {
    padding: 2.25rem 0 2rem;
  }

  .hero-head {
    gap: 1.25rem;
  }

  .hero-lead {
    font-size: 1.04rem;
  }

  .section-card,
  .gallery-section {
    padding: 2.25rem 0;
  }

  .stat-row {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .nav {
    width: calc(100vw - 2rem);
  }

  .schedule-card,
  .resource-card,
  .content-block {
    padding: 1.25rem;
  }

  .conduct-card,
  .primer-card,
  .event-card {
    padding: 1.1rem;
  }

  .primer-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
  }

  .events-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
  }

  .event-feature {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    text-align: center;
  }

  .event-feature-photo {
    max-width: 170px;
  }

  .event-feature p {
    margin-left: auto;
    margin-right: auto;
  }

  .button {
    width: 100%;
  }

  .calendar-frame iframe {
    height: 520px;
  }

  .gallery-slide {
    min-height: 18rem;
    padding: 0.85rem;
  }

  .gallery-slide img {
    max-height: 16.5rem;
  }

  .gallery-arrow {
    width: 2.3rem;
    height: 2.3rem;
    font-size: 1.15rem;
  }

  .gallery-arrow-prev {
    left: 0.6rem;
  }

  .gallery-arrow-next {
    right: 0.6rem;
  }

  .resource-links a,
  .roadtrip-links a {
    flex-direction: column;
    gap: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
