/* ArcFlow theme – design tokens.
   Every colour, font and spacing of the theme comes from here. A site changes them without touching this file:
   sites/<site>/theme/theme-tokens.html, e.g. <style>:root { --brand: #3e91ce; }</style>
   Two colour schemes: light (:root) and dark (:root[data-scheme="dark"]). Which one a page shows: the visitor's
   choice (header button), otherwise the site's default from site.yaml strings.scheme (light | dark | auto). */

@font-face {
  font-family: "Pirulen";
  src: url("fonts/pirulen.woff2") format("woff2"), url("fonts/pirulen.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Brand */
  --brand: #3e91ce;            /* ARCFLOW blue (wordmark, accents) */
  --brand-strong: #1f6fae;     /* links and buttons: 5.2:1 on white */
  --brand-soft: #e8f2fa;       /* tinted backgrounds */
  --accent: #ffa500;           /* ZISOFT orange */

  /* Neutrals */
  --ink: #1d232a;              /* text */
  --ink-muted: #56606b;        /* secondary text: 6.4:1 on white */
  --surface: #ffffff;
  --surface-alt: #f4f6f8;
  --card-bg: #ffffff;          /* cards, panels, dropdowns, inputs */
  --line: #e2e6eb;
  --line-strong: #b0b8c1;      /* input borders, separators */
  --on-brand: #ffffff;         /* text on --brand-strong */
  --button-hover: var(--ink);  /* button background on hover; text stays --on-brand-hover */
  --on-brand-hover: #ffffff;
  --highlight-bg: #fff7cc;     /* highlighted paragraphs */
  --danger: #c0392b;
  --xing: #026466;
  --img-backdrop: transparent; /* behind content images (dark: light, for logos with dark text) */
  --search-icon-filter: brightness(0.45); /* search icon in the open mobile menu */

  /* Header / footer */
  --header-bg: #1f2329;        /* dark anthracite, both schemes: text 14.2:1, logo blue 4.6:1 */
  --header-ink: #f1f3f5;
  --header-line: rgba(255, 255, 255, 0.12);
  --header-hover: rgba(255, 255, 255, 0.1);
  --header-accent: #7dbbe8;    /* active entry: 7.6:1 on the header */
  --footer-bg: #11161c;
  --footer-ink: #e6eaee;
  --footer-muted: #a3adb8;

  /* Type */
  --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Pirulen", var(--font-sans);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-sm: 0.875rem;
  --h1: clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem);
  --h2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --h3: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --h4: 1.125rem;
  --leading: 1.65;
  --measure: 75ch;

  /* Space & shape */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --container: 1200px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.08);
  --header-height: 92px;
}

/* Dark scheme: only the colours change. Contrast (WCAG AA) checked for every text/background pair. */
:root[data-scheme="dark"] {
  color-scheme: dark;

  --brand: #4799d4;            /* ARCFLOW wordmark: a touch lighter, 4.9:1 on --card-bg */
  --brand-strong: #7dbbe8;     /* links and buttons: 8.4:1 on --surface */
  --brand-soft: #1b3550;
  --accent: #ffb52e;

  --ink: #e6eaee;
  --ink-muted: #a3adb8;
  --surface: #12171c;
  --surface-alt: #182028;
  --card-bg: #1e262f;
  --line: #2c3540;
  --line-strong: #4a5563;
  --on-brand: #0b1520;
  --button-hover: #e6eaee;
  --on-brand-hover: #12171c;
  --highlight-bg: #3b3415;
  --danger: #ff8a7a;
  --xing: #4fb7b9;
  --img-backdrop: #ffffff;
  --search-icon-filter: none;

  --header-line: rgba(255, 255, 255, 0.1); /* header is only 1.14:1 against the dark page: keep the edge */
  --footer-bg: #0a0e12;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.45);
}
