/* Custom styles for Tackle & Trail Outdoor Supply Co. */

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f2c59;
}
::-webkit-scrollbar-thumb {
    background: #3cbf74;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5fd38f;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(15, 44, 89, 0.08);
}

.navbar-scrolled .font-serif,
.navbar-scrolled .text-midnight-900 {
    color: #0f2c59 !important;
}

.navbar-scrolled .text-midnight-700,
.navbar-scrolled .text-midnight-600 {
    color: #1e3359 !important;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger animation */
#menu-btn.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-btn.active #bar2 {
    opacity: 0;
}
#menu-btn.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

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

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

/* Scroll indicator animation */
@keyframes scrollDown {
    0% { top: -12px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.animate-scroll-down {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-scroll-down {
        animation: none;
        opacity: 0.5;
    }
    .group:hover .aspect-\[4\/3\] img {
        transform: none;
    }
}

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

/* Selection color */
::selection {
    background: #3cbf74;
    color: #0f2c59;
}
