/* ============================================================
   SPOTWEBNG DESIGN SYSTEM
   Design tokens and foundational CSS variables
   ============================================================ */

/* ===== COLOR TOKENS ===== */
:root {
  /* Base Colors */
  --ds-bg-base: #0a0a12;
  --ds-bg-surface: #12121a;
  --ds-bg-elevated: #1a1a24;
  --ds-bg-overlay: rgba(0, 0, 0, 0.8);

  /* Text Colors */
  --ds-text-primary: #ffffff;
  --ds-text-secondary: #a0a0a0;
  --ds-text-muted: #666666;
  --ds-text-inverse: #000000;

  /* Accent Colors */
  --ds-accent-primary: #06b6d4;    /* Cyan */
  --ds-accent-secondary: #8b5cf6;  /* Purple */
  --ds-accent-tertiary: #10b981;   /* Green */

  /* Status Colors */
  --ds-success: #10b981;
  --ds-warning: #f59e0b;
  --ds-error: #ef4444;
  --ds-info: #3b82f6;

  /* Border Colors */
  --ds-border-subtle: rgba(255, 255, 255, 0.08);
  --ds-border-default: rgba(255, 255, 255, 0.12);
  --ds-border-strong: rgba(255, 255, 255, 0.2);
}

/* ===== TYPOGRAPHY SCALE ===== */
:root {
  /* Font Families */
  --ds-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ds-font-mono: 'SF Mono', Monaco, 'Courier New', monospace;

  /* Font Sizes */
  --ds-text-xs: 0.75rem;    /* 12px */
  --ds-text-sm: 0.875rem;   /* 14px */
  --ds-text-base: 1rem;     /* 16px */
  --ds-text-lg: 1.125rem;   /* 18px */
  --ds-text-xl: 1.25rem;    /* 20px */
  --ds-text-2xl: 1.5rem;    /* 24px */
  --ds-text-3xl: 1.875rem;  /* 30px */
  --ds-text-4xl: 2.25rem;   /* 36px */

  /* Font Weights */
  --ds-font-normal: 400;
  --ds-font-medium: 500;
  --ds-font-semibold: 600;
  --ds-font-bold: 700;

  /* Line Heights */
  --ds-leading-tight: 1.25;
  --ds-leading-normal: 1.5;
  --ds-leading-relaxed: 1.75;
}

/* ===== SPACING SCALE ===== */
:root {
  --ds-space-1: 0.25rem;   /* 4px */
  --ds-space-2: 0.5rem;    /* 8px */
  --ds-space-3: 0.75rem;   /* 12px */
  --ds-space-4: 1rem;      /* 16px */
  --ds-space-5: 1.25rem;   /* 20px */
  --ds-space-6: 1.5rem;    /* 24px */
  --ds-space-8: 2rem;      /* 32px */
  --ds-space-10: 2.5rem;   /* 40px */
  --ds-space-12: 3rem;     /* 48px */
  --ds-space-16: 4rem;     /* 64px */
}

/* ===== BORDER RADIUS ===== */
:root {
  --ds-radius-sm: 4px;
  --ds-radius-md: 8px;
  --ds-radius-lg: 12px;
  --ds-radius-xl: 16px;
  --ds-radius-2xl: 24px;
  --ds-radius-full: 9999px;
}

/* ===== SHADOWS ===== */
:root {
  --ds-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --ds-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --ds-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --ds-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
  --ds-shadow-glow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* ===== TRANSITIONS ===== */
:root {
  --ds-transition-fast: 150ms ease;
  --ds-transition-normal: 250ms ease;
  --ds-transition-slow: 400ms ease;
  --ds-transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --ds-transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Z-INDEX SCALE ===== */
:root {
  --ds-z-base: 0;
  --ds-z-dropdown: 100;
  --ds-z-sticky: 200;
  --ds-z-fixed: 300;
  --ds-z-modal-backdrop: 400;
  --ds-z-modal: 500;
  --ds-z-popover: 600;
  --ds-z-tooltip: 700;
  --ds-z-toast: 800;
}

/* ===== GLASS EFFECTS ===== */
:root {
  --ds-glass-blur-sm: blur(8px);
  --ds-glass-blur-md: blur(16px);
  --ds-glass-blur-lg: blur(32px);
  --ds-glass-blur-xl: blur(48px);
  --ds-glass-bg: rgba(255, 255, 255, 0.05);
  --ds-glass-border: rgba(255, 255, 255, 0.1);
}

/* ===== POSTER SIZES ===== */
:root {
  /* Default sizes */
  --ds-poster-width-sm: 120px;
  --ds-poster-height-sm: 180px;
  --ds-poster-width-md: 150px;
  --ds-poster-height-md: 225px;
  --ds-poster-width-lg: 180px;
  --ds-poster-height-lg: 270px;
  --ds-poster-width-xl: 220px;
  --ds-poster-height-xl: 330px;
}

/* ===== LAYOUT ===== */
:root {
  --ds-sidebar-width: 280px;
  --ds-sidebar-width-collapsed: 80px;
  --ds-header-height: 64px;
  --ds-content-max-width: 1600px;
}

/* Design system uses consolidated glass theme - no variant switching needed */

/* ===== CONTROL SIZING =====
   One height for every interactive control so toolbars line up exactly. */
:root {
  --ds-control-height: 40px;
  --ds-control-radius: var(--ds-radius-md);
}

/* ===== FONTS (self-hosted — no external requests from a LAN install) ===== */
@font-face {
  font-family: 'Instrument Sans';
  src: url('/static/fonts/InstrumentSans.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono.woff2') format('woff2');
  font-weight: 400 500; font-style: normal; font-display: swap;
}

/* ===== THEME 2: STUDIO =====
   From the Spotweb Settings design. Colour tokens + typefaces only —
   spacing, type scale and radii stay shared with the default theme. */
[data-theme="midnight"] {
  --ds-bg-base: #07080C;
  --ds-bg-surface: #0B0E15;
  --ds-bg-elevated: #0F1420;
  --ds-bg-overlay: rgba(0, 0, 0, 0.86);

  --ds-text-primary: #F2F4F8;
  --ds-text-secondary: #98A1B4;
  --ds-text-muted: #5B6377;

  --ds-accent-primary: #6E56F8;
  --ds-accent-secondary: #8B7BFF;
  --ds-accent-tertiary: #34d399;

  --ds-border-subtle: #1B2130;
  --ds-border-default: #1E2534;
  --ds-border-strong: #2A3348;

  --ds-glass-bg: #141926;
  --ds-glass-border: #1E2534;
  --ds-shadow-glow: 0 0 24px rgba(110, 86, 248, 0.30);

  --ds-font-sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ds-font-mono: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
}
