/**
 * BBI Design System - CSS Variables & Tokens
 */

:root {
  /* Brand Accent Colors */
  --color-brand: #f26522;
  --color-brand-hover: #ff7a3d;
  --color-brand-active: #d64f0f;
  --color-brand-glow: rgba(242, 101, 34, 0.22);
  --color-brand-subtle: rgba(242, 101, 34, 0.10);
  --color-brand-border: rgba(242, 101, 34, 0.35);

  /* Typography Stacks */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-editorial: 'Newsreader', 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, Menlo, monospace;

  /* Font Scales (Fluid clamp) */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --font-size-sm: clamp(0.875rem, 0.825rem + 0.25vw, 0.9375rem);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --font-size-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --font-size-xl: clamp(1.35rem, 1.25rem + 0.5vw, 1.55rem);
  --font-size-2xl: clamp(1.65rem, 1.5rem + 0.75vw, 2rem);
  --font-size-3xl: clamp(2rem, 1.75rem + 1.25vw, 2.75rem);
  --font-size-4xl: clamp(2.5rem, 2.1rem + 2vw, 3.75rem);
  --font-size-5xl: clamp(3rem, 2.5rem + 2.8vw, 4.75rem);

  /* Spacing Scale */
  --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;
  --space-32: 8rem;

  /* Layout */
  --container-max: 1240px;
  --container-narrow: 840px;
  --header-height: 80px;

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ☀️ Light Mode (Default / Luxury Editorial Tech Aesthetic) */
:root,
:root[data-theme="light"],
.editor-styles-wrapper {
  --color-bg: #faf9f6;
  --color-bg-secondary: #f0eee8;
  --color-surface: #ffffff;
  --color-surface-hover: #f3f1ea;
  --color-surface-elevated: #ffffff;
  --color-border: rgba(15, 23, 42, 0.14);
  --color-border-hover: rgba(15, 23, 42, 0.28);
  --color-border-focus: rgba(214, 79, 15, 0.8);

  /* High contrast accessible typography */
  --color-text: #0a0f1d;
  --color-text-muted: #2d3748;
  --color-text-faint: #4a5568;
  --color-text-inverse: #ffffff;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 35px rgba(242, 101, 34, 0.22);

  --badge-bg: rgba(15, 23, 42, 0.06);
  --badge-border: rgba(15, 23, 42, 0.14);
  --badge-text: #0a0f1d;

  --card-gradient: none;
  --divider-color: rgba(15, 23, 42, 0.12);
  --header-bg: rgba(250, 249, 246, 0.88);
}

/* 🌙 Dark Mode (High-End Obsidian Tech Aesthetic) */
:root[data-theme="dark"] {
  --color-bg: #0b0f14;
  --color-bg-secondary: #080b0f;
  --color-surface: #111620;
  --color-surface-hover: #171f2b;
  --color-surface-elevated: #161c28;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.18);
  --color-border-focus: rgba(242, 101, 34, 0.6);

  --color-text: #f3f6fa;
  --color-text-muted: #94a3b8;
  --color-text-faint: #64748b;
  --color-text-inverse: #0b0f14;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 35px var(--color-brand-glow);

  --badge-bg: rgba(255, 255, 255, 0.05);
  --badge-border: rgba(255, 255, 255, 0.1);
  --badge-text: #cbd5e1;

  --card-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
  --divider-color: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(11, 15, 20, 0.82);
}
