/* ===================================
   DevOps Platform - Design System Tokens
   ================================== */

:root {
  /* ===================================
     COLOR SYSTEM
     ================================== */
  
  /* Primary Brand Colors */
  --brand-blue: #1367CA;           /* Primary brand color - trust, technology */
  --brand-blue-light: #2563EB;    /* Hover states, accents */
  --brand-blue-dark: #0F4FA8;     /* Focus states, deep actions */
  --brand-dark: #0A275A;          /* Headers, emphasis text */
  
  /* Accent Colors */
  --brand-yellow: #F1A747;        /* CTAs, highlights, energy */
  --brand-orange: #FB923C;        /* Secondary accent, warnings */
  
  /* Extended Blue Palette */
  --blue-50: #F0F9FF;
  --blue-100: #E0F2FE;
  --blue-200: #BAE6FD;
  --blue-300: #7DD3FC;
  --blue-400: #38BDF8;
  --blue-500: #0EA5E9;
  --blue-600: #1367CA;
  --blue-700: #0F4FA8;
  --blue-800: #0C3E84;
  --blue-900: #0A275A;

  /* Semantic Colors */
  --success-50: #F0FDF4;
  --success-100: #DCFCE7;
  --success-200: #BBF7D0;
  --success-300: #86EFAC;
  --success-400: #4ADE80;
  --success-500: #22C55E;
  --success-600: #16A34A;
  --success-700: #15803D;
  --success-800: #166534;
  --success-900: #14532D;
  
  --warning-50: #FFFBEB;
  --warning-100: #FEF3C7;
  --warning-200: #FDE68A;
  --warning-300: #FCD34D;
  --warning-400: #FBBF24;
  --warning-500: #F59E0B;
  --warning-600: #D97706;
  --warning-700: #B45309;
  --warning-800: #92400E;
  --warning-900: #78350F;
  
  --error-50: #FEF2F2;
  --error-100: #FEE2E2;
  --error-200: #FECACA;
  --error-300: #FCA5A5;
  --error-400: #F87171;
  --error-500: #EF4444;
  --error-600: #DC2626;
  --error-700: #B91C1C;
  --error-800: #991B1B;
  --error-900: #7F1D1D;
  
  /* Neutral Grays */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* ===================================
     TYPOGRAPHY SYSTEM
     ================================== */
  
  /* Font Families */
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', 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 */
  --text-7xl: 4.5rem;      /* 72px */
  --text-8xl: 6rem;        /* 96px */
  --text-9xl: 8rem;        /* 128px */
  
  /* Font Weights */
  --font-thin: 100;
  --font-extralight: 200;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;
  
  /* 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.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ===================================
     SPACING SYSTEM
     ================================== */
  
  /* Base spacing scale (8px grid) */
  --space-px: 1px;
  --space-0: 0;
  --space-0-5: 0.125rem;   /* 2px */
  --space-1: 0.25rem;      /* 4px */
  --space-1-5: 0.375rem;   /* 6px */
  --space-2: 0.5rem;       /* 8px */
  --space-2-5: 0.625rem;   /* 10px */
  --space-3: 0.75rem;      /* 12px */
  --space-3-5: 0.875rem;   /* 14px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-7: 1.75rem;      /* 28px */
  --space-8: 2rem;         /* 32px */
  --space-9: 2.25rem;      /* 36px */
  --space-10: 2.5rem;      /* 40px */
  --space-11: 2.75rem;     /* 44px */
  --space-12: 3rem;        /* 48px */
  --space-14: 3.5rem;      /* 56px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */
  --space-28: 7rem;        /* 112px */
  --space-32: 8rem;        /* 128px */
  --space-36: 9rem;        /* 144px */
  --space-40: 10rem;       /* 160px */
  --space-44: 11rem;       /* 176px */
  --space-48: 12rem;       /* 192px */
  --space-52: 13rem;       /* 208px */
  --space-56: 14rem;       /* 224px */
  --space-60: 15rem;       /* 240px */
  --space-64: 16rem;       /* 256px */
  --space-72: 18rem;       /* 288px */
  --space-80: 20rem;       /* 320px */
  --space-96: 24rem;       /* 384px */

  /* Component Spacing */
  --component-padding-sm: var(--space-3) var(--space-4);    /* 12px 16px */
  --component-padding-md: var(--space-4) var(--space-6);    /* 16px 24px */
  --component-padding-lg: var(--space-6) var(--space-8);    /* 24px 32px */
  --component-padding-xl: var(--space-8) var(--space-12);   /* 32px 48px */

  /* Section Spacing */
  --section-padding-mobile: var(--space-12) 0;              /* 48px 0 */
  --section-padding-desktop: var(--space-20) 0;             /* 80px 0 */

  /* Container Spacing */
  --container-padding-mobile: 0 var(--space-6);             /* 0 24px */
  --container-padding-desktop: 0 var(--space-6);            /* 0 24px */

  /* ===================================
     BORDER RADIUS
     ================================== */
  
  --radius-none: 0;
  --radius-sm: 0.125rem;    /* 2px */
  --radius-base: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;    /* 6px */
  --radius-lg: 0.5rem;      /* 8px */
  --radius-xl: 0.75rem;     /* 12px */
  --radius-2xl: 1rem;       /* 16px */
  --radius-3xl: 1.5rem;     /* 24px */
  --radius-full: 9999px;

  /* ===================================
     SHADOWS
     ================================== */
  
  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --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.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --shadow-none: 0 0 #0000;

  /* Focus Shadows */
  --shadow-focus: 0 0 0 3px rgba(19, 103, 202, 0.2);
  --shadow-focus-error: 0 0 0 3px rgba(239, 68, 68, 0.2);
  --shadow-focus-success: 0 0 0 3px rgba(34, 197, 94, 0.2);
  --shadow-focus-warning: 0 0 0 3px rgba(245, 158, 11, 0.2);

  /* ===================================
     ANIMATION & TRANSITIONS
     ================================== */
  
  /* Timing Functions */
  --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-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Duration Scale */
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;

  /* ===================================
     RESPONSIVE BREAKPOINTS
     ================================== */
  
  --breakpoint-sm: 640px;   /* Small devices */
  --breakpoint-md: 768px;   /* Medium devices */
  --breakpoint-lg: 1024px;  /* Large devices */
  --breakpoint-xl: 1280px;  /* Extra large devices */
  --breakpoint-2xl: 1536px; /* 2X large devices */

  /* ===================================
     Z-INDEX SCALE
     ================================== */
  
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;       /* Fixed header, overlays */
  --z-60: 60;       /* Mobile menu */
  --z-70: 70;
  --z-80: 80;
  --z-90: 90;
  --z-100: 100;     /* Modals, tooltips */

  /* ===================================
     LAYOUT TOKENS
     ================================== */
  
  /* Container max-widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;

  /* Grid gaps */
  --gap-xs: var(--space-2);
  --gap-sm: var(--space-4);
  --gap-md: var(--space-6);
  --gap-lg: var(--space-8);
  --gap-xl: var(--space-12);
}


/* ===================================
   BASE STYLES
   ================================== */

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

html {
  font-family: var(--font-family-sans);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary, white);
  color: var(--text-primary, var(--gray-900));
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

/* Theme transition for smooth mode switching */
* {
  transition: background-color var(--duration-200) var(--ease-out),
              color var(--duration-200) var(--ease-out),
              border-color var(--duration-200) var(--ease-out);
}

/* Focus management */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Selection colors */
::selection {
  background: var(--brand-blue);
  color: white;
}

::-moz-selection {
  background: var(--brand-blue);
  color: white;
}

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

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 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;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --brand-blue: #0000FF;
    --brand-yellow: #FFFF00;
    --gray-200: #000000;
    --gray-300: #000000;
    --gray-700: #000000;
    --gray-900: #000000;
  }
}

/* ===================================
   CZECH LANGUAGE TYPOGRAPHY
   ================================== */

/* Ensure proper spacing for Czech diacritics */
html[lang="cs"],
html[lang="cs-CZ"] {
  line-height: var(--leading-relaxed);
}

/* Czech quotation marks */
q::before { content: "„"; }
q::after { content: """; }

/* Czech date and number formatting */
.czech-currency::before {
  content: "";
}

.czech-currency::after {
  content: " Kč";
}

/* ===================================
   PRINT STYLES
   ================================== */

@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .no-print {
    display: none !important;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}