/* Kyvero design tokens.
 *
 * A verbatim copy of the token layer from the Kyvero design system project
 * (claude.ai/design project 724ba44e-b6cc-4116-8882-8384e871b44b), whose
 * `styles.css` is nothing but the eight `@import`s inlined below in the same
 * order. Keeping it verbatim is the point: when the design system moves, this
 * file is replaced wholesale rather than reconciled line by line.
 *
 * Nothing here knows what consumes it. The translation into the documentation
 * theme's `--md-*` variables lives in `kyvero-material.css`, and the marketing
 * site's own component styles live in `site/src/styles/site.css`, so that a
 * re-sync never has to be untangled from theme wiring.
 *
 * VENDORED COPIES OF THIS LAYER — a re-sync updates all of them or none. The
 * two are byte-identical, so a re-sync is a copy into each path, never an edit:
 *   docs/user/assets/stylesheets/kyvero-tokens.css   documentation site
 *   site/public/styles/kyvero-tokens.css             marketing site
 * The `@font-face` blocks below resolve `../fonts/`, so the `.woff2` files
 * beside each copy are part of it and move with it.
 */

/* ── tokens/fonts.css ─────────────────────────────────────────────────────── */

/* Kyvero webfonts — self-hosted, complete.
 *
 * No third-party font CDN: no visitor IP is sent to Google, so no consent
 * banner is required. This replaces the previous
 * @import url("https://fonts.googleapis.com/css2?…"), which was both a GDPR
 * exposure (LG München, 2022) and the slowest possible font load — an @import
 * inside a stylesheet is only discovered after the token file has been fetched
 * and parsed, then costs a second round trip to a third-party origin.
 *
 * PATHS — url() is "../fonts/…", i.e. a `fonts/` directory sitting beside the
 * directory that holds this stylesheet. That resolves everywhere it is used:
 *   design project   tokens/fonts.css                          -> /fonts/
 *   docs site        docs/user/assets/stylesheets/…-tokens.css -> docs/user/assets/fonts/
 *   marketing site   site/public/styles/kyvero-tokens.css      -> site/public/fonts/
 * Copy this file into the repo's vendored token bundles unedited.
 *
 * SUBSET — latin only. Add latin-ext cuts if the site ships Dutch, Polish or
 * Czech copy with accented characters outside latin.
 *
 * LICENCE — all three families are SIL Open Font License 1.1, which permits
 * self-hosting and redistribution provided the licence text travels with the
 * binaries. It does: fonts/OFL-space-grotesk.txt, fonts/OFL-instrument-sans.txt,
 * fonts/OFL-ibm-plex-mono.txt. Move them with the .woff2 files, always.
 *
 * WEIGHTS — exactly the nine the system uses, nothing shipped that is not
 * referenced. Space Grotesk 400/500/600/700, Instrument Sans 400/500/600,
 * IBM Plex Mono 400/500. If a design needs another cut, add the file AND a
 * block here; never let the browser synthesise one. */

/* ── Space Grotesk — display, headings, the monogram ───────────────────────── */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/space-grotesk-v22-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/space-grotesk-v22-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/space-grotesk-v22-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-v22-latin-700.woff2") format("woff2");
}

/* ── Instrument Sans — UI and body ─────────────────────────────────────────── */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-sans-v4-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/instrument-sans-v4-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/instrument-sans-v4-latin-600.woff2") format("woff2");
}

/* ── IBM Plex Mono — eyebrows, labels, code ────────────────────────────────── */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-v20-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-v20-latin-500.woff2") format("woff2");
}

/* ── tokens/colors.css ────────────────────────────────────────────────────── */

:root {
  /* Ink — the primary brand black, warm-shifted */
  --ink-900: #14161A;
  --ink-800: #23252A;
  --ink-700: #33322E;
  --ink-600: #4A4841;

  /* Warm neutrals, derived from the paper ground */
  --neutral-700: #5C5952;
  --neutral-600: #7C7973;
  --neutral-500: #A8A49C;
  --neutral-400: #C4BFB6;
  --neutral-300: #D3CFC7;
  --neutral-200: #E5E2DC;
  --neutral-100: #F2F0EC;
  --neutral-50:  #FAF9F7;
  --paper:       #FAF9F7;
  --paper-sunk:  #EFEDEA;
  --white:       #FFFFFF;

  /* Accent — Kyvero blue. From the logo tile. */
  --accent-700: #24429B;
  --accent-600: #2F52BE;
  --accent-500: #3A63D6;
  --accent-400: #6C8CE4;
  --accent-200: #C3CFF4;
  --accent-100: #E6EBFB;

  /* Secondary accent — clay. Used sparingly: highlights, charts, one CTA per page. */
  --clay-700: #8F3F1F;
  --clay-600: #A94D27;
  --clay-500: #C2603A;
  --clay-300: #E2A98C;
  --clay-100: #F7E9E1;

  /* Semantic */
  --success-600: #24684A;
  --success-500: #2E7D5B;
  --success-100: #E2F0E9;
  --warning-600: #96620F;
  --warning-500: #B7791F;
  --warning-100: #F8EEDA;
  --danger-600:  #A32B26;
  --danger-500:  #C4362F;
  --danger-100:  #FAE6E4;
  --info-500:    #3A63D6;
  --info-100:    #E6EBFB;
}

/* ── tokens/typography.css ────────────────────────────────────────────────── */

:root {
  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-ui: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --text-3xl: 56px;
  --text-2xl: 40px;
  --text-xl: 30px;
  --text-lg: 22px;
  --text-md: 17px;
  --text-base: 15px;
  --text-sm: 13.5px;
  --text-xs: 12px;
  --text-2xs: 11px;

  --leading-tight: 1.05;
  --leading-snug: 1.25;
  --leading-normal: 1.55;
  --leading-loose: 1.7;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --tracking-display: -0.03em;
  --tracking-heading: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-label: 0.1em;
  --tracking-eyebrow: 0.18em;
}

/* ── tokens/spacing.css ───────────────────────────────────────────────────── */

:root {
  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  --container-max: 1180px;
  --container-narrow: 720px;
  --gutter: var(--space-6);
  --section-y: var(--space-24);
}

/* ── tokens/radius.css ────────────────────────────────────────────────────── */

:root {
  /* Kyvero is square-first. The logo tile has no radius; product surfaces take
     the smallest radius that still reads as software. Nothing is a pill. */
  --radius-0: 0px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 10px;
  --radius-full: 999px; /* avatars and status dots only */
}

/* ── tokens/elevation.css ─────────────────────────────────────────────────── */

:root {
  /* Hairline borders do most of the work. Shadow appears only when something
     genuinely floats above the page. */
  --border-hairline: 1px solid var(--neutral-200);
  --border-strong: 1px solid var(--neutral-300);
  --border-ink: 1px solid var(--ink-900);

  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(20, 22, 26, 0.06);
  --shadow-2: 0 4px 14px rgba(20, 22, 26, 0.08);
  --shadow-3: 0 18px 48px rgba(20, 22, 26, 0.14);

  --ring-accent: 0 0 0 3px var(--accent-200);
  --ring-danger: 0 0 0 3px var(--danger-100);
}

/* ── tokens/motion.css ────────────────────────────────────────────────────── */

:root {
  --duration-instant: 80ms;
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 260ms;

  /* Engineered, not bouncy. Nothing overshoots. */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);

  --transition-control: background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

/* ── tokens/semantic.css ──────────────────────────────────────────────────── */

:root {
  /* Text */
  --text-primary: var(--ink-900);
  --text-secondary: var(--neutral-700);
  --text-muted: var(--neutral-600);
  --text-faint: var(--neutral-500);
  --text-inverse: var(--paper);
  --text-link: var(--accent-600);
  --text-link-hover: var(--ink-900);

  /* Surfaces */
  --surface-page: var(--paper);
  --surface-card: var(--white);
  --surface-sunk: var(--paper-sunk);
  --surface-inverse: var(--ink-900);
  --surface-accent-soft: var(--accent-100);

  /* Lines */
  --line-subtle: var(--neutral-200);
  --line-default: var(--neutral-300);
  --line-strong: var(--ink-900);

  /* Controls */
  --control-primary-bg: var(--ink-900);
  --control-primary-bg-hover: var(--ink-700);
  --control-primary-fg: var(--paper);
  --control-accent-bg: var(--accent-500);
  --control-accent-bg-hover: var(--accent-600);
  --control-secondary-border: var(--neutral-300);
  --control-height-sm: 30px;
  --control-height-md: 38px;
  --control-height-lg: 46px;
  --focus-ring: var(--ring-accent);
}
