/* ============================================
   Fenton Fire Department — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #7e1e1e;
    color: #faf8f6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f6;
}
::-webkit-scrollbar-thumb {
    background: #d45050;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9a2424;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background: rgba(250, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all duration-400s;
}

.navbar.scrolled {
    background: rgba(250, 248, 246, 0.98);
    border-bottom-color: #f9d0d0;
    box-shadow: 0 1px 20px rgba(126, 30, 30, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #7e1e1e;
    transition: width 0.3s ease;
}

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

/* Mobile menu */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

#mobile-menu.open {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease;
}

.mobile-nav-link:hover {
    padding-left: 12px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
}

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

/* Only apply hidden state when JS is available and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children */
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   Buttons & Interactive Elements
   ============================================ */
a, button {
    transition: all 0.3s ease;
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #7e1e1e;
    outline-offset: 2px;
}

/* ============================================
   Form Styles
   ============================================ */
input::placeholder, textarea::placeholder {
    color: #a89a94;
}

select {
    appearance: none;
    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='%237e1e1e' 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 12px center;
    padding-right: 36px;
}

/* ============================================
   Back to Top
   ============================================ */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:not(.visible) {
    transform: translateY(10px);
}

/* ============================================
   Decorative Patterns
   ============================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .navbar {
        background: rgba(250, 248, 246, 0.98);
    }
}
