/* CognAIQ - Custom Styles (Tailwind handles most styling) */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(0, 204, 255, 0.3);
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0099DD, #22d3ee);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0077BB, #0ea5e9);
}

/* Canvas styles */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Cursor styles */
#cursor, #cursor-trail {
    transition: transform 0.15s ease-out;
}

/* Gradient text animation */
.animate-gradient {
    background-size: 200% auto;
    animation: gradient 3s linear infinite;
}

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

/* Glow effects */
.glow {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

.glow-cyan {
    filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.5));
}

/* Card hover glow */
.service-card:hover,
.testimonial-card:hover {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.1);
}

/* Tool card hover */
.tool-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover {
    transform: translateY(-4px) scale(1.02);
}

/* Button shine effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

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

/* Pulse glow */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* Form input focus state */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Dropdown menu animation */
.dropdown-menu {
    transform-origin: top;
}

/* Logo item hover */
.logo-item {
    transition: all 0.3s ease;
}

.logo-item:hover svg {
    transform: scale(1.1);
}

/* Service card top bar animation */
.service-card .top-bar {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover .top-bar {
    transform: scaleX(1);
}

/* Stats counter */
.stat-value {
    font-variant-numeric: tabular-nums;
}

/* Testimonial card quote */
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 6rem;
    font-family: Georgia, serif;
    color: rgba(99, 102, 241, 0.1);
    line-height: 1;
    pointer-events: none;
}

/* Mobile menu styles */
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 0.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links > li {
        width: 100%;
    }

    .nav-links > li > a {
        width: 100%;
        padding: 1rem;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(21, 21, 33, 0.5);
        margin-top: 0.5rem;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* Loading animation */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Stagger animation helper */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Hide elements before animation */
.gsap-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Noise texture overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.02;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #0099DD;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile accordion styles */
.mobile-accordion-content {
    overflow: hidden;
}

/* Mobile menu scrollable */
#mobile-menu-content {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Hide scrollbar on mobile menu but keep functionality */
#mobile-menu-content::-webkit-scrollbar {
    width: 4px;
}

#mobile-menu-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Touch-friendly tap targets */
@media (max-width: 1024px) {
    .mobile-accordion-btn,
    #mobile-menu-content a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* Ensure proper spacing on very small screens */
@media (max-width: 380px) {
    #mobile-menu-content {
        padding: 1rem;
    }

    .mobile-accordion-content a {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
