/* ===========================================================================
   PCRC — Pretoria Cycling & Racing Club
   Design system: "Ride Computer" — inspired by cycling head-units, race
   numbers and club jersey stripes. Built on the club's existing brand
   colors (deep blue / light blue / yellow) with the logo's racing red used
   sparingly as a second accent.
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* --- brand palette (unchanged club colors) --- */
  --deep-blue: #004e9e;
  --dark-blue: #002f6c;
  --light-blue: #1ca2dd;
  --yellow: #ffe400;
  --white: #ffffff;
  --ink: #061428;              /* near-black navy, from logo */
  --race-red: #c0293a;         /* sampled from logo wordmark, used sparingly */

  /* --- derived surfaces --- */
  --bg-0: var(--dark-blue);
  --bg-1: #013a7d;             /* between deep and dark blue */
  --bg-2: var(--deep-blue);
  --panel: rgba(255, 255, 255, 0.06);
  --panel-border: rgba(255, 255, 255, 0.14);
  --panel-strong: rgba(4, 20, 46, 0.55);
  --text-soft: rgba(255, 255, 255, 0.78);
  --text-faint: rgba(255, 255, 255, 0.52);

  /* --- type --- */
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* --- layout --- */
  --container: 1180px;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --nav-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg-0);
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(28, 162, 221, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(255, 228, 0, 0.07), transparent 55%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-2) 45%, var(--bg-0) 100%);
  color: var(--white);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

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

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
  line-height: 1.12;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.7em; }
h3 { font-size: clamp(1.05rem, 1.6vw, 1.3rem); letter-spacing: 0.04em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--yellow);
  display: inline-block;
}

p { color: var(--text-soft); max-width: 68ch; }
.section-intro p { margin-bottom: 0.6em; }

/* ===== LAYOUT HELPERS ===== */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; padding: 84px 0; }
section + section { border-top: 1px solid rgba(255,255,255,0.06); }

.stripe-divider {
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0 26px,
    var(--light-blue) 26px 52px
  );
  opacity: 0.9;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ===== NAVIGATION ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(2, 20, 48, 0.35);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
}
header.scrolled {
  background: rgba(2, 14, 34, 0.82);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-link { display: flex; align-items: center; gap: 12px; }
.logo-image { height: 44px; width: 44px; object-fit: contain; transition: transform 0.4s var(--ease); }
.logo-link:hover .logo-image { transform: rotate(-18deg); }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.logo-text::after { content: 'PCRC'; }

.nav { position: static; }
.nav-toggle {
  display: none;
  font-size: 1.6rem;
  color: var(--white);
  z-index: 110;
}

.menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu > li { position: relative; }

.menu > li > a,
.main-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-s);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  position: relative;
}
.menu > li > a:hover,
.main-link:hover { color: var(--yellow); background: rgba(255,255,255,0.06); }

.menu > li > a::after,
.main-link::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 6px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.menu > li > a:hover::after,
.main-link:hover::after { transform: scaleX(1); }

.dropdown-toggle {
  display: none;
}
.dropdown-toggle::after { content: '▾'; }

.dropdown { display: flex; align-items: center; }
.sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 190px;
  background: rgba(2, 16, 40, 0.96);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-m);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}
.dropdown:hover .sub-menu,
.dropdown.active .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.sub-menu li a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-s);
  font-size: 0.85rem;
  color: var(--text-soft);
}
.sub-menu li a:hover { background: rgba(28,162,221,0.18); color: var(--white); }

.nav-cta {
  margin-left: 8px;
  padding: 10px 20px !important;
  background: var(--yellow) !important;
  color: var(--ink) !important;
  border-radius: 999px !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--white) !important; color: var(--ink) !important; }
.nav-cta::after { display: none !important; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color .25s var(--ease);
}
.btn-primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(255,228,0,0.18);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(255,228,0,0.3); }
.btn-outline {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--light-blue); background: rgba(28,162,221,0.12); transform: translateY(-3px); }
.btn-red { background: var(--race-red); color: var(--white); }
.btn-red:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(192,41,58,0.35); }

/* ===== HERO (home) ===== */
.hero {
  position: relative;
  min-height: min(92vh, 880px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.85);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--bg-0) 2%, rgba(0,47,108,0.35) 40%, rgba(0,47,108,0.15) 70%),
    linear-gradient(100deg, rgba(0,20,50,0.75) 10%, rgba(0,20,50,0.1) 55%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 24px 64px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero-content h1 { max-width: 14ch; }
.hero-content .lede {
  margin-top: 18px;
  max-width: 52ch;
  font-size: 1.08rem;
  color: var(--text-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.scroll-cue {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue span.line { width: 1px; height: 26px; background: linear-gradient(var(--yellow), transparent); }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ===== PAGE HERO (inner pages, no video) ===== */
.page-hero {
  position: relative;
  padding: 150px 0 70px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 18% 30%, rgba(28,162,221,0.16) 1.5px, transparent 1.5px),
    radial-gradient(circle at 78% 65%, rgba(255,228,0,0.14) 1.5px, transparent 1.5px);
  background-size: 90px 90px, 130px 130px;
  opacity: 0.5;
}
.page-hero .wrap { position: relative; }
.page-hero p.lede { font-size: 1.05rem; margin-top: 14px; max-width: 62ch; }

/* ===== WELCOME / INTRO STRIP ===== */
.welcome { text-align: left; }
.welcome h1 { max-width: 18ch; }
.welcome p { margin-top: 16px; font-size: 1.05rem; }

/* ===== STAT READOUT BAR ===== */
.stat-strip {
  background: linear-gradient(180deg, rgba(0,10,26,0.6), rgba(0,10,26,0.35));
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 46px 0;
}
.stat-item { text-align: center; border-left: 1px solid rgba(255,255,255,0.09); padding-left: 24px; }
.stat-item:first-child { border-left: none; padding-left: 0; }
.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--light-blue);
  letter-spacing: 0.02em;
  text-shadow: 0 0 24px rgba(28,162,221,0.35);
}
.stat-label {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ===== CARDS / PANELS ===== */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-l);
  backdrop-filter: blur(6px);
}

/* ===== HIGHLIGHTS (testimonies + achievements) ===== */
.highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 900px) { .highlights { grid-template-columns: 1fr; } }

.carousel-container {
  position: relative;
  padding: 34px 30px 30px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.carousel-track {
  position: relative;
  flex: 1;
  overflow: hidden;
}
.testimony-box, .achievement-box {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transform: translateY(6px);
}
.testimony-box.active, .achievement-box.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  position: relative;
}
.quote { font-size: 1.05rem; color: var(--white); }
.quote::before { content: '“'; color: var(--yellow); font-family: var(--font-display); }
.author { margin-top: 14px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--light-blue); }
.achievement-box h3 { color: var(--yellow); margin-bottom: 10px; }
.achievement-box p { margin-top: 6px; font-size: 0.94rem; }
.achievement-box span { color: var(--text-faint); }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--panel-border);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  z-index: 3;
}
.carousel-btn:hover { background: var(--yellow); color: var(--ink); }
.prev-btn { left: -6px; }
.next-btn { right: -6px; }

.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.25); transition: all 0.25s var(--ease); }
.dot.active { background: var(--yellow); width: 22px; border-radius: 5px; }

/* ===== NEWS RIBBON ===== */
.news {
  position: relative;
  background: var(--race-red);
  overflow: hidden;
  padding: 22px 0;
}
.news .wrap { display: flex; align-items: center; gap: 16px; }
.news h2 { font-size: 0.95rem; margin: 0; white-space: nowrap; }
.news p { color: var(--white); margin: 0; opacity: 0.95; }

/* ===== SPONSORS ===== */
.sponsors { padding: 70px 0 90px; }
.sponsor-track {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.sponsor-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.04);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.sponsor-chip:hover { border-color: var(--light-blue); color: var(--white); }

.sponsor-logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.sponsor-logo-frame {
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 14px;
  display: flex; align-items: center; justify-content: center;
  height: 92px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.sponsor-logo-frame:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,0.25); }
.sponsor-logo-frame img { max-height: 100%; object-fit: contain; }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 54px 24px 34px;
  text-align: center;
  background: rgba(0,10,26,0.5);
}
footer p { margin: 0 auto 8px; color: var(--text-faint); font-size: 0.88rem; }
.social-links { display: flex; justify-content: center; margin: 16px 0; }
.facebook-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color .25s;
}
.facebook-link:hover { background: var(--light-blue); border-color: var(--light-blue); color: var(--ink); }
footer small { color: var(--text-faint); }

/* ===== GENERIC PAGE ARTICLE BLOCKS (about/history/etc.) ===== */
.content-block { max-width: 840px; }
.content-block h2 { margin-top: 0; }
article.block { padding: 54px 0; }
article.block + article.block { border-top: 1px solid rgba(255,255,255,0.06); }
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.impact-image, .sponsorship-image, .youngest-image, .podium-image {
  border-radius: var(--radius-m);
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.impact-image:hover, .sponsorship-image:hover { transform: scale(1.02); }
.youngest-image, .podium-image { display: inline-block; width: calc(50% - 8px); margin-top: 18px; margin-right: 16px;}

.join-us { text-align: center; padding: 70px 0 90px; }
.join-button {
  display: inline-flex;
  margin-top: 20px;
  padding: 16px 34px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.join-button:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 34px rgba(255,228,0,0.3); }

/* ===== TEAM PAGE ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  margin-top: 20px;
}
.team-member-article { border-radius: var(--radius-l); overflow: hidden; }
.team-member {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}
.team-member-image {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
  filter: grayscale(0.15) brightness(0.92);
}
.team-member:hover .team-member-image { transform: scale(1.06); filter: grayscale(0) brightness(1); }
.team-member-overlay {
  position: absolute; inset: auto 0 0 0;
  padding: 20px 20px 22px;
  background: linear-gradient(0deg, rgba(0,10,26,0.94) 20%, rgba(0,10,26,0.15) 90%);
  transform: translateY(0);
}
.team-member-overlay h2 { font-size: 1.15rem; margin-bottom: 2px; }
.team-member-overlay .role { color: var(--yellow); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.team-member-overlay .description {
  margin-top: 10px; font-size: 0.86rem;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease);
}
.team-member:hover .description, .team-member:focus-within .description { max-height: 140px; opacity: 1; }
.team-member-info-mobile { display: none; }

@media (hover: none) {
  .team-member-overlay .description { max-height: 140px; opacity: 1; }
}

/* ===== GALLERY / PHOTOS PAGE ===== */
.photo-gallery { margin-top: 46px; }
.photo-gallery h2 { margin-bottom: 4px; }
.gallery-images {
  margin-top: 20px;
  columns: 4 260px;
  column-gap: 14px;
}
.ride-photo {
  width: 100%;
  border-radius: var(--radius-m);
  margin-bottom: 14px;
  break-inside: avoid;
  cursor: zoom-in;
  transition: transform 0.35s var(--ease), box-shadow .35s var(--ease), filter .35s var(--ease);
  filter: brightness(0.94);
}
.ride-photo:hover { transform: translateY(-4px) scale(1.015); box-shadow: 0 18px 30px rgba(0,0,0,0.35); filter: brightness(1.03); }

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(1,8,20,0.92);
  display: none;
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.lightbox.active { display: flex; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 88vh; text-align: center; }
.lightbox-content img { max-width: 90vw; max-height: 78vh; border-radius: var(--radius-m); margin: 0 auto; }
.lightbox-caption { color: var(--text-soft); margin-top: 14px; font-family: var(--font-mono); font-size: 0.8rem; }
.lightbox-close { position: absolute; top: -44px; right: -6px; font-size: 2rem; color: var(--white); }
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--white);
  background: rgba(255,255,255,0.08); width: 46px; height: 46px; border-radius: 50%;
}
.lightbox-prev { left: -70px; } .lightbox-next { right: -70px; }
.lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover { color: var(--yellow); }

/* ===== EVENTS / CALENDAR ===== */
.calendar {
  max-width: 560px;
  margin: 40px auto 0;
  padding: 28px;
}
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.calendar-header button {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--panel-border);
  transition: background .25s var(--ease);
}
.calendar-header button:hover { background: var(--light-blue); color: var(--ink); }
#monthYear { font-family: var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; }
.weekdays, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekdays .day { text-align: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); padding-bottom: 8px; }
.days > div {
  min-height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  border-radius: var(--radius-s); font-size: 0.85rem; color: var(--text-soft);
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.days > div.today { background: var(--yellow); color: var(--ink); font-weight: 700; }
.days > div.today .event-title { color: var(--ink); }
.days > div.event-day { border-color: rgba(28,162,221,0.5); background: rgba(28,162,221,0.1); cursor: default; }
.days > div.event-day:hover { border-color: var(--light-blue); background: rgba(28,162,221,0.18); }
.days > div .event-title {
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.02em;
  color: var(--light-blue); text-align: center; line-height: 1.1; padding: 0 3px;
}
.days > div.empty-day { background: transparent; border: none; }

/* ===== RACE / EVENT DETAIL PAGES (rooiwal / harties) ===== */
.next-race, .harties-event, .results { padding: 60px 0; }
.next-race article, .harties-event article {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: start;
  margin-top: 24px;
}
@media (max-width: 760px) { .next-race article, .harties-event article { grid-template-columns: 1fr; } }
.event-flyer { border-radius: var(--radius-l); border: 1px solid var(--panel-border); }
.event-details { font-size: 1rem; color: var(--text-soft); }
.event-details span { display: block; margin: 6px 0; }
#entry, #results {
  display: inline-flex;
  align-items: center;
  margin-top: 24px;
  padding: 14px 30px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
#entry:hover, #results:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(255,228,0,0.3); }

/* ===== JOIN PAGE ===== */
.join, .sent-to { text-align: left; }
.form-preview {
  margin-top: 26px;
  max-width: 420px;
  border-radius: var(--radius-m);
  border: 1px solid var(--panel-border);
}
.download-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 18px;
  padding: 14px 26px;
  background: var(--light-blue);
  color: var(--ink);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.download-link:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(28,162,221,0.3); }
.sent-to { margin-top: 10px; }
.sent-to p { font-family: var(--font-mono); }

/* ===== CONTACT PAGE ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
  justify-content: center;
  gap: 22px;
  max-width: 700px;
  margin: 30px auto 0;
}
.contact-section > .wrap { text-align: center; }
.contact-section .lede { margin-left: auto; margin-right: auto; }
.contact-section > article {
  padding: 30px;
  text-align: center;
}
.contact-section h2 { margin-bottom: 4px; font-size: 1.2rem; }
.contact-section h4 { font-family: var(--font-mono); text-transform: none; letter-spacing: 0; color: var(--light-blue); font-size: 0.85rem; margin-bottom: 14px; font-weight: 500; }
.phone { font-family: var(--font-mono); font-size: 0.95rem; }

/* ===== VIDEO SECTION (home) reused as inline media block ===== */
.video-section {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  align-items: center;
}
@media (max-width: 860px) { .video-section { grid-template-columns: 1fr; } }
.video-container video {
  width: 100%; border-radius: var(--radius-l);
  border: 1px solid var(--panel-border);
}
.video-content p { margin-bottom: 16px; }
.video-content a { color: var(--yellow); font-weight: 600; }
.video-content a:hover { color: var(--light-blue); }

/* ===== MOBILE NAV ===== */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .menu {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(1, 10, 26, 0.98);
    backdrop-filter: blur(16px);
    padding: 10px 18px 26px;
    gap: 2px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .menu.active { opacity: 1; transform: translateY(0); visibility: visible; }
  .menu > li > a, .main-link { display: flex; padding: 14px 6px; font-size: 1rem; }
  .dropdown { flex-direction: column; align-items: stretch; }
  .dropdown-toggle {
    display: flex; align-items: center; justify-content: center;
    position: absolute; right: 0; top: 0; height: 100%; width: 46px;
  }
  .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; background: transparent; border: none; box-shadow: none;
    padding-left: 14px;
  }
  .dropdown.active .sub-menu { display: block; }
  .nav-cta { margin: 10px 6px 0; text-align: center; justify-content: center; }
}

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(3) { border-left: none; }
  .stat-item { padding-left: 0; border-left: none; text-align: left; }
}

@media (max-width: 640px) {
  section { padding: 60px 0; }
  .next-race article, .harties-event article { gap: 22px; }
  .lightbox-prev, .lightbox-next { display: none; }
  .youngest-image, .podium-image { width: 100%; margin-right: 0; }
  .gallery-images { columns: 2 160px; }
}