/* ============================================================
   Moonachie Fire Department — shared design system
   Dark, heroic. Fire red + gold from the dept badge.
   Display: Oswald  ·  Body: Barlow
   ============================================================ */

:root {
  --ink:       #0c0d10;   /* page background */
  --ink-2:     #111318;   /* raised section */
  --panel:     #16191f;   /* cards */
  --panel-2:   #1d2129;   /* card hover / insets */
  --line:      rgba(255,255,255,.10);
  --line-soft: rgba(255,255,255,.055);

  --fg:        #f5f4f1;
  --fg-dim:    #c3c4c8;
  --muted:     #8d9097;

  --red:       #e01f26;
  --red-deep:  #aa1318;
  --red-glow:  rgba(224,31,38,.45);
  --gold:      #f4b01c;
  --gold-deep: #c98a08;

  --maxw: 1200px;
  --gap: clamp(20px, 4vw, 48px);
  --radius: 4px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.7);

  --ff-display: 'Oswald', 'Arial Narrow', sans-serif;
  --ff-body: 'Barlow', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--ff-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: .01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 44px, var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 44px, 820px); margin-inline: auto; }

/* ---------- shared eyebrow / section headers ---------- */
.eyebrow {
  font-family: var(--ff-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: 13px;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--red);
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::after {
  content: "";
  width: 28px; height: 2px;
  background: var(--red);
}

.section-title {
  font-size: clamp(34px, 5.2vw, 60px);
  text-transform: uppercase;
}
.lead { font-size: clamp(18px, 2.1vw, 21px); color: var(--fg-dim); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--line);
}
/* Blur lives on a pseudo-element, not the header itself, so it does NOT
   become the containing block for the fixed mobile nav drawer inside it. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(10,11,14,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar {
  background: var(--red-deep);
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 38px; gap: 16px; flex-wrap: wrap;
}
.topbar a { display: inline-flex; align-items: center; gap: 7px; opacity: .94; }
.topbar a:hover { opacity: 1; }
.topbar .emerg {
  font-family: var(--ff-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
}
.topbar .emerg strong { color: var(--gold); }

.navbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 84px;
}
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand img { width: 56px; height: 56px; object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.brand .bt { display: flex; flex-direction: column; line-height: 1; }
.brand .bt b {
  font-family: var(--ff-display); font-weight: 600; font-size: 21px;
  text-transform: uppercase; letter-spacing: .04em;
}
.brand .bt span {
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-top: 5px; font-weight: 600;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--ff-display);
  text-transform: uppercase; letter-spacing: .08em;
  font-size: 15px; font-weight: 500;
  color: var(--fg-dim);
  padding: 10px 14px; border-radius: var(--radius);
  position: relative; transition: color .18s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--red); transform: scaleX(0);
  transition: transform .2s ease; transform-origin: left;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: #fff; }

.btn-donate {
  font-family: var(--ff-display); text-transform: uppercase;
  letter-spacing: .1em; font-weight: 600; font-size: 15px;
  background: var(--red); color: #fff !important;
  padding: 11px 22px !important; border-radius: var(--radius);
  box-shadow: 0 6px 22px -8px var(--red-glow);
  transition: background .18s, transform .18s;
}
.btn-donate::after { display: none; }
.btn-donate:hover { background: var(--red-deep); transform: translateY(-1px); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--fg); width: 46px; height: 46px; border-radius: var(--radius);
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    flex-direction: column; align-items: stretch; gap: 2px;
    z-index: 101;
    background: var(--ink-2);
    border-left: 1px solid var(--line);
    padding: 80px 20px 30px; transform: translateX(100%);
    transition: transform .28s ease; box-shadow: var(--shadow);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { padding: 14px 16px; font-size: 18px; }
  .nav-links a::after { display: none; }
  .nav-links a[aria-current="page"] {
    background: var(--panel); border-left: 3px solid var(--red);
  }
  .btn-donate { margin-top: 10px; text-align: center; }
  .navbar { min-height: 68px; }
  .brand img { width: 46px; height: 46px; }
}

.nav-overlay {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(12, 13, 16, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-overlay[hidden] { display: none; }
body.nav-open { overflow: hidden; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-display); text-transform: uppercase;
  letter-spacing: .1em; font-weight: 600; font-size: 16px;
  padding: 15px 30px; border-radius: var(--radius);
  cursor: pointer; border: none; transition: all .18s; line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--red); color: #fff;
  box-shadow: 0 10px 30px -12px var(--red-glow);
}
.btn-primary:hover { background: var(--red-deep); transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.28);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold { background: var(--gold); color: #1a1205; }
.btn-gold:hover { background: var(--gold-deep); transform: translateY(-2px); }

/* ============================================================
   PAGE HERO (interior pages)
   ============================================================ */
.page-hero {
  position: relative; padding: clamp(70px, 12vw, 130px) 0 clamp(46px, 7vw, 78px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--hero-img); background-size: cover; background-position: center 55%;
  opacity: .30; filter: grayscale(.15); z-index: -2;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12,13,16,.65) 0%, rgba(12,13,16,.92) 100%),
              radial-gradient(120% 90% at 80% 0%, rgba(224,31,38,.18), transparent 60%);
}
.page-hero h1 { font-size: clamp(42px, 7vw, 78px); text-transform: uppercase; }
.page-hero .lead { margin-top: 16px; max-width: 640px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section.alt { background: var(--ink-2); }
.section.tight { padding: clamp(40px, 6vw, 70px) 0; }

/* ---------- cards ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.grid { display: grid; gap: 22px; }
@media (min-width: 720px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .grid.cols-3 { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 980px) { .grid.cols-4 { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 980px) { .grid.cols-5 { grid-template-columns: repeat(5,1fr); } }
@media (min-width: 720px) and (max-width: 979px) { .grid.cols-5 { grid-template-columns: repeat(3,1fr); } }

/* ---------- placeholder media ---------- */
.ph {
  position: relative; background:
    repeating-linear-gradient(45deg, #1a1d24 0 14px, #20242d 14px 28px);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  text-align: center; padding: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #08090b; border-top: 3px solid var(--red);
  padding: clamp(48px,7vw,72px) 0 30px; color: var(--fg-dim);
}
.footer-grid {
  display: grid; gap: 38px;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: start;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 64px; height: 64px; object-fit: contain; }
.footer-brand b { font-family: var(--ff-display); font-size: 20px;
  text-transform: uppercase; letter-spacing: .04em; color: #fff; display: block; }
.footer-col h4 {
  font-size: 14px; text-transform: uppercase; letter-spacing: .2em;
  color: var(--gold); margin-bottom: 16px; font-weight: 600;
}
.footer-col a, .footer-col p { display: block; margin-bottom: 9px; font-size: 15.5px; }
.footer-contact-line {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 10px; font-size: 15.5px; line-height: 1.5;
}
.footer-contact-line svg { flex-shrink: 0; margin-top: 3px; width: 17px; height: 17px; max-width: 17px; max-height: 17px; }
.footer-contact-line a:hover { color: #fff; }
.footer-col a:hover { color: #fff; }
.foot-social { display: flex; gap: 12px; margin-top: 16px; }
.foot-social a {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.foot-social a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.foot-social svg { width: 18px; height: 18px; }
.foot-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); letter-spacing: .03em;
}

/* ============================================================
   INLINE UI ICON SIZING
   Injected SVGs (site.js `ico`) carry a viewBox but no width/height,
   so they balloon to their default size. Constrain only the small
   inline UI symbols (phone, pin, mail, facebook, menu) — scoped so
   intentionally-large/decorative SVGs are left untouched.
   ============================================================ */
.site-header .topbar a svg,
.topbar svg {
  width: 15px; height: 15px; max-width: 15px; max-height: 15px; flex-shrink: 0;
}
.site-footer .footer-col p svg {
  width: 17px; height: 17px; max-width: 17px; max-height: 17px; flex-shrink: 0;
  vertical-align: -0.18em; margin-right: 5px;
}
.cmethod .ic svg { width: 22px; height: 22px; max-width: 22px; max-height: 22px; stroke: var(--gold); }
.map-ph svg { width: 32px; height: 32px; max-width: 32px; max-height: 32px; stroke: var(--muted); }

/* ============================================================
   CTA BAND (shared — used on home, officers, etc.)
   ============================================================ */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(64px, 9vw, 110px) 0;
}
.cta-band img.bgimg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(rgba(12,13,16,.86), rgba(12,13,16,.93));
}
.cta-band .wrap,
.cta-band .wrap-narrow { position: relative; z-index: 2; }
.cta-band h2 { font-size: clamp(34px, 6vw, 64px); text-transform: uppercase; }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
  /* PayPal iframes break when any ancestor uses transform — keep checkout column static */
  .donate-online.reveal,
  .donate-online .reveal,
  #paypal-donate-ui.reveal {
    opacity: 1; transform: none; transition: none;
  }
}

/* utility */
.text-center { text-align: center; }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 26px; } .mt-l { margin-top: 44px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-row.center { justify-content: center; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ============================================================
   FORMS (Join / Contact)
   ============================================================ */
.form-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(26px, 4vw, 44px);
}
.field { margin-bottom: 20px; }
.field label {
  display: block; font-family: var(--ff-display); text-transform: uppercase;
  letter-spacing: .1em; font-size: 13px; color: var(--fg-dim); margin-bottom: 8px;
}
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--fg); font-family: var(--ff-body);
  font-size: 16px; padding: 13px 15px; transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224,31,38,.18);
}
.field input::placeholder, .field textarea::placeholder { color: #5e616a; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--red); }
.field .err-msg { color: #ff8389; font-size: 13px; margin-top: 6px; display: none; }
.field.error .err-msg { display: block; }
.form-row { display: grid; gap: 0 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px){ .form-row { grid-template-columns: 1fr; } }
.form-success {
  display: none; text-align: center; padding: 30px 10px;
}
.form-success.show { display: block; }
.form-success .chk {
  width: 70px; height: 70px; border-radius: 50%; background: rgba(31,138,90,.16);
  border: 2px solid #2fae71; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.form-success .chk svg { width: 34px; height: 34px; stroke: #54d398; }
.form-note { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

