/* ========================================
   MILHOUSE RD - Global Styles & Variables
   Modern, vibrant and accessible design system
   ======================================== */

/* Import Montserrat font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
    /* === PRIMARY BRAND COLORS - More vibrant palette === */
    --mh-primary: #1E40AF;           /* Vibrant Blue - Main brand color */
    --mh-primary-light: #3B82F6;     /* Light Blue - Hover states */
    --mh-primary-dark: #1E3A8A;      /* Dark Blue - Active states */
    
    --mh-secondary: #10B981;         /* Emerald Green - Success, positive actions */
    --mh-secondary-light: #34D399;   /* Light Green */
    --mh-secondary-dark: #059669;    /* Dark Green */
    
    --mh-accent: #F59E0B;            /* Vibrant Amber - Highlights, CTAs */
    --mh-accent-light: #FBBF24;      /* Light Amber */
    --mh-accent-dark: #D97706;       /* Dark Amber */
    
    /* === NEUTRAL COLORS - Better readability === */
    --mh-ink: #0B1220;               /* Almost black - Primary text */
    --mh-navy: #1E293B;              /* Dark slate - Headers */
    --mh-navy-2: #334155;            /* Medium slate */
    --mh-slate: #475569;             /* Medium gray - Secondary text */
    --mh-muted: #64748B;             /* Light gray - Muted text */
    
    /* === BACKGROUND COLORS === */
    --mh-bg: #F8FAFC;                /* Very light gray - Main background */
    --mh-bg-alt: #F1F5F9;            /* Light gray - Alternate background */
    --mh-white: #FFFFFF;             /* Pure white - Cards, containers */
    
    /* === BORDER & DIVIDER COLORS === */
    --mh-line: #E2E8F0;              /* Light border */
    --mh-line-dark: #CBD5E1;         /* Medium border */
    
    /* === SEMANTIC COLORS === */
    --mh-success: #10B981;           /* Success messages */
    --mh-warning: #F59E0B;           /* Warnings */
    --mh-error: #EF4444;             /* Errors, destructive actions */
    --mh-info: #3B82F6;              /* Information */
    
    /* === TYPOGRAPHY === */
    --mh-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --fs-xs: 0.75rem;      /* 12px */
    --fs-sm: 0.875rem;     /* 14px */
    --fs-base: 1rem;       /* 16px */
    --fs-lg: 1.125rem;     /* 18px */
    --fs-xl: 1.25rem;      /* 20px */
    --fs-2xl: 1.5rem;      /* 24px */
    --fs-3xl: 1.875rem;    /* 30px */
    --fs-4xl: 2.25rem;     /* 36px */
    
    /* === SPACING SCALE === */
    --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 */
    
    /* === BORDER 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;   /* Fully rounded */
    
    /* === 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 -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 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);
}

/* === GLOBAL RESETS & BASE STYLES === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--mh-font);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--mh-ink);
    background-color: var(--mh-bg);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--mh-font);
    font-weight: 700;
    line-height: 1.2;
    color: var(--mh-navy);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--fs-4xl); font-weight: 800; }
h2 { font-size: var(--fs-3xl); font-weight: 700; }
h3 { font-size: var(--fs-2xl); font-weight: 700; }
h4 { font-size: var(--fs-xl); font-weight: 600; }
h5 { font-size: var(--fs-lg); font-weight: 600; }
h6 { font-size: var(--fs-base); font-weight: 600; }

p {
    margin-bottom: var(--space-4);
    color: var(--mh-slate);
}

a {
    color: var(--mh-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* === IMPROVED BUTTONS === */
.btn,
button[class*="btn"] {
    font-family: var(--mh-font);
    font-weight: 600;
    font-size: var(--fs-base);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--mh-primary), var(--mh-primary-light));
    color: var(--mh-white);
    border-color: var(--mh-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--mh-primary-dark), var(--mh-primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--mh-secondary), var(--mh-secondary-light));
    color: var(--mh-white);
    border-color: var(--mh-secondary);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--mh-secondary-dark), var(--mh-secondary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-accent {
    background: linear-gradient(135deg, var(--mh-accent), var(--mh-accent-light));
    color: var(--mh-white);
    border-color: var(--mh-accent);
    box-shadow: var(--shadow-md);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--mh-accent-dark), var(--mh-accent));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    background: transparent;
    color: var(--mh-primary);
    border-color: var(--mh-primary);
}

.btn-outline-primary:hover {
    background: var(--mh-primary);
    color: var(--mh-white);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--mh-secondary);
    border-color: var(--mh-secondary);
}

.btn-outline-secondary:hover {
    background: var(--mh-secondary);
    color: var(--mh-white);
}

/* === IMPROVED FORM INPUTS === */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
    font-family: var(--mh-font);
    font-size: var(--fs-base);
    font-weight: 500;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--mh-line);
    border-radius: var(--radius-lg);
    background-color: var(--mh-white);
    color: var(--mh-ink);
    transition: all var(--transition-base);
    width: 100%;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--mh-primary);
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.form-label,
label {
    font-family: var(--mh-font);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--mh-navy);
    margin-bottom: var(--space-2);
    display: block;
}

/* === IMPROVED CARDS === */
.card {
    background: var(--mh-white);
    border: 1px solid var(--mh-line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

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

.card-header {
    padding: var(--space-5);
    background: linear-gradient(135deg, var(--mh-navy), var(--mh-navy-2));
    color: var(--mh-white);
    border-bottom: none;
}

.card-body {
    padding: var(--space-6);
}

/* === BADGES === */
.badge {
    font-family: var(--mh-font);
    font-weight: 600;
    font-size: var(--fs-xs);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.badge-primary {
    background-color: var(--mh-primary);
    color: var(--mh-white);
}

.badge-secondary {
    background-color: var(--mh-secondary);
    color: var(--mh-white);
}

.badge-accent {
    background-color: var(--mh-accent);
    color: var(--mh-white);
}

/* === ACCESSIBILITY IMPROVEMENTS === */
*:focus-visible {
    outline: 3px solid var(--mh-primary);
    outline-offset: 2px;
}

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

/* === UTILITY CLASSES === */
.text-primary { color: var(--mh-primary); }
.text-secondary { color: var(--mh-secondary); }
.text-accent { color: var(--mh-accent); }
.text-muted { color: var(--mh-muted); }
.text-error { color: var(--mh-error); }

.bg-primary { background-color: var(--mh-primary); }
.bg-secondary { background-color: var(--mh-secondary); }
.bg-accent { background-color: var(--mh-accent); }

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

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-6);
    }
}
