/* Custom styles for American Lock & Supply */

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

/* Navbar transition states */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 246, 241, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .nav-logo-sub,
#navbar.scrolled .nav-logo-color,
#navbar.scrolled .menu-line {
    color: #2C2825;
    stroke: #2C2825;
    fill: #2C2825;
}

#navbar.scrolled .nav-logo-sub {
    color: #6B6560;
}

/* Hero content animation - visible by default for progressive enhancement */
.hero-content {
    opacity: 1;
    transform: none;
}

/* Service card hover */
.service-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Gallery hover */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(123, 45, 59, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Testimonial card */
.testimonial-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(123, 45, 59, 0.12);
}

/* Mobile menu */
.mobile-link {
    opacity: 1;
}

/* Scroll reveal animations - progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* About section animations */
@media (prefers-reduced-motion: no-preference) {
    .about-image {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    }
    .about-image.revealed {
        opacity: 1;
        transform: translateX(0);
    }
    .about-content {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    }
    .about-content.revealed {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF6F1;
}
::-webkit-scrollbar-thumb {
    background: #d44568;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(123, 45, 59, 0.15);
    color: #2C2825;
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6560' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    appearance: none;
}

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