/* NexOs theme: brand fonts and UI tokens. Loaded after each page's own stylesheet so these values win.
   Source of truth: web/brand/tokens.json. Brand guide: /brand */

@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  /* Brand palette */
  --nx-ink-950: #06080c;
  --nx-ink-900: #0a0c10;
  --nx-ink-800: #11151d;
  --nx-ink-700: #171c26;
  --nx-ink-600: #222938;
  --nx-text: #e9edf5;
  --nx-muted: #8a94a8;
  --nx-mint: #34d399;
  --nx-blue: #3b82f6;
  --nx-violet: #8b5cf6;
  --nx-amber: #fbbf24;
  --nx-red: #f87171;
  --nx-signal: linear-gradient(135deg, var(--nx-mint), var(--nx-blue) 55%, var(--nx-violet));

  /* Type */
  --nx-font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --nx-font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nx-font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  /* Semantic tokens (dark is the default theme) */
  --nx-bg: var(--nx-ink-900);
  --nx-surface: var(--nx-ink-800);
  --nx-surface-2: var(--nx-ink-700);
  --nx-border: var(--nx-ink-600);
  --nx-fg: var(--nx-text);
  --nx-fg-muted: var(--nx-muted);
  --nx-accent: var(--nx-blue);
  --nx-ok: var(--nx-mint);
  --nx-warn: var(--nx-amber);
  --nx-danger: var(--nx-red);

  /* Map onto the variables the dashboard stylesheets already use */
  --bg: var(--nx-bg);
  --surface: var(--nx-surface);
  --surface-2: var(--nx-surface-2);
  --border: var(--nx-border);
  --text: var(--nx-fg);
  --muted: var(--nx-fg-muted);
  --accent: var(--nx-accent);
  --ok: var(--nx-ok);
  --danger: var(--nx-danger);
}

/* Light theme, for pages that opt in with class="theme-light" on <html> or <body>. */
.theme-light {
  color-scheme: light;
  --nx-bg: #f6f7fb;
  --nx-surface: #ffffff;
  --nx-surface-2: #eef1f6;
  --nx-border: #e2e6ee;
  --nx-fg: #0d1220;
  --nx-fg-muted: #5a6477;
  --nx-accent: #2563eb;
  --nx-ok: #059669;
  --nx-warn: #b45309;
  --nx-danger: #dc2626;
}

html, body { font-family: var(--nx-font-ui); }
code, pre, kbd, samp { font-family: var(--nx-font-mono); }
h1, h2, .title, .brand-name, .auth-title, .nx-display { font-family: var(--nx-font-display); letter-spacing: -0.01em; }

/* Wordmark rendered as text so it stays crisp at any size: <span class="nx-wordmark">Nex<b>Os</b></span> */
.nx-wordmark { font-family: var(--nx-font-display); font-weight: 700; letter-spacing: -0.02em; }
.nx-wordmark b { font-weight: inherit; background: var(--nx-signal); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Brand placements in the dashboard */
.brand-icon { border-radius: 7px; }
.title.nx-wordmark { font-size: 20px; }
.auth-mascot, .empty-mascot { display: block; margin: 0 auto; height: auto; }
.auth-mascot { width: 120px; margin-bottom: 4px; }
.empty-mascot { width: 96px; margin-bottom: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .auth-mascot, .empty-mascot { animation: nx-float 4s ease-in-out infinite; }
}
@keyframes nx-float { 50% { transform: translateY(-5px); } }
