/* ===== BUILDERSOLVE GLOBAL STYLES ===== */

/* ===== CSS VARIABLES ===== */
:root {
    /* === COLORS === */
    /* Primary Brand Colors */
    --primary-blue: #2563eb;
    --primary-orange: #ea580c;
    --primary-green: #10b981;
    
    /* Blue Variations */
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    
    /* Orange Variations */
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --orange-800: #9a3412;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --black: #000000;
    
    /* Dark Mode Colors (available but not auto-applied) */
    --dark-bg: #0f172a;
    --dark-bg-secondary: #1e293b;
    --dark-surface: #334155;
    --dark-border: #475569;
    --dark-text: #f1f5f9;
    --dark-text-secondary: #cbd5e1;
    --dark-text-muted: #94a3b8;
    
    /* === TYPOGRAPHY === */
    /* Font Families */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    
    /* Font Sizes */
    --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 */
    --text-8xl: 6rem;       /* 96px */
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* === SPACING === */
    --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 */
    --space-56: 14rem;      /* 224px */
    --space-64: 16rem;      /* 256px */
    
    /* === LAYOUT === */
    /* Max Widths */
    --max-w-xs: 20rem;
    --max-w-sm: 24rem;
    --max-w-md: 28rem;
    --max-w-lg: 32rem;
    --max-w-xl: 36rem;
    --max-w-2xl: 42rem;
    --max-w-3xl: 48rem;
    --max-w-4xl: 56rem;
    --max-w-5xl: 64rem;
    --max-w-6xl: 72rem;
    --max-w-7xl: 80rem;
    --max-w-full: 100%;
    
    /* Container Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
    
    /* === SHADOWS === */
    --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);
    
    /* Dark Mode Shadows (available for manual use) */
    --shadow-dark-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --shadow-dark-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-dark-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-dark-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    
    /* === BORDER RADIUS === */
    --radius-none: 0;
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    
    /* === TRANSITIONS === */
    --transition-none: none;
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
    --transition-slower: 0.75s ease-in-out;
    
    /* === Z-INDEX === */
    --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;
}

/* ===== CSS RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-primary);
    line-height: var(--leading-normal);
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    scroll-behavior: smooth;
}

body {
    font-family: inherit;
    line-height: inherit;
    color: var(--gray-900);
    background-color: var(--white);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    font-variation-settings: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Remove default margins and paddings */
h1, h2, h3, h4, h5, h6, p, ul, ol, li, blockquote, figure, figcaption {
    margin: 0;
    padding: 0;
}

/* Remove list styles */
ul, ol {
    list-style: none;
}

/* Remove link styles */
a {
    color: inherit;
    text-decoration: none;
}

/* Remove button styles */
button {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    color: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
}

/* Form elements */
input, textarea, select {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    color: inherit;
    border: 0;
    background: transparent;
}

/* Images */
img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ===== BASE TYPOGRAPHY ===== */
h1, .h1 {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    line-height: var(--leading-tight);
    letter-spacing: -0.025em;
}

h2, .h2 {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: -0.025em;
}

h3, .h3 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-snug);
}

h4, .h4 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
}

h5, .h5 {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
}

h6, .h6 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    line-height: var(--leading-snug);
}

p, .body {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

.lead {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
    color: var(--gray-600);
}

.small {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.xs {
    font-size: var(--text-xs);
    line-height: var(--leading-normal);
}

/* ===== UTILITY CLASSES ===== */

/* Container */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-2xl {
    max-width: var(--container-2xl);
}

/* Spacing */
.section {
    padding: var(--space-20) 0;
}

.section-lg {
    padding: var(--space-32) 0;
}

.section-sm {
    padding: var(--space-16) 0;
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Text Alignment */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Colors */
.text-primary {
    color: var(--primary-blue);
}

.text-orange {
    color: var(--primary-orange);
}

.text-success {
    color: var(--success);
}

.text-white {
    color: var(--white);
}

.text-gray-600 {
    color: var(--gray-600);
}

.bg-primary {
    background-color: var(--primary-blue);
}

.bg-orange {
    background-color: var(--primary-orange);
}

.bg-white {
    background-color: var(--white);
}

.bg-gray-50 {
    background-color: var(--gray-50);
}

/* Visibility */
.hidden {
    display: none;
}

.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;
}

/* Loading State */
.loading {
    overflow: hidden;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: var(--space-4);
    color: var(--gray-600);
    font-weight: var(--font-medium);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange));
    z-index: var(--z-fixed);
    transition: width 0.1s ease-out;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: var(--z-fixed);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--blue-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: var(--text-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.modal-close:hover {
    background: var(--gray-200);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
    
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .sm\:text-6xl {
        font-size: var(--text-6xl);
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-8);
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .md\:text-7xl {
        font-size: var(--text-7xl);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .xl\:text-8xl {
        font-size: var(--text-8xl);
    }
}

/* ===== NO AUTO DARK MODE - REMOVED @media (prefers-color-scheme: dark) ===== */
/* Dark mode variables are available in :root but no automatic switching */
/* Individual sections can manually apply dark styles as needed */