/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #f1f5f9;
}

/* Floating Card Animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

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

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-6px) translateX(4px); }
}

.floating-card {
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.card-1 { animation: float1 4s ease-in-out infinite; }
.card-2 { animation: float2 5s ease-in-out infinite; }
.card-3 { animation: float3 4.5s ease-in-out infinite; }
.card-4 { animation: float4 3.5s ease-in-out infinite; }

/* Scroll Reveal */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    .scroll-reveal {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(2, 6, 23, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

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

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

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

/* Select dropdown styling */
select option {
    background: #1e293b;
    color: #f1f5f9;
}

/* Car card hover glow */
.group:hover .group-hover\:scale-110 {
    will-change: transform;
}

/* Smooth image loading */
img {
    will-change: transform;
}

/* Subtle gradient border on focus */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.3);
}
