/* ============================================================
   BMW — SHARED BRAND STYLESHEET
   Per IBS Master AI Handover 5.1, Part 3.3
   ============================================================ */

:root {
  --bmw-blue:       #0166B1;
  --bmw-blue-dark:  #004E8C;
  --bmw-blue-light: #3D9BE0;
  --bmw-ink:        #14161A;
  --bmw-graphite:   #2B2D31;
  --bmw-grey-600:   #6F7276;
  --bmw-grey-400:   #8E9092;
  --bmw-grey-200:   #E3E5E8;
  --bmw-bg:         #FFFFFF;
  --bmw-bg-alt:     #F5F6F7;

  --stripe-blue-dark: #1B4F9C;
  --stripe-blue:      #3D9BE0;
  --stripe-red:       #C8102E;

  --sev-critical: #C0392B;
  --sev-high:     #E07B2C;
  --sev-medium:   #E3B23C;
  --sev-low:      #4E9A51;

  --shadow-card: 0 2px 16px rgba(20,22,26,0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, "Inter", "Söhne", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--bmw-ink);
  background: var(--bmw-bg);
}

h1, h2, h3 {
  font-family: -apple-system, "Inter", "Söhne", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--bmw-ink);
  margin: 0 0 0.5em;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bmw-blue);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.eyebrow::before { content: "/"; font-weight: 900; }

/* ---------- TRICOLOUR STRIPE — BMW signature, hero only ---------- */
.tricolour-stripe {
  display: flex;
  width: 140px;
  height: 4px;
  margin: 14px 0 20px;
  border-radius: 2px;
  overflow: hidden;
}
.tricolour-stripe span { flex: 1; }
.tricolour-stripe .s1 { background: var(--stripe-blue-dark); }
.tricolour-stripe .s2 { background: var(--stripe-blue); }
.tricolour-stripe .s3 { background: var(--stripe-red); }
.tricolour-stripe .s4 { background: var(--bmw-grey-200); }

/* ---------- NAV ---------- */
.site-nav {
  background: var(--bmw-bg);
  border-bottom: 1px solid var(--bmw-grey-200);
  color: var(--bmw-ink);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.site-nav .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bmw-ink); font-weight: 800; font-size: 15px; }
.site-nav .brand .logo-circle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--bmw-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900;
}
.site-nav .brand small { display: block; font-weight: 400; color: var(--bmw-grey-600); font-size: 11px; letter-spacing: 0.08em; }
.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-weight: 600; }
.site-nav a.nav-link { text-decoration: none; color: var(--bmw-ink); }
.site-nav a.nav-link:hover { color: var(--bmw-blue); }
.site-nav .cta-btn {
  background: var(--bmw-blue);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
}
.site-nav .cta-btn:hover { background: var(--bmw-blue-dark); }

.breadcrumb {
  background: var(--bmw-bg-alt);
  color: var(--bmw-grey-600);
  font-size: 12px;
  padding: 10px 32px;
  border-bottom: 1px solid var(--bmw-grey-200);
}
.breadcrumb a { color: var(--bmw-grey-600); text-decoration: none; }
.breadcrumb a:hover { color: var(--bmw-blue); }
.breadcrumb span { margin: 0 6px; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--bmw-bg-alt) 0%, var(--bmw-bg) 100%);
  padding: 56px 32px 0;
  overflow: hidden;
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 48px;
}
.hero h1 { font-size: 42px; max-width: 600px; }
.hero h1 .accent { color: var(--bmw-blue); }
.hero .sub { font-size: 17px; color: var(--bmw-grey-600); max-width: 540px; margin: 18px 0 26px; font-weight: 400; }
.hero-image { position: relative; }
.hero-image img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius-md); }

.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  background: rgba(200,16,46,0.08);
  border: 1px solid var(--stripe-red);
  color: var(--stripe-red);
}

/* ---------- STAT STRIP ---------- */
.stat-strip { background: var(--bmw-bg); }
.stat-strip-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 0 40px;
}
.stat-cell {
  background: var(--bmw-bg);
  border: 1px solid var(--bmw-grey-200);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
}
.stat-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--bmw-blue);
  display: flex; align-items: center; justify-content: center;
  color: var(--bmw-blue);
  font-size: 17px;
}
.stat-num { font-size: 21px; font-weight: 800; color: var(--bmw-ink); line-height: 1.15; }
.stat-label { font-size: 12px; color: var(--bmw-grey-600); line-height: 1.3; }

/* ---------- TOC BAR ---------- */
.toc-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bmw-bg);
  border-bottom: 1px solid var(--bmw-grey-200);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 32px;
  height: 54px;
  overflow-x: auto;
  white-space: nowrap;
}
.toc-bar .toc-label {
  color: var(--bmw-grey-600);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 16px;
  flex-shrink: 0;
  font-weight: 700;
}
.toc-bar ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.toc-bar a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bmw-grey-600);
  text-decoration: none;
  white-space: nowrap;
}
.toc-bar a:hover, .toc-bar a.active { background: var(--bmw-bg-alt); color: var(--bmw-blue); }

/* ---------- SECTIONS ---------- */
.section { padding: 60px 32px; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-alt { background: var(--bmw-bg-alt); }
.section h2 { font-size: 30px; margin-bottom: 16px; }
.section .lede { font-size: 16.5px; color: var(--bmw-grey-600); max-width: 760px; margin-bottom: 30px; }

/* fade-up/down/left/right rules consolidated below in the Scroll Reveal block */

/* ---------- SUMMARY BOX ---------- */
.summary-box {
  background: var(--bmw-bg);
  border: 1px solid var(--bmw-grey-200);
  border-left: 5px solid var(--bmw-blue);
  border-radius: var(--radius-md);
  padding: 26px 30px;
  margin: -32px auto 0;
  max-width: 1116px;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 5;
}
.summary-box p { margin: 0 0 14px; font-size: 16px; }
.summary-box p:first-child { font-weight: 700; font-size: 17.5px; }
.summary-box ul { margin: 0 0 14px; padding-left: 20px; }
.summary-box li { margin-bottom: 6px; }
.tag { color: var(--bmw-blue); font-weight: 600; font-size: 12.5px; }

/* ---------- TABLES ---------- */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-card); border: 1px solid var(--bmw-grey-200); }
.data-table { min-width: 640px; background: var(--bmw-bg); }
.data-table thead th {
  background: var(--bmw-blue);
  color: #fff;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 13px 16px;
  text-align: left;
}
.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--bmw-grey-200);
  font-size: 14.5px;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bmw-bg-alt); }

.sev-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.sev-critical { background: var(--sev-critical); }
.sev-high { background: var(--sev-high); }
.sev-medium { background: var(--sev-medium); }
.sev-low { background: var(--sev-low); }

/* ---------- CARDS / GRID ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--bmw-bg);
  border: 1px solid var(--bmw-grey-200);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.card .icon-circle {
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 2px solid var(--bmw-blue);
  color: var(--bmw-blue); display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; font-size: 15px;
}
.card h4 { font-size: 16px; margin-bottom: 8px; font-weight: 700; }
.card p { font-size: 14.5px; color: var(--bmw-grey-600); margin: 0; }

/* ---------- KNOWLEDGE CENTRE CARD (BMW signature) ---------- */
.kc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kc-card {
  background: var(--bmw-bg);
  border: 1px solid var(--bmw-grey-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.kc-image { position: relative; height: 150px; background: var(--bmw-graphite); }
.kc-image img { width: 100%; height: 100%; object-fit: cover; }
.kc-badge-num {
  position: absolute; top: 10px; left: 10px;
  width: 26px; height: 26px; background: var(--bmw-blue); color: #fff;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.kc-badge-icon {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; background: #fff; border: 2px solid var(--bmw-blue);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--bmw-blue);
}
.kc-body { padding: 16px 18px 18px; }
.kc-body h4 { font-size: 15.5px; font-weight: 800; margin: 0 0 8px; }
.kc-body p { font-size: 13px; color: var(--bmw-grey-600); margin: 0 0 12px; line-height: 1.55; }
.kc-body .explore { color: var(--bmw-blue); font-weight: 700; font-size: 13px; text-decoration: none; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--bmw-grey-200); padding: 18px 0; }
.faq-item summary { font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--bmw-blue); font-size: 20px; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 12px 0 0; color: var(--bmw-grey-600); font-size: 14.5px; }

/* ---------- TRUST STRIP ---------- */
.trust-strip { background: var(--bmw-bg-alt); padding: 36px 32px; border-top: 1px solid var(--bmw-grey-200); }
.trust-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item .dot { color: var(--bmw-blue); font-size: 17px; }
.trust-item p { margin: 0; font-size: 13px; color: var(--bmw-grey-600); }
.trust-item strong { display: block; color: var(--bmw-ink); font-size: 14px; margin-bottom: 2px; }

/* ---------- FINAL CTA ---------- */
.final-cta {
  background: var(--bmw-ink);
  color: #fff;
  padding: 52px 32px;
  text-align: center;
}
.final-cta h2 { color: #fff; }
.final-cta p { color: #C3C6CA; max-width: 540px; margin: 0 auto 26px; }
.btn-blue {
  display: inline-block;
  background: var(--bmw-blue);
  color: #fff;
  font-weight: 700;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14.5px;
}
.btn-outline-bmw {
  display: inline-block;
  border: 1.5px solid #fff;
  color: #fff;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13.5px;
  margin-left: 10px;
}

footer { background: var(--bmw-bg); border-top: 1px solid var(--bmw-grey-200); color: var(--bmw-grey-600); padding: 30px 32px; text-align: center; font-size: 13px; }
footer a { color: var(--bmw-grey-600); }

/* ---------- SCROLL REVEAL — directional fade-in ---------- */
.fade-up, .fade-down, .fade-left, .fade-right {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.fade-up    { transform: translateY(20px); }
.fade-down  { transform: translateY(-20px); }
.fade-left  { transform: translateX(-24px); }
.fade-right { transform: translateX(24px); }
.fade-up.visible, .fade-down.visible, .fade-left.visible, .fade-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}
/* Staggered children within a .stagger wrapper */
.stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.stagger > *.visible { opacity: 1; transform: translateY(0); }

/* Sections below the fold: content is always in the DOM/crawlable;
   this class only defers the *animation* start, never the content. */
[data-lazy-section] { opacity: 1; } /* fallback: fully visible if JS fails */
[data-lazy-section]:not(.lazy-loaded) .fade-up,
[data-lazy-section]:not(.lazy-loaded) .fade-down,
[data-lazy-section]:not(.lazy-loaded) .fade-left,
[data-lazy-section]:not(.lazy-loaded) .fade-right { transition-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-down, .fade-left, .fade-right, .stagger > * {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ============================================================
   RESEARCH CENTRE REPORT COMPONENTS (v1) — added for annual
   data reports. Distinct from blog/KC styling: report pages need
   an executive-summary callout, large citable stat cards, real
   Chart.js containers, and a methodology/limitations box.
   ============================================================ */

.exec-summary { background: linear-gradient(135deg, #0A1628 0%, #0166B1 140%); color: #fff; border-radius: var(--radius-md); padding: 32px 36px; margin: 32px auto; max-width: 900px; }
.exec-summary a { color: #FFFFFF; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.5); font-weight: 600; }
.exec-summary a:hover { text-decoration-color: #FFFFFF; }
.exec-summary h2 { color: #fff; margin-top: 0; }
.exec-summary p { color: #E5EDF5; font-size: 15.5px; line-height: 1.7; }
.exec-summary ul { color: #E5EDF5; padding-left: 20px; }
.exec-summary li { margin-bottom: 8px; }

.stat-card-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1000px;
  margin: 28px auto;
}
.stat-card-big {
  background: #FFFFFF;
  border: 1px solid var(--bmw-grey-200);
  border-top: 4px solid var(--bmw-blue);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(20,22,26,0.06);
}
.stat-card-big .num { font-size: 32px; font-weight: 800; color: var(--bmw-blue); line-height: 1.1; }
.stat-card-big .label { font-size: 12.5px; color: var(--bmw-grey-600); margin-top: 6px; }
.stat-card-big .source-tag { display: block; font-size: 10.5px; color: var(--bmw-grey-400); margin-top: 4px; font-style: italic; }

.chart-container {
  background: #FFFFFF;
  border: 1px solid var(--bmw-grey-200);
  border-radius: var(--radius-md);
  padding: 24px 20px 12px;
  max-width: 900px;
  margin: 28px auto;
  box-shadow: 0 2px 16px rgba(20,22,26,0.06);
}
.chart-container h3 { margin-top: 0; font-size: 16px; }
.chart-container canvas { max-height: 380px; }
.chart-caption { font-size: 12.5px; color: var(--bmw-grey-400); margin-top: 10px; text-align: center; }

.citable-quote {
  border-left: 4px solid var(--bmw-blue);
  background: var(--bmw-bg-alt);
  padding: 18px 24px;
  max-width: 780px;
  margin: 28px auto;
  font-size: 17px;
  font-weight: 600;
  color: var(--bmw-ink);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.citable-quote .attribution { display: block; font-size: 12.5px; font-weight: 400; color: var(--bmw-grey-400); margin-top: 8px; }

.methodology-box {
  background: var(--bmw-bg-alt);
  border: 1px solid var(--bmw-grey-200);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  max-width: 900px;
  margin: 28px auto;
  font-size: 14px;
  color: var(--bmw-grey-600);
  line-height: 1.75;
}
.methodology-box h4 { color: var(--bmw-ink); margin: 0 0 6px; font-size: 14px; }
.methodology-box .source-split { display: flex; gap: 20px; margin-top: 14px; }
.source-split-item { flex: 1; text-align: center; padding: 12px; background: #FFFFFF; border-radius: var(--radius-sm); }
.source-split-item .pct { font-size: 24px; font-weight: 800; color: var(--bmw-blue); }
.source-split-item .desc { font-size: 12px; color: var(--bmw-grey-400); }

.rank-table-wrap { overflow-x: auto; max-width: 1000px; margin: 0 auto; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bmw-blue); color: #fff; font-weight: 700; font-size: 13px;
}
.rank-badge.rank-1 { background: #C8A24C; }
.rank-badge.rank-last { background: var(--bmw-grey-400); }

@media (max-width: 860px) {
  .stat-card-row { grid-template-columns: repeat(2, 1fr); }
  .methodology-box .source-split { flex-direction: column; }
}


