/* ============================================
   Exira Police Department — Custom Styles
   Bold Editorial | Forest Green + Off-White
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #558133;
    color: #FAFAF5;
}

/* --- Section Shared Styles --- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #558133;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    color: #121b0d;
}

.section-desc {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #416529;
}

/* --- Navigation --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 250, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(43, 64, 30, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
    color: #121b0d !important;
}

#navbar.scrolled .text-forest-600 {
    color: #558133 !important;
}

#navbar.scrolled a.text-forest-700 {
    color: #2b401e !important;
}

/* --- Hero --- */
#hero {
    position: relative;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #558133, #73a147);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* --- Community Cards --- */
.community-card {
    position: relative;
}

/* --- Scroll Reveal (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .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; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Fallback: ensure content is visible even if JS doesn't load */
@supports not (animation-fill-mode: both) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Mobile Menu --- */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

.mobile-link {
    display: block;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
    color: #558133;
    padding-left: 8px;
}

/* --- Buttons --- */
button, a {
    cursor: pointer;
}

/* --- Focus Styles --- */
:focus-visible {
    outline: 2px solid #558133;
    outline-offset: 2px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }
}

/* --- Print Styles --- */
@media print {
    #navbar, .community-card img, #hero img {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section-title, .font-serif {
        color: black;
    }
}
