/* ==========================================================================
   werserk design tokens — dark theme
   --------------------------------------------------------------------------
   One source of truth for werserk.dev, written so werserk.com can adopt it.

   Section A is copied value-for-value from the werserk.com source
   (werserk/werserk-landing, src/styles/global.css, read 2026-12-05).
   Do not rename or retune those: both sites must resolve them identically.

   Section B is additive: tokens the catalog needs that werserk.com does not
   have yet (type scale, frame, hairlines, support colours, motion, z-index).

   Usage: link this file before components.css. Font files are expected in
   ./fonts/ relative to this file.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts — IBM Plex Sans + IBM Plex Mono, self-hosted (SIL OFL 1.1,
   see fonts/OFL-IBM-Plex-Sans.txt and fonts/OFL-IBM-Plex-Mono.txt).
   Subsets: latin, latin-ext (₽ and friends), cyrillic. Weights 400/500/600.
   Arrows and box-drawing glyphs are NOT in these subsets: use .wk-icon
   instead of typing → ↗ ←.
   -------------------------------------------------------------------------- */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  color-scheme: dark;

  /* ========================================================================
     A. werserk.com tokens — identical names and values
     ======================================================================== */

  /* Surfaces */
  --wk-background: #171717;
  --wk-layer-01: #1e1e1e;
  --wk-layer-02: #262626;
  --wk-layer-inverse: #0f0f0f;

  /* Borders (alpha: for standalone boxes; see --wk-line for crossing rules) */
  --wk-border-subtle: rgba(255, 255, 255, 0.2);
  --wk-border-strong: rgba(255, 255, 255, 0.2);

  /* Text. --wk-text-faint is 3.6:1 on the background: decoration, disabled
     and large display glyphs only — never body copy. */
  --wk-text-primary: #fafafa;
  --wk-text-secondary: #e5e5e5;
  --wk-text-muted: rgba(229, 229, 229, 0.65);
  --wk-text-faint: rgba(229, 229, 229, 0.42);

  /* Action (the one accent) */
  --wk-action-primary: #ff7518;
  --wk-action-hover: #e56612;
  --wk-action-soft: #ffa366;

  /* Interaction states */
  --wk-state-hover: rgba(255, 255, 255, 0.035);
  --wk-state-selected: rgba(255, 255, 255, 0.055);
  --wk-state-pressed: rgba(255, 255, 255, 0.075);
  --wk-focus: rgba(250, 250, 250, 0.72);
  --wk-focus-accent: rgba(255, 117, 24, 0.55);
  --wk-intent-marker: var(--wk-action-primary);

  /* Grid */
  --wk-grid-cell: 4rem;
  --wk-grid-major-cell: 16rem;
  --wk-cell: var(--wk-grid-cell);
  --wk-cell-half: calc(var(--wk-cell) / 2);
  --wk-cell-quarter: calc(var(--wk-cell) / 4);
  --wk-cell-eighth: calc(var(--wk-cell) / 8);
  --wk-touch-target: 2.75rem;
  --wk-grid-minor: rgba(255, 255, 255, 0.024);
  --wk-grid-major: rgba(255, 255, 255, 0.052);

  /* Instrument lines (brackets, markers, drawings) */
  --wk-instrument-faint: rgba(255, 255, 255, 0.1);
  --wk-instrument-neutral: rgba(255, 255, 255, 0.18);
  --wk-instrument-strong: rgba(255, 255, 255, 0.28);
  --wk-instrument-active: var(--wk-instrument-strong);
  --wk-instrument-active-soft: rgba(255, 255, 255, 0.12);
  --wk-instrument-intent: rgba(255, 117, 24, 0.42);

  /* Spacing */
  --wk-space-01: 0.125rem;
  --wk-space-02: 0.25rem;
  --wk-space-03: 0.5rem;
  --wk-space-04: 0.75rem;
  --wk-space-05: 1rem;
  --wk-space-06: 1.5rem;
  --wk-space-07: 2rem;
  --wk-space-08: 2.5rem;
  --wk-space-09: 3rem;
  --wk-space-10: 4rem;
  --wk-space-11: 5rem;
  --wk-space-12: 6rem;

  --wk-radius: 0;

  /* ========================================================================
     B. Additions for werserk.dev
     ======================================================================== */

  /* Type families */
  --wk-font-sans: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wk-font-mono: "IBM Plex Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;

  /* Type scale — the sizes werserk.com already uses, named */
  --wk-font-size-01: 0.6875rem; /* 11  micro label */
  --wk-font-size-02: 0.75rem;   /* 12  label, caption */
  --wk-font-size-03: 0.8125rem; /* 13  nav, meta */
  --wk-font-size-04: 0.875rem;  /* 14  button, small copy */
  --wk-font-size-05: 1rem;      /* 16  body */
  --wk-font-size-06: 1.125rem;  /* 18  lead */
  --wk-font-size-07: 1.25rem;   /* 20  card title */
  --wk-font-size-08: 1.75rem;   /* 28  prose h2, fact value */
  --wk-font-size-09: 2rem;      /* 32  */
  --wk-font-size-10: 2.625rem;  /* 42  section title */
  --wk-font-size-11: 3.45rem;   /* 55  page title */
  /* Fluid roles */
  --wk-font-size-title: clamp(1.75rem, 1.31rem + 1.88vw, 2.625rem);
  --wk-font-size-display: clamp(2.125rem, 1.46rem + 2.84vw, 3.45rem);

  --wk-font-weight-regular: 400;
  --wk-font-weight-medium: 500;
  --wk-font-weight-semibold: 600;

  --wk-leading-display: 1.08;
  --wk-leading-title: 1.12;
  --wk-leading-snug: 1.25;
  --wk-leading-label: 1.333;
  --wk-leading-body: 1.55;
  --wk-leading-prose: 1.65;

  /* werserk.com sets letter-spacing 0 everywhere; only uppercase mono
     micro-labels are tracked. */
  --wk-tracking-normal: 0;
  --wk-tracking-label: 0.08em;

  --wk-measure: 44rem; /* max line length for prose */

  /* Hairlines. Opaque equivalents of white 10% / 20% / 42% over
     --wk-background, so rules that cross or overlap never double up. */
  --wk-line: #2e2e2e;
  --wk-line-strong: #454545;
  --wk-cross: #787878;
  --wk-border-width: 1px;
  --wk-marker-width: 2px;
  /* Form-field outline: 3:1 against the background (WCAG 1.4.11) */
  --wk-border-field: rgba(255, 255, 255, 0.38);

  /* Focus ring */
  --wk-focus-width: 2px;
  --wk-focus-offset: 2px;

  /* Frame: the centred page column with hairline sides */
  --wk-frame-max: 80rem;                 /* 20 grid cells */
  --wk-frame-gutter: var(--wk-space-04); /* frame to viewport edge */
  --wk-frame-pad: var(--wk-space-05);    /* content to frame edge */
  --wk-topbar-height: 3.5rem;
  --wk-hatch-height: var(--wk-cell-half);
  --wk-cross-size: 13px;

  /* Support colours: always paired with an icon or a label */
  --wk-support-success: #5ccf8f;
  --wk-support-warning: #ecc04b;
  --wk-support-error: #ff6f7d;
  --wk-support-info: var(--wk-text-secondary);

  /* Project status markers */
  --wk-status-idea: var(--wk-text-muted);
  --wk-status-building: var(--wk-support-warning);
  --wk-status-demo: var(--wk-action-primary);
  --wk-status-live: var(--wk-support-success);
  --wk-status-archived: var(--wk-text-faint);

  /* Overlays */
  --wk-background-veil: rgba(23, 23, 23, 0.92); /* sticky bar over content */
  --wk-overlay: rgba(10, 10, 10, 0.8);          /* dialog backdrop */
  --wk-overlay-solid: rgba(12, 12, 12, 0.97);   /* lightbox */
  --wk-shadow-overlay: 0 1.5rem 4rem rgba(0, 0, 0, 0.55);

  /* Motion */
  --wk-duration-fast: 120ms;
  --wk-duration-base: 160ms;
  --wk-duration-slow: 240ms;
  --wk-duration-scan: 9.6s;
  --wk-ease: cubic-bezier(0.2, 0, 0, 1);

  /* z-index */
  --wk-z-base: 0;
  --wk-z-raised: 10;
  --wk-z-sticky: 20;
  --wk-z-menu: 30;
  --wk-z-overlay: 40;

  /* Breakpoints. Custom properties cannot be used inside @media, so these
     are the reference values; media queries repeat them as literals. */
  --wk-breakpoint-sm: 40rem; /* 640  two card columns */
  --wk-breakpoint-md: 48rem; /* 768  wider gutters */
  --wk-breakpoint-lg: 64rem; /* 1024 three card columns, split panels */
  --wk-breakpoint-xl: 80rem; /* 1280 frame reaches its max width */
}

@media (min-width: 40rem) {
  :root {
    --wk-frame-pad: var(--wk-space-06);
    --wk-topbar-height: var(--wk-cell);
  }
}

@media (min-width: 48rem) {
  :root {
    --wk-frame-gutter: var(--wk-space-07);
    --wk-hatch-height: var(--wk-space-09);
  }
}

@media (min-width: 64rem) {
  :root {
    --wk-frame-pad: var(--wk-space-08);
    --wk-hatch-height: var(--wk-cell);
  }
}
