/* Spark — shared design tokens (site + GUI / IDE)
 *
 * Engineer-tool aesthetic: warm ember brand on cool neutrals.
 * Not OpenBin / not generic AI purple / cream-serif.
 * GUI mirrors hex values in tools/spark_bc_gui/theme.py.
 */

:root {
  /* —— Surfaces —— */
  --spark-bg: #ffffff;
  --spark-bg-subtle: #f4f6f8;
  --spark-bg-elevated: #ffffff;
  --spark-bg-code: #f1f3f5;
  --spark-bg-muted: #e8ecf0;

  --spark-border: #d0d5dd;
  --spark-border-light: #e4e7ec;
  --spark-border-strong: #98a2b3;

  /* —— Text —— */
  --spark-text: #101828;
  --spark-text-muted: #475467;
  --spark-text-subtle: #667085;
  --spark-text-inverse: #ffffff;

  /* —— Brand (ember — Spark mark) —— */
  --spark-brand: #e85d04;
  --spark-brand-dark: #c44d03;
  --spark-brand-light: #fff4ed;
  --spark-brand-glow: rgba(232, 93, 4, 0.12);

  --spark-link: #0265c8;
  --spark-link-hover: #024a94;

  /* —— Header / chrome —— */
  --spark-header-bg: #1c1f24;
  --spark-header-text: #ffffff;
  --spark-header-muted: #b0b7c3;

  /* —— Semantic (status chips) —— */
  --spark-ok-bg: #ecfdf3;
  --spark-ok-fg: #067647;
  --spark-warn-bg: #fffaeb;
  --spark-warn-fg: #b54708;
  --spark-info-bg: #eff8ff;
  --spark-info-fg: #175cd3;

  /* —— IDE / dense tool chrome (dark engineer) —— */
  --ide-bg: #12151a;
  --ide-bg-panel: #1a1e26;
  --ide-bg-elevated: #222833;
  --ide-border: #2e3642;
  --ide-border-soft: #252b36;
  --ide-text: #e8eaed;
  --ide-text-muted: #9aa3b2;
  --ide-accent: #e85d04;
  --ide-accent-soft: rgba(232, 93, 4, 0.16);
  --ide-selection: rgba(2, 101, 200, 0.28);
  --ide-focus: #5eb1ff;

  /* —— Typography —— */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code",
    "Source Code Pro", Menlo, Consolas, monospace;
  --font-size-root: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-xs: 0.8125rem;
  --line-height-body: 1.6;
  --line-height-tight: 1.35;
  --letter-tight: -0.02em;

  /* —— Spacing scale —— */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;

  /* —— Radius —— */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* —— Layout —— */
  --max-width: 72rem;
  --doc-measure: 56rem;
  --sidebar-width: 14rem;
  --header-height: 3.35rem;
  --ide-rail-width: 13rem;
  --ide-tools-width: 16rem;

  /* —— Elevation —— */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06),
    0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.1),
    0 2px 4px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 28px rgba(16, 24, 40, 0.12),
    0 4px 8px rgba(16, 24, 40, 0.06);
  --shadow-focus: 0 0 0 3px var(--spark-brand-glow);

  /* —— Motion (150–250ms; respect prefers-reduced-motion in site.css) —— */
  --motion-fast: 150ms;
  --motion-base: 200ms;
  --motion-slow: 250ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);

  /* —— Focus —— */
  --focus-ring: 2px solid var(--spark-brand);
  --focus-ring-offset: 2px;
  --focus-ring-ide: 2px solid var(--ide-focus);
}

/* Optional dark site chrome for future toggle — keep light default */
[data-theme="dark"] {
  --spark-bg: #12151a;
  --spark-bg-subtle: #1a1e26;
  --spark-bg-elevated: #222833;
  --spark-bg-code: #1e2430;
  --spark-border: #2e3642;
  --spark-border-light: #252b36;
  --spark-text: #e8eaed;
  --spark-text-muted: #9aa3b2;
  --spark-text-subtle: #7a8494;
  --spark-brand-light: rgba(232, 93, 4, 0.14);
  --spark-link: #5eb1ff;
  --spark-link-hover: #8ec8ff;
}
