/**
 * RunMe Design Tokens - iOS-Inspired Design System
 * ================================================
 * Single source of truth for colors, spacing, typography, shadows, and transitions.
 * All components should reference these tokens instead of hardcoded values.
 */

:root {
  /* ===== COLOR PALETTE - Professional Finance ===== */

  /* Primary - iOS Blue */
  --color-primary: #007AFF;
  --color-primary-light: #4DA2FF;
  --color-primary-dark: #0056B3;
  --color-primary-bg: rgba(0, 122, 255, 0.1);
  --color-primary-rgb: 0, 122, 255;

  /* Success - Money Green */
  --color-success: #34C759;
  --color-success-light: #4CD964;
  --color-success-dark: #248A3D;
  --color-success-bg: rgba(52, 199, 89, 0.1);
  --color-success-rgb: 52, 199, 89;

  /* Danger - Refined Red */
  --color-danger: #FF3B30;
  --color-danger-light: #FF6961;
  --color-danger-dark: #C9302C;
  --color-danger-bg: rgba(255, 59, 48, 0.1);
  --color-danger-rgb: 255, 59, 48;

  /* Warning - Amber */
  --color-warning: #FF9500;
  --color-warning-light: #FFAA33;
  --color-warning-dark: #CC7700;
  --color-warning-bg: rgba(255, 149, 0, 0.1);
  --color-warning-rgb: 255, 149, 0;

  /* Info - Teal */
  --color-info: #5AC8FA;
  --color-info-light: #7DD4FB;
  --color-info-dark: #32B5F5;
  --color-info-bg: rgba(90, 200, 250, 0.1);
  --color-info-rgb: 90, 200, 250;

  /* ===== NEUTRAL SCALE - iOS System Grays ===== */
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F2F2F7;
  --color-gray-200: #E5E5EA;
  --color-gray-300: #D1D1D6;
  --color-gray-400: #AEAEB2;
  --color-gray-500: #8E8E93;
  --color-gray-600: #636366;
  --color-gray-700: #48484A;
  --color-gray-800: #3A3A3C;
  --color-gray-900: #1C1C1E;

  /* ===== SEMANTIC COLORS ===== */
  --color-text-primary: #1C1C1E;
  --color-text-secondary: #8E8E93;
  --color-text-tertiary: #AEAEB2;
  --color-text-inverse: #FFFFFF;
  --color-background: #F2F2F7;
  --color-surface: #FFFFFF;
  --color-surface-elevated: #FFFFFF;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-strong: rgba(0, 0, 0, 0.15);
  --color-divider: rgba(0, 0, 0, 0.06);
  --color-overlay: rgba(0, 0, 0, 0.4);

  /* ===== SPACING SCALE (4px base unit) ===== */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-3-5: 14px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --space-32: 128px;

  /* ===== BORDER RADIUS (iOS-style generous curves) ===== */
  --radius-none: 0;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* ===== SHADOWS (Elevation System - soft, layered) ===== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16), 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.1);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-none: none;

  /* Colored shadows for buttons/accents */
  --shadow-primary: 0 4px 14px rgba(0, 122, 255, 0.25);
  --shadow-success: 0 4px 14px rgba(52, 199, 89, 0.25);
  --shadow-danger: 0 4px 14px rgba(255, 59, 48, 0.25);

  /* ===== TYPOGRAPHY ===== */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, 'Cascadia Code', 'Fira Code', Menlo, Monaco, Consolas, monospace;

  /* Font sizes (rem-based for accessibility) */
  --text-2xs: 0.625rem;  /* 10px */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */

  /* Font weights */
  --font-thin: 100;
  --font-extralight: 200;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===== TRANSITIONS & ANIMATIONS ===== */
  /* Timing functions (iOS-inspired) */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Durations */
  --duration-instant: 50ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;
  --duration-slowest: 700ms;

  /* ===== BLUR VALUES (Frosted Glass Effects) ===== */
  --blur-none: 0;
  --blur-sm: 4px;
  --blur-md: 8px;
  --blur-lg: 16px;
  --blur-xl: 24px;
  --blur-2xl: 40px;
  --blur-3xl: 64px;

  /* ===== Z-INDEX SCALE ===== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;

  /* ===== CONTAINER WIDTHS ===== */
  --container-xs: 320px;
  --container-sm: 384px;
  --container-md: 448px;
  --container-lg: 512px;
  --container-xl: 576px;
  --container-2xl: 672px;
  --container-3xl: 768px;
  --container-4xl: 896px;
  --container-5xl: 1024px;
  --container-6xl: 1152px;
  --container-7xl: 1280px;

  /* ===== BREAKPOINTS (for reference in media queries) ===== */
  /*
   * --breakpoint-xs: 0;
   * --breakpoint-sm: 576px;
   * --breakpoint-md: 768px;
   * --breakpoint-lg: 992px;
   * --breakpoint-xl: 1200px;
   * --breakpoint-2xl: 1400px;
   */

  /* ===== ASPECT RATIOS ===== */
  --aspect-square: 1 / 1;
  --aspect-video: 16 / 9;
  --aspect-photo: 4 / 3;
  --aspect-portrait: 3 / 4;

  /* ===== SAFE AREA INSETS (for mobile/notch support) ===== */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
}
