:root {
    /* Color palette */
    --background: #ffffff;
    --foreground: #1a202c;
    --primary: #4a5568;
    --primary-foreground: #ffffff;
    --secondary: #718096;
    --secondary-foreground: #ffffff;
    --accent: #805ad5;
    --accent-foreground: #ffffff;
    --muted: #f7fafc;
    --muted-foreground: #4a5568;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #4a5568;
    --card: #ffffff;
    --card-foreground: #1a202c;
    --success: #38a169;
    --warning: #d69e2e;
    --destructive: #e53e3e;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4a5568 0%, #718096 100%);
    --gradient-secondary: linear-gradient(135deg, #718096 0%, #a0aec0 100%);
    --gradient-accent: linear-gradient(135deg, #805ad5 0%, #9f7aea 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);
    
    /* Border Radius */
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

/* ===== BASE STYLES ===== */
body {
    background: var(--background);
    color: var(--foreground);
    font-family: 'Titillium Web', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== UTILITY CLASSES ===== */
/* Background utilities */
.bg-background { background-color: var(--background); }
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-accent { background-color: var(--accent); }
.bg-muted { background-color: var(--muted); }

/* Text utilities */
.text-foreground { color: var(--foreground); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-muted-foreground { color: var(--muted-foreground); }

/* Border utilities */
.border-border { border-color: var(--border); }

/* Gradient utilities */
.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-secondary { background: var(--gradient-secondary); }
.bg-gradient-accent { background: var(--gradient-accent); }

/* Shadow utilities */
.shadow-custom { box-shadow: var(--shadow); }
.shadow-custom-md { box-shadow: var(--shadow-md); }

/* Border radius utilities */
.rounded-custom { border-radius: var(--radius); }
.rounded-custom-md { border-radius: var(--radius-md); }
.rounded-custom-lg { border-radius: var(--radius-lg); }

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

.focus-ring:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ===== LAYOUT UTILITIES ===== */
.section-padding {
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }
}

/* ===== COMPONENT STYLES ===== */
/* Dropdown menu */
.dropdown-menu {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    visibility: hidden;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* Mobile menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

.mobile-menu.active {
    max-height: 100vh;
    opacity: 1;
}

/* Navbar states */
.navbar-scrolled .w-full.max-w-none {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.5);
    margin: 0.5rem auto;
    max-width: 72rem;
    padding: 0 1rem;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-normal .w-full.max-w-none {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    max-width: none;
    margin: 0;
    padding: 0;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* AI Chatbot Button */
.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
}

.chatbot-button {
    position: relative;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 40px -5px rgba(59, 130, 246, 0.5), 0 20px 20px -5px rgba(0, 0, 0, 0.15);
}

.chatbot-button:active {
    transform: scale(0.95);
}

/* Pulsing animation */
.chatbot-pulse {
    animation: chatbotPulse 2s infinite;
}

@keyframes chatbotPulse {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 0.75;
    }
}

/* Notification dot */
.chatbot-notification {
    animation: chatbotBounce 1s infinite;
}

@keyframes chatbotBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1px);
    }
}

/* Chatbot Modal */
.chatbot-modal {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 24rem;
    max-width: calc(100vw - 2rem);
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    transform: translateY(1rem);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    visibility: hidden;
}

.chatbot-modal.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Modal animations */
.chatbot-modal.active .chatbot-form {
    animation: chatbotSlideIn 0.4s ease-out;
}

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

/* Form field focus effects */
.chatbot-form input:focus,
.chatbot-form select:focus,
.chatbot-form textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.3);
}

/* Submit button loading state */
.chatbot-submit-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.chatbot-submit-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: chatbotSpin 0.8s linear infinite;
}

@keyframes chatbotSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success animation */
.chatbot-success {
    animation: chatbotSuccess 0.6s ease-out;
}

@keyframes chatbotSuccess {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .chatbot-modal {
        right: 1rem;
        left: 1rem;
        width: auto;
        bottom: 5rem;
    }
    
    .chatbot-container {
        right: 1rem;
        bottom: 1rem;
    }
}

/* Focus ring styles */
.focus-within\:ring-2:focus-within {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus-within\:ring-blue-500:focus-within {
    --tw-ring-opacity: 1;
    --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));
}

.focus-within\:ring-offset-2:focus-within {
    --tw-ring-offset-width: 2px;
}

/* ===== ANIMATIONS ===== */
/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes bounceSlow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-12px);
    }
    60% {
        transform: translateY(-6px);
    }
}

@keyframes countUp {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

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

/* Animation classes */
.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-delayed {
    animation: fadeIn 1s ease-out 1s both;
}

.text-slide-in {
    animation: textSlideIn 0.5s ease-out;
}

/* Intersection Observer animations */
.features-content.animate-in {
    animation: fadeInRight 0.8s ease-out;
}

.features-card-container.animate-in {
    animation: fadeInLeft 0.8s ease-out;
}

.feature-item.animate-in {
    animation: fadeInRightShort 0.5s ease-out;
}

/* ===== STAGGERED ANIMATION DELAYS ===== */
/* Feature items */
.feature-item:nth-child(1).animate-in { animation-delay: 0s; }
.feature-item:nth-child(2).animate-in { animation-delay: 0.1s; }
.feature-item:nth-child(3).animate-in { animation-delay: 0.2s; }
.feature-item:nth-child(4).animate-in { animation-delay: 0.3s; }
.feature-item:nth-child(5).animate-in { animation-delay: 0.4s; }

/* Service cards */
.service-card:nth-child(1).animate-in { animation-delay: 0s; }
.service-card:nth-child(2).animate-in { animation-delay: 0.1s; }
.service-card:nth-child(3).animate-in { animation-delay: 0.2s; }
.service-card:nth-child(4).animate-in { animation-delay: 0.3s; }
.service-card:nth-child(5).animate-in { animation-delay: 0.4s; }
.service-card:nth-child(6).animate-in { animation-delay: 0.5s; }
.service-card:nth-child(7).animate-in { animation-delay: 0.6s; }
.service-card:nth-child(8).animate-in { animation-delay: 0.7s; }
.service-card:nth-child(9).animate-in { animation-delay: 0.8s; }

/* Stat cards */
.stat-card:nth-child(1).animate-in { animation-delay: 0s; }
.stat-card:nth-child(2).animate-in { animation-delay: 0.1s; }
.stat-card:nth-child(3).animate-in { animation-delay: 0.2s; }
.stat-card:nth-child(4).animate-in { animation-delay: 0.3s; }

/* ===== HOVER EFFECTS ===== */
.service-card .group:hover .w-4 {
    transform: translateX(0.25rem);
}

.group:hover .w-20 {
    transform: scale(1.05);
}

/* ===== ACCESSIBILITY - REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations */
    .hero-content,
    .animate-fade-in-delayed,
    .animate-bounce-slow,
    .text-slide-in,
    .features-content.animate-in,
    .features-card-container.animate-in,
    .feature-item.animate-in,
    .services-header.animate-in,
    .service-card.animate-in,
    .stats-header.animate-in,
    .stat-card.animate-in,
    .counter.animate-count {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    /* Reset transforms for specific elements */
    .hero-content,
    .features-content.animate-in,
    .features-card-container.animate-in,
    .feature-item.animate-in,
    .services-header.animate-in,
    .service-card.animate-in,
    .stats-header.animate-in,
    .stat-card.animate-in {
        transform: translateY(0) translateX(0) scale(1);
    }
    
    /* Disable hover transforms */
    .group:hover .w-20,
    .service-card .group:hover .w-4 {
        transform: none;
    }
}