/* ==========================================================================
   GRNCOMMERCE Design Tokens
   Source of truth: vault/context/Design-Criteria.md
   ========================================================================== */

:root {
  /* ---- Primary Colors ---- */
  --color-primary: #C8E64A;
  --color-primary-dark: #A8C438;
  --color-primary-light: #E8F5A1;
  --color-primary-subtle: #F4FAD6;

  /* ---- Sidebar / Dark Surface Colors ---- */
  --color-sidebar-bg: #1E1E2D;
  --color-sidebar-bg-alt: #2A2A3C;
  --color-sidebar-text: #9CA3AF;
  --color-sidebar-text-active: #FFFFFF;
  --color-sidebar-active-bg: #C8E64A;
  --color-sidebar-active-text: #1E1E2D;

  /* ---- Neutral / Surface Colors ---- */
  --color-page-bg: #F5F5F0;
  --color-card-bg: #FFFFFF;
  --color-outer-bg: linear-gradient(135deg, #E8F5A1 0%, #C8E64A 50%, #E8F5A1 100%);
  --color-border: #E8E8E3;
  --color-border-focus: #C8E64A;

  /* ---- Text Colors ---- */
  --color-text-primary: #1A1A2E;
  --color-text-secondary: #6B7280;
  --color-text-muted: #9CA3AF;
  --color-text-inverse: #FFFFFF;

  /* ---- Semantic Colors ---- */
  --color-success: #22C55E;
  --color-success-light: #DCFCE7;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-error: #DC2626;
  --color-error-light: #FEE2E2;
  --color-info: #3B82F6;
  --color-info-light: #DBEAFE;
  --color-paused: #9CA3AF;

  /* ---- Typography ---- */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* ---- Type Scale ---- */
  --text-display: 2.5rem;
  --text-h1: 1.875rem;
  --text-h2: 1.375rem;
  --text-h3: 1.125rem;
  --text-h4: 1rem;
  --text-body: 0.875rem;
  --text-body-medium: 0.875rem;
  --text-small: 0.75rem;
  --text-tiny: 0.6875rem;

  /* ---- Line Heights ---- */
  --leading-tight: 1.1;
  --leading-snug: 1.2;
  --leading-normal: 1.4;
  --leading-relaxed: 1.5;
  --leading-loose: 1.75;

  /* ---- Letter Spacing ---- */
  --tracking-tight: -0.02em;
  --tracking-snug: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.01em;
  --tracking-wider: 0.02em;
  --tracking-widest: 0.05em;

  /* ---- Spacing (4px base) ---- */
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;

  /* ---- Border Radius ---- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  --radius-circle: 50%;

  /* ---- Elevation / Shadows ---- */
  --shadow-none: none;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.10), 0 8px 10px rgba(0, 0, 0, 0.04);
  --shadow-focus: 0 0 0 3px rgba(200, 230, 74, 0.4);

  /* ---- Transitions ---- */
  --duration-instant: 75ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --duration-deliberate: 500ms;

  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---- Icon Sizes ---- */
  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;
  --icon-xl: 32px;
  --icon-circle-size: 40px;

  /* ---- Layout ---- */
  --layout-content-max-width: 1180px;
  --layout-content-padding-x: 24px;
  --layout-content-padding-y: 32px;
  --layout-topbar-height: 64px;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
