/* Custom styles for Roy's Trains */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection color */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #fefdf8;
}

/* Reveal animation base styles */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal-on-scroll {
        transition: none;
    }
    
    .animate-fade-in,
    .animate-slide-up,
    .animate-bounce {
        animation: none;
    }
}

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

/* Button hover effects */
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(74, 222, 128, 0.2);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #212529 25%, #343a40 50%, #212529 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Gold shimmer effect for special text */
.gold-shimmer {
    background: linear-gradient(90deg, #D4AF37 0%, #F4E4BC 50%, #D4AF37 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 3s linear infinite;
}

@keyframes goldShimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}
