/* =====================================================================
   BMR THEME — Global Design Tokens & Shared Components
   File: wp-content/themes/kleo-child/css/bmr-theme.css
   Loaded site-wide (see enqueue snippet in functions.php).

   PURPOSE
   One source of truth for the visual language of bmwminiracing.jp,
   inspired by F1 / MotoGP / WEC / ADAC official sites.

   COLOR ROLES (do not improvise new colors):
   - Teal  = brand identity: page titles, kickers, section titles
   - Blue  = interaction: buttons, links, active states (BMW #0066B1)
   - Red   = LIVE / urgent ONLY (BMW M red). Never for normal buttons.
   - Ink   = dark surfaces (#111 cards, #0b0c10 full-bleed bands)

   TYPE: BMWTypeNext 300 (light) / 700 (bold). There is NO 900 weight —
   always use var(--bmr-w-bold), never font-weight:900.
   ===================================================================== */

:root {
  /* ---- Brand colors ---- */
  /* Canonical teal. Replaces the historical drift family:
     #005770, #055770, #00566F, #027385, #004b62, #0073aa (all near-teals) */
  --bmr-teal:        #005A74;   /* identity / headings (matches header & footer) */
  --bmr-teal-soft:   rgba(0, 90, 116, .08);
  --bmr-blue:        #0066B1;   /* interactive (BMW blue) */
  --bmr-blue-hover:  #0076CC;
  --bmr-red:         #E41C2A;   /* LIVE / urgent only (BMW M red) */
  --bmr-red-soft:    rgba(228, 28, 42, .10);

  /* ---- Ink & surfaces ---- */
  --bmr-ink:         #111111;   /* dark card surface, table heads */
  --bmr-ink-deep:    #0b0c10;   /* full-bleed dark section bands */
  --bmr-paper:       #ffffff;
  --bmr-paper-dim:   #f6f7f8;

  /* ---- Text ---- */
  --bmr-text:        #111111;
  --bmr-text-soft:   rgba(17, 17, 17, .65);
  --bmr-text-inv:    #ffffff;
  --bmr-text-inv-soft: rgba(255, 255, 255, .75);

  /* ---- Lines & shadows ---- */
  --bmr-line:        rgba(0, 0, 0, .12);
  --bmr-line-soft:   rgba(0, 0, 0, .08);
  --bmr-line-inv:    rgba(255, 255, 255, .14);
  --bmr-shadow:      0 10px 30px rgba(0, 0, 0, .06);
  --bmr-shadow-lift: 0 18px 34px rgba(0, 0, 0, .10);
  --bmr-shadow-dark: 0 18px 40px rgba(0, 0, 0, .35);

  /* ---- Geometry ---- */
  --bmr-radius:      16px;      /* cards, tables, media */
  --bmr-radius-sm:   12px;      /* inputs, small controls */
  --bmr-radius-pill: 999px;

  /* ---- Type ---- */
  --bmr-font: 'BMWTypeNext', 'Hiragino Kaku Gothic ProN', sans-serif;
  --bmr-w-light: 300;
  --bmr-w-bold:  700;           /* the ONLY heavy weight that exists */
  --bmr-track:   .14em;         /* uppercase letterspacing */

  /* ---- Layout ---- */
  --bmr-container: 1180px;
  --bmr-section-pad: 70px;
}

/* =====================================================================
   1. PAGE HEADER PATTERN  (the "Standings look", now universal)
   Usage:
     <header class="bmr-page-head">
       <p class="bmr-kicker">2026 Season</p>
       <h1 class="bmr-page-title">Standings</h1>
       <p class="bmr-page-sub">Optional one-line description.</p>
     </header>
   Dark variant for hero bands: add .bmr-page-head--dark
   ===================================================================== */

.bmr-page-head {
  padding: 44px 0 10px;
}

.bmr-kicker {
  margin: 0;
  font-family: var(--bmr-font);
  font-size: 12px;
  font-weight: var(--bmr-w-bold);
  letter-spacing: var(--bmr-track);
  text-transform: uppercase;
  color: var(--bmr-text-soft);
}

.bmr-page-title {
  margin: 8px 0 0;
  font-family: var(--bmr-font);
  font-size: 36px;
  font-weight: var(--bmr-w-bold);
  line-height: 1.1;
  letter-spacing: .04em;
  color: var(--bmr-teal);
  text-transform: uppercase; /* 2026-07: site-wide title convention */
}

.bmr-page-sub {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--bmr-text-soft);
  max-width: 62ch;
}

/* Dark hero band variant (driver / team / race singles, home sections) */
.bmr-page-head--dark {
  background: var(--bmr-ink-deep);
  color: var(--bmr-text-inv);
  padding: 44px 0 40px;
}
.bmr-page-head--dark .bmr-kicker      { color: var(--bmr-text-inv-soft); }
.bmr-page-head--dark .bmr-page-title  { color: var(--bmr-text-inv); }
.bmr-page-head--dark .bmr-page-sub    { color: var(--bmr-text-inv-soft); }

/* Section title inside a page (h2/h3 level) */
.bmr-section-title {
  margin: 0 0 14px;
  font-family: var(--bmr-font);
  font-size: 22px;
  font-weight: var(--bmr-w-bold);
  letter-spacing: .02em;
  color: var(--bmr-teal);
}
.bmr-section-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: var(--bmr-w-bold);
  letter-spacing: var(--bmr-track);
  text-transform: uppercase;
  color: var(--bmr-text-soft);
}

@media (max-width: 980px) {
  .bmr-page-title { font-size: 30px; }
}

/* =====================================================================
   2. BUTTONS   .bmr-btn  + modifier
   --primary  : BMW blue, main action
   --ghost    : outline on light bg
   --ghost-inv: outline on dark bg
   --live     : red, ONLY for live/urgent (YouTube Live, race live timing)
   ===================================================================== */

.bmr-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--bmr-radius-pill);
  border: 1px solid transparent;
  font-family: var(--bmr-font);
  font-size: 13px;
  font-weight: var(--bmr-w-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease,
              border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.bmr-btn:hover { transform: translateY(-1px); }

.bmr-btn--primary {
  background: var(--bmr-blue);
  color: #fff !important;
}
.bmr-btn--primary:hover { background: var(--bmr-blue-hover); color: #fff !important; }

.bmr-btn--ghost {
  background: #fff;
  border-color: var(--bmr-line);
  color: var(--bmr-ink) !important;
}
.bmr-btn--ghost:hover { border-color: rgba(0,0,0,.35); }

.bmr-btn--ghost-inv {
  background: rgba(255,255,255,.08);
  border-color: var(--bmr-line-inv);
  color: #fff !important;
}
.bmr-btn--ghost-inv:hover { background: rgba(255,255,255,.14); }

.bmr-btn--live {
  background: var(--bmr-red);
  color: #fff !important;
}
.bmr-btn--live:hover { background: #c8121f; }

/* =====================================================================
   3. FILTER PILLS  (class switch, drivers/teams toggle, season chips)
   Same geometry everywhere. Active = ink.
   ===================================================================== */

.bmr-pill {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: var(--bmr-radius-pill);
  border: 1px solid var(--bmr-line);
  background: #fff;
  font-family: var(--bmr-font);
  font-size: 13px;
  font-weight: var(--bmr-w-bold);
  line-height: 1;
  color: var(--bmr-ink);
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, background .12s ease,
              border-color .12s ease, color .12s ease;
}
.bmr-pill:hover { border-color: rgba(0,0,0,.35); transform: translateY(-1px); }
.bmr-pill.is-active {
  background: var(--bmr-ink);
  border-color: var(--bmr-ink);
  color: #fff;
}

/* On dark bands */
.bmr-pill--inv {
  background: rgba(255,255,255,.08);
  border-color: var(--bmr-line-inv);
  color: #fff;
}
.bmr-pill--inv.is-active { background: #fff; border-color: #fff; color: var(--bmr-ink); }

/* =====================================================================
   4. TAGS & STATUS  (category ribbons, race status, role/BoP chips)
   One shape; semantic colors preserved.
   ===================================================================== */

.bmr-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 6px;
  font-family: var(--bmr-font);
  font-size: 11px;
  font-weight: var(--bmr-w-bold);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  color: #fff;
  background: var(--bmr-ink);
}
.bmr-tag--topic   { background: #6d28a8; }  /* news: topic */
.bmr-tag--report  { background: #d97706; }  /* news: race report */
.bmr-tag--video   { background: #15803d; }  /* news: video */
.bmr-tag--release { background: var(--bmr-teal); }

/* Race / round status — use together with .bmr-tag:
   <span class="bmr-tag bmr-status--next">Next</span> */
.bmr-status--next      { background: var(--bmr-blue); }
.bmr-status--upcoming  { background: var(--bmr-blue); }
.bmr-status--completed { background: rgba(0,0,0,.55); }
.bmr-status--live      { background: var(--bmr-red); }
.bmr-status--soon      { background: rgba(0,0,0,.30); }

/* =====================================================================
   5. CARDS
   .bmr-card        white card (news, race, access)
   .bmr-card--dark  ink card (stats, driver grid)
   .bmr-card--media has cover image area
   ===================================================================== */

.bmr-card {
  display: block;
  background: var(--bmr-paper);
  color: inherit;
  border: 1px solid var(--bmr-line-soft);
  border-radius: var(--bmr-radius);
  box-shadow: var(--bmr-shadow);
  overflow: hidden;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.bmr-card:hover,
.bmr-card--link:hover {
  transform: translateY(-2px);
  box-shadow: var(--bmr-shadow-lift);
}

.bmr-card--dark {
  background: var(--bmr-ink);
  color: var(--bmr-text-inv);
  border-color: var(--bmr-line-inv);
  box-shadow: var(--bmr-shadow-dark);
}

.bmr-card__body { padding: 16px; }

/* Stat card (Races / Points / Wins ... on singles) */
.bmr-stat { padding: 16px; }
.bmr-stat small {
  display: block;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--bmr-text-inv-soft);
  margin-bottom: 6px;
}
.bmr-stat strong {
  font-size: 26px;
  font-weight: var(--bmr-w-bold);
  line-height: 1;
}

/* =====================================================================
   6. DATA TABLES  (standings, results — the "F1 table")
   Wrap: <div class="bmr-table-wrap"><table class="bmr-table">...
   ===================================================================== */

.bmr-table-wrap {
  border-radius: var(--bmr-radius);
  overflow: hidden;
  border: 1px solid var(--bmr-line);
  background: #fff;
  box-shadow: var(--bmr-shadow);
}

.bmr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--bmr-font);
}

.bmr-table thead th {
  background: var(--bmr-ink);
  color: #fff;
  font-size: 12px;
  font-weight: var(--bmr-w-bold);
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: 14px 12px;
  text-align: left;
  white-space: nowrap;
}

.bmr-table tbody td {
  padding: 14px 12px;
  border-top: 1px solid var(--bmr-line-soft);
  vertical-align: middle;
  font-size: 14px;
}

.bmr-table tbody tr:nth-child(even) { background: rgba(0,0,0,.015); }
.bmr-table tbody tr:hover           { background: rgba(0,0,0,.035); }

.bmr-table a {
  color: var(--bmr-blue);
  font-weight: var(--bmr-w-bold);
  text-decoration: none;
}
.bmr-table a:hover { text-decoration: underline; }

.bmr-table .is-dim td { opacity: .6; }        /* dnf / dns / dsq rows */

/* =====================================================================
   7. LAYOUT HELPERS
   ===================================================================== */

.bmr-container {
  max-width: var(--bmr-container);
  margin: 0 auto;
  padding: 0 20px;
}

.bmr-section { padding: var(--bmr-section-pad) 0; }
.bmr-section--dark {
  background: var(--bmr-ink-deep);
  color: var(--bmr-text-inv);
}

/* "View all →" link next to section titles */
.bmr-more {
  font-size: 13px;
  font-weight: var(--bmr-w-bold);
  color: var(--bmr-blue);
  text-decoration: none;
}
.bmr-more:hover { text-decoration: underline; }

/* =====================================================================
   8. GLOBAL ALIGNMENTS (light-touch fixes to existing components)
   Kept minimal on purpose; page-by-page adoption happens in later steps.
   ===================================================================== */

/* Kill the fake 900 weight everywhere it was used in our own components:
   BMWTypeNext has no 900, browsers faux-bold it. Snap to real 700. */
.standings-title, .standings-controls label, .standings-tab,
.standings-pos, .standings-name, .standings-points, .standings-gap,
.standings-docs__title, .standings-docs__sub, .standings-docs__badge,
.standings-docs__name, .standings-docs__icon,
.podium-rank, .podium-num,
.home-hero__title, .home-hero__cta,
.home-cta__headline, .home-cta__title, .cta-btn,
.driver-card__num, .driver-card__name {
  font-weight: var(--bmr-w-bold) !important;
}

/* Unify the strays onto tokens */
.standings-name          { color: var(--bmr-blue); }           /* was #1b63c7 */
.standings-docs__icon    { background: var(--bmr-red-soft); color: var(--bmr-red); } /* was #b10000 */
.home-cta__title         { color: var(--bmr-teal); }           /* was rgba(0,163,224,.85) */
.home-sponsors__title    { color: var(--bmr-teal); }           /* pin to token */