/* Custom styles beyond Tailwind */

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

/* Ensure all text is readable on dark backgrounds */
body {
    background-color: #020617;
    color: #e2e8f0;
}

/* Scroll reveal base styles - content is visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply animation when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background-color: rgba(2, 6, 23, 0.95);
    border-bottom: 1px solid rgba(157, 23, 77, 0.2);
}

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

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

::-webkit-scrollbar-thumb {
    background: #9d174d;
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Service card hover effect */
.group:hover .group-hover\:bg-amber-500\/10 {
    background-color: rgba(251, 191, 36, 0.1);
}

/* Ensure select dropdown text is visible */
select option {
    background-color: #1e293b;
    color: #e2e8f0;
}

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

/* Reduce motion preference */
@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;
    }
    
    html {
        scroll-behavior: auto;
    }
}
