/* Custom styles for Kus Customs Wash Detail */

/* Base styles */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #FAFAF8;
}

/* Selection color */
::selection {
    background-color: #2e4a1a;
    color: #FAFAF8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAFAF8;
}
::-webkit-scrollbar-thumb {
    background: #c5d9aa;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #98bc74;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

.animate-fade-up {
    animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scroll-line {
    animation: scrollLine 1.8s ease-in-out infinite;
}

/* Service card hover effect */
.service-card {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

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

#mobileMenu.close {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 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; }

/* Navbar scroll state */
#navbar.scrolled {
    box-shadow: 0 1px 0 rgba(46, 74, 26, 0.06);
}

/* Intersection observer reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 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; }

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398bc74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .animate-fade-up {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .service-card:hover {
        transform: none;
    }
    .animate-scroll-line {
        animation: none;
        opacity: 0.5;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .font-serif {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
}

/* Large screens */
@media (min-width: 1280px) {
    .service-card {
        padding: 2.5rem 2.75rem;
    }
}
