/* 
 * FlashForge Pro Design Tokens
 * B2B 3D Printer Brand — Industrial Precision + Maker Accessibility
 */

:root {
  /* ====== Color System ====== */
  
  /* Primary - Deep Charcoal (not pure black) */
  --color-primary: #1a1a1a;
  --color-primary-light: #2d2d2d;
  --color-primary-lighter: #404040;
  
  /* Secondary - Warm White */
  --color-secondary: #f8f7f4;
  --color-secondary-dark: #e5e4e1;
  --color-secondary-darker: #d1d0cd;
  
  /* Accent - Industrial Orange */
  --color-accent: #e85d2a;
  --color-accent-light: #f0734a;
  --color-accent-dark: #c94b1d;
  --color-accent-bg: rgba(232, 93, 42, 0.08);
  
  /* Neutral Grays */
  --color-gray-50: #f9fafb;
  --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: #14b8a6;
  --color-success-bg: rgba(20, 184, 166, 0.08);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.08);
  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.08);
  --color-info: #3b82f6;
  --color-info-bg: rgba(59, 130, 246, 0.08);
  
  /* Text Colors */
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #4b5563;
  --color-text-tertiary: #6b7280;
  --color-text-inverse: #ffffff;
  --color-text-link: #e85d2a;
  
  /* Background Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8f7f4;
  --color-bg-tertiary: #f3f4f6;
  --color-bg-dark: #1a1a1a;
  --color-bg-accent: rgba(232, 93, 42, 0.08);
  
  /* Border Colors */
  --color-border: #e5e7eb;
  --color-border-dark: #d1d5db;
  --color-border-accent: #e85d2a;
  
  /* ====== Typography ====== */
  
  /* Font Families */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  
  /* Font Sizes */
  --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-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* 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.025em;
  --tracking-tight: -0.0125em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  
  /* ====== Spacing ====== */
  
  /* Base spacing scale (8px 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-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
  
  /* ====== Layout ====== */
  
  /* Container widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  
  /* Section spacing */
  --section-spacing-desktop: 96px;
  --section-spacing-mobile: 64px;
  
  /* ====== Borders & Shadows ====== */
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows - Subtle elevation system */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 12px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 12px 20px rgba(0, 0, 0, 0.1), 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.12), 0 24px 60px rgba(0, 0, 0, 0.1);
  
  /* Interactive shadows */
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-focus: 0 0 0 3px rgba(232, 93, 42, 0.3);
  --shadow-active: 0 2px 4px rgba(0, 0, 0, 0.06);
  
  /* ====== Transitions ====== */
  
  /* Timing */
  --transition-fast: 150ms;
  --transition-base: 200ms;
  --transition-slow: 300ms;
  --transition-slower: 500ms;
  
  /* Easing */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  
  /* ====== Z-Index Scale ====== */
  
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  
  /* ====== Breakpoints ====== */
  
  /* Mobile-first breakpoints */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1200px;
  --bp-2xl: 1400px;
}

/* ====== Dark Mode Support (Optional) ====== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-primary: #1a1a1a;
    --color-bg-secondary: #2d2d2d;
    --color-bg-tertiary: #404040;
    --color-text-primary: #f8f7f4;
    --color-text-secondary: #d1d0cd;
    --color-text-tertiary: #9ca3af;
    --color-border: #404040;
    --color-border-dark: #2d2d2d;
  }
}

/* ====== Base Styles ====== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
}

/* ====== Typography Utilities ====== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--transition-base) var(--ease-in-out);
}

a:hover {
  color: var(--color-accent-dark);
}

/* ====== Layout Utilities ====== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--section-spacing-desktop) 0;
}

@media (max-width: 768px) {
  .section {
    padding: var(--section-spacing-mobile) 0;
  }
}

/* ====== Accessibility ====== */

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: white;
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-skip-link);
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: 0;
}

/* ====== Print Styles ====== */

@media print {
  body {
    background: white;
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
  
  .no-print {
    display: none !important;
  }
}
