/* ========================================
   Moseleyville Fire Department
   Custom Styles
   ======================================== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #B8543A;
    color: #FAF7F2;
}

/* --- Hero Animations --- */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-right {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s ease-out;
}

.animate-fade-right {
    animation: fade-right 0.8s ease-out;
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Default visible state for progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Animated state only when JS is active */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animated-hidden {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    
    .scroll-reveal.animated-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Navbar --- */
.nav-logo-text {
    color: #2a2520;
    transition: color 0.3s ease;
}

.nav-logo-sub {
    color: #524a40;
    transition: color 0.3s ease;
}

.nav-logo-icon {
    color: #B8543A;
}

.nav-link {
    color: #524a40;
}

/* Scrolled state */
.nav-scrolled .nav-logo-text {
    color: #2a2520;
}

.nav-scrolled .nav-logo-sub {
    color: #524a40;
}

.nav-scrolled .nav-link {
    color: #3d3730;
}

/* --- Mobile Menu --- */
.menu-line {
    background-color: #2a2520;
}

.mobile-menu-link {
    color: #2a2520;
}

/* --- Buttons --- */
button[type="submit"],
a[href="tel:+12706858440"] {
    cursor: pointer;
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #b0a698;
}

/* --- Image Hover Effects --- */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* --- Divider --- */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
}

/* --- Smooth scroll offset for fixed nav --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Focus visible for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #B8543A;
    outline-offset: 2px;
}

/* --- Mobile menu open state --- */
body.menu-open {
    overflow: hidden;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #B8543A;
}
