/* TRIZEL — Design Token System
 * NASA/ESA-grade institutional color palette and spacing system
 * System fonts only, no external dependencies
 */

:root {
  /* ═══════════════════════════════════════════════════════════════
     COLOR TOKENS — Institutional Neutral Palette (NASA-grade)
     ═══════════════════════════════════════════════════════════════ */
  
  /* Background layers — Refined scientific grays */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;
  --color-surface-overlay: #fafbfc;
  
  /* Borders and dividers — Enhanced precision */
  --color-border: #cbd5e1;
  --color-border-light: #e2e8f0;
  --color-border-strong: #64748b;
  --color-border-accent: #0969da;
  
  /* Text hierarchy — NASA-grade readability */
  --color-text: #0f172a;
  --color-text-medium: #334155;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  --color-text-inverse: #ffffff;
  
  /* Accent — NASA institutional blue (WCAG AAA compliant) */
  --color-accent: #0b5fb8;
  --color-accent-hover: #084a8f;
  --color-accent-active: #063970;
  --color-accent-bg: #e0f2fe;
  --color-accent-border: #7dd3fc;
  
  /* Notice/Warning — Institutional amber (WCAG AA compliant) */
  --color-notice-bg: #fffbeb;
  --color-notice-border: #f59e0b;
  --color-notice-text: #78350f;
  --color-notice-heading: #92400e;
  
  /* Status colors — Scientific observatory palette */
  --color-success: #166534;
  --color-success-bg: #f0fdf4;
  --color-error: #991b1b;
  --color-error-bg: #fef2f2;
  --color-warning: #d97706;
  --color-warning-bg: #fef3c7;
  
  /* Info/Reference box — Enhanced clarity */
  --color-info-bg: #eff6ff;
  --color-info-border: #3b82f6;
  --color-info-text: #1e3a8a;
  --color-info-heading: #1e40af;
  
  /* ═══════════════════════════════════════════════════════════════
     SPACING SCALE — 4px base unit with fluid variants
     ═══════════════════════════════════════════════════════════════ */
  --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 */
  
  /* Fluid spacing — Viewport-responsive (Phase E.2) */
  --space-fluid-sm: clamp(0.5rem, 1vw, 1rem);
  --space-fluid-md: clamp(1rem, 2vw, 2rem);
  --space-fluid-lg: clamp(1.5rem, 3vw, 3rem);
  --space-fluid-xl: clamp(2rem, 4vw, 4rem);
  --space-fluid-2xl: clamp(3rem, 6vw, 6rem);
  
  /* ═══════════════════════════════════════════════════════════════
     TYPOGRAPHY SCALE — NASA-grade institutional typography
     ═══════════════════════════════════════════════════════════════ */
  
  /* Font families — System fonts for maximum clarity and performance */
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', 'Courier New', monospace;
  
  /* Font sizes — Refined type scale for scientific content */
  --text-xs: 0.75rem;      /* 12px — Captions, metadata */
  --text-sm: 0.875rem;     /* 14px — Supporting text */
  --text-base: 1rem;       /* 16px — Body text (optimal readability) */
  --text-lg: 1.125rem;     /* 18px — Lead paragraphs */
  --text-xl: 1.25rem;      /* 20px — H6, subsection headings */
  --text-2xl: 1.5rem;      /* 24px — H5, section headings */
  --text-3xl: 1.875rem;    /* 30px — H4, major sections */
  --text-4xl: 2.25rem;     /* 36px — H3, primary sections */
  --text-5xl: 3rem;        /* 48px — H2, page titles */
  --text-6xl: 3.75rem;     /* 60px — H1, hero titles */
  
  /* Fluid typography — Viewport-responsive (Phase E.2) */
  --text-fluid-xs: clamp(0.7rem, 1.2vw, 0.75rem);
  --text-fluid-sm: clamp(0.8rem, 1.5vw, 0.875rem);
  --text-fluid-base: clamp(0.875rem, 1.8vw, 1rem);
  --text-fluid-lg: clamp(1rem, 2vw, 1.125rem);
  --text-fluid-xl: clamp(1.125rem, 2.5vw, 1.25rem);
  --text-fluid-2xl: clamp(1.25rem, 3vw, 1.5rem);
  --text-fluid-3xl: clamp(1.5rem, 4vw, 1.875rem);
  --text-fluid-4xl: clamp(1.75rem, 5vw, 2.25rem);
  --text-fluid-5xl: clamp(2rem, 6vw, 3rem);
  --text-fluid-6xl: clamp(2.25rem, 7vw, 3.75rem);
  
  /* Font weights — Precise institutional hierarchy */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line heights — Optimized for research content readability */
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.7;
  --leading-loose: 1.8;
  
  /* Letter spacing — Precision tuning for professional appearance */
  --tracking-tighter: -0.03em;
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.04em;
  --tracking-widest: 0.08em;
  
  /* ═══════════════════════════════════════════════════════════════
     LAYOUT TOKENS — NASA-grade precision
     ═══════════════════════════════════════════════════════════════ */
  
  /* Border radius — Subtle, professional curves */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  
  /* Shadow — Refined institutional elevation system */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-reverse-sm: 0 -1px 3px 0 rgba(15, 23, 42, 0.04);
  
  /* Container widths — Research-grade content layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;
  --container-max: 1600px;  /* Ultra-wide maximum */
  
  /* Content max-width for optimal readability (Phase E.2 enhanced) */
  --content-max-width: 75ch;
  --content-max-width-wide: 90ch;
  --content-max-width-narrow: 60ch;
  
  /* Responsive breakpoints (Phase E.2) */
  --breakpoint-mobile: 320px;
  --breakpoint-mobile-lg: 430px;
  --breakpoint-tablet: 768px;
  --breakpoint-tablet-lg: 1024px;
  --breakpoint-desktop: 1280px;
  --breakpoint-desktop-lg: 1920px;
  --breakpoint-ultrawide: 2560px;
  
  /* ═══════════════════════════════════════════════════════════════
     TRANSITIONS — Phase E.3: NASA-grade institutional timing
     ═══════════════════════════════════════════════════════════════ */
  --transition-fast: 120ms ease-out;
  --transition-base: 150ms ease-out;
  --transition-slow: 180ms cubic-bezier(0.2, 0, 0, 1);
  
  /* Focus ring enhancement — High visibility for keyboard navigation */
  --focus-ring-width: 3px;
  --focus-ring-color: rgba(11, 95, 184, 0.4);
  --focus-ring-offset-width: 2px;
  --focus-offset-color: var(--color-surface);
}
