/*
  Design tokens for Ridewolf OS: Breeze, as Plasma 6 ships it, plus the CachyOS
  brand colours used by the boot screens, the fetch and Hello.

  Everything the desktop draws takes its values from here and nowhere else.
  That is what makes Settings cheap: the theme is <html data-theme>, the
  animation speed is <html data-anim>, and the accent is one line below.

  Prefixed --bz- and --cachy- on purpose. terminal.css already owns
  --background, --primary, --success and friends for the rwsh look, and the old
  terminal must keep looking like itself until it becomes Konsole.

  Values are the Plasma 6 BreezeDark colour scheme (spec, appendix A). The
  Plasma 5 values are different and must not be used for the dark theme.
*/
:root {
  --bz-window: #202326;
  --bz-button: #292c30;
  --bz-view: #141618;
  --bz-view-alt: #1d1f22;
  --bz-header: #272c31;
  --bz-header-inactive: #202428;
  --bz-text: #fcfcfc;
  --bz-text-inactive: #a1a9b1;

  --bz-accent: #3daee9;
  --bz-selection: var(--bz-accent);
  --bz-selection-alt: #1e5774;
  --bz-link: #1d99f3;
  --bz-link-visited: #9b59b6;

  --bz-negative: #da4453;
  --bz-neutral: #f67400;
  --bz-positive: #27ae60;

  --bz-konsole-bg: #232627;
  --bz-konsole-fg: #fcfcfc;

  --cachy-cyan: #00ccff;
  --cachy-teal: #00aa88;
  --cachy-mint: #00ffcc;
  --cachy-green: #008066;
  --cachy-black: #020202;
  --cachy-surface: #061717;

  --bz-unit: 18px;
  --bz-gap-s: 4px;
  --bz-gap-m: 6px;
  --bz-gap-l: 8px;
  --bz-radius: 5px;
  --bz-radius-check: 4px;
  --bz-shadow-window: 0 8px 32px rgb(0 0 0 / 0.55);

  /* Noto Sans is not loaded yet; it joins the font link when the desktop does. */
  --bz-font: "Noto Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  --bz-font-size: 13.3px;
  --bz-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /*
    Half of regular Plasma's 50/100/200/400. CachyOS ships a quarter, and a
    quarter makes the small steps 12 ms long, too short to be seen; the owner
    asked for animations that can. The slider (anim.factor) scales these.
  */
  --bz-dur-1: 25ms;
  --bz-dur-2: 50ms;
  --bz-dur-3: 100ms;
  --bz-dur-4: 200ms;
}

/*
  Breeze Light. Not yet checked against BreezeLight.colors line by line —
  verify before the Settings app ships the switch (stage 5).
*/
:root[data-theme="light"] {
  --bz-window: #eff0f1;
  --bz-button: #fcfcfc;
  --bz-view: #ffffff;
  --bz-view-alt: #f7f7f7;
  --bz-header: #dee0e2;
  --bz-header-inactive: #eff0f1;
  --bz-text: #232629;
  --bz-text-inactive: #707d8a;
  --bz-link: #2980b9;
}

/* Settings → Animations → "as in regular Plasma". */
:root[data-anim="normal"] {
  --bz-dur-1: 50ms;
  --bz-dur-2: 100ms;
  --bz-dur-3: 200ms;
  --bz-dur-4: 400ms;
}

:root[data-anim="off"] {
  --bz-dur-1: 0ms;
  --bz-dur-2: 0ms;
  --bz-dur-3: 0ms;
  --bz-dur-4: 0ms;
}

/*
  A link inside an app takes the accent for its focus ring, not the browser's
  default blue. :where() keeps the specificity at zero, so any app that styles
  its own links (Hello's link cards, Wolfox's chrome) still wins.
*/
:where(.kw__body, .mw__body) a:focus-visible {
  outline: 2px solid var(--bz-accent);
  outline-offset: 1px;
}

/*
  Last in the file on purpose: :root[data-anim] has the same specificity as
  the blocks above, so source order is what lets the reader's system setting
  beat ours.
*/
@media (prefers-reduced-motion: reduce) {
  :root,
  :root[data-anim] {
    --bz-dur-1: 0ms;
    --bz-dur-2: 0ms;
    --bz-dur-3: 0ms;
    --bz-dur-4: 0ms;
  }
}
