/* ============================================================
   Progressive Training Team — Custom Styles
   Tailwind handles layout/spacing; this file covers custom
   components and anything that needs to live outside utilities.
   ============================================================ */

/* ----- Typography base ------------------------------------- */
body {
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  color: #111111;
  background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
}

/* ----- CTA Button ------------------------------------------ */
.btn-cta {
  display: inline-block;
  background-color: #C0202A;
  color: #ffffff;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.625rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  cursor: pointer;
  border: none;
  line-height: 1.4;
}

.btn-cta:hover {
  background-color: #8B1A1C;
  box-shadow: 0 4px 14px rgba(192, 32, 42, 0.35);
}

.btn-cta:active {
  transform: translateY(1px);
}

.btn-cta:focus-visible {
  outline: 2px solid #C0202A;
  outline-offset: 3px;
}

/* ----- Secondary (outline) button -------------------------- */
.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: #C0202A;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5625rem 1.375rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1.5px solid #C0202A;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1.4;
}

.btn-outline:hover {
  background-color: #C0202A;
  color: #ffffff;
}

.btn-outline:focus-visible {
  outline: 2px solid #C0202A;
  outline-offset: 3px;
}

/* ----- Nav active link ------------------------------------- */
.nav-link.active {
  color: #8B1A1C !important;
}

/* Sticky nav: background change + shadow once the page is scrolled */
header#site-header {
  transition: background-color 0.25s ease, box-shadow 0.25s ease,
              backdrop-filter 0.25s ease;
}

header.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

/* ----- Section spacing helper ------------------------------ */
.section-pad {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* ----- Content max-width wrapper --------------------------- */
.container-site {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ----- Phase-1 placeholder sections ----------------------- */
.phase-placeholder {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F5F5F5;
  padding: 6rem 1.5rem;
  text-align: center;
}

/* ----- Responsive image helper ----------------------------- */
img {
  max-width: 100%;
  height: auto;
}

/* ----- Hero white-outline button (dark backgrounds) -------- */
.btn-hero-outline {
  display: inline-block;
  background-color: transparent;
  color: #ffffff;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.625rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  text-align: center;
  line-height: 1.4;
}

.btn-hero-outline:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-hero-outline:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* ----- Hero diagonal speed-line pattern -------------------- */
.hero-pattern {
  background-image: repeating-linear-gradient(
    -55deg,
    rgba(192, 32, 42, 0.15) 0,
    rgba(192, 32, 42, 0.15) 1px,
    transparent 0,
    transparent 50%
  );
  background-size: 24px 24px;
}

/* ----- "Why Run With Us" feature icon circle --------------- */
.feature-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background-color: rgba(139, 26, 28, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: background-color 0.2s ease;
}

.feature-icon:hover,
.feature-col:hover .feature-icon {
  background-color: rgba(139, 26, 28, 0.15);
}

/* ----- Service cards --------------------------------------- */
.service-card {
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07), 0 4px 12px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* ----- Gallery masonry grid -------------------------------- */
.gallery-masonry {
  columns: 3 240px;
  gap: 0.875rem;
}

.gallery-masonry > div {
  break-inside: avoid;
  margin-bottom: 0.875rem;
  border-radius: 6px;
  overflow: hidden;
}

/* ----- Photo placeholder cells ----------------------------- */
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ----- Testimonial cards (on dark bg) ---------------------- */
.testimonial-card {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2rem;
  transition: background-color 0.2s ease;
}

.testimonial-card:hover {
  background-color: rgba(255, 255, 255, 0.07);
}

/* ----- Inline "learn more" arrow link ---------------------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C0202A;
  text-decoration: none;
  transition: gap 0.15s ease, color 0.15s ease;
}

.link-arrow:hover {
  gap: 0.625rem;
  color: #8B1A1C;
}

/* ----- Section eyebrow label ------------------------------- */
.eyebrow {
  font-family: 'Oswald', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #C0202A;
  margin-bottom: 0.875rem;
}

/* ----- Scroll-cue mouse icon ------------------------------- */
.scroll-cue {
  width: 1.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.375rem;
}

.scroll-cue__dot {
  width: 0.25rem;
  height: 0.5rem;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  animation: scrollBounce 1.6s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(6px); opacity: 1; }
}

/* ----- FAQ Accordion --------------------------------------- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
}

.faq-answer.is-open {
  max-height: 600px;
}

.faq-icon {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-icon.is-open {
  transform: rotate(180deg);
}

/* ----- Service image column (full-height fill) ------------- */
.service-image-col {
  position: relative;
  min-height: 300px;
}

@media (min-width: 1024px) {
  .service-image-col {
    min-height: 0;   /* let the grid row determine height */
  }
}

.service-image-col > .service-img-fill {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ----- Weekly schedule day cards --------------------------- */
.schedule-day {
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  overflow: hidden;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
}

.schedule-day.is-active {
  border-top: 3px solid #C0202A;
}

.schedule-day.is-rest {
  border-top: 3px solid transparent;
  background-color: #fafafa;
}

.schedule-day__header {
  padding: 0.5rem 0.75rem 0.4rem;
  border-bottom: 1px solid #F3F4F6;
}

.schedule-day__body {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ----- Race cards ------------------------------------------ */
.race-card {
  background-color: #ffffff;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.race-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* ----- Pace table ------------------------------------------ */
.pace-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
}

.pace-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
}

.pace-table thead th {
  background-color: #111111;
  color: #ffffff;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 1rem;
  text-align: left;
}

.pace-table thead th:first-child {
  border-radius: 0;
}

.pace-table tbody tr {
  border-bottom: 1px solid #F3F4F6;
  transition: background-color 0.15s ease;
}

.pace-table tbody tr:last-child {
  border-bottom: none;
}

.pace-table tbody tr:hover {
  background-color: #fafafa;
}

.pace-table tbody td {
  padding: 0.875rem 1rem;
  font-size: 0.9rem;
  color: #444444;
  vertical-align: middle;
}

.pace-table tbody td:first-child {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #111111;
}

.pace-table tbody tr:nth-child(even) td {
  background-color: #fafafa;
}

.pace-table tbody tr:nth-child(even):hover td {
  background-color: #f0f0f0;
}

/* Zone colour chips inside pace cells */
.pace-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.pace-chip--easy     { background-color: #dcfce7; color: #166534; }
.pace-chip--moderate { background-color: #fef9c3; color: #854d0e; }
.pace-chip--race     { background-color: #fee2e2; color: #991b1b; }

/* ----- Gallery page: masonry grid (CSS columns) ------------ */
.gallery-grid {
  columns: 1;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .gallery-grid { columns: 2; gap: 0.875rem; }
}

@media (min-width: 1024px) {
  .gallery-grid { columns: 3; gap: 1rem; }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 0.75rem;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 1024px) {
  .gallery-item { margin-bottom: 1rem; }
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Dark overlay + caption on hover */
.gallery-item .gal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17,17,17,0);
  transition: background 0.22s ease;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
}

.gallery-item:hover .gal-overlay,
.gallery-item:focus-visible .gal-overlay {
  background: rgba(17,17,17,0.35);
}

.gallery-item .gal-caption-text {
  color: #ffffff;
  font-family: 'Oswald', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.gallery-item:hover .gal-caption-text,
.gallery-item:focus-visible .gal-caption-text {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:focus-visible {
  outline: 3px solid #C0202A;
  outline-offset: 2px;
}

/* ----- Gallery category filter buttons -------------------- */
.filter-btn {
  padding: 0.4rem 1.125rem;
  border-radius: 999px;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1.5px solid #E5E7EB;
  background-color: #ffffff;
  color: #666666;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.filter-btn:hover:not(.filter-active) {
  border-color: #C0202A;
  color: #C0202A;
}

.filter-btn.filter-active {
  background-color: #8B1A1C;
  border-color: #8B1A1C;
  color: #ffffff;
}

.filter-btn:focus-visible {
  outline: 2px solid #C0202A;
  outline-offset: 2px;
}

/* ----- Lightbox overlay ------------------------------------ */
#lightbox {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lb-nav-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 50%;
  color: rgba(255,255,255,0.7);
  transition: background-color 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lb-nav-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #ffffff;
}

.lb-nav-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* ----- Contact form labels --------------------------------- */
.contact-label {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111111;
  margin-bottom: 0.375rem;
}

.contact-label .opt {
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  color: #6B7280;   /* WCAG AA: 4.83:1 on white */
  margin-left: 0.3rem;
}

/* ----- Contact form inputs --------------------------------- */
.contact-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #E5E7EB;
  border-radius: 6px;
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  font-size: 0.95rem;
  color: #111111;
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  resize: vertical;
}

.contact-input::placeholder {
  color: #6B7280;   /* WCAG AA: 4.83:1 on white */
}

.contact-input:focus {
  border-color: #8B1A1C;
  box-shadow: 0 0 0 3px rgba(139, 26, 28, 0.08);
}

.contact-input.is-invalid {
  border-color: #C0202A;
  box-shadow: 0 0 0 3px rgba(192, 32, 42, 0.07);
}

.contact-input.is-valid {
  border-color: #16a34a;
}

/* ----- Field error messages -------------------------------- */
.field-error {
  display: none;
  color: #C0202A;
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  font-size: 0.78rem;
  margin-top: 0.3rem;
  line-height: 1.4;
}

.field-error.is-visible {
  display: block;
}

/* ----- Form success box ------------------------------------ */
.form-success {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 2px solid #dcfce7;
  background-color: #f0fdf4;
  border-radius: 8px;
}

/* ----- Contact detail list items -------------------------- */
.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.contact-detail-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: rgba(139, 26, 28, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ============================================================
   PHASE 8 — Polish & Animations
   ============================================================ */

/* ----- 1. Smooth scroll + sticky-nav offset ---------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;   /* clears the 4rem sticky header */
}

/* Anchored sections shouldn't show a focus ring when targeted
   programmatically for smooth scroll. */
[tabindex="-1"]:focus {
  outline: none;
}

/* ----- 2. Fade-in on scroll (Intersection Observer) -------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ----- 4. Hover scale + shadow on cards -------------------- */
.service-card:hover,
.race-card:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
}

.feature-col {
  transition: transform 0.2s ease;
}

.feature-col:hover {
  transform: translateY(-4px);
}

.testimonial-card {
  transition: background-color 0.2s ease, transform 0.2s ease,
              box-shadow 0.2s ease;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

/* ----- 7. Back-to-top button ------------------------------- */
#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  width: 2.875rem;
  height: 2.875rem;
  border: none;
  border-radius: 50%;
  background-color: #C0202A;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(192, 32, 42, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease,
              visibility 0.25s ease, background-color 0.2s ease;
}

#back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background-color: #8B1A1C;
}

#back-to-top svg {
  width: 1.375rem;
  height: 1.375rem;
}

#back-to-top:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* ----- 8. Global accessible focus states ------------------- */
/* Component-specific :focus-visible rules above take precedence;
   this is the baseline fallback for any interactive element. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid #C0202A;
  outline-offset: 2px;
  border-radius: 3px;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-cue__dot {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ============================================================
   SIGNATURE FEATURES — kinetic hero, ticker, runner progress,
   counters, countdowns, page transitions, CTA micro-interactions
   ============================================================ */

/* ----- Cross-page transitions (View Transitions API) -------- */
/* Progressive enhancement: browsers without support simply get
   instant navigation. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-leave 0.16s ease-in both;
}

::view-transition-new(root) {
  animation: vt-enter 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes vt-leave {
  to { opacity: 0; }
}

@keyframes vt-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ----- Runner scroll-progress bar --------------------------- */
#run-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 70;            /* above sticky header (50) */
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#run-progress.is-active {
  opacity: 1;
}

#run-progress__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #8B1A1C, #C0202A);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

#run-progress__runner {
  position: absolute;
  top: -1px;
  left: 0;
  width: 22px;
  height: 22px;
  margin-left: -4px;
  color: #C0202A;
  transform: translateX(0);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

#run-progress__runner svg {
  width: 100%;
  height: 100%;
  animation: runner-bob 0.5s ease-in-out infinite alternate;
}

@keyframes runner-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-2px); }
}

/* ----- Kinetic hero ------------------------------------------ */
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotate(1.5deg);
  animation: hero-word-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
  will-change: opacity, transform;
}

.hero-fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes hero-word-in {
  to { opacity: 1; transform: none; }
}

@keyframes hero-fade-up {
  to { opacity: 1; transform: none; }
}

/* Sweeping speed streaks behind the hero copy */
.speed-streak {
  position: absolute;
  height: 2px;
  width: 38vw;
  max-width: 540px;
  background: linear-gradient(90deg, transparent, rgba(192, 32, 42, 0.55), transparent);
  transform: skewX(-24deg) translateX(-60vw);
  animation: streak-sweep var(--dur, 7s) linear infinite;
  animation-delay: var(--d, 0s);
  pointer-events: none;
}

.speed-streak--bright {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

@keyframes streak-sweep {
  0%   { transform: skewX(-24deg) translateX(-60vw); opacity: 0; }
  8%   { opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: skewX(-24deg) translateX(160vw); opacity: 0; }
}

/* ----- Stadium ticker ---------------------------------------- */
.ticker {
  background-color: #111111;
  border-top: 1px solid rgba(192, 32, 42, 0.45);
  border-bottom: 1px solid rgba(192, 32, 42, 0.45);
  overflow: hidden;
  position: relative;
}

.ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ticker-scroll 36s linear infinite;
}

.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track {
  animation-play-state: paused;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.5rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.ticker__item .tick-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #C0202A;
  flex-shrink: 0;
}

.ticker__item em {
  font-style: normal;
  color: #C0202A;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----- Animated stat counters -------------------------------- */
[data-count-to] {
  font-variant-numeric: tabular-nums;
}

/* ----- Race countdown chips ----------------------------------- */
.race-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8B1A1C;
  background-color: rgba(139, 26, 28, 0.07);
  border: 1px solid rgba(139, 26, 28, 0.18);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-variant-numeric: tabular-nums;
}

.race-countdown svg {
  width: 0.8rem;
  height: 0.8rem;
  flex-shrink: 0;
}

.race-countdown--past {
  color: #666666;
  background-color: #F5F5F5;
  border-color: #E5E7EB;
}

/* ----- Pace calculator ---------------------------------------- */
.calc-panel {
  background-color: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.calc-result-num {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #8B1A1C;
}

.calc-split-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.875rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.calc-split-row:nth-child(odd) {
  background-color: #fafafa;
}

/* ----- CTA micro-interactions ---------------------------------- */
.btn-cta {
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s ease, box-shadow 0.2s ease,
              transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-cta::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-160%) skewX(-20deg);
  pointer-events: none;
}

.btn-cta:hover::after {
  animation: cta-sheen 0.7s ease forwards;
}

.btn-cta:active {
  transform: scale(0.965);
}

@keyframes cta-sheen {
  to { transform: translateX(320%) skewX(-20deg); }
}

.btn-hero-outline,
.btn-outline {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
              transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-hero-outline:active,
.btn-outline:active {
  transform: scale(0.965);
}

.link-arrow svg {
  transition: transform 0.18s ease;
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

/* ----- Reduced motion: switch the new features off ------------- */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }

  .hero-word,
  .hero-fade-up {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .speed-streak {
    display: none;
  }

  .ticker__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
  }

  #run-progress__runner svg {
    animation: none;
  }

  .btn-cta:hover::after {
    animation: none;
  }
}
