/* Hearth themes. Every colour in the app comes from the tokens below, so a theme is just a set of values.
   Pick one in Settings -> Appearance. The default is Ember. theme.js sets data-theme / data-mode on <html>.

   Ember    warm dark   (the default)
   Linen    warm light
   Midnight cool navy dark  (the original look)
   Daylight clean light blue (the original light look)

   The four --cat-* slots are the calendar/badge palette: slot 1 = Personal, 2 = School, 3 = Home, 4 = other. */

@font-face {
  font-family: 'Fraunces';
  src: url('vendor/fonts/fraunces-latin-wght.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --radius-lg: 22px; --radius-md: 14px; --radius-sm: 9px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Midnight (original dark). Also the fallback if no theme is set. ---------- */
:root, :root[data-theme="midnight"] {
  --font-display: var(--font);
  --bg: #0a0b0f; --bg-soft: #101218; --panel: #14161d; --panel-alt: #1a1d26;
  --border: rgba(255,255,255,0.07); --border-soft: rgba(255,255,255,0.045);
  --text: #edecea; --text-dim: #92949e; --text-faint: #5a5c66;
  --accent: #3b6fd6; --accent-bright: #5b8aef; --accent-deep: #1e3a6e; --accent-soft: rgba(59,111,214,0.16);
  --on-accent: #0d1e3a;
  --good: #6fcf97; --bad: #e2685f; --warn: #f2b84b;
  --cat-blue: #5b8aef; --cat-teal: #4cc2d1; --cat-green: #6fcf97; --cat-amber: #f2b84b;
  --glow: transparent; --hero-glow: transparent; --scroll-thumb: rgba(255,255,255,0.12);
  color-scheme: dark;
}

/* ---------- Daylight (original light) ---------- */
:root[data-theme="daylight"] {
  --font-display: var(--font);
  --bg: #f4f5f8; --bg-soft: #ffffff; --panel: #ffffff; --panel-alt: #eceef4;
  --border: rgba(20,24,40,0.13); --border-soft: rgba(20,24,40,0.07);
  --text: #1a1d26; --text-dim: #4f5463; --text-faint: #737888;
  --accent: #2f62c9; --accent-bright: #2a58b8; --accent-deep: #1e3a6e; --accent-soft: rgba(47,98,201,0.12);
  --on-accent: #ffffff;
  --good: #1b8a4c; --bad: #c93d33; --warn: #a96a05;
  --cat-blue: #2a58b8; --cat-teal: #167a88; --cat-green: #1b8a4c; --cat-amber: #a96a05;
  --glow: transparent; --hero-glow: transparent; --scroll-thumb: #c9ccd6;
  color-scheme: light;
}

/* ---------- Ember: warm dark, like a fire in a dark room ---------- */
:root[data-theme="ember"] {
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --bg: #110e0c; --bg-soft: #181310; --panel: #1e1915; --panel-alt: #28211b;
  --border: rgba(255,226,196,0.09); --border-soft: rgba(255,226,196,0.055);
  --text: #f6ede2; --text-dim: #bcad9c; --text-faint: #948575;
  --accent: #e07a2f; --accent-bright: #f4a259; --accent-deep: #8f3f12; --accent-soft: rgba(244,162,89,0.14);
  --on-accent: #2b1406;
  --good: #a8d08d; --bad: #ef7b6b; --warn: #e9c46a;
  --cat-blue: #f4a259; --cat-teal: #5fc4b8; --cat-green: #a8d08d; --cat-amber: #e58fa8;
  --glow: rgba(224,122,47,0.10); --hero-glow: rgba(224,122,47,0.17); --scroll-thumb: rgba(255,226,196,0.14);
  color-scheme: dark;
}

/* ---------- Linen: warm paper, terracotta ink ---------- */
:root[data-theme="linen"] {
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --bg: #f4eee4; --bg-soft: #fbf7f0; --panel: #fffdf8; --panel-alt: #efe6d8;
  --border: rgba(70,45,20,0.15); --border-soft: rgba(70,45,20,0.085);
  --text: #2a2018; --text-dim: #64554a; --text-faint: #7d6e60;
  --accent: #c2561a; --accent-bright: #ad4712; --accent-deep: #7b2f08; --accent-soft: rgba(194,86,26,0.11);
  --on-accent: #ffffff;
  --good: #3d7a39; --bad: #b53a2d; --warn: #a56a00;
  --cat-blue: #ad4712; --cat-teal: #17787a; --cat-green: #3d7a39; --cat-amber: #a63f68;
  --glow: rgba(194,86,26,0.07); --hero-glow: rgba(194,86,26,0.10); --scroll-thumb: #d5c9b8;
  color-scheme: light;
}
