/* Custom styles for Audio Alliance */

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

/* Prevent content flash on scroll-reveal */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
}

/* Scroll-reveal for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #102a43;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23627d98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Input focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
    50% { transform: translateY(-10px) rotate(var(--rotate, 0deg)); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1s;
    animation-duration: 5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2s;
    animation-duration: 4.5s;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 400px;
    opacity: 1;
}

/* Hero card floating animations */
@media (prefers-reduced-motion: no-preference) {
    .hero-float-1 {
        animation: heroFloat1 6s ease-in-out infinite;
    }
    .hero-float-2 {
        animation: heroFloat2 7s ease-in-out infinite;
    }
    .hero-float-3 {
        animation: heroFloat3 5s ease-in-out infinite;
    }
}

@keyframes heroFloat1 {
    0%, 100% { transform: translateY(0px) rotate(-3deg); }
    50% { transform: translateY(-12px) rotate(-3deg); }
}

@keyframes heroFloat2 {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes heroFloat3 {
    0%, 100% { transform: translateY(0px) rotate(1deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}

/* Loading state for form */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d4a843;
    outline-offset: 2px;
    border-radius: 0.5rem;
}
