/* ==========================================
   COMARAI - AI AUTOMATION AGENCY
   Custom CSS for B2B SaaS Landing Page
   Dark Theme + Glassmorphism + Neon Effects
   ========================================== */

/* ==========================================
   1. CSS VARIABLES & ROOT STYLES
   ========================================== */
:root {
    --primary: #8B5CF6;
    --secondary: #06B6D4;
    --accent: #A855F7;
    --dark-100: #1A1A2E;
    --dark-200: #0F0F1A;
    --dark-300: #0A0A14;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* ==========================================
   2. BASE STYLES & SCROLLBAR
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--dark-200) 0%, var(--dark-300) 100%);
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-300);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent), var(--primary));
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* ==========================================
   3. GLASSMORPHISM COMPONENTS
   ========================================== */
.glass-nav {
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.3);
}

/* ==========================================
   4. NAVIGATION STYLES
   ========================================== */
.nav-link {
    position: relative;
    color: #94A3B8;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: white;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-mobile {
    color: #94A3B8;
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
    transition: color 0.3s ease;
}

.nav-link-mobile:hover {
    color: white;
}

/* ==========================================
   5. BUTTON STYLES
   ========================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 12px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn-primary-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    border: none;
    cursor: pointer;
}

.btn-primary-large:hover {
    transform: translateY(-3px);
    box-shadow: var(--neon-glow), 0 10px 40px rgba(139, 92, 246, 0.5);
}

.btn-primary-large:active {
    transform: translateY(0);
}

/* ==========================================
   6. CARD ANIMATIONS & EFFECTS
   ========================================== */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.pain-card {
    position: relative;
    transition: transform 0.3s ease;
}

.pain-card:hover {
    transform: translateY(-8px);
}

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::after {
    transform: scaleX(1);
}

/* ==========================================
   7. NEON GLOW EFFECTS
   ========================================== */
@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }

    to {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6), 0 0 60px rgba(168, 85, 247, 0.3);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ==========================================
   8. GRADIENT TEXT
   ========================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   9. PARTICLES.JS CUSTOMIZATION
   ========================================== */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==========================================
   10. FORM STYLES
   ========================================== */
input:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px var(--dark-200) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================
   11. RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    .btn-primary-large {
        width: 100%;
        justify-content: center;
    }

    .glass-card {
        padding: 1.5rem !important;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }
}

/* ==========================================
   12. LOADING ANIMATION
   ========================================== */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   13. TOOLTIP STYLES
   ========================================== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--dark-100);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 10px);
}

/* ==========================================
   14. SUCCESS/ERROR STATES
   ========================================== */
.form-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22C55E;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}

/* ==========================================
   15. HOVER EFFECTS FOR ICONS
   ========================================== */
.icon-hover {
    transition: all 0.3s ease;
}

.icon-hover:hover {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary);
}

/* ==========================================
   16. SECTION DIVIDERS
   ========================================== */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--glass-border),
            var(--primary),
            var(--glass-border),
            transparent);
}

/* ==========================================
   17. BACKDROP BLUR FALLBACK
   ========================================== */
@supports not (backdrop-filter: blur(12px)) {

    .glass-nav,
    .glass-card {
        background: rgba(15, 15, 26, 0.95);
    }
}