/* Quapaw Fire Department — matches the 2024 Hostinger Website Builder design.
   Change colors and fonts here; every page uses these. */
:root {
    --red: #e6382a;
    --red-hover: #e94c3f;
    --navy: #2b2d40;
    --text: #111111;
    --input-bg: #f1f1f1;
    --font-heading: 'Prompt', sans-serif;
    --font-body: 'Lato', sans-serif;
    --content: 1224px;
    /* Motion: "press" is instant, "settle" is a critically damped release (no overshoot) */
    --press: 90ms ease-out;
    --settle: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: #fff;
    color: var(--text);
    font: 16px/1.7 var(--font-body);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; } /* we draw our own press state */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.35; margin: 0 0 24px; }
h3 { font-size: 46px; font-weight: 500; }
h4 { font-size: 40px; font-weight: 500; }
h6 { font-size: 28px; font-weight: 400; margin-bottom: 8px; }
p  { margin: 0 0 16px; }

.container { width: 100%; max-width: var(--content); margin: 0 auto; }
.center { text-align: center; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 32px;
    background: var(--red); color: #fff;
    font: 16px/1.2 var(--font-body); letter-spacing: .01em; text-align: center; text-decoration: none;
    border: 0; border-radius: 8px; cursor: pointer;
    transition: background-color .2s ease, transform .35s var(--settle);
}
.btn:focus-visible { background: var(--red-hover); }
.btn:active { transform: scale(.97); background: var(--red-hover); transition: transform var(--press), background-color var(--press); }
.btn-xl { font-size: 34px; min-height: 81px; padding: 0 16px; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: #fff;
    padding: 32px 16px;
}
.header-inner { max-width: 1240px; display: flex; justify-content: flex-end; align-items: center; }
.site-nav { display: flex; gap: 56px; }
.site-nav a {
    font: 16px/1.25 var(--font-heading); text-decoration: none; color: var(--text);
    padding-bottom: 4px; border-bottom: 1px solid transparent;
    transition: border-color .2s ease, opacity .25s ease;
}
.site-nav a.active { border-bottom-color: currentColor; color: #000; }
.site-nav a:active { opacity: .55; transition-duration: 60ms; }
.nav-toggle { display: none; }

/* Hero */
.hero {
    min-height: 1104px;
    padding: 52px 0 16px;
    background: center / cover no-repeat;
}
.hero-buttons { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.hero-buttons .btn:first-child { width: 259px; }
.hero-buttons .btn:last-child  { width: 360px; }

/* About (dark band) */
.about { background: var(--navy); color: #fff; padding: 42px 0; min-height: 336px; }
.about-grid { display: grid; grid-template-columns: 496px 392px; justify-content: space-between; padding: 0 104px; gap: 24px; }
.about h3 { max-width: 392px; margin: 24px 0 0; }

/* Generic white section */
.section { padding: 58px 16px; }
.narrow { max-width: 808px; margin: 24px auto 48px; }
.narrow p { margin-bottom: 8px; }
.button-row { display: flex; justify-content: space-between; gap: 24px; }
.button-row .btn { min-width: 218px; }
.button-row .btn:first-child { width: 392px; }

/* Full-width photo band */
.banner-photo { min-height: 784px; background: center / cover no-repeat; }

/* Gallery: 4-column masonry */
.gallery { column-count: 4; column-gap: 16px; }
.gallery-item { display: block; margin-bottom: 16px; break-inside: avoid; cursor: zoom-in;
    transition: transform .35s var(--settle); }
.gallery-item:active { transform: scale(.98); transition: transform var(--press); }
.gallery-item img { width: 100%; height: auto; border-radius: 2px; transition: filter .25s ease; }

/* Forms */
.form { text-align: left; display: grid; gap: 22px; }
.form label { display: grid; gap: 8px; font-size: 14px; color: #1a1a1a; }
.form input, .form textarea {
    width: 100%; padding: 14px 16px;
    font: 16px var(--font-body); color: var(--text);
    background: var(--input-bg); border: 1px solid transparent; border-radius: 4px;
    transition: border-color .15s ease, background-color .15s ease;
}
.form input::placeholder, .form textarea::placeholder { color: #888; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--red); background: #fff; }
.form .btn { justify-self: start; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-msg { margin: 0; padding: 12px 16px; border-radius: 4px; }
.form-msg.ok  { background: #e7f6ea; color: #1d6b2f; }
.form-msg.err { background: #fdecea; color: #a12118; }

.subscribe-form { max-width: 392px; margin: 34px auto 18px; }
.wide-photo { width: 100%; height: auto; border-radius: 6px; margin-top: 18px; }

/* Location */
.location { padding: 0 16px; }
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; min-height: 688px; }
.location-text { text-align: center; align-self: center; }
.location-text a { text-decoration: none; }
.map { width: 100%; height: 100%; min-height: 688px; border: 0; }

/* Footer */
.site-footer { padding: 41px 16px 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr 600px; gap: 24px; }
.footer-info h3 { margin-bottom: 48px; }
.footer-info p { margin-bottom: 28px; }
.footer-info a { text-decoration: none; }
.social { display: inline-flex; color: var(--text); transition: color .2s ease, transform .35s var(--settle); }
.social:active { transform: scale(.88); color: var(--red); transition: transform var(--press), color var(--press); }
.copyright { text-align: center; font-size: 14px; color: #666; margin: 48px 0 0; }

/* Lightbox — motion is driven by main.js (springs, drag, swipe) */
.lightbox {
    --o: 1;                               /* 0..1 presence, animated by JS */
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, calc(.9 * var(--o)));
    overscroll-behavior: contain;
}
.lightbox[hidden] { display: none; }
.lightbox img {
    max-width: 90vw; max-height: 88vh;
    touch-action: none; user-select: none; -webkit-user-drag: none;
    will-change: transform; cursor: grab;
}
.lightbox img.dragging { cursor: grabbing; }
.lightbox button {
    position: absolute; z-index: 1; background: none; border: 0; color: #fff;
    font-size: 48px; line-height: 1; cursor: pointer; padding: 16px;
    opacity: var(--o);
    transition: transform .35s var(--settle);
}
.lightbox button:active { transform: scale(.85); transition: transform var(--press); }
.lightbox-close { top: 8px; right: 16px; }
.lightbox-prev  { left: 8px; }
.lightbox-next  { right: 8px; }

/* Hover only for devices that really hover (prevents "stuck" hover after a tap on phones) */
@media (hover: hover) and (pointer: fine) {
    .btn:hover { background: var(--red-hover); }
    .site-nav a:hover { border-bottom-color: currentColor; color: #000; }
    .social:hover { color: var(--red); }
    .gallery-item:hover img { filter: brightness(1.07); }
}

/* Tablet */
@media (max-width: 1240px) {
    .container { padding: 0 16px; }
    .about-grid { padding: 0 16px; grid-template-columns: 1fr 1fr; }
    .hero { min-height: 76vw; }
}

/* Phone */
@media (max-width: 920px) {
    h3 { font-size: 32px; }
    h4 { font-size: 28px; }
    h6 { font-size: 20px; }

    .site-header { padding: 16px; }
    .nav-toggle {
        display: grid; gap: 5px; padding: 8px; background: none; border: 0; cursor: pointer;
        transition: transform .35s var(--settle);
    }
    .nav-toggle:active { transform: scale(.9); transition: transform var(--press); }
    .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text);
        transition: transform .35s var(--settle), opacity .2s ease; }
    /* Hamburger morphs into an X */
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Menu drops out from under the header and leaves the same way it came */
    .site-nav { display: flex; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
        flex-direction: column; gap: 0; padding: 8px 16px 16px; box-shadow: 0 8px 16px rgba(0,0,0,.08);
        visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
        transition: opacity .2s ease, transform .3s var(--settle), visibility 0s linear .3s; }
    .site-nav.open { visibility: visible; opacity: 1; transform: none; pointer-events: auto;
        transition: opacity .2s ease, transform .3s var(--settle), visibility 0s; }
    .site-nav a { padding: 12px 0; }

    .hero { min-height: 0; aspect-ratio: 3 / 2; padding: 16px 0; }
    .hero-buttons .btn { width: auto !important; flex: 1; }
    .btn-xl { font-size: 18px; min-height: 56px; }

    .about { padding: 40px 0; }
    .about-grid, .location-grid, .footer-grid { grid-template-columns: 1fr; }
    .about h3 { margin-top: 0; }

    .section { padding: 40px 16px; }
    .button-row { flex-direction: column; align-items: center; }
    .button-row .btn { width: 100% !important; max-width: 392px; }

    .banner-photo { min-height: 0; aspect-ratio: 4 / 3; }
    .gallery { column-count: 2; }
    .location-grid { min-height: 0; padding: 40px 0; }
    .map { min-height: 320px; }
}

/* Reduced motion: keep the feedback (color/opacity), drop the movement */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn:active, .social:active, .gallery-item:active, .nav-toggle:active, .lightbox button:active { transform: none; }
    .site-nav, .site-nav.open { transform: none !important; }
    .nav-toggle span { transition: none; }
}
