/* Custom styles for Anderson Mechanical */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #3b0764;
}
::-webkit-scrollbar-thumb {
    background: #7e22ce;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9333ea;
}

/* Selection color */
::selection {
    background: #fbbf24;
    color: #3b0764;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(59, 7, 100, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Floating card animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Staggered card float */
.absolute.top-0.right-0 {
    animation: float 6s ease-in-out infinite;
}
.absolute.top-40.right-32 {
    animation: float 5s ease-in-out infinite 0.5s;
}
.absolute.top-72.right-0 {
    animation: float 7s ease-in-out infinite 1s;
}
.absolute.top-96.right-40 {
    animation: float 5.5s ease-in-out infinite 1.5s;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Service card hover glow */
.group:hover .group-hover\:bg-amber-500\/25 {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.15);
}

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

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

/* Input focus animation */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Image hover zoom */
.relative.rounded-2xl.overflow-hidden img {
    transition: transform 0.6s ease;
}
.relative.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.05);
}

/* Testimonial card hover */
.bg-plum-950\/60:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
}

/* 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;
    }
}
