/* Maupin's Used Appliance — Custom Styles */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scroll reveal — progressive enhancement via JS */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(88, 214, 137, 0.08);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .font-serif {
    color: #ffffff;
}

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobileMenu.hiding {
    animation: slideUp 0.25s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
}

/* Subtle hover glow on cards */
.group:hover .bg-mint-500\/10 {
    background-color: rgba(88, 214, 137, 0.15);
}

/* Image lazy-load fade */
img[loading="lazy"] {
    transition: opacity 0.4s ease;
}

img[loading="lazy"]:not([data-loaded]) {
    opacity: 0;
}

img[loading="lazy"][data-loaded] {
    opacity: 1;
}

/* Selection color */
::selection {
    background: rgba(88, 214, 137, 0.3);
    color: #f0f4f8;
}

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

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

::-webkit-scrollbar-thumb {
    background: #1e4066;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2e5a87;
}

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

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