/* ============================================
   CProcess s.r.o. — Design Tokens & Base
   ============================================ */

:root, [data-theme="light"] {
  /* Type scale (fluid) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.5rem, 1.2rem + 4.5vw, 5rem);

  /* Spacing (4px scale) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Colors — CProcess corporate palette
     Antracit navy + steel blue + technical accent */
  --color-bg: #ffffff;
  --color-surface: #f7f8fa;
  --color-surface-2: #eef0f4;
  --color-surface-offset: #e7eaf0;
  --color-divider: #e2e5ec;
  --color-border: #d4d8e0;

  --color-text: #0f1b2d;
  --color-text-muted: #5b6478;
  --color-text-faint: #9aa1b0;
  --color-text-inverse: #ffffff;

  --color-primary: #1e5bb8;
  --color-primary-hover: #174a99;
  --color-primary-active: #103a7a;
  --color-primary-highlight: #dde6f5;

  --color-accent: #00a39a;
  --color-accent-hover: #008e85;

  --color-dark: #0f1b2d;
  --color-dark-2: #15233a;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 16px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.04), 0 1px 1px rgba(15, 27, 45, 0.03);
  --shadow-md: 0 4px 16px rgba(15, 27, 45, 0.06), 0 2px 4px rgba(15, 27, 45, 0.04);
  --shadow-lg: 0 12px 36px rgba(15, 27, 45, 0.1), 0 4px 12px rgba(15, 27, 45, 0.06);

  /* Layout widths */
  --content-narrow: 720px;
  --content-default: 1080px;
  --content-wide: 1240px;

  /* Transition */
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-display: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
  --color-bg: #0a1220;
  --color-surface: #0f1b2d;
  --color-surface-2: #15233a;
  --color-surface-offset: #1b2c47;
  --color-divider: #1f3155;
  --color-border: #2b3f63;

  --color-text: #e8ecf3;
  --color-text-muted: #9aa5bb;
  --color-text-faint: #5b6a85;
  --color-text-inverse: #0f1b2d;

  --color-primary: #4d8aef;
  --color-primary-hover: #6ea0f3;
  --color-primary-active: #3a73d4;
  --color-primary-highlight: #1b2d52;

  --color-accent: #3dcfb6;
  --color-accent-hover: #5fd9c4;

  --color-dark: #050a13;
  --color-dark-2: #0a1220;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Reset & base
   ============================================ */

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  font-weight: 400;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role="list"], ol[role="list"] { list-style: none; }

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--color-text);
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 70ch;
  color: var(--color-text-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--color-primary-hover); }

::selection {
  background: var(--color-primary-highlight);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@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;
  }
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

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

a, button, [role="button"], input, textarea, select {
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}
