/**
 * COPO Design System - Brand Design Tokens
 * Court of Public Opinion - YOU BE THE JUDGE
 * 
 * Version: 1.0.0
 * Created: 2025-12-15
 * 
 * This is the single source of truth for all brand design elements.
 * All pages and components should import and reference these tokens.
 * Do NOT override these values directly in component styles.
 */

:root {
    /* ========================================
       BRAND COLORS
       ======================================== */
    
    /* Primary Brand Colors */
    --copo-blue: #546DB4;
    --copo-blue-dark: #3D5391;          /* Darker shade for hover states */
    --copo-blue-light: #7B99CC;         /* Lighter shade for backgrounds */ 
    --copo-blue-pale: #E8EEF7;          /* Very light for subtle backgrounds */
    
    --copo-red: #DA0000;
    --copo-red-dark: #B00000;           /* Darker shade for hover states */
    --copo-red-light: #FF4444;          /* Lighter shade for backgrounds */
    
    --copo-charcoal: #434343;
    --copo-charcoal-dark: #2A2A2A;      /* Darker shade for hover states */
    --copo-charcoal-light: #666666;     /* Lighter shade for text */
    
    --copo-green: #00da52;     /* Green for buttons */


    /* Neutrals & Grays */
    --copo-black: #000000;
    --copo-white: #FFFFFF;
    --copo-gray-100: #F9FAFB;
    --copo-gray-200: #E5E7EB;
    --copo-gray-300: #D1D5DB;
    --copo-gray-400: #9CA3AF;
    --copo-gray-500: #6B7280;
    --copo-gray-600: #4B5563;
    --copo-gray-700: #374151;
    --copo-gray-800: #1F2937;
    --copo-gray-900: #111827;
    
    /* Semantic Colors */
    --color-success: #059669;
    --color-success-light: #D1FAE5;
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-error: #DC2626;
    --color-error-light: #FEE2E2;
    --color-info: #0969DA;
    --color-info-light: #DBEAFE;
    
    /* ========================================
       TYPOGRAPHY
       ======================================== */
    
    /* Font Families */
    --font-heading: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", 
                    "Helvetica Neue", Arial, sans-serif;
    --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", 
                 "Helvetica Neue", Arial, sans-serif;
    --font-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-regular: 400;     /* Body text */
    --font-weight-medium: 500;      /* Slightly emphasized */
    --font-weight-bold: 700;        /* Headings */
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Letter Spacing */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    
    /* ========================================
       SPACING SCALE
       ======================================== */
    
    --spacing-unit: 8px;
    --spacing-0: 0;
    --spacing-1: calc(var(--spacing-unit) * 0.5);    /* 4px */
    --spacing-2: var(--spacing-unit);                 /* 8px */
    --spacing-3: calc(var(--spacing-unit) * 1.5);    /* 12px */
    --spacing-4: calc(var(--spacing-unit) * 2);      /* 16px */
    --spacing-5: calc(var(--spacing-unit) * 2.5);    /* 20px */
    --spacing-6: calc(var(--spacing-unit) * 3);      /* 24px */
    --spacing-8: calc(var(--spacing-unit) * 4);      /* 32px */
    --spacing-10: calc(var(--spacing-unit) * 5);     /* 40px */
    --spacing-12: calc(var(--spacing-unit) * 6);     /* 48px */
    --spacing-16: calc(var(--spacing-unit) * 8);     /* 64px */
    --spacing-20: calc(var(--spacing-unit) * 10);    /* 80px */
    --spacing-24: calc(var(--spacing-unit) * 12);    /* 96px */
    
    /* ========================================
       LAYOUT
       ======================================== */
    
--page-max-width: 1400px;           /* Overall page constraint */
--container-max-width: 1400px;       /* Content container */
--container-padding: var(--spacing-4);
--header-height: 60px;
--subject-menu-height: 48px;
--sidebar-width: 300px;
    
    /* ========================================
       BORDERS
       ======================================== */
    
    --border-width-thin: 0.25px;     /* Thin separator lines */
    --border-width-base: 0.25px;
    --border-width-thick: 0.25px;
    --border-color: var(--copo-gray-300);
    --border-color-light: var(--copo-gray-300);
    
    /* Border Radius - ALWAYS 0 for panels, modals, page sections */
    --radius-none: 0;
    --radius-sm: 4px;               /* For buttons only */
    --radius-md: 6px;               /* For buttons only */
    --radius-lg: 8px;               /* For buttons only */
    --radius-full: 9999px;          /* For circular elements */
    
    /* ========================================
       SHADOWS
       ======================================== */
    
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 
                 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* ========================================
       TRANSITIONS
       ======================================== */
    
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ========================================
       Z-INDEX SCALE
       ======================================== */
    
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    
    /* ========================================
       TOUCH TARGETS
       ======================================== */
    
    --touch-target-min: 44px;       /* Minimum touch target size */
    --button-height-sm: 36px;
    --button-height-md: 44px;
    --button-height-lg: 52px;
    
    /* ========================================
       BREAKPOINTS
       ======================================== */
    
    --breakpoint-sm: 480px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1400px;
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--copo-black);
    background-color: var(--copo-white);
}

/* Heading defaults */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-4);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

/* Link defaults */
a {
    color: var(--copo-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--copo-blue-dark);
}

/* Focus outline for accessibility */
:focus-visible {
    outline: 2px solid var(--copo-blue);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}