/* ========================================================================== 
   StudioFlow — premium design tokens
   Quiet surfaces, editorial typography, near-black dark mode, restrained blue.
   ========================================================================== */

:root {
  /* Type */
  --font-display: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.8125rem;  /* 13px */
  --text-base: 0.9375rem;/* 15px */
  --text-md: 1rem;       /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.375rem;   /* 22px */
  --text-2xl: 1.75rem;   /* 28px */
  --text-3xl: 2.25rem;   /* 36px */
  --text-4xl: 3rem;      /* 48px */
  --text-5xl: 3.75rem;   /* 60px */

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radius & shadow */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 20px 40px -6px rgba(15, 23, 42, 0.16), 0 8px 16px -4px rgba(15, 23, 42, 0.08);

  --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 280ms cubic-bezier(0.16, 1, 0.3, 1);

  --sidebar-width: 252px;
  --topbar-height: 64px;
  --content-max: 1160px;

  /* ---- Light theme (default) ---- */
  --color-bg: #f8f9fb;
  --color-bg-subtle: #f0f2f6;
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;
  --color-border: #e2e6ed;
  --color-border-strong: #cfd5e1;

  --color-ink: #0f141e;
  --color-ink-soft: #4b5568;
  --color-ink-faint: #7e8b9f;
  --color-ink-on-accent: #ffffff;

  --color-accent: #4856df;
  --color-accent-hover: #3b48c7;
  --color-accent-soft: #edf0ff;
  --color-accent-border: #cdd5fb;

  --color-success: #108548;
  --color-success-hover: #0c6e3b;
  --color-success-soft: #e8f7ee;
  --color-success-border: #b8e6cb;

  --color-warning: #b7740b;
  --color-warning-hover: #9c6206;
  --color-warning-soft: #fdf5e7;
  --color-warning-border: #f7ddb2;

  --color-danger: #d93838;
  --color-danger-hover: #bd2a2a;
  --color-danger-soft: #fdeeee;
  --color-danger-border: #f8c3c3;

  --color-overlay: rgba(15, 20, 30, 0.48);

  color-scheme: light;
}

[data-theme="dark"] {
  /* ---- Dark theme — rich, layered slate palette ---- */
  --color-bg: #0b0d13;
  --color-bg-subtle: #11141d;
  --color-surface: #171b26;
  --color-surface-raised: #1e2230;
  --color-border: #232938;
  --color-border-strong: #31384c;

  --color-ink: #f2f4f8;
  --color-ink-soft: #9aa5b9;
  --color-ink-faint: #636e84;
  --color-ink-on-accent: #ffffff;

  --color-accent: #5e6ef5;
  --color-accent-hover: #7583f8;
  --color-accent-soft: rgba(94, 110, 245, 0.12);
  --color-accent-border: rgba(94, 110, 245, 0.26);

  --color-success: #2ebd74;
  --color-success-hover: #3ed084;
  --color-success-soft: rgba(46, 189, 116, 0.12);
  --color-success-border: rgba(46, 189, 116, 0.25);

  --color-warning: #e59e2e;
  --color-warning-hover: #f0ad43;
  --color-warning-soft: rgba(229, 158, 46, 0.12);
  --color-warning-border: rgba(229, 158, 46, 0.25);

  --color-danger: #ea4e4e;
  --color-danger-hover: #f16969;
  --color-danger-soft: rgba(234, 78, 78, 0.12);
  --color-danger-border: rgba(234, 78, 78, 0.25);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 18px -2px rgba(0, 0, 0, 0.45), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 36px -4px rgba(0, 0, 0, 0.55), 0 6px 16px -2px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 24px 48px -8px rgba(0, 0, 0, 0.65);

  --color-overlay: rgba(3, 5, 8, 0.72);

  color-scheme: dark;
}
