/* ============================================================================
   SIGNALDESK - MAIN CSS
   Global styles, variables, typography, and utilities
   ============================================================================ */

/* CSS VARIABLES - Color Palette from Logo */
:root {
    /* Primary Colors - Blues from logo */
    --primary-blue: #1E3A8A;
    --primary-blue-light: #3B82F6;
    --primary-blue-dark: #1E40AF;
    --primary-blue-hover: #1D4ED8;
    
    /* Neutral Colors */
    --grey-darkest: #111827;
    --grey-dark: #1F2937;
    --grey-medium: #6B7280;
    --grey-light: #F3F4F6;
    --grey-lighter: #F9FAFB;
    --white: #FFFFFF;
    
    /* Accent Colors */
    --accent-blue: #60A5FA;
    --accent-indigo: #818CF8;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    --gradient-hero: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 50%, #60A5FA 100%);
    --gradient-impact: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    
    /* Spacing Scale */
    --spacing-xs: 0.5rem;    /* 8px */
    --spacing-sm: 1rem;      /* 16px */
    --spacing-md: 2rem;      /* 32px */
    --spacing-lg: 4rem;      /* 64px */
    --spacing-xl: 6rem;      /* 96px */
    --spacing-2xl: 8rem;     /* 128px */
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', sans-serif;
    
    /* Font Sizes */
    --font-xs: 0.75rem;      /* 12px */
    --font-sm: 0.875rem;     /* 14px */
    --font-base: 1rem;       /* 16px */
    --font-lg: 1.125rem;     /* 18px */
    --font-xl: 1.25rem;      /* 20px */
    --font-2xl: 1.5rem;      /* 24px */
    --font-3xl: 1.875rem;    /* 30px */
    --font-4xl: 2.25rem;     /* 36px */
    --font-5xl: 3rem;        /* 48px */
    --font-6xl: 3.75rem;     /* 60px */
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
    
    /* Border Radius */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 1rem;       /* 16px */
    --radius-xl: 1.5rem;     /* 24px */
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Transitions */
    --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);
    
    /* Container Max Width */
    --container-max: 1280px;
}

/* ============================================================================
   GLOBAL RESETS & BASE STYLES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-base);
    line-height: var(--leading-normal);
    color: var(--grey-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--grey-darkest);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: var(--font-5xl);
    font-weight: 800;
    letter-spacing: -0.025em;
}

h2 {
    font-size: var(--font-4xl);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-size: var(--font-3xl);
    font-weight: 700;
}

h4 {
    font-size: var(--font-2xl);
    font-weight: 600;
}

h5 {
    font-size: var(--font-xl);
    font-weight: 600;
}

h6 {
    font-size: var(--font-lg);
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-sm);
    line-height: var(--leading-relaxed);
    color: var(--grey-medium);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-blue-hover);
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: var(--font-4xl);
    }
    
    h2 {
        font-size: var(--font-3xl);
    }
    
    h3 {
        font-size: var(--font-2xl);
    }
}

/* ============================================================================
   CONTAINER & LAYOUT UTILITIES
   ============================================================================ */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* Section Spacing */
section {
    padding: var(--spacing-2xl) 0;
    position: relative;
}

@media (max-width: 768px) {
    section {
        padding: var(--spacing-lg) 0;
    }
}

/* ============================================================================
   SECTION TITLES & SUBTITLES (Reusable)
   ============================================================================ */

.section-overline {
    font-size: var(--font-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
    display: block;
}

.section-title {
    font-size: var(--font-4xl);
    font-weight: 800;
    color: var(--grey-darkest);
    margin-bottom: var(--spacing-sm);
    line-height: var(--leading-tight);
}

.section-subtitle {
    font-size: var(--font-xl);
    color: var(--grey-medium);
    max-width: 800px;
    margin: 0 auto var(--spacing-md);
    line-height: var(--leading-relaxed);
}

@media (max-width: 768px) {
    .section-title {
        font-size: var(--font-3xl);
    }
    
    .section-subtitle {
        font-size: var(--font-lg);
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Stagger Animation Delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

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

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

/* Colors */
.text-primary { color: var(--primary-blue); }
.text-white { color: var(--white); }
.text-muted { color: var(--grey-medium); }
.text-dark { color: var(--grey-darkest); }

/* Background Colors */
.bg-white { background-color: var(--white); }
.bg-light { background-color: var(--grey-light); }
.bg-dark { background-color: var(--grey-dark); }
.bg-primary { background-color: var(--primary-blue); }
.bg-gradient-primary { background: var(--gradient-primary); }

/* Margins */
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

/* Padding */
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

/* Borders */
.border-radius { border-radius: var(--radius-md); }
.border-radius-lg { border-radius: var(--radius-lg); }

/* Shadows */
.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); }

/* Hover Effects */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ============================================================================
   IMAGES
   ============================================================================ */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* ============================================================================
   LISTS
   ============================================================================ */

ul, ol {
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

li {
    margin-bottom: var(--spacing-xs);
    line-height: var(--leading-relaxed);
    color: var(--grey-medium);
}

/* Unstyled List */
.list-unstyled {
    list-style: none;
    padding-left: 0;
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--grey-light);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-blue);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    z-index: 9999;
}

.skip-to-content:focus {
    top: 0;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================================================
   RESPONSIVE HELPERS
   ============================================================================ */

/* Hide on Mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on Desktop */
@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================================================
   SELECTION COLORS
   ============================================================================ */

::selection {
    background-color: var(--primary-blue);
    color: var(--white);
}

::-moz-selection {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* ============================================================================
   SCROLLBAR STYLING (Webkit browsers)
   ============================================================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--grey-light);
}

::-webkit-scrollbar-thumb {
    background: var(--grey-medium);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}