/* Custom styles for Modern Mercantile & Co. */

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scroll reveal base state - visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll reveal enhanced with JS - only applied when JS is available */
@media (prefers-reduced-motion: no-preference) {
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:not(.revealed) {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #404066;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e07a5f;
}

/* Selection color */
::selection {
    background: #e07a5f;
    color: #ffffff;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fafafa inset !important;
    -webkit-text-fill-color: #1a1a2e !important;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #e07a5f;
    outline-offset: 2px;
}

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

/* Floating card animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.floating-card {
    animation: float 4s ease-in-out infinite;
}

/* Pulse dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}
.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}
