/**
 * Insuffle Brand - Modern Design System
 * Inspired by Monday.com, Linear, Notion
 */

:root {
    /* Primary Colors - Insuffle Brand */
    --primary-50: #EEF2F7;
    --primary-100: #D4E1EF;
    --primary-200: #A9C3DF;
    --primary-300: #7DA5CF;
    --primary-400: #5287BF;
    --primary-500: #2B4C7E;  /* Main Insuffle Blue */
    --primary-600: #223D66;
    --primary-700: #1A2E4F;
    --primary-800: #111F37;
    --primary-900: #09101F;

    /* Accent Colors - Insuffle Yellow */
    --accent-50: #FFFBEB;
    --accent-100: #FEF3C7;
    --accent-200: #FDE68A;
    --accent-300: #FCD34D;
    --accent-400: #FBBF24;
    --accent-500: #F4D03F;  /* Main Insuffle Yellow */
    --accent-600: #D69E2E;
    --accent-700: #B7791F;
    --accent-800: #975A16;
    --accent-900: #744210;

    /* Semantic Colors */
    --success-50: #ECFDF5;
    --success-500: #10B981;
    --success-600: #059669;

    --error-50: #FEF2F2;
    --error-500: #EF4444;
    --error-600: #DC2626;

    --warning-50: #FFFBEB;
    --warning-500: #F59E0B;
    --warning-600: #D97706;

    --info-50: #EFF6FF;
    --info-500: #3B82F6;
    --info-600: #2563EB;

    /* Neutrals - Modern Gray Scale */
    --neutral-0: #FFFFFF;
    --neutral-50: #F9FAFB;
    --neutral-100: #F3F4F6;
    --neutral-200: #E5E7EB;
    --neutral-300: #D1D5DB;
    --neutral-400: #9CA3AF;
    --neutral-500: #6B7280;
    --neutral-600: #4B5563;
    --neutral-700: #374151;
    --neutral-800: #1F2937;
    --neutral-900: #111827;
    --neutral-950: #030712;

    /* Post-its - Vibrant but sophisticated */
    --postit-yellow: #FEF08A;
    --postit-blue: #BAE6FD;
    --postit-green: #BBF7D0;
    --postit-pink: #FBCFE8;
    --postit-orange: #FED7AA;
    --postit-purple: #E9D5FF;
    --postit-red: #FECACA;
    --postit-teal: #99F6E4;

    /* Risk Colors */
    --risk-low: #86EFAC;
    --risk-medium: #FDE047;
    --risk-high: #FCA5A5;
    --risk-critical: #F87171;

    /* Background Colors */
    --bg-primary: var(--neutral-0);
    --bg-secondary: var(--neutral-50);
    --bg-tertiary: var(--neutral-100);
    --bg-dark: var(--neutral-900);

    /* Text Colors */
    --text-primary: var(--neutral-900);
    --text-secondary: var(--neutral-600);
    --text-tertiary: var(--neutral-500);
    --text-inverse: var(--neutral-0);

    /* Border Colors */
    --border-light: var(--neutral-200);
    --border-medium: var(--neutral-300);
    --border-dark: var(--neutral-400);

    /* Typography - Insuffle Font Stack */
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    /* Font Sizes - Type Scale */
    --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 */
    --text-7xl: 4.5rem;      /* 72px */

    /* Font Weights */
    --font-light: 300;
    --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;

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

    /* Border Radius - Generous but tasteful */
    --radius-none: 0;
    --radius-sm: 0.25rem;    /* 4px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-3xl: 2rem;      /* 32px */
    --radius-full: 9999px;

    /* Shadows - Soft and elegant */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --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);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

    /* Special Shadows */
    --shadow-glow: 0 0 20px rgba(43, 76, 126, 0.3);
    --shadow-colored: 0 10px 30px rgba(43, 76, 126, 0.15);

    /* Transitions - Buttery smooth */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Easing functions */
    --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);

    /* Z-index Scale */
    --z-0: 0;
    --z-10: 10;
    --z-20: 20;
    --z-30: 30;
    --z-40: 40;
    --z-50: 50;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;

    /* Backdrop Blur */
    --backdrop-blur-sm: blur(4px);
    --backdrop-blur-md: blur(8px);
    --backdrop-blur-lg: blur(16px);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-400) 0%, var(--accent-600) 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-ocean: linear-gradient(135deg, #2e3192 0%, #1bffff 100%);

    /* ============================================
       BACKWARD COMPATIBILITY ALIASES
       Old variable names for existing pages
       ============================================ */

    /* Color Aliases */
    --insuffle-blue: var(--primary-500);
    --insuffle-blue-light: var(--primary-400);
    --insuffle-blue-dark: var(--primary-700);
    --insuffle-yellow: var(--accent-500);
    --insuffle-yellow-light: var(--accent-200);
    --insuffle-white: var(--neutral-0);
    --insuffle-black: var(--neutral-900);

    /* Semantic Aliases */
    --success: var(--success-500);
    --warning: var(--warning-500);
    --danger: var(--error-500);
    --info: var(--info-500);

    /* Gray Aliases */
    --gray-100: var(--neutral-100);
    --gray-200: var(--neutral-200);
    --gray-300: var(--neutral-300);
    --gray-400: var(--neutral-400);
    --gray-500: var(--neutral-500);
    --gray-600: var(--neutral-600);
    --gray-700: var(--neutral-700);
    --gray-800: var(--neutral-800);
    --gray-900: var(--neutral-900);

    /* Spacing Aliases */
    --spacing-xs: var(--space-1);
    --spacing-sm: var(--space-2);
    --spacing-md: var(--space-4);
    --spacing-lg: var(--space-6);
    --spacing-xl: var(--space-8);
    --spacing-xxl: var(--space-12);

    /* Note: Transition, Shadow, and Radius variables kept same names for compatibility */
}

/* Dark Mode Variables (for future use) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: var(--neutral-900);
        --bg-secondary: var(--neutral-800);
        --bg-tertiary: var(--neutral-700);
        --text-primary: var(--neutral-50);
        --text-secondary: var(--neutral-300);
        --text-tertiary: var(--neutral-400);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Color Utilities */
.text-primary { color: var(--primary-500); }
.text-accent { color: var(--accent-500); }
.text-success { color: var(--success-500); }
.text-error { color: var(--error-500); }
.text-warning { color: var(--warning-500); }
.text-info { color: var(--info-500); }

.bg-primary { background-color: var(--primary-500); }
.bg-accent { background-color: var(--accent-500); }
.bg-success { background-color: var(--success-500); }
.bg-error { background-color: var(--error-500); }

/* Typography Utilities */
.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

/* Shadow Utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }
.shadow-glow { box-shadow: var(--shadow-glow); }
.shadow-none { box-shadow: none; }

/* Transition Utilities */
.transition-fast { transition: all var(--transition-fast); }
.transition-base { transition: all var(--transition-base); }
.transition-slow { transition: all var(--transition-slow); }

/* Border Radius Utilities */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Opacity Utilities */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Flex Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
