/* Professional Design System - IAMCompass */

/* ===== CSS Variables & Design Tokens ===== */
:root {
    /* Color Palette - Refined and Professional */
    --primary-600: #1e40af;  /* Main brand color */
    --primary-700: #1e3a8a;  /* Darker shade */
    --primary-500: #3b82f6;  /* Lighter shade */
    --primary-200: #bfdbfe;  /* Light tint */
    --primary-100: #dbeafe;  /* Very light tint */
    --primary-50: #eff6ff;   /* Ultra light tint */
    
    /* Neutral Colors */
    --gray-900: #111827;     /* Darkest text */
    --gray-800: #1f2937;     /* Dark text */
    --gray-700: #374151;     /* Secondary text */
    --gray-600: #4b5563;     /* Muted text */
    --gray-500: #6b7280;     /* Light text */
    --gray-400: #9ca3af;     /* Very light text */
    --gray-300: #d1d5db;     /* Borders */
    --gray-200: #e5e7eb;     /* Light borders */
    --gray-100: #f3f4f6;     /* Light backgrounds */
    --gray-50: #f9fafb;      /* Very light backgrounds */
    --white: #ffffff;
    
    /* Semantic Colors */
    --success-600: #059669;
    --success-100: #d1fae5;
    --warning-600: #d97706;
    --warning-100: #fef3c7;
    --danger-600: #dc2626;
    --danger-100: #fee2e2;
    
    /* Spacing Scale (8-point grid) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 2.5rem;   /* 40px */
    --space-6: 3rem;     /* 48px */
    --space-7: 3.5rem;   /* 56px */
    --space-8: 4rem;     /* 64px */
    --space-10: 5rem;    /* 80px */
    --space-12: 6rem;    /* 96px */
    --space-16: 8rem;    /* 128px */
    
    /* Typography 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 */
    
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* 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: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-full: 9999px;
    
    /* Shadows - Subtle and Professional */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Z-index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-popover: 500;
}

/* ===== Reset & Base Styles ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--gray-900);
    background-color: var(--white);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--gray-900);
}

h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-3);
}

h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}

h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-2);
}

h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

h5 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

h6 {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

p {
    margin-bottom: var(--space-2);
    color: var(--gray-700);
}

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

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

/* ===== Layout Containers ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

.container-narrow {
    max-width: 960px;
}

.container-wide {
    max-width: 1400px;
}

/* Section Spacing */
.section {
    padding: var(--space-12) 0;
}

.section-sm {
    padding: var(--space-8) 0;
}

.section-lg {
    padding: var(--space-16) 0;
}

/* ===== Navigation ===== */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    transition: box-shadow var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-weight: var(--font-bold);
    font-size: var(--text-xl);
    color: var(--gray-900);
    text-decoration: none;
}

.nav-brand:hover {
    color: var(--gray-900);
    opacity: 0.9;
}

.logo-icon {
    font-size: var(--text-2xl);
    margin-right: var(--space-2);
    color: var(--primary-600);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: var(--space-4);
}

.nav-menu a {
    color: var(--gray-700);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    padding: var(--space-1) 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-600);
    transition: width var(--transition-base);
}

.nav-menu a:hover {
    color: var(--gray-900);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Language and Currency Selectors */
.nav-selectors {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-left: var(--space-4);
    padding-left: var(--space-4);
    border-left: 1px solid var(--gray-200);
}

/* Login button in nav */
.nav-selectors .btn-secondary.btn-small {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
}

.nav-selectors .btn-secondary.btn-small:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    transform: translateY(-1px);
}

.selector-group {
    position: relative;
}

.selector-button {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.selector-button:hover {
    background: var(--white);
    border-color: var(--gray-300);
}

.selector-dropdown {
    position: absolute;
    top: calc(100% + var(--space-1));
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    display: none;
    min-width: 150px;
}

.selector-dropdown.active {
    display: block;
}

.selector-option {
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: var(--text-sm);
}

.selector-option:hover {
    background: var(--gray-50);
}

.selector-option.active {
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: var(--font-medium);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    font-weight: var(--font-medium);
    font-size: var(--text-base);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary-600);
    color: var(--white) !important;
    border: 2px solid var(--primary-600);
}

.btn-primary:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: var(--white) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-large {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-lg);
}

.btn-small {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
}

/* ===== Hero Sections ===== */
.hero {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    padding: var(--space-10) 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

.hero h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    line-height: 1.1;
    margin-bottom: var(--space-4);
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--gray-600);
    margin-bottom: var(--space-5);
    line-height: var(--leading-relaxed);
}

.hero-cta {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    align-items: center;
    justify-content: center;
}

.hero-stats {
    display: flex;
    gap: var(--space-6);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--primary-600);
    display: block;
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

/* Secondary Hero (for inner pages) */
.hero-secondary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    padding: var(--space-8) 0;
    text-align: center;
    color: var(--white);
}

.hero-secondary h1 {
    color: var(--white) !important;
    font-size: var(--text-4xl);
    margin-bottom: var(--space-3);
}

.hero-secondary p {
    font-size: var(--text-lg);
    color: var(--white) !important;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

.hero-secondary a {
    color: var(--white) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hero-secondary a:hover {
    color: var(--white) !important;
    opacity: 0.9;
}

/* ===== Cards ===== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: var(--space-3);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-100);
    color: var(--primary-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}

.card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.card p {
    font-size: var(--text-base);
    color: var(--gray-600);
    line-height: var(--leading-relaxed);
}

/* ===== Grid Layouts ===== */
.grid {
    display: grid;
    gap: var(--space-4);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== Content Sections ===== */
.content-section {
    padding: var(--space-10) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.section-header h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-3);
}

.section-header p {
    font-size: var(--text-lg);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Background Variations */
.bg-light {
    background-color: var(--gray-50);
}

.bg-white {
    background-color: var(--white);
}

.bg-primary {
    background-color: var(--primary-600);
    color: var(--white);
}

.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary h4,
.bg-primary h5,
.bg-primary h6,
.bg-primary p,
.bg-primary span,
.bg-primary li {
    color: var(--white) !important;
}

.bg-primary a:not(.btn) {
    color: var(--white) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.bg-primary a:not(.btn):hover {
    color: var(--white) !important;
    opacity: 0.9;
}

/* ===== Footer ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.footer-section h4 {
    color: var(--white);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--space-2);
}

.footer-section a {
    color: var(--gray-400);
    font-size: var(--text-sm);
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-4);
    border-top: 1px solid var(--gray-800);
    font-size: var(--text-sm);
}

/* ===== CTA Sections ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: var(--white);
    text-align: center;
    padding: var(--space-10) 0;
    border-radius: var(--radius-xl);
    margin: var(--space-8) 0;
}

.cta-section h2 {
    color: var(--white) !important;
    font-size: var(--text-4xl);
    margin-bottom: var(--space-3);
}

.cta-section p {
    color: var(--white) !important;
    font-size: var(--text-lg);
    margin-bottom: var(--space-5);
    opacity: 0.95;
}

.cta-section .btn-primary {
    background: var(--white) !important;
    color: var(--primary-600) !important;
    border: 2px solid var(--white) !important;
    font-weight: var(--font-semibold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-primary:hover {
    background: var(--gray-50) !important;
    color: var(--primary-700) !important;
    border-color: var(--gray-50) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cta-section .btn-secondary,
.hero-secondary .btn-secondary,
.bg-primary .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.cta-section .btn-secondary:hover,
.hero-secondary .btn-secondary:hover,
.bg-primary .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cta-section a:not(.btn) {
    color: var(--white) !important;
    text-decoration: underline;
}

.cta-section a:not(.btn):hover {
    color: var(--white) !important;
    opacity: 0.9;
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Typography Scale Adjustments */
    h1 {
        font-size: var(--text-3xl);
    }
    
    h2 {
        font-size: var(--text-2xl);
    }
    
    .hero h1 {
        font-size: var(--text-4xl);
    }
    
    /* Layout Adjustments */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Navigation */
    .nav-menu {
        display: none;
    }
    
    .nav-selectors {
        margin-left: var(--space-2);
        padding-left: var(--space-2);
    }
    
    /* Spacing Adjustments */
    .section {
        padding: var(--space-8) 0;
    }
    
    .section-lg {
        padding: var(--space-10) 0;
    }
    
    .container {
        padding: 0 var(--space-2);
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===== Focus States ===== */
:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Feature Lists */
.feature {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-align: left;
    font-size: var(--text-base);
    color: var(--gray-700);
}

.feature-check {
    color: var(--success-600);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
}

/* Conversion-focused styles */
.conversion-cta {
    text-align: center;
    padding: var(--space-6) 0;
}

.conversion-cta h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}

.conversion-cta p {
    font-size: var(--text-lg);
    color: var(--gray-600);
    margin-bottom: var(--space-4);
}

/* ===== Print Styles ===== */
@media print {
    .navbar,
    .footer,
    .nav-selectors {
        display: none;
    }
}