/* =============================================================
   Synthetic Users Design System
   Colors + typography tokens
   ============================================================= */

/* ---------- Fonts ----------
   Inter is the single sans-serif face for body text and UI chrome alike.
   Brawler is the display serif for headings and section titles. Two
   typefaces, one job each — keeps the deck visually disciplined. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Brawler:wght@400;700&display=swap");

:root {
  /* ---------- Core brand ---------- */
  --su-violet-600: rgb(122, 103, 217);  /* primary / brand mark */
  --su-violet-500: rgb(138, 56, 245);   /* accent lines, dashed frames */
  --su-violet-700: rgb(115, 93, 223);   /* buttons (solid) */
  --su-violet-200: rgb(232, 229, 240);  /* soft button bg */
  --su-violet-100: rgb(243, 240, 250);

  /* ---------- Canvas / surfaces ---------- */
  --su-bg-canvas: rgb(245, 243, 240);   /* page cream */
  --su-bg-canvas-2: rgb(245, 242, 240); /* cover cream */
  --su-surface: rgb(255, 255, 255);
  --su-surface-muted: rgb(244, 244, 245);
  --su-surface-sunken: rgb(245, 245, 245);
  --su-surface-chip: rgb(236, 236, 236);

  /* ---------- Text (neutrals) ---------- */
  --su-ink-900: rgb(10, 10, 10);
  --su-ink-800: rgb(23, 23, 23);
  --su-ink-700: rgb(42, 42, 42);   /* default body */
  --su-ink-600: rgb(63, 64, 77);
  --su-ink-500: rgb(72, 72, 84);
  --su-ink-400: rgb(107, 114, 128);
  --su-ink-300: rgb(122, 122, 122);
  --su-ink-200: rgb(156, 163, 175);
  --su-ink-100: rgb(163, 163, 163);

  /* ---------- Borders / hairlines ---------- */
  --su-line-strong: rgb(203, 203, 203);
  --su-line: rgb(229, 229, 229);
  --su-line-soft: rgb(236, 236, 236);
  --su-line-dashed: rgb(138, 56, 245); /* Figma frame convention */

  /* ---------- Semantic ---------- */
  --su-success: rgb(22, 163, 74);
  --su-success-soft: rgb(220, 252, 231);
  --su-info: rgb(2, 132, 199);
  --su-info-soft: rgb(224, 242, 254);
  --su-warning: rgb(217, 119, 6);
  --su-warning-2: rgb(227, 146, 25);
  --su-warning-soft: rgb(254, 243, 199);
  --su-danger: rgb(220, 62, 62);
  --su-danger-2: rgb(224, 52, 52);
  --su-danger-soft: rgb(254, 226, 226);

  /* ---------- Shadows ---------- */
  --su-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --su-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --su-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --su-shadow-lg: 0 10px 24px -6px rgba(0, 0, 0, 0.12);
  --su-shadow-focus: 0 0 0 3px rgba(122, 103, 217, 0.25);
  --su-shadow-ring-muted: 0 0 0 4px rgba(161, 161, 170, 0.5);

  /* ---------- Radius ---------- */
  --su-radius-xs: 4px;
  --su-radius-sm: 6px;
  --su-radius-md: 8px;
  --su-radius-lg: 12px;
  --su-radius-xl: 14px;
  --su-radius-2xl: 24px;
  --su-radius-pill: 9999px;

  /* ---------- Spacing scale (based on Figma 4/8 grid) ---------- */
  --su-space-1: 4px;
  --su-space-2: 8px;
  --su-space-3: 12px;
  --su-space-4: 16px;
  --su-space-5: 20px;
  --su-space-6: 24px;
  --su-space-8: 32px;
  --su-space-10: 40px;
  --su-space-12: 48px;
  --su-space-16: 64px;

  /* ---------- Font stacks ---------- */
  --su-font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --su-font-text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --su-font-display: "Brawler", ui-serif, Georgia, "Times New Roman", serif;
  --su-font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* ---------- Semantic text tokens ---------- */
  --fg-1: var(--su-ink-700);   /* primary body text */
  --fg-2: var(--su-ink-400);   /* secondary / meta */
  --fg-3: var(--su-ink-200);   /* tertiary / placeholder */
  --fg-brand: var(--su-violet-600);
  --fg-inverse: #ffffff;
  --bg-1: var(--su-bg-canvas);
  --bg-2: var(--su-surface);
  --bg-3: var(--su-surface-muted);
}

/* ---------- Base element styles ---------- */
html, body {
  background: var(--bg-1);
  color: var(--fg-1);
  font-family: var(--su-font-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, .h1 {
  font-family: var(--su-font-text);
  font-weight: 700;
  font-size: 64px;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--fg-brand);
}
h2, .h2 {
  font-family: var(--su-font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
  color: var(--su-ink-800);
}
h3, .h3 {
  font-family: var(--su-font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: var(--su-ink-700);
}
h4, .h4 {
  font-family: var(--su-font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.4;
  color: var(--su-ink-700);
}
.display-lg {
  font-family: var(--su-font-text);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.subtitle {
  font-family: var(--su-font-text);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  color: var(--su-ink-400);
}

p, .body {
  font-family: var(--su-font-text);
  font-size: 14px;
  line-height: 20px;
  color: var(--fg-1);
}
.body-sm { font-size: 12px; line-height: 16px; color: var(--fg-2); }
.body-md { font-size: 14px; line-height: 20px; color: var(--fg-1); }
.body-lg { font-size: 16px; line-height: 24px; color: var(--fg-1); }

/* Geist is used for UI chrome: buttons, tabs, form fields, tables */
.ui, .ui-md { font-family: var(--su-font-ui); font-weight: 500; font-size: 14px; line-height: 20px; }
.ui-sm     { font-family: var(--su-font-ui); font-weight: 500; font-size: 12px; line-height: 16px; }
.ui-lg     { font-family: var(--su-font-ui); font-weight: 500; font-size: 16px; line-height: 24px; }
.ui-regular { font-family: var(--su-font-ui); font-weight: 400; }

.label    { font-family: var(--su-font-ui); font-weight: 500; font-size: 14px; color: var(--su-ink-700); }
.meta     { font-family: var(--su-font-text); font-weight: 500; font-size: 12px; line-height: 16px; color: var(--fg-2); }
.code, code, pre { font-family: var(--su-font-mono); font-size: 13px; }

/* Focus ring */
:where(button, input, select, textarea, a):focus-visible {
  outline: none;
  box-shadow: var(--su-shadow-focus);
  border-radius: inherit;
}
