/* ==========================================================================
   DESIGN SYSTEM — Luxury Automotive (Apple · Tesla · BMW)
   ========================================================================== */

:root {
  /* --- Palette: deep void + precision red + champagne --- */
  --brand-black: #000000;
  --brand-void: #050505;
  --brand-graphite: #0c0c0c;
  --brand-graphite-elevated: #141414;
  --brand-surface: #111111;
  --brand-surface-hover: #1a1a1a;
  --brand-border: rgba(255, 255, 255, 0.05);
  --brand-border-strong: rgba(255, 255, 255, 0.1);
  --brand-white: #fafafa;
  --brand-mist: #e5e5e5;
  --brand-silver: #9ca3af;
  --brand-muted: #6b7280;
  --brand-red: #8f0a0a;
  --brand-red-bright: #d42020;
  --brand-red-deep: #4a0000;
  --brand-red-glow: rgba(212, 32, 32, 0.35);
  --brand-red-subtle: rgba(212, 32, 32, 0.08);
  --brand-champagne: #d4c4a8;
  --brand-champagne-subtle: rgba(212, 196, 168, 0.1);

  /* --- Lighting tokens --- */
  --light-key: rgba(255, 255, 255, 0.04);
  --light-rim: rgba(255, 255, 255, 0.14);
  --light-specular: rgba(255, 255, 255, 0.22);
  --light-ambient-red: rgba(212, 32, 32, 0.12);
  --light-ambient-warm: rgba(212, 196, 168, 0.06);

  /* --- Typography: Inter = precision (BMW/Tesla UI) --- */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.625rem;
  --text-3xl: clamp(1.875rem, 3.5vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 4.5vw, 3.25rem);
  --text-5xl: clamp(2.75rem, 6vw, 4.5rem);
  --text-hero: clamp(3rem, 9vw, 5.75rem);
  --leading-tight: 1.02;
  --leading-snug: 1.2;
  --leading-normal: 1.55;
  --tracking-tighter: -0.045em;
  --tracking-tight: -0.03em;
  --tracking-wide: 0.08em;
  --tracking-wider: 0.18em;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* --- Spacing --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-section: clamp(6rem, 14vw, 10rem);

  /* --- Radius: tighter = more premium --- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* --- Depth & shadows --- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.65);
  --shadow-glow-red: 0 0 80px var(--brand-red-glow);
  --shadow-inner: inset 0 1px 0 var(--light-rim);
  --shadow-card:
    0 0 0 1px var(--brand-border),
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 var(--light-key);
  --depth-1: translateZ(0);
  --perspective: 1200px;

  /* --- Glass: Apple-style vibrancy --- */
  --glass-bg: rgba(10, 10, 10, 0.55);
  --glass-bg-strong: rgba(5, 5, 5, 0.82);
  --glass-blur: 24px;
  --glass-saturate: 1.4;
  --glass-border: 1px solid var(--brand-border);

  /* --- Motion: spring-like luxury --- */
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-instant: 0.15s;
  --duration-fast: 0.25s;
  --duration-base: 0.5s;
  --duration-slow: 0.85s;
  --duration-cinematic: 1.2s;
  --duration-reveal: 1s;

  /* --- Layout --- */
  --header-height: 64px;
  --header-height-scrolled: 56px;
  --trust-bar-height: 34px;
  --site-top-offset: calc(var(--header-height) + var(--trust-bar-height));
  --site-top-offset-scrolled: calc(var(--header-height-scrolled) + var(--trust-bar-height));
  --container-max: 1240px;
  --container: min(var(--container-max), 100%);
  --container-padding: clamp(1rem, 4vw, 1.5rem);
  --container-narrow: min(680px, 90vw);

  /* --- Z-index --- */
  --z-grain: 4;
  --z-particles: 5;
  --z-hero-media: 0;
  --z-hero-fx: 3;
  --z-hero-content: 10;
  --z-scroll-progress: 1001;
  --z-header: 1000;
  --z-mobile-nav: 999;
  --z-cursor-glow: 998;
  --z-float: 900;
  --z-loader: 10000;
  --z-lightbox: 10001;
}
