/*
 * Design tokens: fonts, colours, shadows.
 * Everything else in the stylesheets reads these custom properties, so a theme
 * is just a different set of values. Light is the default; dark is opt-in with
 * <html data-theme="dark"> (test it with ?theme=dark).
 */

/* Selawik, self-hosted (no third-party font requests). */
@font-face {
  font-family: Selawik;
  src: url(../fonts/selawk.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Selawik;
  src: url(../fonts/selawksb.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Selawik;
  src: url(../fonts/selawkb.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* surfaces and text */
  --bg: #ffffff;
  --fg: #0d0d0d;
  --muted: #6e6e80;
  --line: rgba(13, 13, 13, .14);
  --card: rgba(255, 255, 255, .92);
  --shadow: 0 8px 30px rgba(0, 0, 0, .08);
  --halo: rgba(255, 255, 255, .9);          /* soft glow behind the big titles so they stay legible over the brain */

  /* buttons and form fields */
  --btn: #0d0d0d;
  --btn-fg: #ffffff;
  --btn-hover: #2f2f2f;
  --field: #ffffff;
  --field-line: #d0d0d5;
  --ring: rgba(13, 13, 13, .14);            /* focus ring around inputs */

  /* feedback colours */
  --err: #d92d20;
  --ok: #067647;

  /* brand accents (logo): red and azure */
  --logo-red: #e5322d;
  --logo-blue: #1ea7e8;
  --dot: 30%;                               /* where the red dot of the logo "i" ends and the azure stem starts */

  --font: Selawik, system-ui, -apple-system, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --bg: #0d0d0d;
  --fg: #ececec;
  --muted: #9b9ba8;
  --line: rgba(255, 255, 255, .16);
  --card: rgba(24, 24, 24, .92);
  --shadow: 0 8px 30px rgba(0, 0, 0, .5);
  --halo: rgba(13, 13, 13, .9);
  --btn: #ececec;
  --btn-fg: #0d0d0d;
  --btn-hover: #ffffff;
  --field: #171717;
  --field-line: #3a3a40;
  --ring: rgba(255, 255, 255, .2);
  --err: #ff8a80;
  --ok: #7ee0a6;
}
