/* Base CSS - Variables, Reset, Body Styling */

:root {
  /* Foundation — warm-neutral ramp. Deliberately not cold Tailwind gray, which
     (with indigo) is the "AI-generated dashboard" tell. Warm reads editorial. */
  --bg: #f8f8f6;
  --ink: #0a0a0a;
  --muted: #6b6b67;
  --muted-strong: #3a3a37;
  --surface: #ffffff;
  --surface-subtle: #f3f3f0;
  --surface-hover: #eeeeea;
  --border: #e6e5e0;
  --border-hover: #d5d4cd;

  /* Brand accent — "Ravi Blue", a clean azure (cyan-leaning so it reads
     unambiguously blue on the warm canvas — never violet). The one main/action
     color. Intentionally not a round Tailwind value, and never purple. */
  --accent: #0b6bdb;
  --accent-hover: #0a55ad;
  --accent-contrast: #ffffff;
  --accent-subtle: rgba(11, 107, 219, 0.08);
  --accent-ring: rgba(11, 107, 219, 0.38);

  /* State — functional only, never decorative or a CTA */
  --success: #15803d;
  --warning: #b45309;
  --danger: #dc2626;
  --success-subtle: rgba(21, 128, 61, 0.1);
  --warning-subtle: rgba(180, 83, 9, 0.1);
  --danger-subtle: #fdeaea;

  /* Legacy aliases — existing components inherit the new system.
     `--teal` (the old interactive accent) now resolves to the brand accent;
     `--red`/`--error` resolve to the destructive color; `--green`/`--amber`
     to their state colors. Prefer the semantic tokens above in new code. */
  --error: var(--danger);
  --red: var(--danger);
  --green: var(--success);
  --amber: var(--warning);
  --teal: var(--accent);
  --teal-light: var(--accent-subtle);
  --red-light: var(--danger-subtle);
  --green-light: var(--success-subtle);
  --amber-light: var(--warning-subtle);

  /* Typography — Inter for all UI/body; JetBrains Mono for code, data, labels */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --font-heading: var(--font-sans);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Elevation — subtle, layered depth. Tactile, not flat; flatness is what
     reads "unfinished". Overlay is reserved for modals/menus. */
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04), 0 1px 3px rgba(10, 10, 10, 0.06);
  --shadow-md: 0 2px 4px rgba(10, 10, 10, 0.04), 0 8px 20px rgba(10, 10, 10, 0.08);
  --shadow-overlay: 0 20px 56px rgba(10, 10, 10, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

/* Consistent, on-brand focus for keyboard users — a polish tell. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
