/**
 * Gensoft Enterprise Design System: Master Design Tokens
 * Conforms to WCAG 2.2 AA and 60-30-10 Enterprise Color Rule
 */
:root {
  /* ══════════════════════════════════════════════════════════
     1. COLOR SYSTEM (60-30-10 Rule)
     ══════════════════════════════════════════════════════════ */
  
  /* 30% Primary Brand (Navigation, key structural accents, headings) */
  --gs-primary: #1d4ed8;
  --gs-primary-hover: #1e40af;
  --gs-primary-active: #172554;
  --gs-primary-subtle: #eff6ff;
  --gs-primary-100: #dbeafe;
  --gs-navy: #0b1b33;
  --gs-navy-light: #162a4a;

  /* Legacy compatibility bridge */
  --gs-blue: var(--gs-primary);
  --gs-blue-hover: var(--gs-primary-hover);
  --gs-blue-light: var(--gs-primary-subtle);

  /* 10% Accent (CTAs, interactive buttons, conversion highlights) */
  --gs-accent: #f97316;
  --gs-accent-hover: #ea580c;
  --gs-accent-active: #c2410c;
  --gs-accent-subtle: #fff7ed;
  --gs-accent-100: #ffedd5;
  --gs-amber: #f59e0b;

  /* 60% Neutrals & Surfaces */
  --gs-bg: #ffffff;
  --gs-surface: #f8fafc;
  --gs-surface-alt: #f1f5f9;
  --gs-surface-dark: #0f172a;
  --gs-border: #e2e8f0;
  --gs-border-subtle: #f1f5f9;
  --gs-border-strong: #cbd5e1;
  --gs-light: #f8fafc;

  /* Accessible Text Scale (WCAG 2.2 AA Contrast >= 4.5:1 on light) */
  --gs-text: #0f172a;            /* Contrast 16.1:1 on #ffffff */
  --gs-text-secondary: #334155;  /* Contrast 9.6:1 on #ffffff */
  --gs-text-muted: #475569;      /* Contrast 7.1:1 on #ffffff */
  --gs-text-light: #64748b;      /* Contrast 4.6:1 on #ffffff */
  --gs-text-inverse: #ffffff;

  /* Semantic Feedback Tokens */
  --gs-success: #16a34a;
  --gs-success-subtle: #f0fdf4;
  --gs-warning: #d97706;
  --gs-warning-subtle: #fffbeb;
  --gs-error: #dc2626;
  --gs-error-subtle: #fef2f2;
  --gs-info: #0284c7;
  --gs-info-subtle: #f0f9ff;

  /* ══════════════════════════════════════════════════════════
     2. TYPOGRAPHY SYSTEM
     ══════════════════════════════════════════════════════════ */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Fluid Clamped Headings */
  --text-h1: clamp(2.1rem, 3.8vw + 0.9rem, 3.4rem);
  --text-h2: clamp(1.75rem, 2.4vw + 0.9rem, 2.5rem);
  --text-h3: clamp(1.25rem, 1.4vw + 0.8rem, 1.75rem);
  --text-h4: clamp(1.1rem, 0.8vw + 0.85rem, 1.35rem);
  --text-lead: clamp(1.05rem, 0.4vw + 0.95rem, 1.2rem);
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-xs: 0.75rem;

  /* Line Heights */
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  /* Max Measure (Line Length 60-80 Characters) */
  --max-ch: 68ch;

  /* ══════════════════════════════════════════════════════════
     3. SPACING SYSTEM (8px Base Scale)
     ══════════════════════════════════════════════════════════ */
  --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.5rem;   /* 24px */
  --space-6: 2rem;     /* 32px */
  --space-8: 3rem;     /* 48px */
  --space-10: 4rem;    /* 64px */
  --space-12: 5rem;    /* 80px */
  --space-16: 6rem;    /* 96px */

  /* Section Vertical Paddings */
  --section-pad-desktop: clamp(3.5rem, 6vw, 6rem);
  --section-pad-mobile: clamp(2.5rem, 4vw, 3.5rem);

  /* ══════════════════════════════════════════════════════════
     4. SHAPE & ELEVATION
     ══════════════════════════════════════════════════════════ */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px -1px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 20px 40px -8px rgba(15, 23, 42, 0.16);

  /* ══════════════════════════════════════════════════════════
     5. INTERACTIVE & MOTION
     ══════════════════════════════════════════════════════════ */
  --touch-target-min: 44px;
  --focus-ring-width: 3px;
  --focus-ring-offset: 3px;
  --focus-ring-color: var(--gs-primary);

  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Token Mapping */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"], [data-theme="dark"] {
    --gs-bg: #0b1220;
    --gs-surface: #111a2e;
    --gs-surface-alt: #162238;
    --gs-border: #1e293b;
    --gs-border-subtle: #172439;
    --gs-border-strong: #334155;

    --gs-text: #f8fafc;
    --gs-text-secondary: #e2e8f0;
    --gs-text-muted: #94a3b8;
    --gs-text-light: #64748b;

    --gs-primary: #60a5fa;
    --gs-primary-hover: #93c5fd;
    --gs-primary-subtle: #1e293b;

    --gs-accent: #fb923c;
    --gs-accent-hover: #fdba74;
    --gs-accent-subtle: #2d1808;
  }
}

/* Reduced Motion Preference (WCAG 2.2 AA Guideline 2.3.3) */
@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;
  }
}
