/* Custom styles for Kwik and Klean Auto Repair */

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

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(18, 16, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-logo-text {
    color: #ffffff !important;
}

/* Mobile menu animation */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

/* Menu button animation */
.menu-toggle.active #menu-line-1 {
    transform: translateY(6px) rotate(45deg);
}

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

.menu-toggle.active #menu-line-3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 100%;
}

/* Scroll indicator animation */
.scroll-indicator {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.8;
        transform: scaleY(1.2);
    }
}

/* Hero text entrance (progressive enhancement - only when JS runs) */
@media (prefers-reduced-motion: no-preference) {
    .hero-content {
        animation: heroFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

::-webkit-scrollbar-track {
    background: #242019;
}

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

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

/* Selection color */
::selection {
    background: #c93d22;
    color: #ffffff;
}

/* 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='%23988f84' 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 #c93d22;
    outline-offset: 2px;
}

/* Button hover lift effect */
button, a {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Image lazy loading placeholder */
img {
    background: linear-gradient(135deg, #e8e4df 0%, #d4cec6 100%);
}

/* Subtle card hover glow */
.group:hover .group-hover\\:bg-terracotta-600 {
    box-shadow: 0 0 30px rgba(201, 61, 34, 0.15);
}

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

/* Nav link underline animation */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #f4ad93;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link {
    position: relative;
}
