/* ========================================
   North Haven Fire Dept II — Custom Styles
   ======================================== */

/* Base resets and smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(209, 79, 46, 0.15);
    color: #8c3320;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5eb;
}
::-webkit-scrollbar-thumb {
    background: #e0d5c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c09a58;
}

/* ========================================
   Reveal Animations (Progressive Enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.mobile-link:last-child {
    border-bottom: none;
}

/* ========================================
   Hero Section
   ======================================== */
#top {
    position: relative;
}

#top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--tw-bg-sand-50, #fdfbf7));
    pointer-events: none;
}

/* ========================================
   Cards
   ======================================== */
.group:hover .group-hover\:bg-terracotta-600 {
    background-color: #d14f2e;
}

/* ========================================
   Button Focus States
   ======================================== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d14f2e;
    outline-offset: 2px;
}

/* ========================================
   Form Input Focus Ring
   ======================================== */
input:focus,
textarea:focus {
    outline: none;
}

/* ========================================
   Image Hover
   ======================================== */
.aspect-square > img,
.aspect-\[4\/5\] > img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========================================
   Utility: Thin lines / dividers
   ======================================== */
.divider-line {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.08), transparent);
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 768px) {
    #top::after {
        height: 60px;
    }

    .font-serif {
        line-height: 1.15;
    }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    #navbar,
    #contact-form,
    iframe {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
