/* Custom styles for Silver Creek Fire Department */

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

/* Reveal animation for above-the-fold */
html.animate-reveal body {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll reveal base styles — always visible by default for no-JS */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden state for enhanced motion users */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(253, 248, 240, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(4, 78, 59, 0.08);
}

/* Mobile menu transitions */
#mobileMenu {
    transition: opacity 0.3s ease, transform 0.3s ease, pointer-events 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#mobileMenu.closed {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

/* Subtle hover on nav links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile link hover */
.mobile-link {
    transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-link:hover {
    transform: translateX(4px);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-track {
    background: #FDF8F0;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #34D399;
}

/* Selection color */
::selection {
    background: #A7F3D0;
    color: #064E3B;
}
