/* ================================================================
   main.css – ModVision design system
   Luxury automotive configurator — monochrome premium
   ================================================================ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  /* ─ Core backgrounds ─ */
  --c-bg:         #0A0A0A;
  --c-surface-1:  #111111;
  --c-surface-2:  #181818;
  --c-surface-3:  #222222;
  --c-surface-4:  #2E2E2E;

  /* ─ Borders ─ */
  --c-border:        rgba(255, 255, 255, 0.06);
  --c-border-mid:    rgba(255, 255, 255, 0.10);
  --c-border-bright: rgba(255, 255, 255, 0.20);

  /* ─ Accent — WHITE: text + active/selected borders ONLY (not a button fill) ─ */
  --c-accent:        #FFFFFF;
  --c-accent-dim:    rgba(255, 255, 255, 0.55);
  --c-accent-bright: #FFFFFF;
  --c-accent-glow:   rgba(255, 255, 255, 0.04);
  --c-accent-glow2:  rgba(255, 255, 255, 0.08);
  --c-accent-glow3:  rgba(255, 255, 255, 0.13);

  /* ─ Active/selected emphasis — monochrome white. The UI is fully monochrome
        (owner decision 2026-06-28): NO gold anywhere, including Buy CTAs. Buy and
        active states are distinguished by FILL / WEIGHT / OUTLINE, not colour.
        (Replaces the retired gold-token family — do not reintroduce a chromatic accent.) ─ */
  --c-active:        #FFFFFF;
  --c-active-dim:    rgba(255,255,255,0.55);
  --c-active-glow:   rgba(255,255,255,0.10);
  --c-active-border: rgba(255,255,255,0.30);

  /* ─ CTA blue — single affordance colour for non-monetised actions (configure / navigate) ─ */
  --c-cta:         #4a8fd4;   /* canonical CTA role (== --c-blue, kept for back-compat) */
  --c-cta-dim:     rgba(74,143,212,0.40);
  --c-cta-glow:    rgba(74,143,212,0.10);
  --c-blue:        #4a8fd4;
  --c-blue-dim:    rgba(74,143,212,0.4);
  --c-blue-glow:   rgba(74,143,212,0.1);

  /* ─ Secondary — kept for gradients only, very muted ─ */
  --c-purple:        #888888;
  --c-purple-dim:    rgba(136, 136, 136, 0.5);
  --c-purple-glow:   rgba(136, 136, 136, 0.10);

  /* ─ Text — 4-level hierarchy (all legible on dark surfaces) ─ */
  --c-text-1:   #FFFFFF;                 /* L1 headings, active labels, CTA text */
  --c-text:     #EDEDED;                 /* default body */
  --c-text-2:   #B0B0B0;                 /* secondary */
  --c-text-3:   rgba(255,255,255,0.55);  /* tertiary — was #555555 (failed contrast) */
  --c-text-4:   rgba(255,255,255,0.38);  /* metadata, timestamps, placeholders */
  --c-text-inv: #0A0A0A;                 /* on-accent text */

  /* ─ Status — data colours only, not UI decoration ─ */
  --c-success:  #4ADE80;
  --c-warning:  #FBB24E;
  --c-error:    #F87171;
  --c-info:     #94A3B8;

  /* ─ Performance metric colours ─ */
  --c-hp:       #E05C5C;
  --c-torque:   #D4894A;
  --c-weight:   #4ADE80;
  --c-sound:    #9B8EC4;
  --c-handling: #7EB3CC;

  /* ─ Typography ─ */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --text-2xs: 0.6875rem;
  --text-xs:  0.8125rem;
  --text-sm:  0.9375rem;
  --text-md:  1.0625rem;
  --text-lg:  1.1875rem;
  --text-xl:  1.3125rem;
  --text-2xl: 1.5625rem;
  --text-3xl: 1.9375rem;

  /* ─ Spacing — 8px base grid (playbook §2): 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 ─ */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;   /* completes the scale; also resolves existing --sp-8 refs in mod-menu.css */

  /* ─ Radii — premium-friendly scale (playbook §3, target ~14–20px for cards/panels) ─ */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-2xl: 24px;
  --r-full: 999px;
  /* Semantic radii sitting in the 14–20px premium band — use for glass panels & part cards */
  --r-card:  14px;
  --r-panel: 18px;

  /* ─ Transitions ─ */
  --t-fast:   150ms ease;
  --t-base:   250ms ease;
  --t-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ─ Easing curves (playbook §1): ease-out enter · ease-in-out move · ease-in exit ─ */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);     /* enter / appear */
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);    /* move / resize */
  --ease-in:     cubic-bezier(0.55, 0, 1, 0.45);    /* exit / leave */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* attention / overshoot */

  /* ─ Semantic motion durations (playbook §1 canonical numbers) ─
        entrance 200–300 · exit 150 · feedback <100 · dropdown 150 · tab 180 · toggle 250 ─ */
  --t-entrance:      240ms var(--ease-out);     /* panel/modal/page open (200–300ms) */
  --t-exit:          150ms var(--ease-in);      /* panel close, modal dismiss */
  --t-feedback:      90ms  ease;                /* hover / press / toggle — Doherty <100ms */
  --t-move:          200ms var(--ease-in-out);  /* reposition / resize */
  --t-dropdown:      150ms var(--ease-out);     /* select / dropdown open-close */
  --t-tab:           180ms var(--ease-out);     /* tab content crossfade */
  --t-toggle:        250ms var(--ease-out);     /* toggle-switch morph */
  --t-attention:     600ms var(--ease-spring);  /* error / alert (500–800ms + bounce) */
  --t-tooltip-delay: 300ms;                     /* tooltip intent delay (not a transition) */
  --t-stagger:       50ms;                       /* between list items */
  --t-stagger-icon:  30ms;                       /* star / icon fill */

  /* ─ Shadows ─ */
  --shadow-sm:    0 1px 4px  rgba(0, 0, 0, 0.5);
  --shadow-md:    0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-lg:    0 8px 40px rgba(0, 0, 0, 0.7);
  --shadow-panel: 0 0 0 1px var(--c-border), 0 8px 32px rgba(0, 0, 0, 0.6);

  /* ─ Panel widths ─ */
  --left-panel-w:  300px;
  --right-panel-w: 320px;
  --header-h:      56px;

  /* ─ Dynamic paint colour (updated by JS) ─ */
  --c-paint:      #EDEDED;
  --c-paint-glow: rgba(237, 237, 237, 0.12);
}

/* ── Landing overlay — scrollable multi-section ───────────── */
.landing {
  position: fixed; inset: 0; z-index: 10000;
  display: block;
  background: transparent;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
/* Each section gets its own background so the car demo section can be transparent */
.land-hero, .land-problem, .land-features, .land-steps,
.land-roadmap, .land-specs, .land-final { background: #040406; }
.landing.landing--exit {
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), filter 1.2s;
  opacity: 0; filter: blur(8px); pointer-events: none;
}

/* Background ambient glows — simple gradients, no blur filter */
.landing__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.landing__glow {
  position: absolute; border-radius: 50%;
}
.landing__glow--1 {
  width: 800px; height: 800px; top: -20%; left: 20%;
  background: radial-gradient(circle, rgba(40, 80, 160, 0.35) 0%, rgba(20, 50, 120, 0.12) 40%, transparent 70%);
}
.landing__glow--2 {
  width: 700px; height: 700px; bottom: -25%; right: 10%;
  background: radial-gradient(circle, rgba(212, 140, 40, 0.2) 0%, rgba(180, 100, 20, 0.06) 40%, transparent 70%);
}
.landing__glow--3 {
  width: 500px; height: 500px; top: 35%; left: 60%;
  background: radial-gradient(circle, rgba(40, 120, 180, 0.12) 0%, transparent 70%);
}
/* glow-drift animation removed for performance — static glows look fine */

/* Noise texture removed for performance */
.landing__noise { display: none; }

/* Vignette overlay */
.landing__bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 0%, rgba(4,4,6,0.7) 100%);
  pointer-events: none;
}

/* Horizontal accent line */
.landing__line {
  width: 60px; height: 1px; margin: 0 auto 36px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* Content */
.landing__content {
  text-align: center; max-width: 720px; padding: 20px;
  position: relative; z-index: 2;
}

/* Badge */
.landing__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 20px; margin-bottom: 36px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 24px;
  font: 600 10px var(--font-display); color: rgba(255,255,255,0.5);
  letter-spacing: 2.5px; text-transform: uppercase;
  background: rgba(255,255,255,0.03);
}
.landing__badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 10px rgba(74,222,128,0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Title — massive, confident, metallic sheen */
.landing__title {
  font: 900 clamp(72px, 10vw, 130px) var(--font-display);
  color: #fff; margin: 0 0 20px; letter-spacing: -4px;
  line-height: 0.85;
  position: relative;
}
.landing__title em {
  font-style: normal;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.5) 60%, rgba(255,255,255,0.3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing__title-line {
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle */
.landing__sub {
  font: 500 14px var(--font-display); color: rgba(255,255,255,0.25);
  margin: 0 0 52px; letter-spacing: 8px; text-transform: uppercase;
}

/* Stats row */
.landing__stats {
  display: flex; align-items: center; justify-content: center; gap: 0;
  margin: 0 0 52px;
}
.landing__stat {
  display: flex; flex-direction: column; align-items: center; padding: 0 32px;
}
.landing__stat-num {
  font: 800 32px var(--font-display); color: #fff; letter-spacing: -0.5px;
}
.landing__stat-label {
  font: 400 10px var(--font-body); color: rgba(255,255,255,0.25);
  letter-spacing: 1px; margin-top: 6px; text-transform: uppercase;
}
.landing__stat-divider {
  width: 1px; height: 40px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* CTA button — premium glass with glow */
.landing__cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 48px;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #fff; cursor: pointer;
  font: 700 13px var(--font-display); letter-spacing: 3px; text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
/* CTA pseudo-elements removed for performance */
.landing__cta:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}
.landing__cta:active { transform: translateY(0); transition-duration: 0.1s; }
.landing__cta-text { position: relative; z-index: 1; }
.landing__cta-arrow {
  position: relative; z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); font-size: 18px;
}
.landing__cta:hover .landing__cta-arrow { transform: translateX(6px); }

/* Footer */
.landing__footer {
  margin-top: 36px;
  font: 400 11px var(--font-body); color: rgba(255,255,255,0.1);
  letter-spacing: 0.5px;
}

/* Brand strip — marquee at bottom */
.landing__brands {
  position: absolute; bottom: 36px; left: 0; right: 0;
  font: 600 10px var(--font-display); color: rgba(255,255,255,0.08);
  letter-spacing: 3px; text-transform: uppercase;
  z-index: 2;
}
.landing__brands span {
  white-space: nowrap;
}

/* ── Landing — pure CSS animations, no GSAP ───────────────── */
[data-anim] { opacity: 0; }

@keyframes land-fade-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal — IntersectionObserver adds .land-visible */
.land-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.land-reveal.land-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scroll progress bar ──────────────────────────────────── */
.landing__progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--c-blue), var(--c-active));
  z-index: 10001; pointer-events: none;
  transition: width 0.1s linear;
}

/* ── Hero section (full viewport) ─────────────────────────── */
.land-hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.land-hero__content {
  text-align: center; max-width: 760px; padding: 20px;
  position: relative; z-index: 2;
}
.land-hero__tagline {
  font: 300 clamp(22px, 3vw, 36px) var(--font-body);
  color: rgba(255,255,255,0.8); margin: 0 0 12px;
  letter-spacing: 0.3px;
}

/* Hero orb — pure radial gradient, no blur filter */
.hero-orb {
  position: absolute;
  width: 600px; height: 600px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%,
    rgba(74,143,212,0.08) 0%,
    rgba(255,255,255,0.03) 35%,
    transparent 70%
  );
  z-index: 0; pointer-events: none;
}
.hero-orb--sm {
  width: 400px; height: 400px;
}
.land-hero__scroll-hint {
  margin-top: 48px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.15); font: 400 10px var(--font-display);
  letter-spacing: 2px; text-transform: uppercase;
}
.scroll-dot { animation: scroll-bob 1.5s ease-in-out infinite; }
@keyframes scroll-bob {
  0%, 100% { cy: 8; opacity: 1; }
  50% { cy: 16; opacity: 0.3; }
}

/* ── Generic landing section ──────────────────────────────── */
.land-section {
  position: relative; min-height: 90vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 120px 48px;
  max-width: 1100px; margin: 0 auto;
}
.land-section__label {
  display: block;
  font: 600 10px var(--font-display); color: var(--c-blue);
  letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 16px;
}
.land-section__title {
  font: 700 clamp(32px, 5vw, 56px) var(--font-display);
  color: #fff; letter-spacing: -1.5px; margin-bottom: 56px;
  text-align: center; line-height: 1.1;
}

/* ── Section 2: Problem / Tension ─────────────────────────── */
.land-problem { min-height: 70vh; justify-content: center; }
.land-problem__text {
  max-width: 640px; text-align: center;
  display: flex; flex-direction: column; gap: 32px;
}
.land-problem__text p {
  font: 300 clamp(18px, 2.5vw, 26px) var(--font-body);
  color: rgba(255,255,255,0.4); line-height: 1.6;
}
.land-problem__text em {
  font-style: normal; color: var(--c-blue);
}
.land-reveal--accent {
  font-weight: 600 !important;
  color: #fff !important;
  font-size: clamp(24px, 3vw, 36px) !important;
}

/* ── Section 3: Features grid ─────────────────────────────── */
.land-features__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; width: 100%;
}
.land-feature {
  padding: 32px; border-radius: 14px;
  position: relative;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.land-feature:hover {
  transform: translateY(-4px);
}
.land-feature__num {
  position: absolute; top: 16px; right: 16px;
  font: 700 11px var(--font-mono); color: rgba(74,143,212,0.2);
  letter-spacing: 0.5px;
}
.land-feature__icon {
  color: var(--c-blue); margin-bottom: 20px; opacity: 0.8;
}
.land-feature h3 {
  font: 700 17px var(--font-display); color: #fff;
  letter-spacing: 0.02em; margin-bottom: 10px;
}
.land-feature p {
  font: 400 13px var(--font-body); color: rgba(255,255,255,0.35);
  line-height: 1.7;
}

/* ── Section 4: Steps ─────────────────────────────────────── */
.land-steps__row {
  display: flex; align-items: flex-start; gap: 0;
  width: 100%;
}
.land-step {
  flex: 1; text-align: center; padding: 0 20px;
  display: flex; flex-direction: column; align-items: center;
}
.land-step__icon-wrap {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: rgba(74,143,212,0.06);
  border: 1px solid rgba(74,143,212,0.12);
  color: var(--c-blue);
  margin-bottom: 20px;
  position: relative;
}
.land-step h3 {
  font: 700 18px var(--font-display); color: #fff;
  margin-bottom: 10px;
}
.land-step p {
  font: 400 13px var(--font-body); color: rgba(255,255,255,0.35);
  line-height: 1.7; max-width: 240px;
}
.land-step__connector {
  display: flex; align-items: center; padding-top: 32px; flex-shrink: 0;
}
.land-step__connector-line {
  width: 48px; height: 1px;
  background: linear-gradient(90deg, rgba(74,143,212,0.15), rgba(255,255,255,0.1));
}

/* ── Section 5: Specs ─────────────────────────────────────── */
.land-specs__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; width: 100%; max-width: 600px;
}
.land-spec {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
  background: rgba(255,255,255,0.02);
}
.land-spec__key {
  font: 600 10px var(--font-display); color: rgba(255,255,255,0.3);
  letter-spacing: 1px; text-transform: uppercase;
}
.land-spec__val {
  font: 500 12px var(--font-body); color: rgba(255,255,255,0.6);
}

/* ── Section: 3D Car Demo (transparent window to canvas) ───── */
.land-car-demo {
  position: relative;
  min-height: 200vh;
  background: transparent !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}
.land-car-demo__sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.land-car-demo__text {
  text-align: center;
  pointer-events: none;
}
.land-car-demo__text h2 {
  font: 700 clamp(24px, 3.5vw, 42px) var(--font-display);
  color: #fff; letter-spacing: -1px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8);
  margin-bottom: 8px;
}
.land-car-demo__text p {
  font: 400 14px var(--font-body);
  color: rgba(255,255,255,0.5);
  text-shadow: 0 1px 10px rgba(0,0,0,0.8);
}
/* Gradient edges to blend into dark sections above/below */
.land-car-demo::before,
.land-car-demo::after {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 120px; z-index: 1;
  pointer-events: none;
}
.land-car-demo::before {
  top: 0;
  background: linear-gradient(180deg, #040406 0%, transparent 100%);
}
.land-car-demo::after {
  bottom: 0;
  background: linear-gradient(0deg, #040406 0%, transparent 100%);
}

/* Hide ALL configurator UI except the raw canvas during landing */
.landing-active .navbar,
.landing-active .left-panel,
.landing-active .right-panel,
.landing-active .viewer__overlay,
.landing-active .viewer__tools,
.landing-active .viewer__bottombar,
.landing-active .nav-cube-wrap,
.landing-active .panel-toggle,
.landing-active .left-panel-expand,
.landing-active .viewer__hud,
.landing-active .scene-ambient-glow,
.landing-active #navbar-slot,
.landing-active .search-box,
.landing-active .category-box,
.landing-active .panel-fixed,
.landing-active .panel-scroll,
.landing-active .vehicle-summary,
.landing-active .tabs {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ── Section: Coming Soon / Roadmap ────────────────────────── */
.land-roadmap__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; width: 100%; max-width: 700px;
}
.land-roadmap__item {
  padding: 28px; border-radius: 14px;
  position: relative;
}
.land-roadmap__tag {
  display: inline-block; margin-bottom: 12px;
  padding: 3px 10px; border-radius: 20px;
  font: 600 9px var(--font-display); letter-spacing: 1.5px; text-transform: uppercase;
  background: rgba(74,143,212,0.08); color: var(--c-blue);
  border: 1px solid rgba(74,143,212,0.15);
}
.land-roadmap__item h3 {
  font: 700 16px var(--font-display); color: #fff;
  margin-bottom: 8px;
}
.land-roadmap__item p {
  font: 400 13px var(--font-body); color: rgba(255,255,255,0.35);
  line-height: 1.7;
}

/* ── Section 6: Final CTA ─────────────────────────────────── */
.land-final {
  min-height: 80vh; position: relative; overflow: hidden;
  max-width: none; width: 100%; padding: 120px 40px 60px;
}
/* no image backgrounds — pure CSS visual effects */
.land-final__content {
  position: relative; z-index: 2; text-align: center;
}
.land-final__title {
  font: 800 clamp(40px, 6vw, 80px) var(--font-display);
  color: #fff; letter-spacing: -3px; margin-bottom: 16px;
  line-height: 1.05;
}
.land-final__sub {
  font: 400 18px var(--font-body); color: rgba(255,255,255,0.4);
  margin-bottom: 40px;
}
.land-final__note {
  margin-top: 24px;
  font: 400 11px var(--font-body); color: rgba(255,255,255,0.1);
  letter-spacing: 0.5px;
}
.landing__cta--lg {
  padding: 20px 56px; font-size: 15px;
}

/* scroll-reveal handled above with .land-visible */

/* ── Environment body overrides ─────────────────────────────── */
body.env-studio      { background: #0a0a0a; }
body.env-garage      { background: #0D0D0D; }
body.env-night       { background: #040406; }
body.env-track       { background: #141410; }
body.env-gas-station { background: #050808; }

/* ── Print / PDF export ────────────────────────────────────── */
@media print {
  body { background: #fff !important; color: #111 !important; }
  .workspace { position: static !important; }
  .left-panel, .right-panel, .viewer__overlay,
  .viewer__tools, .viewer__bottombar, .nav-cube-wrap, .navbar,
  .panel-toggle, .paint-panel { display: none !important; }
  #viewer-canvas { width: 100% !important; height: 50vh !important; }
  .oem-panel { display: block !important; position: static !important; padding: 20px; }
  .oem-price-table { color: #222; }
  .oem-price-table thead th { color: #555; border-bottom: 2px solid #999; }
  .oem-price-row td { border-bottom: 1px solid #ddd; color: #333; }
  .oem-price-total td { border-top: 2px solid #333; color: #000; }
  .oem-sum-header { color: #000; font-size: 18px; }
  .oem-sum-code { color: #444; }
  .oem-sum-actions { display: none !important; }
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Focus-visible outlines for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--c-active);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.55;
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  transition: background 0.5s ease;
}

img, canvas, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
select, input { font-family: inherit; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

/* ── App shell ──────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.workspace {
  position: relative;
  flex: 1;
  overflow: hidden;
}

/* ── Typography helpers ─────────────────────────────────────── */
.label {
  font-family: var(--font-display);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.label--accent { color: var(--c-text-2); }

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 3px; height: 3px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--c-surface-4); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-text-3); }

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 1.5px solid var(--c-surface-4);
  border-top-color: var(--c-text-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ────────────────────────────────────────────────── */
.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;
}
.hidden        { display: none !important; }
.flex-center   { display: flex; align-items: center; justify-content: center; }

/* ── Glass panel ────────────────────────────────────────────── */
.glass {
  background: rgba(17, 17, 17, 0.90);
  border: 1px solid var(--c-border);
}

/* ── Thin divider ───────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--c-border);
}

/* ── Component error fallback ───────────────────────────────── */
.component-error {
  padding: var(--sp-4);
  color: var(--c-error);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  background: rgba(248, 113, 113, 0.06);
  border-left: 2px solid var(--c-error);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root {
    --left-panel-w: 270px;
    --right-panel-w: 290px;
  }
}

/* ── Iteration 4: Card & Layout Polish ── */
.part-card__thumb {
  background: linear-gradient(160deg, #18181F 0%, #13131A 100%);
  position: relative;
  overflow: hidden;
}
.part-card__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.part-card__thumb-icon {
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.25s;
}
.part-card.mv-box:hover .part-card__thumb-icon {
  color: rgba(255, 255, 255, 0.7);
}
.part-card__brand {
  color: var(--c-text-2);
  letter-spacing: 0.15em;
  font-size: 0.6rem;
}
.part-card__name {
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.part-card__price {
  font-size: 1.05rem;
  font-weight: 700;
}
.badge.badge--popular {
  background: linear-gradient(135deg, #0A2310, #0D2D14) !important;
  color: #4ADE80 !important;
  border: 1px solid rgba(74, 222, 128, 0.25) !important;
  font-size: 0.56rem !important;
  letter-spacing: 0.12em !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
}
.badge.badge--premium {
  background: linear-gradient(135deg, #1c1c22, #26262e) !important;
  color: var(--c-text-1) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  font-size: 0.56rem !important;
  letter-spacing: 0.12em !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
}
.badge.badge--track {
  background: linear-gradient(135deg, #0A0A20, #10103A) !important;
  color: #818CF8 !important;
  border: 1px solid rgba(129, 140, 248, 0.25) !important;
  font-size: 0.56rem !important;
  letter-spacing: 0.12em !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
}
.vehicle-summary__name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
}
.vs-spec {
  border-radius: 7px;
  transition: border-color 0.2s;
}
.vs-spec:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
}
.section-title {
  letter-spacing: 0.2em;
  font-size: 0.58rem;
}
.perf-meter__bar {
  height: 3px;
  border-radius: 2px;
}
.perf-meter__fill {
  height: 3px;
  border-radius: 2px;
}
.panel-scroll::-webkit-scrollbar { width: 3px; }
.panel-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 3px; }
.panel-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }
.parts-list::-webkit-scrollbar { width: 3px; }
.parts-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 3px; }
.navbar__wordmark { letter-spacing: 0.15em; }
/* ── End Iteration 4 ── */

