/* 
 * Genesys Life Bio Design System
 * Core design tokens and variables for consistent branding
 * Version: 1.0.0
 */

:root {
  /* =================================================================
     Primary Color Palette
     ================================================================= */
  --color-primary: #094074;        /* Deep Navy Blue - Main brand color */
  --color-secondary: #3C6997;      /* Medium Blue - Supporting elements */
  --color-accent: #5ADBFF;         /* Bright Cyan - CTAs & highlights */
  --color-highlight: #FFDD4A;      /* Golden Yellow - Important actions */
  --color-alert: #FE9000;          /* Orange - Warnings & alerts */
  
  /* =================================================================
     Extended Color System
     ================================================================= */
  /* Neutrals */
  --color-white: #FFFFFF;
  --color-gray-50: #F8FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;
  
  /* Semantic Colors */
  --color-success: #10B981;
  --color-warning: var(--color-alert);
  --color-error: #EF4444;
  --color-info: var(--color-accent);
  
  /* =================================================================
     Background Colors
     ================================================================= */
  --bg-primary: var(--color-primary);
  --bg-secondary: var(--color-secondary);
  --bg-light: var(--color-gray-50);
  --bg-white: var(--color-white);
  --bg-card: var(--color-white);
  --bg-hover: var(--color-gray-50);
  
  /* =================================================================
     Text Colors
     ================================================================= */
  --text-primary: var(--color-gray-900);
  --text-secondary: var(--color-gray-700);
  --text-muted: var(--color-gray-500);
  --text-light: var(--color-white);
  --text-accent: var(--color-accent);
  --text-link: var(--color-secondary);
  --text-link-hover: var(--color-primary);
  
  /* =================================================================
     Border Colors
     ================================================================= */
  --border-light: var(--color-gray-200);
  --border-medium: var(--color-gray-300);
  --border-focus: var(--color-accent);
  --border-error: var(--color-error);
  --border-success: var(--color-success);
  
  /* =================================================================
     Typography System
     ================================================================= */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  
  /* Font Sizes */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;
  
  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  
  /* =================================================================
     Spacing System (8px base)
     ================================================================= */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-7: 1.75rem;   /* 28px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  
  /* =================================================================
     Border Radius
     ================================================================= */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* =================================================================
     Shadows
     ================================================================= */
  --shadow-xs: 0 1px 2px 0 rgba(9, 64, 116, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(9, 64, 116, 0.06);
  --shadow-md: 0 4px 8px -1px rgba(9, 64, 116, 0.08);
  --shadow-lg: 0 8px 16px -2px rgba(9, 64, 116, 0.1);
  --shadow-xl: 0 16px 32px -4px rgba(9, 64, 116, 0.12);
  --shadow-2xl: 0 24px 48px -8px rgba(9, 64, 116, 0.16);
  --shadow-inner: inset 0 2px 4px 0 rgba(9, 64, 116, 0.06);
  --shadow-focus: 0 0 0 3px rgba(90, 219, 255, 0.4);
  
  /* =================================================================
     Transitions
     ================================================================= */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* =================================================================
     Z-Index Scale
     ================================================================= */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
  
  /* =================================================================
     Container Widths
     ================================================================= */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
}

/* =================================================================
   Dark Mode Variables
   ================================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    /* Backgrounds */
    --bg-primary: #051A30;
    --bg-secondary: #1A3A52;
    --bg-light: #0A2540;
    --bg-white: #0F172A;
    --bg-card: #1E293B;
    --bg-hover: #334155;
    
    /* Text */
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    
    /* Borders */
    --border-light: #334155;
    --border-medium: #475569;
    
    /* Adjusted accent colors for dark mode */
    --color-accent: #7AE5FF;
    --color-highlight: #FFE666;
    
    /* Shadows for dark mode */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 16px -2px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 16px 32px -4px rgba(0, 0, 0, 0.4);
  }
}

/* =================================================================
   Utility Classes
   ================================================================= */

/* Color utilities */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--color-accent); }
.text-highlight { color: var(--color-highlight); }
.text-alert { color: var(--color-alert); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-accent { background-color: var(--color-accent); }
.bg-highlight { background-color: var(--color-highlight); }
.bg-light { background-color: var(--bg-light); }

/* Typography utilities */
.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }
.text-5xl { font-size: var(--font-size-5xl); }

/* Shadow utilities */
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Border radius utilities */
.rounded-none { border-radius: var(--radius-none); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* =================================================================
   Base Styles
   ================================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-light);
}

/* =================================================================
   Focus Styles
   ================================================================= */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* =================================================================
   Selection Styles
   ================================================================= */
::selection {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

::-moz-selection {
  background-color: var(--color-accent);
  color: var(--color-primary);
}