/* GraymatterLab Design System - Official Brand Implementation
 * Aligned with the Unified Design System (workspace/agent-hub-styles/)
 * See docs/WEBSITE_STYLE_GUIDE.md for usage documentation
 */

/* === SELF-HOSTED FONTS === */
/* Inter - Primary Font */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/inter-latin-800-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/inter-latin-900-normal.woff2') format('woff2');
}

/* Space Mono - Monospace Font */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/space-mono-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-mono-latin-700-normal.woff2') format('woff2');
}

/* Core Brand Colors - Official Palette */
:root {
  /* === BRAND IDENTITY === */
  --gms-matte-black: #1e1e1e;
  --gms-gunmetal-gray: #3b3b3b;
  --gms-silver-gray: #d0d0d0;
  --gms-bright-blue: #00aae7;
  /* Accessible variant for text on white - passes WCAG AA 4.5:1 contrast ratio */
  --gms-bright-blue-accessible: #007aa0;
  --gms-papaya-orange: #ffa613;
  --gms-white: #ffffff;
  --gms-black: #000000;

  /* Primary Color Scale (dark theme based) */
  --gms-primary-50: #f8fafc;
  --gms-primary-100: #f1f5f9;
  --gms-primary-200: #e2e8f0;
  --gms-primary-300: #cbd5e1;
  --gms-primary-400: #94a3b8;
  --gms-primary-500: #64748b;
  --gms-primary-600: #475569;
  --gms-primary-700: #334155;
  --gms-primary-800: #1e293b;
  --gms-primary-900: #0f172a;
  --gms-primary: var(--gms-matte-black);

  /* Accent Color Scale (blue) */
  --gms-accent-50: #eff6ff;
  --gms-accent-100: #dbeafe;
  --gms-accent-200: #bfdbfe;
  --gms-accent-300: #93c5fd;
  --gms-accent-400: #60a5fa;
  --gms-accent-500: #3b82f6;
  --gms-accent-600: #2563eb;
  --gms-accent-700: #1d4ed8;
  --gms-accent-800: #1e40af;
  --gms-accent-900: #006687;
  --gms-accent: var(--gms-bright-blue);

  /* === NEUTRAL SCALE (from unified system) === */
  --gms-neutral-50: #fafafa;
  --gms-neutral-100: #f4f4f5;
  --gms-neutral-200: #e4e4e7;
  --gms-neutral-300: #d4d4d8;
  --gms-neutral-400: #a1a1aa;
  --gms-neutral-500: #71717a;
  --gms-neutral-600: #52525b;
  --gms-neutral-700: #3f3f46;
  --gms-neutral-800: #27272a;
  --gms-neutral-900: #18181b;

  /* === SEMANTIC STATUS COLORS === */
  --gms-success: #10b981;
  --gms-success-50: #ecfdf5;
  --gms-success-500: #10b981;
  --gms-success-600: #059669;
  --gms-warning: #f59e0b;
  --gms-warning-50: #fffbeb;
  --gms-warning-500: #f59e0b;
  --gms-warning-600: #d97706;
  --gms-error: #ef4444;
  --gms-error-50: #fef2f2;
  --gms-error-500: #ef4444;
  --gms-error-600: #dc2626;
  --gms-info: #06b6d4;
  --gms-info-50: #ecfeff;
  --gms-info-500: #06b6d4;
  --gms-info-600: #0891b2;
  --gms-purple: #8b5cf6;
  --gms-purple-50: #faf5ff;
  --gms-purple-500: #a855f7;
  --gms-purple-600: #8b5cf6;

  /* === BACKGROUND COLORS === */
  --gms-bg-primary: #fafafa;
  --gms-bg-secondary: #ffffff;
  --gms-bg-tertiary: var(--gms-neutral-100);
  --gms-bg-elevated: var(--gms-white);
  --gms-bg-surface: var(--gms-white);
  --gms-bg-subtle: var(--gms-neutral-50);
  --gms-bg-overlay: rgba(0, 0, 0, 0.6);

  /* === TEXT COLORS (WCAG 2.2 AA Compliant) === */
  --gms-text-primary: var(--gms-matte-black);
  --gms-text-secondary: var(--gms-gunmetal-gray);
  --gms-text-tertiary: var(--gms-neutral-500);
  /* Text accent uses accessible blue variant for WCAG AA compliance on white backgrounds */
  --gms-text-accent: var(--gms-bright-blue-accessible);
  --gms-text-inverse: var(--gms-white);
  --gms-text-disabled: var(--gms-neutral-400);

  /* === BORDER COLORS === */
  --gms-border-primary: var(--gms-neutral-200);
  --gms-border-secondary: var(--gms-neutral-300);
  --gms-border-focus: var(--gms-bright-blue);
  --gms-border-error: var(--gms-error);
  
  /* Typography Scale - Healthcare Optimized */
  --gms-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gms-font-mono: 'Space Mono', 'SF Mono', Monaco, monospace;
  
  /* Display Sizes (Marketing/Heroes) */
  --gms-display-xl: clamp(72px, 12vw, 144px);
  --gms-display-lg: clamp(48px, 8vw, 96px);
  --gms-display-md: clamp(36px, 6vw, 64px);
  
  /* Functional Sizes (Platform UI) */
  --gms-heading-1: 48px;
  --gms-heading-2: 36px;
  --gms-heading-3: 28px;
  --gms-heading-4: 24px;
  --gms-heading-5: 20px;
  
  /* Body Text */
  --gms-body-lg: 18px;
  --gms-body-md: 16px;
  --gms-body-sm: 14px;
  
  /* UI Elements */
  --gms-button-text: 16px;
  --gms-label: 14px;
  --gms-caption: 12px;
  
  /* Font Weights */
  --gms-font-black: 900;
  --gms-font-extrabold: 800;
  --gms-font-bold: 700;
  --gms-font-semibold: 600;
  --gms-font-medium: 500;
  --gms-font-normal: 400;
  --gms-font-light: 300;

  /* Line Heights (aligned with unified system) */
  --gms-leading-display: 0.9;      /* Display text (marketing) */
  --gms-leading-display-md: 0.95;  /* Medium display text */
  --gms-leading-display-sm: 1;     /* Small display text */
  --gms-leading-heading: 1.1;      /* H1 headers */
  --gms-leading-heading-2: 1.2;    /* H2 headers */
  --gms-leading-heading-3: 1.3;    /* H3 headers */
  --gms-leading-heading-4: 1.4;    /* H4-H5 headers */
  --gms-leading-body: 1.6;         /* Default body text */
  --gms-leading-body-lg: 1.7;      /* Large body text */
  --gms-leading-body-sm: 1.5;      /* Small body text */
  --gms-leading-ui: 1.4;           /* UI elements, captions */
  --gms-leading-none: 1;
  --gms-leading-tight: 1.25;
  --gms-leading-normal: 1.5;
  --gms-leading-relaxed: 1.625;
  --gms-leading-loose: 2;

  /* Letter Spacing (aligned with unified system) */
  --gms-tracking-display: -0.04em;    /* XL display text */
  --gms-tracking-display-lg: -0.03em; /* Large display text */
  --gms-tracking-display-md: -0.02em; /* Medium display text */
  --gms-tracking-heading: -0.02em;    /* H1 headers */
  --gms-tracking-heading-2: -0.01em;  /* H2-H3 headers */
  --gms-tracking-normal: 0em;         /* Default/body text */
  --gms-tracking-ui: 0.01em;          /* UI elements */
  --gms-tracking-wide: 0.025em;       /* Wide spacing */
  
  /* Spacing Scale (Consistent Rhythm - aligned with unified system) */
  --gms-space-0: 0;
  --gms-space-px: 1px;
  --gms-space-0_5: 0.125rem; /* 2px */
  --gms-space-1: 0.25rem;    /* 4px */
  --gms-space-1_5: 0.375rem; /* 6px */
  --gms-space-2: 0.5rem;     /* 8px */
  --gms-space-2_5: 0.625rem; /* 10px */
  --gms-space-3: 0.75rem;    /* 12px */
  --gms-space-3_5: 0.875rem; /* 14px */
  --gms-space-4: 1rem;       /* 16px */
  --gms-space-5: 1.25rem;    /* 20px */
  --gms-space-6: 1.5rem;     /* 24px */
  --gms-space-7: 1.75rem;    /* 28px */
  --gms-space-8: 2rem;       /* 32px */
  --gms-space-9: 2.25rem;    /* 36px */
  --gms-space-10: 2.5rem;    /* 40px */
  --gms-space-11: 2.75rem;   /* 44px */
  --gms-space-12: 3rem;      /* 48px */
  --gms-space-14: 3.5rem;    /* 56px */
  --gms-space-16: 4rem;      /* 64px */
  --gms-space-20: 5rem;      /* 80px */
  --gms-space-24: 6rem;      /* 96px */
  --gms-space-28: 7rem;      /* 112px */
  --gms-space-32: 8rem;      /* 128px */

  /* Semantic Spacing Aliases */
  --gms-space-xs: var(--gms-space-2);  /* 8px */
  --gms-space-sm: var(--gms-space-3);  /* 12px */
  --gms-space-md: var(--gms-space-4);  /* 16px */
  --gms-space-lg: var(--gms-space-6);  /* 24px */
  --gms-space-xl: var(--gms-space-8);  /* 32px */
  --gms-space-2xl: var(--gms-space-12); /* 48px */
  --gms-space-3xl: var(--gms-space-16); /* 64px */
  
  /* Component Dimensions - WCAG 2.2 AA Compliance */
  --gms-touch-target-min: 44px;
  --gms-button-height: 44px;
  
  /* Border Radius (aligned with unified system) */
  --gms-radius-none: 0;
  --gms-radius-sm: 0.125rem;  /* 2px */
  --gms-radius-base: 0.25rem; /* 4px */
  --gms-radius-md: 0.375rem;  /* 6px */
  --gms-radius-lg: 0.5rem;    /* 8px */
  --gms-radius-xl: 0.75rem;   /* 12px */
  --gms-radius-2xl: 1rem;     /* 16px */
  --gms-radius-3xl: 1.5rem;   /* 24px */
  --gms-radius-full: 9999px;

  /* Border Width */
  --gms-border-base: 1px;

  /* Card Dimensions */
  --gms-card-padding: var(--gms-space-6);
  --gms-card-border-radius: var(--gms-radius-2xl);
  
  /* === SHADOWS (from unified system) === */
  --gms-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --gms-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --gms-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --gms-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --gms-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --gms-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --gms-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --gms-shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --gms-shadow-button: 0 2px 4px rgba(0, 0, 0, 0.1);
  --gms-shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

  /* === TRANSITIONS (from unified system) === */
  --gms-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --gms-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --gms-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --gms-transition-smooth: 300ms cubic-bezier(0.25, 0.1, 0.25, 1);

  /* === ACCESSIBILITY (WCAG 2.2 AA) === */
  --gms-focus-ring-width: 2px;
  --gms-focus-ring-offset: 2px;
  --gms-focus-ring-color: var(--gms-bright-blue);
  --gms-focus-ring-style: solid;

  /* === Z-INDEX SCALE === */
  --gms-z-dropdown: 1000;
  --gms-z-sticky: 1020;
  --gms-z-fixed: 1030;
  --gms-z-modal-backdrop: 1040;
  --gms-z-modal: 1050;
  --gms-z-popover: 1060;
  --gms-z-tooltip: 1070;
  --gms-z-toast: 1080;

  /* === LAYOUT DIMENSIONS === */
  --gms-header-height: 80px;
  --gms-content-max-width: 1400px;
  --gms-sidebar-width: 320px;

  /* Legacy status color aliases */
  --gms-status-success: var(--gms-success);
  --gms-status-warning: var(--gms-warning);
  --gms-status-error: var(--gms-error);
  --gms-status-info: var(--gms-info);
}

/* === DARK MODE SUPPORT === */
[data-theme='dark'] {
  /* Backgrounds */
  --gms-bg-primary: #0f0f0f;
  --gms-bg-secondary: #1a1a1a;
  --gms-bg-tertiary: #2d2d2d;
  --gms-bg-elevated: #1f1f1f;
  --gms-bg-surface: #1a1a1a;
  --gms-bg-subtle: #242424;
  --gms-bg-overlay: rgba(0, 0, 0, 0.8);

  /* Text */
  --gms-text-primary: var(--gms-white);
  --gms-text-secondary: #d1d5db;
  --gms-text-tertiary: var(--gms-neutral-400);
  --gms-text-accent: #60a5fa;
  --gms-text-inverse: var(--gms-matte-black);

  /* Borders */
  --gms-border-primary: #404040;
  --gms-border-secondary: #525252;
  --gms-border-focus: #60a5fa;

  /* Shadows (darker for dark mode) */
  --gms-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.5);
  --gms-shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 10px 10px -5px rgba(0, 0, 0, 0.6);
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Account for fixed header */
}

body {
  font-family: var(--gms-font-sans);
  font-size: var(--gms-body-md);
  font-weight: var(--gms-font-normal);
  line-height: 1.6;
  color: var(--gms-text-primary);
  background-color: var(--gms-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography System (aligned with unified system tokens) */
.display-xl {
  font-size: var(--gms-display-xl);
  font-weight: var(--gms-font-black);
  line-height: var(--gms-leading-display);
  letter-spacing: var(--gms-tracking-display);
}

.display-lg {
  font-size: var(--gms-display-lg);
  font-weight: var(--gms-font-normal);
  line-height: var(--gms-leading-display-md);
  letter-spacing: var(--gms-tracking-display-lg);
}

.display-md {
  font-size: var(--gms-display-md);
  font-weight: var(--gms-font-bold);
  line-height: var(--gms-leading-heading);
  letter-spacing: var(--gms-tracking-heading);
}

.heading-1 {
  font-size: var(--gms-heading-1);
  font-weight: var(--gms-font-bold);
  line-height: var(--gms-leading-heading);
  letter-spacing: var(--gms-tracking-heading);
}

.heading-2 {
  font-size: var(--gms-heading-2);
  font-weight: var(--gms-font-bold);
  line-height: var(--gms-leading-heading-2);
  letter-spacing: var(--gms-tracking-heading-2);
}

.heading-3 {
  font-size: var(--gms-heading-3);
  font-weight: var(--gms-font-semibold);
  line-height: var(--gms-leading-heading-3);
  letter-spacing: var(--gms-tracking-heading-2);
}

.heading-4 {
  font-size: var(--gms-heading-4);
  font-weight: var(--gms-font-semibold);
  line-height: var(--gms-leading-heading-4);
}

.heading-5 {
  font-size: var(--gms-heading-5);
  font-weight: var(--gms-font-semibold);
  line-height: var(--gms-leading-heading-4);
}

.body-lg {
  font-size: var(--gms-body-lg);
  font-weight: var(--gms-font-normal);
  line-height: var(--gms-leading-body-lg);
}

.body-md {
  font-size: var(--gms-body-md);
  font-weight: var(--gms-font-normal);
  line-height: var(--gms-leading-body);
}

.body-sm {
  font-size: var(--gms-body-sm);
  font-weight: var(--gms-font-normal);
  line-height: var(--gms-leading-body-sm);
}

.button-text {
  font-size: var(--gms-button-text);
  font-weight: var(--gms-font-semibold);
  letter-spacing: var(--gms-tracking-ui);
}

.label {
  font-size: var(--gms-label);
  font-weight: var(--gms-font-medium);
  letter-spacing: var(--gms-tracking-ui);
}

.caption {
  font-size: var(--gms-caption);
  font-weight: var(--gms-font-normal);
  line-height: var(--gms-leading-ui);
}

/* Button Components - Hierarchy (aligned with unified system) */
.gms-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gms-space-2);
  height: var(--gms-button-height);
  min-width: var(--gms-touch-target-min);
  padding: 0 var(--gms-space-4);
  border: none;
  border-radius: var(--gms-radius-lg);
  font-family: var(--gms-font-sans);
  font-size: var(--gms-button-text);
  font-weight: var(--gms-font-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--gms-transition-base);
  box-shadow: var(--gms-shadow-button);
}

.gms-button:focus-visible {
  outline: var(--gms-focus-ring-width) var(--gms-focus-ring-style) var(--gms-focus-ring-color);
  outline-offset: var(--gms-focus-ring-offset);
}

.gms-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button - Accent color (bright blue) for marketing CTAs */
.gms-button--primary {
  background: var(--gms-bright-blue);
  color: var(--gms-white);
}

.gms-button--primary:hover:not(:disabled) {
  background: var(--gms-accent-600);
  transform: translateY(-1px);
  box-shadow: var(--gms-shadow-md);
}

/* Secondary Button - Matte black for secondary actions */
.gms-button--secondary {
  background: var(--gms-gunmetal-gray);
  color: var(--gms-white);
}

.gms-button--secondary:hover:not(:disabled) {
  background: var(--gms-matte-black);
  transform: translateY(-1px);
}

/* Critical Button - Orange for urgent actions (use sparingly) */
.gms-button--critical {
  background: var(--gms-papaya-orange);
  color: var(--gms-matte-black);
}

.gms-button--critical:hover:not(:disabled) {
  background: var(--gms-warning-600);
  transform: translateY(-1px);
}

/* Outline Button - For tertiary actions */
.gms-button--outline {
  background: transparent;
  color: var(--gms-bright-blue);
  border: 2px solid var(--gms-bright-blue);
  box-shadow: none;
}

.gms-button--outline:hover:not(:disabled) {
  background: var(--gms-bright-blue);
  color: var(--gms-white);
}

/* Ghost Button - Minimal style */
.gms-button--ghost {
  background: transparent;
  color: var(--gms-text-secondary);
  box-shadow: none;
}

.gms-button--ghost:hover:not(:disabled) {
  background: var(--gms-bg-secondary);
  color: var(--gms-text-primary);
}

/* Tertiary Button - Text-like */
.gms-button--tertiary {
  background: transparent;
  color: var(--gms-text-secondary);
  border: none;
  padding: var(--gms-space-2) var(--gms-space-3);
  min-height: var(--gms-touch-target-min);
  box-shadow: none;
}

.gms-button--tertiary:hover:not(:disabled) {
  color: var(--gms-text-primary);
  background: var(--gms-bg-secondary);
  text-decoration: none;
}

/* Button Sizes */
.gms-button--sm {
  height: 32px;
  padding: 0 var(--gms-space-3);
  font-size: var(--gms-caption);
}

.gms-button--lg {
  height: 48px;
  padding: 0 var(--gms-space-6);
  font-size: var(--gms-body-md);
}

/* Form Controls */
.gms-form-control {
  min-height: var(--gms-touch-target-min);
  padding: var(--gms-space-2) var(--gms-space-3);
  border: 1px solid var(--gms-border-secondary);
  border-radius: var(--gms-radius-md);
  font-family: var(--gms-font-sans);
  font-size: var(--gms-body-sm);
  color: var(--gms-text-primary);
  background: var(--gms-bg-secondary);
  transition: all var(--gms-transition-base);
}

.gms-form-control:focus {
  outline: var(--gms-focus-ring-width) var(--gms-focus-ring-style) var(--gms-focus-ring-color);
  outline-offset: var(--gms-focus-ring-offset);
  border-color: var(--gms-border-focus);
  box-shadow: 0 0 0 2px rgba(0, 170, 231, 0.2);
}

.gms-form-control::placeholder {
  color: var(--gms-text-tertiary);
}

/* Form Input Variants */
.gms-form-control--light {
  background: var(--gms-white);
  color: var(--gms-text-primary);
}

/* Contact Form Specific Styles */
.gms-contact-form {
  background: rgba(0, 170, 231, 0.08);
  border: none;
  border-radius: var(--gms-radius-lg);
  padding: var(--gms-space-8);
}

.gms-contact-form .form-input,
.gms-contact-form .form-textarea,
.gms-contact-form .form-select {
  background: var(--gms-white);
  color: var(--gms-text-primary);
}

.gms-contact-form .form-textarea {
  min-height: 100px;
}

/* Card Component (aligned with unified system) */
.gms-card {
  background: var(--gms-bg-elevated);
  border: var(--gms-border-base) solid var(--gms-border-primary);
  border-radius: var(--gms-card-border-radius);
  padding: var(--gms-card-padding);
  transition: var(--gms-transition-smooth);
  box-shadow: var(--gms-shadow-card);
}

.gms-card:hover {
  border-color: var(--gms-border-secondary);
  box-shadow: var(--gms-shadow-card-hover);
  transform: translateY(-2px);
}

.gms-card--interactive {
  cursor: pointer;
}

.gms-card--interactive:hover {
  border-color: var(--gms-accent);
}

.gms-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gms-space-md);
  padding-bottom: var(--gms-space-md);
  border-bottom: var(--gms-border-base) solid var(--gms-border-primary);
}

.gms-card__title {
  font-size: var(--gms-body-lg);
  font-weight: var(--gms-font-semibold);
  color: var(--gms-text-primary);
  margin: 0;
}

.gms-card__content {
  color: var(--gms-text-secondary);
  line-height: var(--gms-leading-relaxed);
}

.gms-card__footer {
  margin-top: var(--gms-space-md);
  padding-top: var(--gms-space-md);
  border-top: var(--gms-border-base) solid var(--gms-border-primary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--gms-space-2);
}

/* Badge Component */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--gms-space-1) var(--gms-space-2);
  font-size: var(--gms-caption);
  font-weight: var(--gms-font-medium);
  line-height: var(--gms-leading-ui);
  color: var(--gms-text-secondary);
  background: var(--gms-bg-tertiary);
  border-radius: var(--gms-radius-md);
  white-space: nowrap;
}

.badge--success {
  color: var(--gms-success-600);
  background: var(--gms-success-50);
}

.badge--warning {
  color: var(--gms-warning-600);
  background: var(--gms-warning-50);
}

.badge--error {
  color: var(--gms-error-600);
  background: var(--gms-error-50);
}

.badge--info {
  color: var(--gms-info-600);
  background: var(--gms-info-50);
}

.badge--accent {
  color: var(--gms-accent-600);
  background: var(--gms-accent-50);
}

/* Status Indicators */
.status--success { color: var(--gms-status-success); }
.status--warning { color: var(--gms-status-warning); }
.status--error { color: var(--gms-status-error); }
.status--info { color: var(--gms-status-info); }

/* Utility Classes */
.text-primary { color: var(--gms-text-primary); }
.text-secondary { color: var(--gms-text-secondary); }
.text-accent { color: var(--gms-text-accent); }
.text-inverse { color: var(--gms-text-inverse); }

.bg-primary { background-color: var(--gms-bg-primary); }
.bg-secondary { background-color: var(--gms-bg-secondary); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: var(--gms-font-bold); }
.font-semibold { font-weight: var(--gms-font-semibold); }
.font-medium { font-weight: var(--gms-font-medium); }

/* Responsive Typography */
@media (max-width: 768px) {
  :root {
    --gms-heading-1: 36px;
    --gms-heading-2: 28px;
    --gms-heading-3: 24px;
    --gms-body-lg: 16px;
  }

  .gms-button {
    min-height: var(--gms-touch-target-min);
    min-width: var(--gms-touch-target-min);
  }

  .gms-form-control {
    min-height: var(--gms-touch-target-min);
  }

  .gms-card {
    padding: var(--gms-space-md);
  }
}

@media (max-width: 480px) {
  .gms-card {
    padding: var(--gms-space-sm);
  }

  .gms-button {
    min-width: auto;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
  .gms-button {
    border: 2px solid currentColor;
  }

  .gms-card {
    border: 2px solid var(--gms-border-primary);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .gms-card:hover {
    transform: none;
  }

  .gms-button:hover {
    transform: none;
  }
}

/* ========================================
   ACCESSIBILITY UTILITIES
   ======================================== */

/* Screen Reader Only - visually hidden but accessible to assistive technology */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to Main Content Link - hidden until focused */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: var(--gms-space-4);
  z-index: 10000;
  padding: var(--gms-space-3) var(--gms-space-4);
  background: var(--gms-bright-blue);
  color: white;
  font-weight: var(--gms-font-semibold);
  text-decoration: none;
  border-radius: var(--gms-radius-md);
  transition: top var(--gms-transition-fast);
}

.skip-to-main:focus {
  top: var(--gms-space-4);
  outline: 2px solid var(--gms-papaya-orange);
  outline-offset: 2px;
}

/* Focus Visible - consistent focus indicator across all interactive elements */
:focus-visible {
  outline: 2px solid var(--gms-bright-blue);
  outline-offset: 2px;
}

/* Remove default focus for mouse users (focus-visible handles keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */

/* Flexbox Utilities */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--gms-space-2); }
.gap-3 { gap: var(--gms-space-3); }
.gap-4 { gap: var(--gms-space-4); }
.gap-6 { gap: var(--gms-space-6); }
.gap-8 { gap: var(--gms-space-8); }

/* Margin Utilities */
.mt-1 { margin-top: var(--gms-space-1); }
.mt-2 { margin-top: var(--gms-space-2); }
.mt-3 { margin-top: var(--gms-space-3); }
.mt-4 { margin-top: var(--gms-space-4); }
.mt-6 { margin-top: var(--gms-space-6); }
.mt-8 { margin-top: var(--gms-space-8); }
.mt-lg { margin-top: var(--gms-space-lg); }
.mt-xl { margin-top: var(--gms-space-xl); }

.mb-2 { margin-bottom: var(--gms-space-2); }
.mb-3 { margin-bottom: var(--gms-space-3); }
.mb-4 { margin-bottom: var(--gms-space-4); }
.mb-6 { margin-bottom: var(--gms-space-6); }
.mb-8 { margin-bottom: var(--gms-space-8); }
.mb-12 { margin-bottom: var(--gms-space-12); }

.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }

/* Padding Utilities */
.p-4 { padding: var(--gms-space-4); }
.p-6 { padding: var(--gms-space-6); }
.p-8 { padding: var(--gms-space-8); }

/* Width/Max-Width Utilities */
.max-w-600 { max-width: 600px; }
.max-w-700 { max-width: 700px; }
.max-w-800 { max-width: 800px; }
.max-w-900 { max-width: 900px; }
.max-w-1000 { max-width: 1000px; }
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Padding Right Utilities */
.pr-8 { padding-right: var(--gms-space-8); }
@media (max-width: 900px) {
  .pr-8-mobile-none { padding-right: 0; }
}

/* Additional Spacing Utilities */
.mb-1 { margin-bottom: var(--gms-space-1); }
.mt-0 { margin-top: 0; }
.m-0 { margin: 0; }

/* Line Height Utilities */
.leading-relaxed { line-height: 1.7; }

/* Font Style Utilities */
.italic { font-style: italic; }

/* Transition Delay Utilities */
.delay-150 { transition-delay: 0.15s; }

/* Background Color Utilities */
.bg-white { background-color: var(--gms-white); }
.bg-surface { background-color: var(--gms-bg-surface); }

/* Grid Gap Utilities */
.grid-gap-4 { gap: var(--gms-space-4); }
.grid-gap-5 { gap: var(--gms-space-5); }

/* Align Items Utilities */
.items-end { align-items: flex-end; }

/* Gap Utilities for Grid */
.gap-16 { gap: var(--gms-space-16); }

/* Flex Direction Utilities */
.flex-column { flex-direction: column; }

/* Color Utilities - Text */
.text-gunmetal { color: var(--gms-gunmetal-gray); }

/* About Page - Principles Card */
.gms-principles-card {
  background: var(--gms-bg-primary);
  padding: var(--gms-space-8);
}

.gms-principles-list {
  display: flex;
  flex-direction: column;
  gap: var(--gms-space-5);
}

/* Section White Background */
.section-bg-white {
  background: var(--gms-white);
}

/* Breadcrumb Link Style - Subdued link in breadcrumb trail */
.breadcrumb-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity var(--gms-transition-base);
}

.breadcrumb-link:hover {
  opacity: 1;
}

.breadcrumb-link:visited {
  color: inherit;
}

/* Text Link - Accent colored inline link */
.text-link {
  color: var(--gms-bright-blue);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Loading States - Full width centered loading indicators */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--gms-space-12);
}

/* Highlighted/Emphasized Text - Accent color emphasis */
.text-emphasis,
strong.text-emphasis {
  color: var(--gms-bright-blue);
}

/* Spacing/Height Utilities */
.spacer-sm { height: var(--gms-space-8); }
.spacer-md { height: var(--gms-space-12); }
.spacer-lg { height: 80px; }
.spacer-xl { height: 120px; }

/* Hero Button - larger CTA for hero sections */
.gms-button--hero {
  height: 56px;
  padding: 0 var(--gms-space-8);
  font-size: var(--gms-body-lg);
}

/* ========================================
   COMMON COMPONENT PATTERNS
   ======================================== */

/* Icon Box - colored icon containers */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--gms-radius-lg);
}

.icon-box--sm {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  border-radius: var(--gms-radius-md);
}

.icon-box--md {
  width: 72px;
  height: 72px;
  font-size: 2rem;
}

.icon-box--lg {
  width: 80px;
  height: 80px;
  font-size: 2.5rem;
}

.icon-box--primary {
  background: var(--gms-bright-blue);
  color: var(--gms-white);
}

.icon-box--accent {
  background: var(--gms-papaya-orange);
  color: var(--gms-white);
}

.icon-box--dark {
  background: var(--gms-gunmetal-gray);
  color: var(--gms-white);
}

.icon-box--gradient {
  background: linear-gradient(135deg, var(--gms-bright-blue), var(--gms-papaya-orange));
  color: var(--gms-white);
}

/* Info Box - highlighted information boxes */
.info-box {
  background: var(--gms-bg-secondary);
  padding: var(--gms-space-4);
  border-radius: var(--gms-radius-md);
}

.info-box--lg {
  padding: var(--gms-space-6);
  border-radius: var(--gms-radius-lg);
}

/* Feature List - checkmark lists within cards */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.feature-list li {
  margin-bottom: var(--gms-space-1);
}

/* Button Group - multiple buttons in a row */
.button-group {
  display: flex;
  gap: var(--gms-space-4);
  flex-wrap: wrap;
}

.button-group--center {
  justify-content: center;
}

/* Card with centered content */
.card-centered {
  text-align: center;
  padding: var(--gms-space-8);
}

/* Gradient Header - for featured cards */
.gradient-header {
  background: linear-gradient(135deg, var(--gms-bright-blue), var(--gms-papaya-orange));
  height: 300px;
  border-radius: var(--gms-radius-lg) var(--gms-radius-lg) 0 0;
  margin: calc(-1 * var(--gms-space-6)) calc(-1 * var(--gms-space-6)) var(--gms-space-6) calc(-1 * var(--gms-space-6));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
}

.gradient-header--sm {
  height: 200px;
  font-size: 3rem;
  margin-bottom: var(--gms-space-4);
}

.gradient-header--alt {
  background: linear-gradient(135deg, var(--gms-gunmetal-gray), var(--gms-bright-blue));
}

/* Newsletter/Signup Box */
.newsletter-box {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--gms-space-12);
  background: var(--gms-bg-secondary);
  border-radius: var(--gms-radius-xl);
}

.newsletter-box__form {
  display: flex;
  gap: var(--gms-space-3);
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-box__input {
  flex: 1;
  max-width: 300px;
  min-width: 250px;
}

/* Research/Publication Card Pattern */
.pub-card {
  padding: var(--gms-space-6);
}

.pub-card__header {
  display: flex;
  align-items: center;
  gap: var(--gms-space-3);
  margin-bottom: var(--gms-space-4);
}

.pub-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pub-card__actions {
  display: flex;
  gap: var(--gms-space-2);
  margin-left: auto;
}

/* ========================================
   ICON SYSTEM - Standardized Icon Styling
   ======================================== */

/*
 * Icon System Overview:
 * - Icons use currentColor for stroke/fill to inherit from parent
 * - No backgrounds by default - clean, modern presentation
 * - Consistent sizing through size classes
 * - Color applied via color utility classes
 *
 * Usage:
 * <svg class="gms-icon gms-icon--md gms-icon--primary">...</svg>
 * <div class="gms-icon-wrapper"><svg class="gms-icon">...</svg></div>
 */

/* Base Icon - inherits color, no background */
.gms-icon {
  display: inline-block;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Icon that should be filled instead of stroked */
.gms-icon--filled {
  fill: currentColor;
  stroke: none;
}

/* Icon Sizes */
.gms-icon--xs {
  width: 16px;
  height: 16px;
}

.gms-icon--sm {
  width: 20px;
  height: 20px;
}

.gms-icon--md {
  width: 24px;
  height: 24px;
}

.gms-icon--lg {
  width: 32px;
  height: 32px;
}

.gms-icon--xl {
  width: 40px;
  height: 40px;
}

/* Icon Colors - using currentColor inheritance */
.gms-icon--primary {
  color: var(--gms-bright-blue);
}

.gms-icon--accent {
  color: var(--gms-papaya-orange);
}

.gms-icon--dark {
  color: var(--gms-gunmetal-gray);
}

.gms-icon--muted {
  color: var(--gms-text-secondary);
}

.gms-icon--success {
  color: var(--gms-success);
}

/* Icon Wrapper - for alignment in layouts */
.gms-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Small wrapper for feature items (36x36) */
.gms-icon-wrapper--sm {
  width: 36px;
  height: 36px;
}

/* Medium wrapper for card icons (40x40) */
.gms-icon-wrapper--md {
  width: 40px;
  height: 40px;
}

/* Large wrapper for hero/section icons (48x48) */
.gms-icon-wrapper--lg {
  width: 48px;
  height: 48px;
}

/* Feature List Item with Icon - clean presentation */
.gms-feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--gms-space-4);
  padding: var(--gms-space-6) 0;
  border-top: 1px solid var(--gms-silver-gray);
}

.gms-feature-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Color classes on wrapper pass to child SVGs via currentColor */
}

/* Icon colors applied to wrapper - inherit to SVG children */
.gms-feature-item__icon.gms-icon--primary {
  color: var(--gms-bright-blue);
}

.gms-feature-item__icon.gms-icon--accent {
  color: var(--gms-papaya-orange);
}

.gms-feature-item__icon.gms-icon--dark {
  color: var(--gms-gunmetal-gray);
}

.gms-feature-item__icon.gms-icon--success {
  color: var(--gms-success);
}

.gms-feature-item__content {
  flex: 1;
}

.gms-feature-item__text {
  color: var(--gms-text-primary);
  margin: 0;
  line-height: 1.6;
}

/* Pillar Card Icon - clean, no background */
.gms-pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--gms-space-4);
  color: var(--gms-bright-blue);
}

/* Feature Grid Item Icon - compact, no background */
.gms-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--gms-gunmetal-gray);
}