/* ==========================================================================
   NEXTMART USA — Design Tokens
   Palette: Deep violet primary + warm coral accent + lime highlight
   ========================================================================== */

:root,
[data-theme='light'] {
  /* ---- Type scale (fluid clamp) ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* ---- Spacing (4px system) ---- */
  --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-32: 8rem;

  /* ---- Surfaces (warm off-white, violet-tinted) ---- */
  --color-bg: #faf8fc;
  --color-surface: #ffffff;
  --color-surface-2: #fdfcfe;
  --color-surface-offset: #f2eefa;
  --color-surface-offset-2: #ece4f7;
  --color-surface-dynamic: #e4d9f2;
  --color-divider: #e5ddf0;
  --color-border: #d9cce9;

  /* ---- Text (deep violet-black) ---- */
  --color-text: #241b33;
  --color-text-muted: #6b6079;
  --color-text-faint: #a89dbb;
  --color-text-inverse: #fdfcff;

  /* ---- Primary Accent (Electric Violet) ---- */
  --color-primary: #6d28d9;
  --color-primary-hover: #5b21b6;
  --color-primary-active: #4c1d95;
  --color-primary-highlight: #ece0fb;
  --color-primary-soft: #f4edfd;

  /* ---- Secondary Accent (Coral) ---- */
  --color-coral: #ff6b57;
  --color-coral-hover: #f2543f;
  --color-coral-active: #d9432f;
  --color-coral-highlight: #ffe3dc;

  /* ---- Highlight (Lime) — badges, sparks ---- */
  --color-lime: #b7e024;
  --color-lime-hover: #9dc71c;
  --color-lime-active: #83a916;
  --color-lime-highlight: #eef8cf;
  --color-lime-ink: #3a4707;

  /* ---- Warning / Rollback-style badge (amber) ---- */
  --color-warning: #b5590a;
  --color-warning-hover: #94480a;
  --color-warning-highlight: #fce3c4;

  /* ---- Error ---- */
  --color-error: #d1284f;
  --color-error-hover: #a91f3f;
  --color-error-highlight: #fbdbe3;

  /* ---- Success ---- */
  --color-success: #1f8a4c;
  --color-success-hover: #196f3d;
  --color-success-highlight: #d9f2e2;

  /* ---- Star rating gold ---- */
  --color-star: #f5a623;

  /* ---- Radius ---- */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* ---- Transitions ---- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Shadows (violet tone-matched) ---- */
  --shadow-sm: 0 1px 2px oklch(0.25 0.08 300 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.25 0.08 300 / 0.12);
  --shadow-lg: 0 16px 40px oklch(0.25 0.08 300 / 0.18);

  /* ---- Content widths ---- */
  --content-wide: 1280px;
  --content-full: 100%;

  /* ---- Fonts ---- */
  --font-display: 'Cabinet Grotesk', 'General Sans', 'Segoe UI', sans-serif;
  --font-body: 'General Sans', 'Inter', 'Segoe UI', sans-serif;
}

/* ---- Dark mode ---- */
[data-theme='dark'] {
  --color-bg: #17111f;
  --color-surface: #1e1728;
  --color-surface-2: #241c2f;
  --color-surface-offset: #291f36;
  --color-surface-offset-2: #32263f;
  --color-surface-dynamic: #3a2c49;
  --color-divider: #362a44;
  --color-border: #453655;
  --color-text: #ede8f5;
  --color-text-muted: #af9fc7;
  --color-text-faint: #7c6b95;
  --color-text-inverse: #201a2b;

  --color-primary: #a476f0;
  --color-primary-hover: #b794f4;
  --color-primary-active: #c5abf6;
  --color-primary-highlight: #392a52;
  --color-primary-soft: #2c2140;

  --color-coral: #ff8770;
  --color-coral-hover: #ff9c88;
  --color-coral-active: #ffb09f;
  --color-coral-highlight: #4a2c26;

  --color-lime: #c8ea52;
  --color-lime-hover: #d4ef6f;
  --color-lime-active: #dff29a;
  --color-lime-highlight: #37421a;
  --color-lime-ink: #eef8cf;

  --color-warning: #f0954a;
  --color-warning-hover: #f3ab6d;
  --color-warning-highlight: #4a3319;

  --color-error: #f2718c;
  --color-error-hover: #f591a7;
  --color-error-highlight: #4a2230;

  --color-success: #5cd18a;
  --color-success-hover: #7fdba3;
  --color-success-highlight: #1c3d2a;

  --color-star: #ffc253;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #17111f;
    --color-surface: #1e1728;
    --color-surface-2: #241c2f;
    --color-surface-offset: #291f36;
    --color-surface-offset-2: #32263f;
    --color-surface-dynamic: #3a2c49;
    --color-divider: #362a44;
    --color-border: #453655;
    --color-text: #ede8f5;
    --color-text-muted: #af9fc7;
    --color-text-faint: #7c6b95;
    --color-text-inverse: #201a2b;
    --color-primary: #a476f0;
    --color-primary-hover: #b794f4;
    --color-primary-active: #c5abf6;
    --color-primary-highlight: #392a52;
    --color-primary-soft: #2c2140;
    --color-coral: #ff8770;
    --color-coral-hover: #ff9c88;
    --color-coral-active: #ffb09f;
    --color-coral-highlight: #4a2c26;
    --color-lime: #c8ea52;
    --color-lime-hover: #d4ef6f;
    --color-lime-active: #dff29a;
    --color-lime-highlight: #37421a;
    --color-lime-ink: #eef8cf;
    --color-warning: #f0954a;
    --color-warning-hover: #f3ab6d;
    --color-warning-highlight: #4a3319;
    --color-error: #f2718c;
    --color-error-hover: #f591a7;
    --color-error-highlight: #4a2230;
    --color-success: #5cd18a;
    --color-success-hover: #7fdba3;
    --color-success-highlight: #1c3d2a;
    --color-star: #ffc253;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}
