:root {
  /* Brand */
  --color-bg: #070707;
  --color-bg-soft: #101010;
  --color-surface: #151515;
  --color-surface-2: #1c1c1c;
  --color-text: #ffffff;
  --color-text-soft: #b5b5b5;
  --color-text-muted: #7d7d7d;
  --color-line: rgba(255, 255, 255, 0.08);
  --color-primary: #68cc04;
  --color-primary-deep: #488f08;
  --color-secondary: #ff6a3d;
  --color-secondary-soft: rgba(255, 106, 61, 0.15);
  --color-primary-soft: rgba(104, 204, 4, 0.14);
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --container: 1180px;
  --header-height: 78px;
  --transition: 220ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  font-family: 'Montserrat', sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgba(104, 204, 4, 0.1), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 106, 61, 0.08), transparent 24%),
    linear-gradient(180deg, #090909 0%, #050505 100%);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

p {
  color: var(--color-text-soft);
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 88px 0;
}

.section-dark {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 0.94;
}

.section-head p {
  max-width: 700px;
}

.section-kicker,
.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--color-primary);
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.divider {
  width: 72px;
  height: 4px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.page-shell {
  position: relative;
  isolation: isolate;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-line);
  background: rgba(7, 7, 7, 0.82);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 42px;
  object-fit: contain;
}

.brand-logo--footer {
  height: 34px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), #9fff43);
  color: #040404;
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(104, 204, 4, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1;
}

.brand-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brand-subtitle {
  color: var(--color-text-muted);
  font-size: 0.73rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text);
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle span {
  margin: 5px auto;
}

.menu-toggle[aria-expanded="true"]::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"]::after {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-toggle[aria-expanded="true"] span {
  opacity: 0;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--color-text-soft);
  font-size: 0.94rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero--inner {
  min-height: 56vh;
}

.hero-media,
.inner-hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero::before,
.page-hero::before,
.article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.66) 58%, rgba(0, 0, 0, 0.92) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 55%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 1;
}

.hero-glow,
.hero-glow-alt {
  position: absolute;
  border-radius: 999px;
  filter: blur(160px);
  z-index: 1;
}

.hero-glow {
  width: 420px;
  height: 420px;
  top: -180px;
  left: -140px;
  background: rgba(104, 204, 4, 0.22);
}

.hero-glow-alt {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -100px;
  background: rgba(255, 106, 61, 0.16);
}

.hero-content,
.page-hero-content,
.article-hero-content {
  position: relative;
  z-index: 2;
  padding: 128px 0 76px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 32px;
  align-items: end;
}

.hero-copy {
  max-width: 720px;
}

.hero h1,
.page-hero h1,
.article-hero h1 {
  font-size: clamp(3.4rem, 8vw, 6.6rem);
  line-height: 0.9;
  margin-bottom: 18px;
}

.hero h1 span,
.page-hero h1 span,
.article-hero h1 span {
  color: transparent;
  -webkit-text-stroke: 2px var(--color-text);
}

.hero p,
.page-hero p,
.article-hero p {
  max-width: 640px;
  font-size: clamp(1rem, 2vw, 1.14rem);
}

.hero-actions,
.card-actions,
.dual-actions,
.filter-actions,
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.button-secondary,
.button-tertiary,
.chip,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: 14px;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), color var(--transition);
}

.button {
  color: #060606;
  background: linear-gradient(135deg, var(--color-primary), #90e93c);
  clip-path: polygon(8% 0, 100% 0, 100% 76%, 92% 100%, 0 100%, 0 24%);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.button-tertiary,
.link-button {
  min-height: auto;
  padding: 0;
  color: var(--color-text);
  font-size: 0.96rem;
}

.button-tertiary {
  border-bottom: 2px solid var(--color-primary);
}

.button:hover,
.button-secondary:hover,
.chip:hover,
.link-button:hover,
.button-tertiary:hover {
  transform: translateY(-2px);
}

.hero-panel,
.stat-card,
.info-card,
.card,
.cta-panel,
.filters-panel,
.empty-state,
.table-card {
  border: 1px solid var(--color-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.hero-panel {
  padding: 22px;
  border-radius: 24px;
}

.hero-panel-title {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.hero-panel p {
  margin-bottom: 18px;
}

.stat-list {
  display: grid;
  gap: 14px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item strong {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
}

.grid,
.cards-grid,
.news-grid,
.clubs-grid,
.products-grid,
.races-grid,
.feature-grid,
.info-grid,
.cta-grid,
.stats-grid {
  display: grid;
  gap: 24px;
}

.news-grid,
.feature-grid,
.cta-grid,
.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clubs-grid,
.products-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card,
.info-card,
.cta-panel,
.filters-panel,
.empty-state,
.table-card,
.article-card {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(104, 204, 4, 0.18), rgba(255, 106, 61, 0.12));
}

.card-media img,
.article-cover,
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 100%);
}

.card-body {
  padding: 22px;
}

.card h3,
.info-card h3,
.cta-panel h3,
.article-body h2 {
  margin-bottom: 12px;
  font-size: 1.7rem;
  line-height: 1;
}

.card p,
.info-card p,
.cta-panel p {
  margin-bottom: 14px;
}

.badge,
.meta-pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge {
  margin-bottom: 14px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge--warm {
  background: var(--color-secondary-soft);
  color: #ffab90;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-soft);
}

.hero-card-list,
.feature-list,
.data-points {
  display: grid;
  gap: 14px;
}

.feature-list li,
.data-points li,
.hero-card-list li {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-soft);
}

.feature-list strong,
.data-points strong,
.hero-card-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text);
}

.cta-panel {
  padding: 28px;
}

.cta-panel--accent {
  background: linear-gradient(135deg, rgba(104, 204, 4, 0.18), rgba(255, 106, 61, 0.12));
  border-color: rgba(104, 204, 4, 0.22);
}

.filters-panel {
  padding: 22px;
  margin-bottom: 24px;
}

.filters-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.field,
.field-select,
.field-date {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--color-line);
  outline: none;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}

.field::placeholder {
  color: #8a8a8a;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  min-height: 42px;
  padding: 10px 18px;
  color: var(--color-text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chip.is-active {
  color: #060606;
  background: linear-gradient(135deg, var(--color-primary), #90e93c);
  border-color: transparent;
}

.results-meta {
  margin-bottom: 18px;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.empty-state {
  padding: 30px;
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.table-card {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.table thead {
  background: rgba(255, 255, 255, 0.03);
}

.table th,
.table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--color-text);
  font-family: 'Oswald', sans-serif;
  font-size: 0.96rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table td {
  color: var(--color-text-soft);
}

.table tr:last-child td {
  border-bottom: 0;
}

.table-link {
  color: var(--color-text);
  border-bottom: 2px solid var(--color-primary);
}

.mobile-races {
  display: none;
}

.page-hero,
.article-hero {
  position: relative;
  overflow: hidden;
}

.page-hero-content,
.article-hero-content {
  max-width: 760px;
}

.page-hero h1,
.article-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
}

.article-main {
  padding: 52px 0 92px;
}

.article-card {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-soft);
}

.article-cover-wrap {
  aspect-ratio: 16 / 8;
  background: rgba(255, 255, 255, 0.03);
}

.article-body {
  padding: 34px;
}

.article-body p {
  margin-bottom: 16px;
  font-size: 1.03rem;
}

.article-body h2 {
  margin: 28px 0 12px;
}

.footer {
  padding: 42px 0 54px;
  border-top: 1px solid var(--color-line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 28px;
}

.footer p,
.footer a {
  color: var(--color-text-muted);
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer small {
  color: var(--color-text-muted);
}

.status-highlight {
  color: var(--color-primary);
}

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

.debug-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 3000;
  width: min(360px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(8, 8, 8, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.debug-panel.is-collapsed .debug-panel__body {
  display: none;
}

.debug-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.debug-panel__head strong {
  color: var(--color-text);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.debug-panel__toggle {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-soft);
  font-size: 0.78rem;
}

.debug-panel__body {
  display: grid;
  gap: 10px;
}

.debug-panel__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.debug-panel__label {
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.86rem;
}

.debug-panel__status {
  justify-self: end;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.debug-panel__status--pending {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-soft);
}

.debug-panel__status--remote {
  background: rgba(104, 204, 4, 0.18);
  color: #9fff43;
}

.debug-panel__status--fallback {
  background: rgba(255, 106, 61, 0.16);
  color: #ffb097;
}

.debug-panel__message {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .hero-layout,
  .news-grid,
  .feature-grid,
  .cta-grid,
  .stats-grid,
  .clubs-grid,
  .products-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  :root {
    --header-height: 72px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--color-line);
    background: rgba(9, 9, 9, 0.98);
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    width: 100%;
  }

  .hero-layout,
  .news-grid,
  .feature-grid,
  .cta-grid,
  .stats-grid,
  .clubs-grid,
  .products-grid,
  .info-grid,
  .footer-grid,
  .filters-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 72px 0;
  }

  .hero-content,
  .page-hero-content,
  .article-hero-content {
    padding: 108px 0 60px;
  }

  .section-head,
  .filters-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-card {
    display: none;
  }

  .mobile-races {
    display: grid;
    gap: 18px;
  }

  .article-body {
    padding: 26px 20px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(var(--container), calc(100% - 24px));
  }

  .hero h1,
  .page-hero h1,
  .article-hero h1 {
    font-size: clamp(2.6rem, 14vw, 4.2rem);
  }

  .button,
  .button-secondary,
  .chip {
    width: 100%;
  }

  .hero-actions,
  .card-actions,
  .dual-actions,
  .article-actions {
    flex-direction: column;
  }

  .brand-subtitle {
    display: none;
  }

  .brand-logo {
    height: 34px;
  }

  .brand-logo--footer {
    height: 30px;
  }

  .debug-panel {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }
}
