/* =============================================================================
   DRAADLOZE DESIGN SYSTEM — CSS CUSTOM PROPERTIES
   Enterprise-grade ISP/Hosting website design tokens
   ============================================================================= */

:root {
  /* -------------------------------------------------------------------------
     COLOR SYSTEM — Dark Theme (Default)
     ------------------------------------------------------------------------- */

  /* Backgrounds */
  --color-bg: #0a0e17;
  --color-surface: #111827;
  --color-elevated: #1a2332;
  --color-overlay: rgba(10, 14, 23, 0.8);

  /* Borders */
  --color-border: #1e293b;
  --color-border-subtle: #151d2e;
  --color-border-strong: #334155;

  /* Text */
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-text-inverse: #0f172a;

  /* Brand Colors */
  --color-accent: #4f46e5;
  --color-accent-hover: #6366f1;
  --color-accent-light: #818cf8;
  --color-accent-dark: #3730a3;

  --color-secondary: #22d3ee;
  --color-secondary-hover: #06b6d4;
  --color-secondary-light: #67e8f9;
  --color-secondary-dark: #0891b2;

  /* Status Colors */
  --color-success: #22c55e;
  --color-success-bg: rgba(34, 197, 94, 0.1);
  --color-success-border: rgba(34, 197, 94, 0.3);

  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.1);
  --color-warning-border: rgba(245, 158, 11, 0.3);

  --color-error: #ef4444;
  --color-error-bg: rgba(239, 68, 68, 0.1);
  --color-error-border: rgba(239, 68, 68, 0.3);

  /* Links */
  --color-link: #60a5fa;
  --color-link-hover: #93c5fd;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #4f46e5, #6366f1);
  --gradient-secondary: linear-gradient(135deg, #0891b2, #22d3ee);
  --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.3) 0%, transparent 60%);
  --gradient-hero-secondary: radial-gradient(ellipse 60% 40% at 80% 100%, rgba(34, 211, 238, 0.15) 0%, transparent 50%);
  --gradient-card: linear-gradient(180deg, var(--color-surface), var(--color-elevated));
  --gradient-glow: radial-gradient(circle, rgba(79, 70, 229, 0.4) 0%, transparent 70%);

  /* Glassmorphism */
  --glass-bg: rgba(17, 24, 39, 0.8);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-blur: blur(12px);

  /* -------------------------------------------------------------------------
     TYPOGRAPHY
     ------------------------------------------------------------------------- */

  /* Font Families */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;

  /* Font Sizes — Fluid Typography */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Fluid Headings */
  --heading-hero: clamp(2.5rem, 5vw, 4rem);      /* 40px - 64px */
  --heading-section: clamp(1.875rem, 3vw, 2.5rem); /* 30px - 40px */
  --heading-card: clamp(1.25rem, 2vw, 1.5rem);   /* 20px - 24px */

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

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

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

  /* -------------------------------------------------------------------------
     SPACING SYSTEM (4px base)
     ------------------------------------------------------------------------- */

  --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 */

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

  /* -------------------------------------------------------------------------
     LAYOUT
     ------------------------------------------------------------------------- */

  --container-max: 1280px;
  --container-padding: clamp(1rem, 4vw, 2rem);

  /* -------------------------------------------------------------------------
     BORDERS & RADIUS
     ------------------------------------------------------------------------- */

  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  --border-width: 1px;
  --border-width-2: 2px;

  /* -------------------------------------------------------------------------
     SHADOWS
     ------------------------------------------------------------------------- */

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Glow Shadows */
  --shadow-glow-accent: 0 0 20px rgba(79, 70, 229, 0.4);
  --shadow-glow-secondary: 0 0 20px rgba(34, 211, 238, 0.4);
  --shadow-glow-success: 0 0 20px rgba(34, 197, 94, 0.4);
  --shadow-glow-error: 0 0 20px rgba(239, 68, 68, 0.4);

  /* -------------------------------------------------------------------------
     TRANSITIONS & ANIMATIONS
     ------------------------------------------------------------------------- */

  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-slower: 500ms ease;

  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* -------------------------------------------------------------------------
     Z-INDEX SCALE
     ------------------------------------------------------------------------- */

  --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;
}

/* =============================================================================
   LIGHT THEME
   ============================================================================= */

html[data-theme="light"] {
  /* Backgrounds */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-elevated: #f1f5f9;
  --color-overlay: rgba(248, 250, 252, 0.9);

  /* Borders */
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;
  --color-border-strong: #cbd5e1;

  /* Text */
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-text-inverse: #f1f5f9;

  /* Links */
  --color-link: #4f46e5;
  --color-link-hover: #4338ca;

  /* Gradients */
  --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.15) 0%, transparent 60%);
  --gradient-hero-secondary: radial-gradient(ellipse 60% 40% at 80% 100%, rgba(34, 211, 238, 0.1) 0%, transparent 50%);
  --gradient-card: linear-gradient(180deg, var(--color-surface), var(--color-elevated));

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.05);

  /* Shadows (more prominent in light mode) */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* System preference detection (when theme is "system") */
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    /* Backgrounds */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-elevated: #f1f5f9;
    --color-overlay: rgba(248, 250, 252, 0.9);

    /* Borders */
    --color-border: #e2e8f0;
    --color-border-subtle: #f1f5f9;
    --color-border-strong: #cbd5e1;

    /* Text */
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-text-inverse: #f1f5f9;

    /* Links */
    --color-link: #4f46e5;
    --color-link-hover: #4338ca;

    /* Gradients */
    --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.15) 0%, transparent 60%);
    --gradient-hero-secondary: radial-gradient(ellipse 60% 40% at 80% 100%, rgba(34, 211, 238, 0.1) 0%, transparent 50%);
    --gradient-card: linear-gradient(180deg, var(--color-surface), var(--color-elevated));

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  }
}
