/* ============================================ */
/* AFRIPRECISION DESIGN SYSTEM - TOKENS */
/* Version: 2.0 - Enterprise SaaS Standard */
/* Created: December 2025 */
/* ============================================ */

/* ============================================ */
/* 1. COLOR TOKENS */
/* ============================================ */

:root {
    /* Primary Brand Colors */
    --color-primary: #C41E28;
    --color-primary-hover: #A01820;
    --color-primary-dark: #8a151c;
    --color-primary-light: rgba(196, 30, 40, 0.1);
    --color-primary-lighter: rgba(196, 30, 40, 0.05);
    --color-primary-glow: rgba(196, 30, 40, 0.25);
    
    /* Neutral Grays (Stripe-inspired) */
    --gray-50: #f7f8f9;
    --gray-100: #ebeef1;
    --gray-200: #d8dce2;
    --gray-300: #c4c9d0;
    --gray-400: #9ba3af;
    --gray-500: #6b7280;
    --gray-600: #5a6370;
    --gray-700: #3d4350;
    --gray-800: #2d3139;
    --gray-900: #1a1d24;
    --gray-950: #0a0e16;
    
    /* Semantic Colors */
    --color-success: #10b981;
    --color-success-light: rgba(16, 185, 129, 0.1);
    --color-warning: #f59e0b;
    --color-warning-light: rgba(245, 158, 11, 0.1);
    --color-error: #dc3545;
    --color-error-light: rgba(220, 53, 69, 0.1);
    --color-info: #3b82f6;
    --color-info-light: rgba(59, 130, 246, 0.1);
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --bg-dark: var(--gray-950);
    --bg-dark-secondary: var(--gray-900);
    
    /* Text Colors */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --text-muted: var(--gray-400);
    --text-inverse: #ffffff;
    --text-inverse-secondary: rgba(255, 255, 255, 0.8);
    --text-inverse-muted: rgba(255, 255, 255, 0.6);
    
    /* Border Colors */
    --border-light: var(--gray-200);
    --border-default: var(--gray-300);
    --border-dark: var(--gray-400);
    --border-focus: var(--color-primary);
}

/* ============================================ */
/* 2. SPACING SCALE (8px Grid) */
/* ============================================ */

:root {
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-14: 56px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;
    --space-32: 128px;
    
    /* Component-specific spacing */
    --section-padding-sm: var(--space-16);
    --section-padding-md: var(--space-24);
    --section-padding-lg: var(--space-32);
    --card-padding: var(--space-10);
    --card-padding-lg: var(--space-12);
    --input-padding-x: var(--space-4);
    --input-padding-y: var(--space-3);
    --btn-padding-x: var(--space-8);
    --btn-padding-y: var(--space-4);
}

/* ============================================ */
/* 3. TYPOGRAPHY TOKENS */
/* ============================================ */

:root {
    /* Font Family - Inter Only */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Font Sizes */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;
    --text-4xl: 40px;
    --text-5xl: 48px;
    --text-6xl: 64px;
    --text-7xl: 72px;
    
    /* Heading Sizes */
    --text-hero: var(--text-6xl);
    --text-h1: var(--text-5xl);
    --text-h2: var(--text-4xl);
    --text-h3: var(--text-2xl);
    --text-h4: var(--text-xl);
    --text-h5: var(--text-lg);
    --text-body: var(--text-base);
    --text-caption: var(--text-sm);
    
    /* Font Weights */
    --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.15;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 1.75;
    
    /* 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;
}

/* ============================================ */
/* 4. SHADOW TOKENS */
/* ============================================ */

:root {
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.16);
    
    /* Colored Shadows */
    --shadow-primary: 0 8px 24px rgba(196, 30, 40, 0.25);
    --shadow-primary-lg: 0 16px 48px rgba(196, 30, 40, 0.35);
    
    /* Glow Effects */
    --glow-primary: 0 0 32px rgba(196, 30, 40, 0.2);
    --glow-primary-intense: 0 0 48px rgba(196, 30, 40, 0.35);
}

/* ============================================ */
/* 5. BORDER RADIUS TOKENS */
/* ============================================ */

:root {
    --radius-none: 0;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;
    
    /* Component-specific */
    --radius-btn: var(--radius-lg);
    --radius-input: var(--radius-lg);
    --radius-card: var(--radius-2xl);
    --radius-badge: var(--radius-full);
}

/* ============================================ */
/* 6. TRANSITION TOKENS */
/* ============================================ */

:root {
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 400ms ease;
    --transition-slowest: 500ms ease;
    
    /* Easing Functions */
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================ */
/* 7. Z-INDEX SCALE */
/* ============================================ */

:root {
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-toast: 800;
}

/* ============================================ */
/* 8. BREAKPOINTS (Reference) */
/* ============================================ */

:root {
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-2xl: 1400px;
}

/* ============================================ */
/* 9. GRADIENTS */
/* ============================================ */

:root {
    /* Primary Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    --gradient-primary-intense: linear-gradient(135deg, var(--color-primary) 0%, #ff3d47 50%, var(--color-primary) 100%);
    
    /* Background Gradients */
    --gradient-dark: linear-gradient(135deg, var(--gray-950) 0%, var(--gray-900) 100%);
    --gradient-dark-radial: radial-gradient(circle at 30% 40%, rgba(196, 30, 40, 0.08) 0%, transparent 50%);
    
    /* Subtle Gradients */
    --gradient-subtle: linear-gradient(135deg, var(--gray-50) 0%, var(--bg-primary) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
}

/* ============================================ */
/* 10. FORCED DARK MODE */
/* Site always loads in dark mode */
/* ============================================ */

:root {
    color-scheme: dark;
    
    /* Theme colors - DARK MODE ONLY */
    --theme-bg: var(--gray-950);
    --theme-bg-secondary: var(--gray-900);
    --theme-bg-tertiary: var(--gray-800);
    --theme-text: #ffffff;
    --theme-text-secondary: rgba(255, 255, 255, 0.8);
    --theme-text-muted: rgba(255, 255, 255, 0.6);
    --theme-border: rgba(255, 255, 255, 0.1);
    --theme-card-bg: var(--gray-900);
    --theme-header-bg: var(--gray-900);
    
    /* Override semantic colors for dark mode */
    --bg-primary: var(--gray-950);
    --bg-secondary: var(--gray-900);
    --bg-tertiary: var(--gray-800);
    
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-400);
    --text-tertiary: var(--gray-500);
    
    --border-light: var(--gray-800);
    --border-default: var(--gray-700);
    --border-dark: var(--gray-600);
}

/* ============================================ */
/* 11. GLOBAL RESETS & BASE STYLES */
/* ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: dark;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-body);
    line-height: var(--leading-relaxed);
    color: #ffffff;
    background-color: #0d0f16;
    margin: 0;
    padding: 0;
}

/* Force dark mode - override any data-theme attributes */
[data-theme],
[data-theme="dark"],
[data-theme="light"] {
    background: #0d0f16 !important;
    color: #ffffff !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: var(--leading-tight);
    margin: 0 0 var(--space-4) 0;
}

h1 { font-size: var(--text-h1); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--text-h2); letter-spacing: var(--tracking-tight); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }

p {
    margin: 0 0 var(--space-4) 0;
    color: var(--text-secondary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

/* ============================================ */
/* 12. FOCUS STATES (Accessibility) */
/* ============================================ */

*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* Remove focus outline for mouse users */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

/* ============================================ */
/* END DESIGN TOKENS */
/* ============================================ */

