/* ============================================
   Hometown Hardware — Custom Styles
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f2fdf9;
}
::-webkit-scrollbar-thumb {
    background: #7edfc4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #45c9a8;
}

/* Selection color */
::selection {
    background: #7edfc4;
    color: #1a2744;
}

/* ============================================
   Reveal Animations (progressive enhancement)
   Only applied when JS is available and
   prefers-reduced-motion allows it
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}

/* ============================================
   Navbar scroll state
   ============================================ */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(26, 39, 68, 0.06);
}

/* ============================================
   Mobile menu transitions
   ============================================ */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
#mobile-menu.hidden {
    animation: slideUp 0.25s ease forwards;
}

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

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

/* ============================================
   Hero decorative underline animation
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .group:hover svg path {
        animation: underlineGrow 0.4s ease forwards;
    }
}

@keyframes underlineGrow {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* ============================================
   Focus visible styles
   ============================================ */
:focus-visible {
    outline: 2px solid #45c9a8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Reduced 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;
    }
}

/* ============================================
   Image aspect ratio utilities
   ============================================ */
.img-cover {
    object-fit: cover;
}
