/* ============================================
   CIS Kenya - Premium Design System
   Palette: Premium White, Vibrant Yellow, Bold Red
   With rich animations and glassmorphism
   ============================================ */

:root {
    /* Colors - Primary (Maroon) */
    --color-primary: #5B1A2E;
    --color-primary-dark: #481425;
    --color-primary-light: #7B2A3E;
    --color-primary-lighter: #F5E8EC;
    --color-primary-50: #FAF3F5;

    /* Colors - Accent (Gold) */
    --color-accent: #C5A028;
    --color-accent-dark: #A6861E;
    --color-accent-light: #E8CD79;
    --color-accent-lighter: #F9F0DA;
    --color-accent-bright: #FCC930;

    /* Colors - Secondary (Deep Maroon) */
    --color-secondary: #481425;
    --color-secondary-dark: #380F1E;
    --color-secondary-light: #6B2A3E;
    --color-secondary-lighter: #F0E0E5;

    /* Colors - Success/Warning/Danger/Info */
    --color-success: #06a77d;
    --color-success-light: #d1f5e8;
    --color-warning: #ffd60a;
    --color-warning-light: #fff9e6;
    --color-danger: #e63946;
    --color-danger-light: #fce4e6;
    --color-info: #4895ef;
    --color-info-light: #e0ecff;

    /* Colors - Neutrals (Premium White) */
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-surface: #ffffff;
    --color-border: #edeeef;
    --color-border-dark: #d8d9db;
    --color-text: #1a1a1a;
    --color-text-secondary: #555555;
    --color-text-muted: #999999;
    --color-text-inverse: #ffffff;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;
    --font-size-6xl: 4.5rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 7rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --radius-full: 9999px;

    /* Shadows - Premium, layered */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.10);
    --shadow-red: 0 8px 30px rgba(91, 26, 46, 0.25);
    --shadow-yellow: 0 8px 30px rgba(197, 160, 40, 0.25);
    --shadow-gold: 0 8px 30px rgba(197, 160, 40, 0.20);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --container-max: 1280px;
    --navbar-height: 80px;
    --topbar-height: 40px;
    --sidebar-width: 260px;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #5B1A2E 0%, #481425 50%, #C5A028 100%);
    --gradient-maroon: linear-gradient(180deg, #5B1A2E 0%, #481425 100%);
    --gradient-gold: linear-gradient(135deg, #C5A028 0%, #E8CD79 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, rgba(91, 26, 46, 0.06) 0%, transparent 50%),
                     radial-gradient(at 100% 0%, rgba(197, 160, 40, 0.06) 0%, transparent 50%),
                     radial-gradient(at 50% 100%, rgba(91, 26, 46, 0.03) 0%, transparent 50%);
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    letter-spacing: -0.025em;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p { margin-bottom: 1rem; }

::selection {
    background: var(--color-accent);
    color: #fff;
}

/* ============================================
   Utility Classes
   ============================================ */

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

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Backgrounds */
.bg-mesh {
    background: var(--gradient-mesh);
}

.bg-gradient-red {
    background: var(--gradient-maroon);
}

.bg-gradient-yellow {
    background: var(--gradient-gold);
}

/* Section divider */
.section-divider {
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border: none;
    border-radius: var(--radius-full);
    width: 60px;
    margin: var(--space-sm) 0;
}

.section-divider--center {
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* Animation utility classes */
.animate-fadeInUp { animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-fadeIn { animation: fadeIn 0.8s ease both; }
.animate-slideInLeft { animation: slideInLeft 0.7s cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-slideInRight { animation: slideInRight 0.7s cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-scaleIn { animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse { animation: pulse 2.5s ease-in-out infinite; }
.animate-bounceIn { animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

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

/* Shimmer effect */
.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Animated gradient */
.animated-gradient {
    background: linear-gradient(135deg, #5B1A2E, #C5A028, #5B1A2E);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* ============================================
   Mobile Responsive - Base
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: var(--font-size-2xl); }
    h2 { font-size: var(--font-size-xl); }
    h3 { font-size: var(--font-size-lg); }

    .container {
        padding: 0 var(--space-xs);
    }
}

@media (max-width: 480px) {
    h1 { font-size: var(--font-size-xl); }
    h2 { font-size: var(--font-size-lg); }
    h3 { font-size: var(--font-size-base); }

    .container {
        padding: 0 0.75rem;
    }
}
