/**
 * CAUSE II Home Landing Page - Custom Styles
 * Modern, professional styling following international best practices
 * 
 * Note: Base styling is handled by Tailwind CSS CDN
 * This file contains additional custom enhancements
 */

/* ===================================================================
   Custom Color Utilities (Fallback for dynamic colors)
   =================================================================== */

.bg-blue-500 { background-color: #3b82f6; }
.bg-green-500 { background-color: #22c55e; }
.bg-purple-500 { background-color: #a855f7; }
.bg-cyan-500 { background-color: #06b6d4; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-indigo-500 { background-color: #6366f1; }

.hover\:bg-blue-600:hover { background-color: #2563eb; }
.hover\:bg-green-600:hover { background-color: #16a34a; }
.hover\:bg-purple-600:hover { background-color: #9333ea; }
.hover\:bg-cyan-600:hover { background-color: #0891b2; }
.hover\:bg-amber-600:hover { background-color: #d97706; }
.hover\:bg-indigo-600:hover { background-color: #4f46e5; }

.border-blue-300 { border-color: #93c5fd; }
.border-green-300 { border-color: #86efac; }
.border-purple-300 { border-color: #d8b4fe; }
.border-cyan-300 { border-color: #67e8f9; }
.border-amber-300 { border-color: #fcd34d; }
.border-indigo-300 { border-color: #a5b4fc; }

.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #16a34a; }
.text-purple-600 { color: #9333ea; }
.text-cyan-600 { color: #0891b2; }
.text-amber-600 { color: #d97706; }
.text-indigo-600 { color: #4f46e5; }

.text-blue-500 { color: #3b82f6; }
.text-green-500 { color: #22c55e; }
.text-purple-500 { color: #a855f7; }
.text-cyan-500 { color: #06b6d4; }
.text-amber-500 { color: #f59e0b; }
.text-indigo-500 { color: #6366f1; }

.from-blue-50 { --tw-gradient-from: #eff6ff; }
.from-green-50 { --tw-gradient-from: #f0fdf4; }
.from-purple-50 { --tw-gradient-from: #faf5ff; }
.from-cyan-50 { --tw-gradient-from: #ecfeff; }
.from-amber-50 { --tw-gradient-from: #fffbeb; }
.from-indigo-50 { --tw-gradient-from: #eef2ff; }

.to-blue-100 { --tw-gradient-to: #dbeafe; }
.to-green-100 { --tw-gradient-to: #dcfce7; }
.to-purple-100 { --tw-gradient-to: #f3e8ff; }
.to-cyan-100 { --tw-gradient-to: #cffafe; }
.to-amber-100 { --tw-gradient-to: #fef3c7; }
.to-indigo-100 { --tw-gradient-to: #e0e7ff; }

.border-blue-200 { border-color: #bfdbfe; }
.border-green-200 { border-color: #bbf7d0; }
.border-purple-200 { border-color: #e9d5ff; }
.border-cyan-200 { border-color: #a5f3fc; }
.border-amber-200 { border-color: #fde68a; }
.border-indigo-200 { border-color: #c7d2fe; }

/* ===================================================================
   Smooth Scrolling & Performance
   =================================================================== */

html {
    scroll-behavior: smooth;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

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

@keyframes gradient-x {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}

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

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-gradient {
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

.animate-gradient-x {
    animation: gradient-x 3s ease infinite;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-600 {
    animation-delay: 600ms;
}

.animation-delay-6000 {
    animation-delay: 6s;
}

/* ===================================================================
   Card Hover Effects
   =================================================================== */

.system-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.system-card:hover {
    transform: translateY(-12px) scale(1.02);
}

.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1.5rem;
    padding: 2px;
    background: linear-gradient(45deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.system-card:hover::before {
    opacity: 1;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 300% 300%;
    animation: gradient 3s ease infinite;
}

/* ===================================================================
   Custom Gradient Overlays
   =================================================================== */

.gradient-overlay {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
}

/* Grid Pattern Background */
.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Animated Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-shimmer {
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===================================================================
   Responsive Typography
   =================================================================== */

@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

/* ===================================================================
   Print Styles
   =================================================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ===================================================================
   Accessibility Enhancements
   =================================================================== */

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

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================================================================
   Loading States
   =================================================================== */

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

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

/* ===================================================================
   Custom Scrollbar (Webkit browsers)
   =================================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
