/* ============================================
   RITHM - CSS Custom Properties
   Cinematic dark palette. Dark mode default.
   ============================================ */

:root {
  color-scheme: dark;

  /* Typography families — re-pointed at stage mono stack */
  --font-sans: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Brand colors — STAGE rack palette (amber primary) */
  --color-primary: #FFB020;
  --color-primary-dark: #7A4F0E;
  --color-primary-light: #FFD66B;
  --color-primary-glow: rgba(255, 176, 32, 0.15);
  --color-success: #5CE08B;
  --color-success-dark: #2BAA5A;
  --color-danger: #FF4D4D;
  --color-danger-dark: #C73838;
  --color-warning: #FFB020;
  --color-warning-dark: #7A4F0E;
  --color-info: #4A9EFF;

  /* Dark theme (default) — STAGE chassis */
  --bg-deep: #050507;
  --bg-base: #1A1A1C;
  --bg-elevated: #26262A;
  --bg-surface: #0E0E10;
  --text-primary: #E8E8EE;
  --text-secondary: #A8A8B0;
  --text-muted: #7A7A82;
  --border-color: #000;
  --border-hover: #55555E;
  --input-bg: #0A0A0C;
  --input-border: #000;

  /* Surface tints */
  --surface-alpha: rgba(255, 176, 32, 0.04);
  --surface-primary: rgba(255, 176, 32, 0.08);
  --surface-success: rgba(92, 224, 139, 0.08);
  --surface-danger: rgba(255, 77, 77, 0.08);
  --surface-warning: rgba(255, 176, 32, 0.08);
  --surface-info: rgba(74, 158, 255, 0.08);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-card: inset 0 1px 0 #55555E, inset 0 -1px 0 #000, 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 20px rgba(255, 176, 32, 0.15);
  --shadow-focus: 0 0 0 2px rgba(255, 176, 32, 0.5);

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius — sharper to match hardware aesthetic */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --radius-xl: 6px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-modal: 300ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Sidebar (legacy — rack-nav is wider) */
  --sidebar-width: 264px;
  --sidebar-collapsed-width: 56px;

  /* Right Panel (legacy — removed but tokens kept for any stragglers) */
  --right-panel-width: 320px;
  --right-panel-collapsed-width: 48px;

  /* Semantic aliases (referenced by component CSS) */
  --color-primary-hover: #FFD66B;
  --color-secondary: #A8A8B0;
  --color-accent: #FFB020;
  --accent-dark: #7A4F0E;
  --olive: #8A9A6A;

  /* Legacy compat — repointed at STAGE tokens so existing CSS / JS get the new look */
  --primary: #FFB020;
  --primary-dark: #7A4F0E;
  --primary-light: #FFD66B;
  --secondary: #A8A8B0;
  --accent: #FFB020;
  --success: #5CE08B;
  --warning: #FFB020;
  --danger: #FF4D4D;
  --bg-primary: #1A1A1C;
  --bg-secondary: #26262A;
  --bg-card: #26262A;
  --bg-navbar: #1A1A1C;
  --dark: #050507;
  --dark-lighter: #1A1A1C;
  --light: #E8E8EE;
  --gray: #7A7A82;
  --shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.7);
  --alert-error-text: #FF8A8A;
  --alert-success-text: #5CE08B;
  --card-glow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
