/* DealerSkill design tokens.
   Graphite + ember. Light and dark are both first-class. */

:root {
  color-scheme: light dark;

  /* Type */
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-stretch: 118%;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --fs-hero: clamp(2.4rem, 1.4rem + 4.6vw, 4.6rem);

  /* Space + shape */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 140ms;
  --t-med: 280ms;
  --t-slow: 520ms;

  /* Brand constants (same in both themes) */
  --ember-1: #FF7A3D;
  --ember-2: #FF5B24;
  --ember-3: #E0400C;
  --ember-edge: #9E2A05;
  --on-ember: #170700;
  --electric: #4DA3FF;
  --gold: #F5C451;
  --silver: #C9CFD8;
  --bronze: #D98E54;
}

/* ---------------------------------- DARK ---------------------------------- */
:root,
:root[data-theme="dark"] {
  --bg: #08090B;
  --bg-glow-1: rgba(255, 91, 36, 0.16);
  --bg-glow-2: rgba(77, 163, 255, 0.10);
  --surface: #111317;
  --surface-2: #171A20;
  --surface-3: #1F232B;
  --surface-hover: #22262F;
  --glass: rgba(20, 23, 29, 0.72);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --highlight: rgba(255, 255, 255, 0.06);

  --ink: #F4F5F7;
  --ink-2: #AEB4BF;
  --ink-3: #6E7582;

  --accent: var(--ember-2);
  --accent-soft: rgba(255, 91, 36, 0.14);
  --accent-ink: #FF8B5C;
  --success: #3DDC97;
  --success-soft: rgba(61, 220, 151, 0.13);
  --warning: #F5C451;
  --warning-soft: rgba(245, 196, 81, 0.13);
  --danger: #FF5C7A;
  --danger-soft: rgba(255, 92, 122, 0.13);
  --info: #6CB4FF;
  --info-soft: rgba(77, 163, 255, 0.14);

  --btn-2: linear-gradient(180deg, #2A2F39 0%, #1D2129 100%);
  --btn-2-edge: #0B0D10;
  --btn-2-ink: #F4F5F7;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .85), 0 8px 24px -8px rgba(0, 0, 0, .5);
  --grain-opacity: .05;
}

/* ---------------------------------- LIGHT --------------------------------- */
:root[data-theme="light"] {
  --bg: #F3F1ED;
  --bg-glow-1: rgba(255, 91, 36, 0.14);
  --bg-glow-2: rgba(77, 163, 255, 0.10);
  --surface: #FFFFFF;
  --surface-2: #F8F6F2;
  --surface-3: #EFECE6;
  --surface-hover: #F4F1EC;
  --glass: rgba(255, 255, 255, 0.72);
  --line: rgba(17, 19, 23, 0.08);
  --line-strong: rgba(17, 19, 23, 0.16);
  --highlight: rgba(255, 255, 255, 0.9);

  --ink: #0D0F12;
  --ink-2: #4A515D;
  --ink-3: #8A909A;

  --accent: #F0480F;
  --accent-soft: rgba(240, 72, 15, 0.10);
  --accent-ink: #C43A0A;
  --success: #0F9D63;
  --success-soft: rgba(15, 157, 99, 0.10);
  --warning: #B7830E;
  --warning-soft: rgba(183, 131, 14, 0.12);
  --danger: #D92D4F;
  --danger-soft: rgba(217, 45, 79, 0.10);
  --info: #1F6FD1;
  --info-soft: rgba(31, 111, 209, 0.10);

  --btn-2: linear-gradient(180deg, #FFFFFF 0%, #F1EEE9 100%);
  --btn-2-edge: #D3CEC5;
  --btn-2-ink: #0D0F12;

  --shadow-sm: 0 1px 2px rgba(20, 16, 10, .08);
  --shadow-md: 0 12px 30px -14px rgba(40, 28, 12, .28), 0 2px 6px rgba(40, 28, 12, .06);
  --shadow-lg: 0 34px 80px -24px rgba(40, 28, 12, .35), 0 8px 24px -10px rgba(40, 28, 12, .12);
  --grain-opacity: .035;
}

/* System preference when the user hasn't picked a theme */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F3F1ED;
    --bg-glow-1: rgba(255, 91, 36, 0.14);
    --bg-glow-2: rgba(77, 163, 255, 0.10);
    --surface: #FFFFFF;
    --surface-2: #F8F6F2;
    --surface-3: #EFECE6;
    --surface-hover: #F4F1EC;
    --glass: rgba(255, 255, 255, 0.72);
    --line: rgba(17, 19, 23, 0.08);
    --line-strong: rgba(17, 19, 23, 0.16);
    --highlight: rgba(255, 255, 255, 0.9);
    --ink: #0D0F12;
    --ink-2: #4A515D;
    --ink-3: #8A909A;
    --accent: #F0480F;
    --accent-soft: rgba(240, 72, 15, 0.10);
    --accent-ink: #C43A0A;
    --success: #0F9D63;
    --success-soft: rgba(15, 157, 99, 0.10);
    --warning: #B7830E;
    --warning-soft: rgba(183, 131, 14, 0.12);
    --danger: #D92D4F;
    --danger-soft: rgba(217, 45, 79, 0.10);
    --info: #1F6FD1;
    --info-soft: rgba(31, 111, 209, 0.10);
    --btn-2: linear-gradient(180deg, #FFFFFF 0%, #F1EEE9 100%);
    --btn-2-edge: #D3CEC5;
    --btn-2-ink: #0D0F12;
    --shadow-sm: 0 1px 2px rgba(20, 16, 10, .08);
    --shadow-md: 0 12px 30px -14px rgba(40, 28, 12, .28), 0 2px 6px rgba(40, 28, 12, .06);
    --shadow-lg: 0 34px 80px -24px rgba(40, 28, 12, .35), 0 8px 24px -10px rgba(40, 28, 12, .12);
    --grain-opacity: .035;
  }
}
