/* Keyfern design tokens. Shared by the website, docs AND the dashboard so they look like one product.
   Fonts are self-hosted (Inter + JetBrains Mono, both SIL OFL). Do not add external fonts or CDNs. */
@font-face { font-family: 'Inter'; src: url('/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jbmono-var.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 20px; --radius-xl: 28px;
  --maxw: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* brand: fern green -> mint, with a cool teal-blue companion for contrast */
  --brand: #3ddc97;
  --brand-strong: #1fb877;
  --brand-ink: #04281a;
  --brand-2: #5ad1e6;
  --grad: #3ddc97;
  --grad-text: linear-gradient(180deg, #ffffff 0%, #9fb3aa 100%);
  --ok: #3ddc97; --warn: #f5b73b; --bad: #ff6b6b; --info: #6ea8fe;
}

/* DARK (default for the marketing site; dashboard follows the system unless the user picked a theme) */
:root, :root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #07100c;
  --bg-2: #0b1511;
  --card: #0f1a15;
  --card-2: #13211b;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eaf2ee;
  --text-2: #b4c4bc;
  --muted: #7f948b;
  --code-bg: #060d0a;
  --glow: 0 0 0 1px rgba(61, 220, 151, .35);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 50px -20px rgba(0, 0, 0, .8);
  --grad-text: linear-gradient(180deg, #ffffff 0%, #9fb3aa 100%);
  --brand-on-bg: #3ddc97;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #fbfdfc;
  --bg-2: #f2f7f4;
  --card: #ffffff;
  --card-2: #f6faf8;
  --border: rgba(7, 32, 21, .10);
  --border-strong: rgba(7, 32, 21, .22);
  --text: #0a1712;
  --text-2: #33463d;
  --muted: #60756b;
  --code-bg: #0b1511;
  --glow: 0 0 0 1px rgba(17, 138, 92, .35);
  --shadow: 0 1px 2px rgba(7, 32, 21, .06), 0 20px 40px -24px rgba(7, 32, 21, .25);
  --grad-text: linear-gradient(180deg, #0a1712 0%, #35564a 100%);
  --brand: #118a5c;
  --brand-strong: #0c6b47;
  --brand-on-bg: #0c6b47;
  --grad: #14a36e;
  --ok: #0f7a52; --warn: #96620a; --bad: #c43232; --info: #2563c9;
}

/* No explicit choice: follow the OS (dashboard + docs). The marketing site sets data-theme='dark' by default via theme.js. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #fbfdfc; --bg-2: #f2f7f4; --card: #ffffff; --card-2: #f6faf8;
    --border: rgba(7, 32, 21, .10); --border-strong: rgba(7, 32, 21, .22);
    --text: #0a1712; --text-2: #33463d; --muted: #60756b; --code-bg: #0b1511;
    --glow: 0 0 0 1px rgba(17, 138, 92, .35);
    --shadow: 0 1px 2px rgba(7, 32, 21, .06), 0 20px 40px -24px rgba(7, 32, 21, .25);
    --grad-text: linear-gradient(180deg, #0a1712 0%, #35564a 100%);
    --brand: #118a5c; --brand-strong: #0c6b47; --brand-on-bg: #0c6b47;
    --grad: #14a36e;
  --ok: #0f7a52; --warn: #96620a; --bad: #c43232; --info: #2563c9;
  }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
