/* ==========================================================================
   RustPress Enterprise Theme - Design System Variables
   ========================================================================== */

:root {
  /* ========== Color Palette - Rust Orange Theme ========== */

  /* Primary Colors - Rust/Orange */
  --color-rust: #CE422B;
  --color-rust-light: #E05A3E;
  --color-rust-dark: #A33520;
  --color-rust-glow: rgba(206, 66, 43, 0.5);

  /* Secondary Colors - Copper/Bronze */
  --color-copper: #B87333;
  --color-copper-light: #D4894A;
  --color-copper-dark: #8B5A2B;

  /* Accent Colors - Warm Tones */
  --color-accent: #E97451;
  --color-accent-light: #FF9472;
  --color-accent-dark: #C45D3E;
  --color-gold: #FFB347;
  --color-amber: #FFBF00;

  /* Background Colors - Dark Theme */
  --color-bg-primary: #0A0A0A;
  --color-bg-secondary: #111111;
  --color-bg-tertiary: #1A1A1A;
  --color-bg-elevated: #222222;
  --color-bg-card: #1E1E1E;
  --color-bg-hover: #2A2A2A;

  /* Surface Colors with Transparency */
  --color-surface: rgba(26, 26, 26, 0.8);
  --color-surface-light: rgba(42, 42, 42, 0.6);
  --color-glass: rgba(255, 255, 255, 0.05);
  --color-glass-border: rgba(255, 255, 255, 0.1);

  /* Text Colors */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #B0B0B0;
  --color-text-muted: #707070;
  --color-text-accent: var(--color-rust-light);
  --color-text-link: var(--color-accent);

  /* Semantic Colors */
  --color-success: #4ADE80;
  --color-warning: #FBBF24;
  --color-error: #F87171;
  --color-info: #60A5FA;

  /* Gradients */
  --gradient-rust: linear-gradient(135deg, #CE422B 0%, #E97451 50%, #FFB347 100%);
  --gradient-rust-vertical: linear-gradient(180deg, #CE422B 0%, #E97451 100%);
  --gradient-sunset: linear-gradient(135deg, #CE422B 0%, #B87333 50%, #FFB347 100%);
  --gradient-fire: linear-gradient(135deg, #FF4500 0%, #CE422B 50%, #8B0000 100%);
  --gradient-warm: linear-gradient(135deg, #E97451 0%, #FFB347 100%);
  --gradient-dark: linear-gradient(180deg, #0A0A0A 0%, #1A1A1A 100%);
  --gradient-radial: radial-gradient(ellipse at center, rgba(206, 66, 43, 0.15) 0%, transparent 70%);
  --gradient-glow: radial-gradient(ellipse at center, var(--color-rust-glow) 0%, transparent 70%);
  --gradient-mesh:
    radial-gradient(at 40% 20%, rgba(206, 66, 43, 0.3) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(184, 115, 51, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(233, 116, 81, 0.2) 0px, transparent 50%),
    radial-gradient(at 80% 50%, rgba(255, 179, 71, 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(206, 66, 43, 0.2) 0px, transparent 50%);

  /* ========== Typography ========== */

  /* Font Families */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes - Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
  --text-5xl: clamp(3rem, 2rem + 5vw, 4.5rem);
  --text-6xl: clamp(3.75rem, 2.5rem + 6.25vw, 6rem);
  --text-hero: clamp(2.5rem, 1.5rem + 5vw, 5rem);

  /* Font Weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ========== Spacing System ========== */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
  --space-40: 10rem;    /* 160px */
  --space-48: 12rem;    /* 192px */

  /* Section Spacing */
  --section-padding: clamp(4rem, 8vw, 8rem);
  --section-gap: clamp(6rem, 12vw, 12rem);

  /* ========== Layout ========== */
  --container-xs: 540px;
  --container-sm: 720px;
  --container-md: 960px;
  --container-lg: 1140px;
  --container-xl: 1320px;
  --container-2xl: 1536px;
  --container-padding: clamp(1rem, 5vw, 2rem);

  /* ========== Borders & Radius ========== */
  --radius-none: 0;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;
  --radius-full: 9999px;

  --border-width: 1px;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  --border-rust: rgba(206, 66, 43, 0.3);

  /* ========== Shadows ========== */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px var(--color-rust-glow);
  --shadow-glow-lg: 0 0 40px var(--color-rust-glow), 0 0 80px rgba(206, 66, 43, 0.3);
  --shadow-glow-accent: 0 0 20px rgba(233, 116, 81, 0.4);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);

  /* ========== Animation Timing ========== */
  --duration-instant: 50ms;
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 700ms;
  --duration-slowest: 1000ms;

  /* Easing Functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* ========== Z-Index Scale ========== */
  --z-behind: -1;
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-notification: 800;
  --z-max: 9999;

  /* ========== Component Specific ========== */

  /* Header */
  --header-height: 80px;
  --header-height-scrolled: 64px;
  --header-bg: rgba(10, 10, 10, 0.85);
  --header-blur: 20px;

  /* Buttons */
  --btn-padding-x: 1.5rem;
  --btn-padding-y: 0.75rem;
  --btn-padding-x-sm: 1rem;
  --btn-padding-y-sm: 0.5rem;
  --btn-padding-x-lg: 2rem;
  --btn-padding-y-lg: 1rem;

  /* Cards */
  --card-padding: 1.5rem;
  --card-bg: var(--color-bg-card);
  --card-border: var(--border-color);
  --card-radius: var(--radius-xl);

  /* Inputs */
  --input-padding-x: 1rem;
  --input-padding-y: 0.75rem;
  --input-bg: var(--color-bg-tertiary);
  --input-border: var(--border-color);
  --input-border-focus: var(--color-rust);
  --input-radius: var(--radius-lg);
}

/* ========== Dark Mode (Default) ========== */
[data-theme="dark"] {
  color-scheme: dark;
}

/* ========== Light Mode Override ========== */
[data-theme="light"] {
  --color-bg-primary: #FAFAFA;
  --color-bg-secondary: #F5F5F5;
  --color-bg-tertiary: #EEEEEE;
  --color-bg-elevated: #FFFFFF;
  --color-bg-card: #FFFFFF;
  --color-bg-hover: #E5E5E5;

  --color-surface: rgba(255, 255, 255, 0.9);
  --color-surface-light: rgba(255, 255, 255, 0.7);
  --color-glass: rgba(0, 0, 0, 0.03);
  --color-glass-border: rgba(0, 0, 0, 0.08);

  --color-text-primary: #1A1A1A;
  --color-text-secondary: #4A4A4A;
  --color-text-muted: #888888;

  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-hover: rgba(0, 0, 0, 0.2);

  --header-bg: rgba(255, 255, 255, 0.9);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  color-scheme: light;
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-instant: 0ms;
    --duration-fast: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
    --duration-slower: 0ms;
    --duration-slowest: 0ms;
  }
}
