/**
 * BYD Shares and Stocks - CSS Custom Properties (Variables)
 * 
 * This file contains all design tokens used throughout the site.
 * Modify values here to change the entire site's appearance.
 * 
 * Structure:
 * 1. Color Palette (Light Theme)
 * 2. Dark Theme Overrides
 * 3. Typography
 * 4. Spacing
 * 5. Border Radius
 * 6. Shadows
 * 7. Transitions
 * 8. Z-Index
 * 9. Layout
 */

/* ============================================
   1. COLOR PALETTE - LIGHT THEME (Default)
   ============================================ */
:root {
  /* Primary Colors - Gold */
  --color-primary: #0fb780;
  --color-primary-light: #aec4d9;
  --color-primary-dark: #aec4d9;
  --color-primary-rgb: 212, 175, 55;

  /* Soft blue accent (used for subtle blobs/badges on Contact page) */
  --color-accent-soft-blue: #aec4d9;
  --color-accent-soft-blue-rgb: 174, 196, 217;

  /* Gradient accent (replace yellow 2nd stop with light blue) */
  --color-primary-gradient-2: #aec4d9;
  
  /* Background Colors */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F2F2F2;
  --color-bg-tertiary: #E8E8E8;
  --color-bg-elevated: #FFFFFF;
  
  /* Text Colors */
  --color-text-primary: #1A1A1A;
  --color-text-secondary: #555555;
  --color-text-muted: #888888;
  --color-text-inverse: #FFFFFF;
  
  /* Border Colors */
  --color-border-light: #E8E8E8;
  --color-border-medium: #D0D0D0;
  --color-border-dark: #A0A0A0;
  
  /* Status Colors */
  --color-success: #22C55E;
  --color-success-light: #DCFCE7;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-error: #EF4444;
  --color-error-light: #FEE2E2;
  --color-info: #3B82F6;
  --color-info-light: #DBEAFE;
  
  /* Gradients */
  --gradient-gold: linear-gradient(135deg, #0fb780 0%, var(--color-primary-gradient-2) 50%, #0fb780 100%);
  --gradient-gold-vertical: linear-gradient(180deg, #0fb780 0%, var(--color-primary-gradient-2) 100%);
  --gradient-hero: linear-gradient(180deg, #FFFFFF 0%, #F9F9F9 100%);
  --gradient-card: linear-gradient(145deg, #FFFFFF 0%, #F9F9F9 100%);
  
  /* Overlay */
  --color-overlay: rgba(0, 0, 0, 0.5);
  --color-overlay-light: rgba(0, 0, 0, 0.3);
}

/* ============================================
   2. DARK THEME OVERRIDES
   ============================================ */
[data-theme="dark"] {
  /* Primary Colors - Gold remains consistent for brand identity */
  --color-primary: #0fb780;
  --color-primary-light: #aec4d9;
  --color-primary-dark: #aec4d9;

  /* Soft blue accent (used for subtle blobs/badges on Contact page) */
  --color-accent-soft-blue: #aec4d9;
  --color-accent-soft-blue-rgb: 174, 196, 217;

  /* Gradient accent (replace yellow 2nd stop with light blue) */
  --color-primary-gradient-2: #aec4d9;
  
  /* Background Colors */
  --color-bg-primary: #0D0D0D;
  --color-bg-secondary: #151515;
  --color-bg-tertiary: #1F1F1F;
  --color-bg-elevated: #1A1A1A;
  
  /* Text Colors */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0B0B0;
  --color-text-muted: #707070;
  --color-text-inverse: #1A1A1A;
  
  /* Border Colors */
  --color-border-light: #2A2A2A;
  --color-border-medium: #3D3D3D;
  --color-border-dark: #505050;
  
  /* Status Colors - Adjusted for dark bg */
  --color-success-light: rgba(34, 197, 94, 0.15);
  --color-warning-light: rgba(245, 158, 11, 0.15);
  --color-error-light: rgba(239, 68, 68, 0.15);
  --color-info-light: rgba(59, 130, 246, 0.15);
  
  /* Gradients */
  --gradient-hero: linear-gradient(180deg, #0D0D0D 0%, #151515 100%);
  --gradient-card: linear-gradient(145deg, #1A1A1A 0%, #151515 100%);
  
  /* Overlay */
  --color-overlay: rgba(0, 0, 0, 0.7);
  --color-overlay-light: rgba(0, 0, 0, 0.5);
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
:root {
  /* Font Families */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Font Sizes */
  --text-display-1: 4.5rem;    /* 72px - Hero headlines */
  --text-display-2: 3.5rem;    /* 56px - Page titles */
  --text-h1: 3rem;             /* 48px - Section titles */
  --text-h2: 2.25rem;          /* 36px - Subsection titles */
  --text-h3: 1.75rem;          /* 28px - Card titles */
  --text-h4: 1.5rem;           /* 24px - Feature titles */
  --text-h5: 1.25rem;          /* 20px - Small titles */
  --text-h6: 1.125rem;         /* 18px - Labels */
  --text-body-lg: 1.125rem;    /* 18px - Large body */
  --text-body: 1rem;           /* 16px - Default body */
  --text-body-sm: 0.875rem;    /* 14px - Small body */
  --text-caption: 0.75rem;     /* 12px - Captions */
  
  /* Font Weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  
  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
}

/* ============================================
   4. SPACING
   ============================================ */
:root {
  /* Base spacing scale (4px grid) */
  --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-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-14: 3.5rem;    /* 56px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */
  
  /* Section spacing */
  --section-py: var(--space-24);
  --section-py-sm: var(--space-16);
  
  /* Component spacing */
  --card-padding: var(--space-6);
  --card-padding-lg: var(--space-8);
}

/* ============================================
   5. BORDER RADIUS
   ============================================ */
: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;
}

/* ============================================
   6. SHADOWS
   ============================================ */
:root {
  /* Elevation shadows */
  --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 -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  
  /* Component-specific shadows */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.1);
  --shadow-button: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-dropdown: 0 10px 40px rgba(0, 0, 0, 0.12);
  
  /* Gold glow for accent elements */
  --shadow-gold: 0 4px 20px rgba(174, 196, 217, 0.25);
  --shadow-gold-hover: 0 8px 30px rgba(174, 196, 217, 0.35);
  --shadow-gold-intense: 0 0 40px rgba(174, 196, 217, 0.4);
}

/* Dark theme shadow adjustments */
[data-theme="dark"] {
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-dropdown: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================
   7. TRANSITIONS
   ============================================ */
:root {
  /* Durations */
  --duration-instant: 0ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  --duration-slowest: 1000ms;
  
  /* Easings */
  --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-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Common transition presets */
  --transition-fast: all var(--duration-fast) var(--ease-out);
  --transition-normal: all var(--duration-normal) var(--ease-out);
  --transition-slow: all var(--duration-slow) var(--ease-out);
  
  /* Specific transitions */
  --transition-colors: 
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
  --transition-transform: transform var(--duration-normal) var(--ease-out);
  --transition-shadow: box-shadow var(--duration-normal) var(--ease-out);
  --transition-opacity: opacity var(--duration-normal) var(--ease-out);
}

/* ============================================
   8. Z-INDEX SCALE
   ============================================ */
:root {
  --z-behind: -1;
  --z-base: 0;
  --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;
}

/* ============================================
   9. LAYOUT
   ============================================ */
:root {
  /* Container */
  --container-max-width: 1200px;
  --container-padding: var(--space-6);
  --container-padding-sm: var(--space-4);
  
  /* Header */
  --header-height: 80px;
  --header-height-mobile: 64px;
  
  /* Grid */
  --grid-gap: var(--space-6);
  --grid-gap-sm: var(--space-4);
}

/* ============================================
   10. RESPONSIVE BREAKPOINTS (for reference)
   ============================================ */
/*
  --breakpoint-xs: 320px;   Mobile S
  --breakpoint-sm: 375px;   Mobile M
  --breakpoint-md: 768px;   Tablet
  --breakpoint-lg: 1024px;  Desktop
  --breakpoint-xl: 1200px;  Large Desktop
  --breakpoint-xxl: 1440px; Extra Large
*/

