/* Custom styles for Jay's Auto Repair */

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

nav.scrolled .nav-logo-text {
    color: #0f172a !important;
}

nav.scrolled .nav-link {
    color: #475569 !important;
}

nav.scrolled .nav-link:hover {
    color: #0d9488 !important;
}

nav.scrolled #menu-btn {
    background: rgba(15, 23, 42, 0.08);
}

nav.scrolled #menu-btn svg {
    stroke: #1e293b !important;
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:nth-child(2) { transition-delay: 0.08s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.16s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.24s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.32s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.40s; }
}

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

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

/* Hero text animation (above fold — always visible) */
#hero h1,
#hero p,
#hero a,
#hero .inline-flex,
#hero .relative.z-10 .grid > div {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#hero h1 { animation-delay: 0.1s; opacity: 0; }
#hero p { animation-delay: 0.25s; opacity: 0; }
#hero a:first-of-type { animation-delay: 0.4s; opacity: 0; }
#hero a:last-of-type { animation-delay: 0.5s; opacity: 0; }
#hero .grid > div:nth-child(1) { animation-delay: 0.55s; opacity: 0; }
#hero .grid > div:nth-child(2) { animation-delay: 0.62s; opacity: 0; }
#hero .grid > div:nth-child(3) { animation-delay: 0.69s; opacity: 0; }
#hero .grid > div:nth-child(4) { animation-delay: 0.76s; opacity: 0; }

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection color */
::selection {
    background: #99f6e4;
    color: #134e4a;
}
