/* Custom styles — overrides and enhancements beyond Tailwind */

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

/* Selection color */
::selection {
    background-color: rgba(20, 184, 166, 0.3);
    color: #f0fdf9;
}

/* Subtle grain texture overlay on body */
body {
    position: relative;
}

/* Navbar scroll state */
header.scrolled {
    background-color: rgba(2, 6, 16, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

/* Hero text gradient shimmer */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    background: linear-gradient(
        110deg,
        #5eead4 0%,
        #2dd4bf 25%,
        #99f6db 50%,
        #2dd4bf 75%,
        #5eead4 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s linear infinite;
}

/* Card hover glow */
.group:hover .card-glow {
    box-shadow: 0 0 60px -12px rgba(20, 184, 166, 0.15);
}

/* Image lazy-load fade */
img[loading="lazy"] {
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"] {
    opacity: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .fade-up {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Mobile menu transition */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #5eead4;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050A18;
}
::-webkit-scrollbar-thumb {
    background: rgba(20, 184, 166, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(20, 184, 166, 0.5);
}
