/* ===== Shadowhunter Systems — theme tokens ===== */
:root {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* radius (tweakable) */
  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* brand */
  --accent: #2f9bf6;
  --accent-hi: #5fb4ff;
  --accent-ink: #061321;
  --fire: #ff6a1a;
  --fire-hi: #ff8c42;
  --blurple: #5865f2;
  --blurple-hi: #7984ff;
  --green: #2fd07a;
  --amber: #f5b53a;
  --red: #f4525f;

  /* group identity */
  --g-asa: #38a8ff;
  --g-ase: #ff7a2f;
  --g-discord: #5865f2;
}

/* ---------- DARK (default) ---------- */
:root, :root[data-theme="dark"] {
  --bg: #08090d;
  --bg-grid: rgba(255,255,255,0.022);
  --bg-elev: #0e1016;
  --surface: #13151d;
  --surface-2: #181b24;
  --surface-3: #1f2330;
  --border: rgba(255,255,255,0.075);
  --border-strong: rgba(255,255,255,0.15);
  --text: #e8eaf0;
  --text-dim: #969cab;
  --text-faint: #606675;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.6);
  --accent-soft: rgba(47,155,246,.14);
  --fire-soft: rgba(255,106,26,.14);
  --blurple-soft: rgba(88,101,242,.16);
  --green-soft: rgba(47,208,122,.14);
  --red-soft: rgba(244,82,95,.15);
  --amber-soft: rgba(245,181,58,.15);
  color-scheme: dark;
}

/* ---------- LIGHT ---------- */
:root[data-theme="light"] {
  --bg: #f4f5f8;
  --bg-grid: rgba(10,15,30,0.025);
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --surface-3: #e9edf3;
  --border: rgba(12,16,30,0.10);
  --border-strong: rgba(12,16,30,0.20);
  --text: #0f1320;
  --text-dim: #5b6271;
  --text-faint: #939aa8;
  --shadow-sm: 0 1px 2px rgba(20,30,60,.06);
  --shadow-md: 0 10px 30px rgba(30,40,70,.10);
  --shadow-lg: 0 24px 60px rgba(30,40,70,.16);
  --accent: #1f7fe0;
  --accent-hi: #2f9bf6;
  --accent-soft: rgba(31,127,224,.10);
  --fire-soft: rgba(255,106,26,.12);
  --blurple-soft: rgba(88,101,242,.12);
  --green-soft: rgba(28,160,90,.12);
  --red-soft: rgba(220,50,65,.10);
  --amber-soft: rgba(210,150,20,.14);
  --green: #1ca05a;
  --red: #dc3241;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { min-height: 100vh; }

::selection { background: var(--accent-soft); }

/* scrollbars */
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

@keyframes sh-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sh-scale-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sh-spin { to { transform: rotate(360deg); } }
@keyframes sh-pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes sh-shimmer { to { background-position: 200% 0; } }

.sh-grid-bg {
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 56px 56px;
}
