/*
 * Theme: calm (opt-in, not imported by css/domestic.css)
 *
 * An indigo accent (--dui-color-accent-indigo) as the primary fill, with
 * white text, and for links and focus; 8 / 12px corners; comfortable density; shadows tinted
 * with the accent hue.
 *
 * Apply with data-theme="calm" on :root or on any element, after linking
 * this file after css/domestic.css. It sets semantic --dui-* tokens only
 * (scripts/check-tokens.mjs checks it), so a scope can nest inside any
 * other. Light and dark values come from light-dark(); forced colors keep
 * the base behavior.
 *
 * Our choice: the file repeats the layer order and puts its overrides in
 * the tokens layer, so it works whether it is linked before or after
 * css/domestic.css and your unlayered CSS still wins.
 *
 * Specs
 *   https://developer.mozilla.org/en-US/docs/Web/CSS/--*
 *   https://www.w3.org/TR/css-color-5/#light-dark
 *   https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html
 */
@layer reset, tokens, base, layout, components, utilities;

@layer tokens {
  /* Also on knob scopes inside the theme: semantic.css re-derives some of these tokens there and would otherwise drop the theme's values. */
  [data-theme="calm"],
  [data-theme="calm"] :where([data-motion], [data-density], [data-contrast]) {
    --dui-color-accent: var(--dui-color-accent-indigo);
    --dui-color-primary: var(--dui-color-accent);
    --dui-color-primary-hover: var(--dui-color-accent-hover);
    --dui-color-primary-contrast: var(--dui-color-accent-contrast);
    --dui-color-shadow: light-dark(oklch(32% 0.06 272deg / 14%), oklch(12% 0.04 272deg / 50%));
  }
}
