/* ==========================================================================
   MotorLB — "Apple" theme (EXPERIMENT, 2026-10-16): white, black and grey.
   Loaded after styles.css only while the theme is switched on, so it can be removed with
   ./switch-theme.sh cream  (the original cream/charcoal look is untouched in styles.css).
   ========================================================================== */
:root {
  --bg:            #ffffff;
  --bg-elevated:   #f5f5f7;
  --bg-card:       #ffffff;
  --bg-card-hover: #f5f5f7;
  --border:        #e0e0e5;
  --border-strong: #c4c4c9;
  --text:          #1d1d1f;
  --text-muted:    #6e6e73;
  --text-dim:      #86868b;
  --brand:         #1d1d1f;
  --brand-light:   #424245;
  --brand-dark:    #000000;
  --accent-grad:   linear-gradient(135deg, #48484a 0%, #2c2c2e 40%, #1d1d1f 75%, #000000 100%);
  --info:          #6e6e73;
  --neutral:       #86868b;
  --shadow:        0 18px 50px -14px rgba(0, 0, 0, 0.14);
  --glow-shadow:   0 18px 40px -22px rgba(0, 0, 0, 0.22);
}

/* plain white page — no tinted gradients, no grid pattern behind the hero */
body { background: #ffffff; }
.hero::before, .hero::after { display: none; }
.stats .wrap { background: none; gap: 0; }
.stat + .stat { border-left: 1px solid var(--border); }

/* translucent bars: white glass instead of cream */
.site-header.scrolled { background: rgba(255, 255, 255, 0.82); }
.is-app .tab-bar { background: rgba(255, 255, 255, 0.92); }

/* the MotorLB name keeps its brand colours (bronze "LB") — only the page palette changes.
   Small interface accents that used bronze become black: */
.save-toggle.is-saved { background: #1d1d1f; border-color: #1d1d1f; }
.saved-count { background: #1d1d1f; }
.saved-empty-heart svg { stroke: #86868b; }
.saved-toast button { color: #d2d2d7; }
.family-go { color: #1d1d1f; }
.compare-toggle.is-selected { background: #1d1d1f; }
.wizard-option.is-selected { background: #1d1d1f; border-color: #1d1d1f; }

/* brand logos sit on pure white cards */
.brand-chip { background: #ffffff; }
.card-photo, .card-photo.is-cutout, .compare-photo.is-cutout { background: #f5f5f7; }
body::after { display: none; }
/* white page sections (cards keep a thin grey outline); the stats strip stays softly grey */
.coverage { background: #ffffff; border-color: #e0e0e5; }
.stats { background: #f5f5f7; border-color: #e0e0e5; }
.stat { background: transparent; }

/* Headings: clean sans-serif (SF Pro on Apple devices, Inter elsewhere) to match the white look.
   The MotorLB wordmark sets its own font (Barlow Condensed) and is NOT affected by this. */
:root {
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
}
h1, h2, h3, h4, .stat .num, .quick-card h3, .quick-card .num, .compare-modal h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
}
h1 { letter-spacing: -0.035em; line-height: 1.04; }

/* ==========================================================================
   DARK MODE (set in Settings: System / Light / Dark). The early script in each page's <head>
   puts data-theme="dark" on <html>; "System" follows the phone's own setting.
   Only the page palette changes. The MotorLB logo keeps its bronze "LB"; its "MOTOR" part
   uses the normal text colour, so it turns white on the dark background to stay readable.
   ========================================================================== */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] {
  --bg:            #000000;
  --bg-elevated:   #1c1c1e;
  --bg-card:       #1c1c1e;
  --bg-card-hover: #2c2c2e;
  --border:        #38383a;
  --border-strong: #545458;
  --text:          #f5f5f7;
  --text-muted:    #a1a1a6;
  --text-dim:      #8e8e93;
  --brand:         #f5f5f7;
  --brand-light:   #d2d2d7;
  --brand-dark:    #ffffff;
  --accent-grad:   linear-gradient(135deg, #ffffff 0%, #f2f2f7 50%, #d2d2d7 100%);
  --shadow:        0 18px 50px -14px rgba(0, 0, 0, 0.7);
  --glow-shadow:   0 18px 40px -22px rgba(0, 0, 0, 0.8);
}
html[data-theme="dark"] body { background: #000; }
html[data-theme="dark"] .coverage { background: #000; border-color: var(--border); }
html[data-theme="dark"] .stats { background: #1c1c1e; border-color: var(--border); }
html[data-theme="dark"] .site-header.scrolled { background: rgba(0, 0, 0, 0.8); }
html[data-theme="dark"].is-app .tab-bar { background: rgba(18, 18, 20, 0.94); }
html[data-theme="dark"] .more-sheet { background: #000; }

/* buttons: white-on-black becomes black-on-white */
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-primary:hover { color: #000; box-shadow: 0 10px 30px -12px rgba(255, 255, 255, 0.25); }
html[data-theme="dark"] .save-toggle.is-saved,
html[data-theme="dark"] .compare-toggle.is-selected,
html[data-theme="dark"] .wizard-option.is-selected,
html[data-theme="dark"] .saved-count,
html[data-theme="dark"] .tab-badge,
html[data-theme="dark"] .filters-badge,
html[data-theme="dark"] .brand-back { background: #f5f5f7; border-color: #f5f5f7; color: #000; }
html[data-theme="dark"] .wizard-option.is-selected:hover { background: #ffffff; }
html[data-theme="dark"] .save-toggle { background: rgba(44, 44, 46, 0.92); color: #f5f5f7; border-color: #545458; }
html[data-theme="dark"] .modal-back { background: rgba(60, 60, 64, 0.92); }
html[data-theme="dark"] .saved-toast { background: rgba(58, 58, 60, 0.96); }
html[data-theme="dark"] .saved-toast button { color: #ffffff; }
html[data-theme="dark"] .family-go { color: #f5f5f7; }
html[data-theme="dark"] .card-photo,
html[data-theme="dark"] .card-photo.is-cutout,
html[data-theme="dark"] .compare-photo.is-cutout { background: #2c2c2e; }
html[data-theme="dark"] .modal-overlay { background: rgba(0, 0, 0, 0.7); }


html[data-theme="dark"] .brand-chip { background: #1c1c1e; }
/* the MotorLB header/footer icon + wordmark are NOT car-brand logos: leave them exactly as they are */
html[data-theme="dark"] .brand-mark img,
html[data-theme="dark"] .f-brand img { background: none; }

/* Larger text (Settings → Text size) */
html[data-text="large"] { font-size: 112.5%; }
html[data-theme="dark"] .seg { background: #2c2c2e; }
html[data-theme="dark"] .seg-opt.is-on { background: #636366; color: #fff; box-shadow: none; }
html[data-theme="dark"] .set-btn { background: #2c2c2e; }
html[data-theme="dark"] .more-group { background: #2c2c2e; }
html[data-theme="dark"] .more-row { border-bottom-color: #3a3a3c; }
html[data-theme="dark"] .more-top-back { background: rgba(60, 60, 64, 0.92); }

/* car-brand logos: dark mode uses a separately re-coloured copy of each logo (assets/img/brands/dark/) —
   no plates, no filters, same size and position as the normal logo. */
.brand-logo .lg-d { display: none; }
html[data-theme="dark"] .brand-logo .lg-l { display: none; }
html[data-theme="dark"] .brand-logo .lg-d { display: block; }
