/* =====================================================
   1. TOKENS
   ===================================================== */

:root {
  --color-background: #000000;
  --color-surface: #101010;
  --color-surface-soft: rgba(255, 255, 255, 0.07);
  --color-text: #FFFFFF;
  --color-muted: #C9C9C9;
  --color-gold: #F7D35D;
  --color-border: rgba(255, 255, 255, 0.14);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius-full: 999px;
  --nav-height: 76px;

  /* Universal tile system — every card-like block on the site (cards,
     events, committee, gallery, faq, cta, stats…) is built from these
     same tokens, so spacing, padding and image alignment stay identical
     everywhere. Change a value here, not in an individual section's CSS. */
  --tile-gap: 1.5rem;
  --tile-pad: clamp(1.25rem, 3vw, 1.75rem);
  --tile-pad-lg: clamp(2rem, 6vw, 3.5rem);
  --tile-pad-compact: 1rem;
  --tile-radius: 1.5rem;
  --tile-frame-radius: 1rem;
  --tile-frame-aspect: 1 / 1;
  --tile-inner-gap: 1rem;
  --tile-grid-min: 260px;
}

[data-theme="light"] {
  --color-background: #FFFFFF;
  --color-surface: #F7F7F5;
  --color-surface-soft: rgba(0, 0, 0, 0.045);
  --color-text: #000000;
  --color-muted: #4A4A4A;
  --color-border: rgba(0, 0, 0, 0.14);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   2. RESET & BASE
   ===================================================== */

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--color-background);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.nav-open { overflow: hidden; }

a { color: inherit; }

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

:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 999;
  transform: translateY(-150%);
  background: var(--color-gold);
  color: #000000;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 800;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.container, .container-narrow {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.container-narrow { width: min(760px, calc(100% - 2rem)); }

/* =====================================================
   3. TYPOGRAPHY
   ===================================================== */

.section h1, .section h2 {
  margin-top: 0;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--color-gold);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lede {
  max-width: 720px;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.text-link {
  color: var(--color-gold);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover { text-decoration: underline; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.button.primary { background: var(--color-gold); color: #000000; }

.button.secondary {
  border: 1px solid var(--color-border);
  background: var(--color-surface-soft);
  color: var(--color-text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* =====================================================
   4. LAYOUT — SECTIONS
   ===================================================== */

.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--color-background);
}

.section:nth-of-type(even):not(.section-hero):not(.section-tile-grid) {
  background: var(--color-surface);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

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

/* =====================================================
   5. NAVBAR
   ===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--nav-height);
  border-bottom: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
}

[data-theme="light"] .site-header { background: rgba(255, 255, 255, 0.9); }

.nav {
  width: min(1280px, calc(100% - 2rem));
  min-height: var(--nav-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

/* Neutral frame for the logo mark — no fixed brand colour behind it, so
   a transparent-background logo just sits on the page instead of showing
   through a gold circle. */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crop-x, 50%) var(--crop-y, 50%);
  transform: scale(var(--crop-zoom, 1));
  transform-origin: var(--crop-x, 50%) var(--crop-y, 50%);
}

.brand-name { font-weight: 900; letter-spacing: -0.02em; }

.brand-tagline {
  display: block;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.nav-panel { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }

.nav-links a {
  border-radius: var(--radius-full);
  color: var(--color-muted);
  padding: 0.6rem 0.85rem;
  font-weight: 750;
  text-decoration: none;
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
  background: var(--color-surface-soft);
  color: var(--color-gold);
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle, .nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface-soft);
  color: var(--color-text);
}

.nav-toggle { display: none; }

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: var(--radius-full);
  background: currentColor;
}

.nav-toggle-line + .nav-toggle-line { margin-top: 4px; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  color: #000000;
  padding: 0.7rem 1.1rem;
  font-weight: 850;
  text-decoration: none;
}

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

  .nav-panel {
    position: fixed;
    inset: var(--nav-height) 1rem auto 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: 1.25rem;
    background: var(--color-surface);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
  }

  .nav-panel.is-open { display: flex; }
  .nav-links { display: grid; }

  .nav-actions {
    justify-content: space-between;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
  }
}

/* =====================================================
   6. FOOTER
   ===================================================== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: 3.5rem 2rem;
  background: var(--color-background);
}

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

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.footer-brand-mark { width: 40px; height: 40px; }

.footer-brand-header .brand-name { margin: 0; }

.footer-brand p, .footer-bottom { color: var(--color-muted); }

.footer-column h2 {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-column ul { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.footer-column a { color: var(--color-muted); text-decoration: none; }
.footer-column a:hover { color: var(--color-gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--color-border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

/* =====================================================
   7. HERO
   ===================================================== */

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: grid;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 20% 15%, rgba(247, 211, 93, 0.14), transparent 32rem), #000000;
}

[data-theme="light"] .hero { background: radial-gradient(circle at 20% 15%, rgba(247, 211, 93, 0.28), transparent 32rem), #FFFFFF; }

.hero-photo, .hero-bg {
  position: absolute;
  inset: 0;
}

.hero-photo {
  background-size: cover;
  background-position: var(--crop-x, 50%) var(--crop-y, 50%);
  background-repeat: no-repeat;
  transform: scale(var(--crop-zoom, 1));
  transform-origin: var(--crop-x, 50%) var(--crop-y, 50%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.28) 100%);
}

[data-theme="light"] .hero-overlay {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.78) 45%, rgba(255, 255, 255, 0.32) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 10vw, 7rem);
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.hero-subtitle {
  margin: 1.1rem 0 0;
  color: var(--color-gold);
  font-size: clamp(1.4rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

[data-theme="light"] .hero-subtitle { color: #8A6A00; }

.hero-body {
  max-width: 640px;
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

@media (max-width: 760px) {
  .hero { min-height: auto; display: grid; align-items: end; }
  .hero-content { padding-top: clamp(7rem, 20vh, 10rem); padding-bottom: clamp(3.5rem, 10vh, 6rem); }
}

/* =====================================================
   8. UNIVERSAL TILE SYSTEM
   The single spacing/shape contract for every card-like block on the
   site: cards, events, committee, gallery, faq, cta, stats, etc.

   Every tile grid uses the same --tile-gap, every tile the same
   --tile-pad, and — this is the important part — every tile's media
   (photo, cover image, icon) sits INSET inside that same padding, using
   the same --tile-inner-gap before the text that follows it. Media never
   bleeds to the tile's edge while text stays padded; that mismatch is
   what used to make image tiles look misaligned against text-only ones.
   A tile is one padded box, top to bottom, always.
   ===================================================== */

.tile-grid {
  display: grid;
  gap: var(--tile-gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tile-grid-min)), 1fr));
  align-items: start;
}

.tile-grid-three-up { --tile-grid-min: 280px; }
.tile-grid-four-up { --tile-grid-min: 220px; }

.tile-grid-nested {
  margin-top: var(--tile-pad-compact);
  --tile-grid-min: 200px;
}

.tile-stack { display: flex; flex-direction: column; gap: var(--tile-gap); }
.tile-stack-narrow { width: min(100%, 760px); margin-inline: auto; }

.tile {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--tile-inner-gap);
  padding: var(--tile-pad);
  border: 1px solid var(--color-border);
  border-radius: var(--tile-radius);
  background: var(--color-surface-soft);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  color: inherit;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tile:hover { border-color: rgba(247, 211, 93, 0.4); }

.tile-nested {
  padding: var(--tile-pad-compact);
  border-radius: var(--tile-frame-radius);
  background: var(--color-surface-soft);
  box-shadow: none;
}

.tile-header { margin: 0; }
.tile-header > :first-child { margin-top: 0; }
.tile-header > :last-child { margin-bottom: 0; }

.tile-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tile-header-text { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }

.tile-body { display: flex; flex-direction: column; gap: var(--tile-inner-gap); margin: 0; }
.tile-body > * { margin-block: 0; }

/* Media frame: always inset within the tile's own padding, at a fixed
   aspect ratio (matches the square images the build produces), so a
   tile's photo lines up left/right with the text below it every time. */
.tile-frame {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: var(--tile-frame-aspect, 1 / 1);
  border-radius: var(--tile-frame-radius);
  overflow: hidden;
  background: var(--color-surface);
  flex: none;
}

.tile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--crop-x, 50%) var(--crop-y, 50%);
  transform: scale(var(--crop-zoom, 1));
  transform-origin: var(--crop-x, 50%) var(--crop-y, 50%);
  display: block;
}

.tile-frame-cover, .tile-frame-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.tile-frame-cover { background-size: cover; background-position: center; }

.tile-frame-placeholder {
  background: radial-gradient(circle at top left, rgba(247, 211, 93, 0.28), transparent 14rem), var(--color-surface);
  color: var(--color-gold);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-align: center;
  padding: var(--tile-pad-compact);
}

.tile-title {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 900;
  line-height: 1.1;
}

.tile-subtitle, .tile-meta {
  margin: 0;
  color: var(--color-gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tile-text { margin: 0; color: var(--color-text); line-height: 1.55; }
.tile-muted { color: var(--color-muted); }

.tile-stat-value {
  display: block;
  color: var(--color-gold);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
}

.tile-date-context { position: relative; padding-top: 4.5rem; }

.tile-date-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  border: 1px solid rgba(247, 211, 93, 0.35);
  border-radius: var(--radius-full);
  background: rgba(247, 211, 93, 0.1);
  color: var(--color-gold);
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 850;
}

/* Accent variant for CTAs and expandable committee cards */
.tile-surface-accent {
  background: radial-gradient(circle at top right, rgba(247, 211, 93, 0.14), transparent 18rem), var(--color-surface);
}

.tile-cta { padding: var(--tile-pad-lg); text-align: center; align-items: center; }

.tile-cta-title {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.tile-actions-center { justify-content: center; }

/* Expandable (details/summary) tiles: FAQ + committee */
.tile-reveal-summary {
  cursor: pointer;
  list-style: none;
}

.tile-reveal-summary::-webkit-details-marker { display: none; }

.tile-reveal-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.tile-reveal-toggle::before, .tile-reveal-toggle::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.8rem;
  height: 2px;
  background: var(--color-gold);
  transform: translate(-50%, -50%);
}

.tile-reveal-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }

details[open] .tile-reveal-toggle {
  background: var(--color-gold);
  border-color: var(--color-gold);
}

details[open] .tile-reveal-toggle::before,
details[open] .tile-reveal-toggle::after { background: #000000; }

details[open] .tile-reveal-toggle::after { display: none; }

.tile-reveal-body {
  display: flex;
  flex-direction: column;
  gap: var(--tile-inner-gap);
  border-top: 1px solid var(--color-border);
  padding-top: var(--tile-inner-gap);
  margin-top: var(--tile-inner-gap);
}

/* Embed widgets (Facebook/Strava iframes etc) — deliberately not part of
   the media-frame system above, since these are fixed-size third-party
   iframes rather than photos. */
.tile-frame-embed {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--tile-frame-radius);
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.3);
  padding: var(--tile-pad-compact);
  line-height: 0;
}

.tile-frame-embed iframe {
  display: block;
  width: min(100%, var(--tile-embed-width, 500px));
  max-width: 100%;
  border: 0;
}

/* Text prose panel */
.text-panel .prose p:first-child, .prose p:first-child { margin-top: 0; }
.text-panel .prose p:last-child, .prose p:last-child { margin-bottom: 0; }

.text-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 860px) {
  .text-layout { grid-template-columns: 1fr; }
}

.notice-card code {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
}

/* Sections that must not be squeezed by the tile grid auto-fit (iframes) */
.section-normal-flow { overflow: visible; }

/* =====================================================
   9. TIMELINE
   ===================================================== */

.timeline-item {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.timeline-number {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--color-gold);
  color: #000000;
  font-weight: 900;
}

/* =====================================================
   10. SOCIAL LOGO STRIP + RELAY BAR
   ===================================================== */

.social-logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 1.5rem);
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.social-logo-link {
  display: grid;
  width: clamp(72px, 9vw, 104px);
  height: clamp(72px, 9vw, 104px);
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.social-logo-link:hover { transform: translateY(-4px); border-color: rgba(247, 211, 93, 0.5); }

.social-logo-link img { width: 58%; height: 58%; object-fit: cover; border-radius: 50%; }

.social-logo-link span { color: var(--color-gold); font-size: 1.3rem; font-weight: 900; }

.relay-bar {
  display: flex;
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.relay-bar span { display: block; height: 100%; }
.relay-bar .swim { width: 20%; background: #38BDF8; }
.relay-bar .bike { width: 55%; background: var(--color-gold); }
.relay-bar .run { width: 25%; background: #4ADE80; }

.relay-key {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.relay-key i { display: inline-block; width: 10px; height: 10px; margin-right: 0.4rem; border-radius: 2px; }
.relay-key .swim i { background: #38BDF8; }
.relay-key .bike i { background: var(--color-gold); }
.relay-key .run i { background: #4ADE80; }

/* =====================================================
   11. MOTION
   ===================================================== */

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

/* =====================================================
   12. TILE-GRID SECTION LAYOUT
   Every option a Section exposes (columns, equal height, scroll,
   width, padding, background) maps to one class each here. Nothing
   about a specific *kind* of tile lives in this block — that's the
   point: this is the one place section layout is controlled, no
   matter which preset the tiles inside were built from.
   ===================================================== */

.section-tile-grid[data-columns="1"] .tile-grid { --tile-grid-min: 100%; }
.section-tile-grid[data-columns="2"] .tile-grid { --tile-grid-min: 340px; }
.section-tile-grid[data-columns="3"] .tile-grid { --tile-grid-min: 280px; }
.section-tile-grid[data-columns="4"] .tile-grid { --tile-grid-min: 220px; }

.tile-grid-align-stretch { align-items: stretch; }
.tile-grid-align-stretch .tile { height: 100%; }

/* Horizontal scroll variant: tiles become a fixed-width scrolling row
   instead of wrapping. Used when a section has more tiles than make
   sense to wrap onto a new line (e.g. a long sponsor row). */
.tile-grid-scroll {
  display: flex;
  grid-template-columns: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.tile-grid-scroll .tile {
  flex: 0 0 min(80vw, var(--tile-grid-min, 280px));
  scroll-snap-align: start;
}

/* Width variants, matching the .container / .container-narrow already
   used elsewhere, plus a wide option for sections that want the full
   1120px+ measure even though most tile grids read better narrower. */
.section-width-wide .container-narrow { width: min(1400px, calc(100% - 2rem)); }

/* Padding variants */
.section-padding-compact { padding-block: clamp(2rem, 4vw, 3rem); }
.section-padding-spacious { padding-block: clamp(4.5rem, 9vw, 8rem); }

/* Background variants — explicit, so a Section no longer depends on
   its position in the page (old odd/even striping) to control this. */
.section-bg-default { background: var(--color-background); }
.section-bg-surface { background: var(--color-surface); }
.section-bg-accent {
  background: radial-gradient(circle at top left, rgba(247, 211, 93, 0.12), transparent 32rem), var(--color-background);
}

/* Centred tile-grid, used by the old "cta" preset: a single tile,
   narrow width, centred text — built entirely from existing tile
   classes (.tile-surface-accent / .tile-cta / .tile-actions-center). */
.tile-grid-center { justify-items: center; }

/* Numbered variant, replaces the old dedicated timeline include: any
   tile-grid can ask for a leading number badge per tile via
   layout.numbered instead of needing its own section type. */
.tile-index-badge {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--color-gold);
  color: #000000;
  font-weight: 900;
}

.tile-numbered { flex-direction: row; align-items: flex-start; gap: 1rem; }
.tile-numbered .tile-body { flex: 1 1 auto; }

/* Wraps a tile's header + expandable content together so it behaves as
   one flex sibling next to a badge/index number when a tile lays out
   horizontally (numbered mode), and is otherwise an invisible no-op. */
.tile-content-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--tile-inner-gap);
  flex: 1 1 auto;
  min-width: 0;
}

/* Round image variant, for icon/logo-style tile images (e.g. social
   platform icons) instead of the default square photo frame. */
.tile-frame-round { border-radius: 50%; aspect-ratio: 1 / 1; width: 72px; }

/* Badge — a small free-floating tag (event date, race distance, etc),
   generalised from the old committee-only "tile-date-badge". */
.tile-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  border: 1px solid rgba(247, 211, 93, 0.35);
  border-radius: var(--radius-full);
  background: rgba(247, 211, 93, 0.1);
  color: var(--color-gold);
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 850;
}

.tile-has-badge { position: relative; padding-top: 4.5rem; }
