/* 
    EMN CMS - Global Design System (Unified Theme Engine)
*/

:root {
    /* --- Light Theme (Default) --- */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --heading: #0f172a;
    --paragraph: #475569;
    --background: #ffffff;
    --surface: #f8fafc;
    --button-bg: var(--primary);
    --button-text: var(--background);
    --link: var(--primary);
    --card-border: #e2e8f0;
    --site-font: 'Roboto', sans-serif;

    /* --- Spacing --- */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4.5rem;
    --space-4xl: 6rem;

    /* --- Border Radius --- */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-3xl: 48px;
    --radius-full: 9999px;

    /* --- Z-Index --- */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;

    /* --- Font Weight --- */
    --fw-thin: 100;
    --fw-light: 300;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 900;

    /* --- Line Height --- */
    --lh-tight: 1.25;
    --lh-snug: 1.375;
    --lh-normal: 1.5;
    --lh-relaxed: 1.625;
    --lh-loose: 2;

    /* --- Typography --- */
    --fs-h1: clamp(2.25rem, 1.7rem + 2.5vw, 3.5rem);
    --fs-h2: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
    --fs-h3: clamp(1.25rem, 1.1rem + 1vw, 1.75rem);
    --fs-h4: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
    --fs-h5: clamp(1.1rem, 1rem + 0.3vw, 1.25rem);
    --fs-h6: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
    --fs-p: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);

    /* --- Containers --- */
    --container-xs: 20rem;
    --container-sm: 24rem;
    --container-md: 28rem;
    --container-lg: 32rem;
    --container-xl: 36rem;
    --container-2xl: 42rem;
    --container-3xl: 48rem;
    --container-4xl: 56rem;
    --container-5xl: 64rem;
    --container-6xl: 72rem;
    --container-7xl: 80rem;

    /* --- Opacity --- */
    --opacity-10: 0.1;
    --opacity-20: 0.2;
    --opacity-30: 0.3;
    --opacity-40: 0.4;
    --opacity-50: 0.5;
    --opacity-60: 0.6;
    --opacity-70: 0.7;
    --opacity-80: 0.8;
    --opacity-90: 0.9;
    --opacity-25: 0.25;
    --opacity-75: 0.75;

    /* --- Status Colors --- */
    --success: #16a34a;
    --success-bg: #dcfce7;
    --success-border: #bbf7d0;
    --error: #dc2626;
    --error-bg: #fee2e2;
    --error-border: #fecaca;
    --warning: #d97706;
    --info: #0891b2;
    --overlay-bg: rgba(0, 0, 0, 0.4);

    /* --- Animation & Transitions --- */
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Shadows --- */
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.12);

    /* --- Image Hover --- */
    --image-hover-translate: translateY(-10px);
    --image-hover-scale: scale(1.05);
    --image-hover-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);

    /* --- RGB Helpers --- */
    --primary-rgb: 37, 99, 235;
}

/* --- Dark Theme Overrides --- */
[data-theme='dark'],
.dark-mode {
    color-scheme: dark;
    --primary: #60a5fa;
    --primary-hover: #93c5fd;
    --heading: #f8fafc;
    --paragraph: #94a3b8;
    --background: #0f172a;
    --surface: #1e293b;
    --button-bg: var(--primary);
    --card-border: #334155;
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.9);
}

/* --- Standardized Utility Classes --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    background-color: var(--button-bg);
    color: var(--button-text) !important;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--button-text) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-premium);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 26px;
    background-color: transparent;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--button-text) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}