/*
 * BTB Riders club design: page layout for the home, 2026 event dates, contact and sponsors pages.
 * Customer-owned (loaded after css/theme.css by those four pages). Colours come from the theme tokens in
 * css/theme.css, so light and dark mode follow the site theme switch (html.dark).
 * Header and footer are styled in css/theme.css so every page, including the shared LiveLaps app pages, gets them.
 */

:root {
  --btb-display: 'Barlow Condensed', 'Outfit', ui-sans-serif, system-ui, sans-serif;
  --btb-navy: #142238;
  --btb-ink-soft: var(--muted-foreground);
  --btb-xc: #2f9e6b;
  --btb-ev: #d9a400;
  --btb-flag-a: #101a2c;
  --btb-flag-b: #ffffff;
  --btb-shadow: 0 6px 24px rgb(16 26 44 / 0.1);
  --btb-on-navy: #c9d3ea;
  /* Orange as text needs a darker value on light backgrounds (>= 4.5:1) and a lighter one on navy. */
  --btb-accent-text: #b23a0a;
  --btb-accent-on-navy: #ff8a57;
  --btb-primary-hover: #9a3412;
}
.dark {
  --btb-navy: #0b121f;
  --btb-flag-a: #eef1f8;
  --btb-flag-b: #0b121f;
  --btb-shadow: 0 6px 24px rgb(0 0 0 / 0.45);
  --btb-accent-text: #ff6a33;
  --btb-primary-hover: #ff8a57;
}

.btb-wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}
.btb-display,
.btb-page :is(h1, h2, h3):not([data-imported-schedule] *):not([data-imported-contact-info] *) {
  font-family: var(--btb-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.02;
  font-weight: 800;
}
.btb-page {
  background: var(--background);
  color: var(--foreground);
  font-size: 17px;
  line-height: 1.55;
}

/* Checkered motif */
.btb-flag {
  height: 14px;
  background: repeating-conic-gradient(var(--btb-flag-a) 0 25%, var(--btb-flag-b) 0 50%) 0 0 / 28px 28px;
  border-block: 1px solid var(--border);
}

/* Buttons */
.btb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 8px;
  padding: 11px 20px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease;
}
.btb-btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.btb-btn--primary:hover {
  background: var(--btb-primary-hover);
}
.btb-btn--ghost {
  border-color: #fff;
  color: #fff;
}
.btb-btn--ghost:hover {
  background: rgb(255 255 255 / 0.14);
}
.btb-btn--line {
  border-color: var(--btb-link, #3f568d);
  color: var(--btb-link, #3f568d);
  background: transparent;
}
.dark .btb-btn--line {
  --btb-link: #8fa6e0;
}
.btb-btn--line:hover {
  background: var(--muted);
}
.btb-btn:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* Sections */
.btb-block {
  padding-block: 64px;
}
.btb-eyebrow {
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--btb-accent-text);
  margin: 0 0 8px;
}
.btb-page-hero .btb-eyebrow {
  color: var(--btb-accent-on-navy);
}
.btb-title {
  font-size: clamp(34px, 5vw, 52px);
  color: var(--foreground);
  margin: 0;
}
.btb-lead {
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 12px 0 0;
}
.btb-head {
  margin-bottom: 32px;
}

/* Home hero */
.btb-hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  background: var(--btb-navy);
}
.btb-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.btb-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(20 34 56 / 0.82), rgb(20 34 56 / 0.12) 70%);
}
.dark .btb-hero::after {
  background: linear-gradient(to top, rgb(8 13 24 / 0.86), rgb(8 13 24 / 0.15) 70%);
}
.btb-hero .btb-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 120px;
  padding-bottom: 56px;
}
.btb-kicker {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 4px 10px;
  border-radius: 4px;
  margin: 0 0 16px;
}
.btb-hero h1 {
  font-size: clamp(52px, 9vw, 120px);
  max-width: 900px;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 20px rgb(0 0 0 / 0.4);
}
.btb-hero-text {
  font-size: clamp(18px, 2.2vw, 22px);
  max-width: 560px;
  margin: 16px 0 28px;
}
.btb-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Season strip */
.btb-strip {
  margin-top: -48px;
  position: relative;
  z-index: 5;
}
.btb-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--btb-shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}
.btb-stat {
  padding: 26px 24px;
  border-right: 1px solid var(--border);
  border-top: 5px solid var(--btb-link, #3f568d);
}
.dark .btb-stat {
  --btb-link: #8fa6e0;
}
.btb-stat:last-child {
  border-right: 0;
}
.btb-stat--mx {
  border-top-color: var(--primary);
}
.btb-stat--xc {
  border-top-color: var(--btb-xc);
}
.btb-stat--ev {
  border-top-color: var(--btb-ev);
}
.btb-stat-title {
  font-family: var(--btb-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.02;
  font-weight: 700;
  font-size: 20px;
  color: var(--muted-foreground);
  margin: 0;
}
.btb-stat-big {
  font-family: var(--btb-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  margin: 8px 0 6px;
  color: var(--foreground);
  text-transform: uppercase;
}
.btb-stat-big small {
  font-size: 22px;
  color: var(--muted-foreground);
  font-weight: 700;
}
.btb-stat p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 15px;
}

/* Cards */
.btb-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.btb-card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--btb-shadow);
}
.btb-card h3 {
  font-size: 26px;
  margin: 0;
}
.btb-card p {
  color: var(--muted-foreground);
  margin: 8px 0 0;
}
.btb-card a {
  color: var(--btb-link, #3f568d);
  font-weight: 600;
}
.dark .btb-card a {
  --btb-link: #8fa6e0;
}

/* Home intro richtext (Studio region) */
.btb-intro .cms-rich-content {
  max-width: none;
  color: var(--foreground);
}
.btb-intro .cms-rich-content h2 {
  font-size: clamp(34px, 5vw, 52px);
  color: var(--foreground);
  margin: 0 0 12px;
}
.btb-intro .cms-rich-content p {
  color: var(--muted-foreground);
  max-width: 680px;
  margin: 0 0 12px;
}
.btb-intro .cms-rich-content p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  max-width: none;
  margin-top: 20px;
}
.btb-intro .cms-rich-content p:last-child a {
  display: inline-block;
  border: 2px solid var(--btb-link, #3f568d);
  color: var(--btb-link, #3f568d);
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.dark .btb-intro .cms-rich-content p:last-child a {
  --btb-link: #8fa6e0;
}
.btb-intro .cms-rich-content p:last-child a:hover {
  background: var(--muted);
}

/* About / split */
.btb-band {
  background: var(--muted);
}
.btb-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.btb-split-photo {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--btb-shadow);
  aspect-ratio: 4 / 3;
}
.btb-split-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.btb-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* Home sponsor richtext (Studio region) */
.btb-sponsor-band .cms-rich-content {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--btb-shadow);
  padding: 32px 24px;
  color: var(--foreground);
}
.btb-sponsor-band .cms-rich-content h2 {
  font-size: clamp(34px, 5vw, 48px);
  margin: 0 0 8px;
  color: var(--foreground);
}
.btb-sponsor-band .cms-rich-content figure {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}
.btb-sponsor-band .cms-rich-content figure img {
  margin-inline: auto;
}
.btb-sponsor-band .cms-rich-content p {
  margin: 8px 0 0;
}
.btb-sponsor-band .cms-rich-content a {
  color: var(--btb-link, #3f568d);
  font-weight: 600;
}
.dark .btb-sponsor-band .cms-rich-content a {
  --btb-link: #8fa6e0;
}

/* Stay-connected band */
.btb-connect {
  background: var(--btb-navy);
  color: #fff;
  padding-block: 56px;
  position: relative;
  overflow: hidden;
}
.btb-connect::after,
.btb-page-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: 0;
  bottom: 0;
  width: 260px;
  opacity: 0.14;
  background: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 36px 36px;
  transform: skewX(-12deg);
  pointer-events: none;
}
.btb-connect-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.btb-connect h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  color: #fff;
  margin: 0;
}
.btb-connect p {
  color: var(--btb-on-navy);
  margin: 8px 0 0;
  max-width: 520px;
}

/* Inner page hero */
.btb-page-hero {
  background: var(--btb-navy);
  color: #fff;
  padding: 56px 0 44px;
  position: relative;
  overflow: hidden;
}
.btb-page-hero .btb-wrap {
  position: relative;
  z-index: 1;
}
.btb-page-hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  color: #fff;
  margin: 0;
  max-width: none;
}
.btb-page-hero p.btb-hero-sub {
  max-width: 620px;
  color: var(--btb-on-navy);
  margin: 12px 0 0;
  font-size: 19px;
}

/* 2026 event dates (Studio richtext turned into date cards) */
.btb-dates .cms-rich-content {
  max-width: none;
  color: var(--foreground);
}
.btb-dates .cms-rich-content h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 36px;
  margin: 56px 0 22px;
  color: var(--foreground);
}
.btb-dates .cms-rich-content h2:first-child {
  margin-top: 0;
}
.btb-dates .cms-rich-content h2::before {
  content: '';
  flex: none;
  width: 14px;
  align-self: stretch;
  border-radius: 4px;
  background: var(--btb-ev);
}
.btb-dates .cms-rich-content h2:nth-of-type(1)::before {
  background: var(--primary);
}
.btb-dates .cms-rich-content h2:nth-of-type(2)::before {
  background: var(--btb-xc);
}
.btb-dates .cms-rich-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  counter-reset: btb-round;
}
.btb-dates .cms-rich-content li {
  margin: 0;
  padding: 20px 22px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 6px solid var(--btb-ev);
  border-radius: 14px;
  box-shadow: var(--btb-shadow);
  counter-increment: btb-round;
}
.btb-dates .cms-rich-content ul:nth-of-type(1) li {
  border-left-color: var(--primary);
}
.btb-dates .cms-rich-content ul:nth-of-type(2) li {
  border-left-color: var(--btb-xc);
}
.btb-dates .cms-rich-content ul:nth-of-type(-n + 2) li::before {
  content: 'Round ' counter(btb-round);
  display: block;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
/* Series colours and round numbers follow the order of the headings and lists (MX, XC, then the rest). */
.btb-dates .cms-rich-content li p {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 1.3;
}
.btb-dates .cms-rich-content li p strong {
  display: block;
  font-family: var(--btb-display);
  font-weight: 800;
  font-size: 38px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--foreground);
}
/* Any other paragraph (for example a note) stays normal text. */
.btb-dates .cms-rich-content > p {
  margin: 12px 0 0;
  color: var(--muted-foreground);
}
/* A single date written as a paragraph straight under a heading (the awards banquet) gets the same card. */
.btb-dates .cms-rich-content > h2 + p {
  display: inline-block;
  min-width: min(100%, 240px);
  margin: 0;
  padding: 20px 22px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 6px solid var(--btb-ev);
  border-radius: 14px;
  box-shadow: var(--btb-shadow);
  font-family: var(--btb-display);
  font-weight: 800;
  font-size: 38px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--foreground);
}
.btb-note {
  background: var(--muted);
}
.btb-note-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.btb-note h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0;
  color: var(--foreground);
}
.btb-note p {
  color: var(--muted-foreground);
  margin: 8px 0 0;
  max-width: 620px;
}

/* Contact page */
/* The imported contact card (js/contact-info.js) becomes the navy "email the club" box. */
.btb-contact [data-slot='card'] {
  --card: var(--btb-navy);
  --card-foreground: #fff;
  --foreground: #fff;
  --muted-foreground: var(--btb-on-navy);
  --border: rgb(255 255 255 / 0.2);
  --background: var(--btb-navy);
  --muted: rgb(255 255 255 / 0.12);
  --primary: var(--btb-accent-on-navy);
  border-radius: 14px;
  box-shadow: var(--btb-shadow);
  color: #fff;
}
.btb-contact [data-slot='card'] h2 {
  font-family: var(--btb-display);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.02;
  font-size: clamp(30px, 4vw, 44px);
  color: #fff;
}
.btb-team .cms-rich-content {
  max-width: none;
  color: var(--foreground);
}
.btb-team .cms-rich-content h2 {
  font-size: clamp(34px, 5vw, 52px);
  margin: 0 0 4px;
  color: var(--foreground);
}
.btb-team .cms-rich-content > p:first-of-type {
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--btb-accent-text);
  margin: 0 0 28px;
}
.btb-team .cms-rich-content table,
.btb-team .cms-rich-content tbody {
  display: block;
  border: 0;
  width: 100%;
  min-width: 0;
}
.btb-team .cms-rich-content colgroup {
  display: none;
}
.btb-team .cms-rich-content tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
/* The Role / Contact header row is hidden visually: each card shows the role as its title. */
.btb-team .cms-rich-content tr:has(th) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.btb-team .cms-rich-content tr {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 5px solid var(--btb-link, #3f568d);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--btb-shadow);
}
.dark .btb-team .cms-rich-content tr {
  --btb-link: #8fa6e0;
}
.btb-team .cms-rich-content td {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
}
.btb-team .cms-rich-content td p {
  margin: 0;
}
.btb-team .cms-rich-content td:first-child p {
  font-family: var(--btb-display);
  font-weight: 800;
  font-size: 25px;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--foreground);
}
.btb-team .cms-rich-content td:last-child:not(:first-child) {
  margin-top: 8px;
  font-size: 18px;
  color: var(--foreground);
}
.btb-team .cms-rich-content > p:last-child {
  margin-top: 24px;
  color: var(--muted-foreground);
}
.btb-team .cms-rich-content > p:last-child a {
  color: var(--btb-link, #3f568d);
  font-weight: 600;
}
.dark .btb-team .cms-rich-content > p:last-child a {
  --btb-link: #8fa6e0;
}

/* Sponsors page */
.btb-sponsors-list ul {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}
.btb-sponsors-list li {
  margin: 0 0 20px;
}
.btb-sponsors-list article {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-radius: 18px;
  box-shadow: var(--btb-shadow);
}
.btb-sponsors-list article > div:first-child {
  background: #fff;
  aspect-ratio: auto;
  min-height: 320px;
  padding: 24px;
  border-bottom: 0;
  border-right: 1px solid var(--border);
}
.btb-sponsors-list article > div:first-child figure {
  max-width: 340px;
  width: 100%;
}
.btb-sponsors-list article > div:first-child img {
  max-height: 340px;
  max-width: 100%;
  object-fit: contain;
}
.btb-sponsors-list article > div:last-child {
  padding: 36px;
  justify-content: center;
  gap: 12px;
}
.btb-sponsors-list article h3 {
  font-family: var(--btb-display);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: 0.02em;
}
.btb-sponsors-list article > div:last-child > p {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
  font-size: 16px;
}
.btb-become {
  background: var(--btb-navy);
  color: #fff;
  border-radius: 18px;
  padding: 40px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  margin-top: 28px;
}
.btb-become h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  color: #fff;
  margin: 0;
}
.btb-become p {
  color: var(--btb-on-navy);
  margin: 8px 0 0;
  max-width: 520px;
}

@media (max-width: 1120px) {
  .btb-cards {
    grid-template-columns: 1fr 1fr;
  }
  .btb-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .btb-stat:nth-child(2) {
    border-right: 0;
  }
  .btb-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
  .btb-split,
  .btb-sponsors-list article {
    grid-template-columns: 1fr;
  }
  .btb-sponsors-list article > div:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 560px) {
  .btb-page {
    font-size: 16px;
  }
  .btb-hero {
    min-height: 520px;
  }
  .btb-hero .btb-wrap {
    padding-top: 90px;
    padding-bottom: 44px;
  }
  .btb-strip {
    margin-top: -28px;
  }
  .btb-stat {
    padding: 18px 16px;
  }
  .btb-stat-big {
    font-size: 44px;
  }
  .btb-cards {
    grid-template-columns: 1fr;
  }
  .btb-block {
    padding-block: 44px;
  }
  .btb-become,
  .btb-connect {
    padding: 26px;
  }
  .btb-sponsors-list article > div:last-child {
    padding: 24px;
  }
  .btb-sponsors-list article h3 {
    font-size: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btb-btn {
    transition: none;
  }
}
