/* === Custom Styles for Car Audio Design === */

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

/* Custom selection color */
::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

/* === Floating Card Animations === */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

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

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

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

/* === Service Card Hover === */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* === Work Card Hover === */
.work-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Process Step === */
.process-step {
    transition: all 0.4s ease;
}

.process-step:hover {
    transform: translateY(-6px);
}

.process-step .w-24 {
    transition: all 0.4s ease;
}

.process-step:hover .w-24 {
    box-shadow: 0 0 0 8px rgba(5, 150, 105, 0.1);
}

/* === Navbar Scroll State === */
.nav-scrolled {
    background-color: rgba(254, 253, 248, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.nav-scrolled #navbar .font-serif {
    color: #0a0908 !important;
}

/* === Mobile Menu === */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem !important;
}

/* === Mobile Link Transition === */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

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

/* === Scroll Reveal Animations === */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* === Input Focus Styles === */
input:focus, textarea:focus {
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

/* === Button Ripple Effect === */
button[type="submit"]:active {
    transform: scale(0.98);
}

/* === Thin decorative line animation === */
.deco-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease;
}

.deco-line.visible {
    stroke-dashoffset: 0;
}

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

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

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

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

/* === Wide screens === */
@media (min-width: 1280px) {
    .hero-grid {
        gap: 4rem;
    }
}
