/* Custom styles for The Rusty Spur */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.5s ease, visibility 0.5s ease;
    visibility: hidden;
}

#mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

#mobile-menu .mobile-link {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease, color 0.3s ease;
}

#mobile-menu.active .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

#mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* Scroll reveal animations (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Nav background transition */
#nav.scrolled {
    background: rgba(20, 83, 45, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

/* Image hover zoom */
img {
    transition: transform 0.6s ease;
}

/* Subtle pattern overlay for cream sections */
.bg-cream-50::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(20,83,52,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #14532d;
}
