/* ===== Custom Styles for Chavez Western Wear ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ed;
}
::-webkit-scrollbar-thumb {
    background: #408a40;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d6e2d;
}

/* Selection color */
::selection {
    background: #408a40;
    color: #faf9f6;
}

/* ===== Scroll Animations ===== */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Hidden state for scroll-reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    .scroll-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
    /* Stagger children */
    .scroll-reveal-stagger > * {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    .scroll-reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
    .scroll-reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
    .scroll-reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
    .scroll-reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
    .scroll-reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.3s; }
    .scroll-reveal-stagger.is-visible > * {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Mobile menu animation ===== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* ===== Button hover effects ===== */
a {
    text-decoration: none;
}

/* ===== Image lazy-load placeholder ===== */
img {
    background-color: #ebe8dd;
}

/* ===== Focus styles for accessibility ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #408a40;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Mobile nav links ===== */
.mobile-link {
    display: block;
    width: 100%;
}

/* ===== Subtle parallax on hero (desktop only) ===== */
@media (prefers-reduced-motion: no-preference) {
    @supports (background-attachment: fixed) {
        .hero-bg {
            background-attachment: fixed;
        }
    }
}

/* ===== Navbar scroll state ===== */
.navbar-scrolled {
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}
</style>
