/* Custom styles for Truck Toys */

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

/* Hide scrollbar on mobile menu open */
body.menu-open {
    overflow: hidden;
}

/* Hero text reveal animation - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays */
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    
    .category-card {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .category-card.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    .feature-card {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .feature-card.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-link:hover::after {
    width: 80%;
    left: 10%;
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Custom selection color */
::selection {
    background-color: #3a6641;
    color: #faf9f7;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3a6641;
    outline-offset: 2px;
}

/* Image loading placeholder */
img {
    background-color: #ebe9e3;
}
