/* Custom styles for Hamlin Auto Parts */

:root {
    --nav-fg: #0f4222;
}

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(22, 101, 52, 0.08);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.05);
}

nav.scrolled .nav-text,
nav.scrolled .nav-link,
nav.scrolled .nav-icon-fg {
    color: #0f4222 !important;
}

nav.scrolled a.nav-link:hover {
    color: #3a7c43 !important;
}

/* Reveal animations — progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-enabled .reveal {
    opacity: 0;
    transform: translateY(20px);
}

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

/* Staggered reveal delays */
.js-enabled .reveal:nth-child(1) { transition-delay: 0.05s; }
.js-enabled .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-enabled .reveal:nth-child(3) { transition-delay: 0.15s; }
.js-enabled .reveal:nth-child(4) { transition-delay: 0.2s; }
.js-enabled .reveal:nth-child(5) { transition-delay: 0.25s; }
.js-enabled .reveal:nth-child(6) { transition-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none !important; transition: none; }
    .js-enabled .reveal { opacity: 1; transform: none; }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf9f6;
}
::-webkit-scrollbar-thumb {
    background: #d9eadc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b7d9ba;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3a7c43;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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