@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #1b1f27;          /* primary text */
  --ink-soft: #515a68;     /* secondary text */
  --paper: #f7f5f1;        /* warm light base */
  --paper-2: #ffffff;
  --edge: #e4e0d8;         /* hairlines */
  --dark: #12161d;         /* dark header/footer */
  --dark-soft: #1c222c;
  --red: #b5301d;          /* department red */
  --red-bright: #cc2200;
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wrap: 1180px;
}

body { font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Masthead ── */
.masthead { background: var(--dark); border-bottom: 3px solid var(--red); position: relative; }
.masthead-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 18px 24px 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.logo-row { display: flex; align-items: center; gap: 14px; }
.emblem { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--red); position: relative; flex-shrink: 0; }
.emblem::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.5); }
.wordmark { text-align: center; }
.wordmark .name { font-family: var(--serif); color: #fff; font-size: 1.5rem; letter-spacing: 0.01em; line-height: 1.1; }
.wordmark .sub { color: #97a0ae; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.22em; margin-top: 4px; }

nav.primary { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
nav.primary a {
  color: #c2c8d2; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 14px 14px; border-bottom: 3px solid transparent; margin-bottom: -3px; transition: color .15s, border-color .15s; white-space: nowrap;
}
nav.primary a:hover { color: #fff; }
nav.primary a.active { color: #fff; border-bottom-color: var(--red); }
nav.primary a.alerts { color: #ff8a73; }

.menu-toggle {
  display: none; position: absolute; right: 20px; top: 16px;
  background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; padding: 4px 8px; line-height: 1;
}

/* ── Alert banner ── */
#alert-banner { display: none; }
#alert-banner.visible { display: block; background: #5b1a12; color: #ffd9d0; border-bottom: 1px solid #7a241a; }
.alert-banner-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 12px; font-size: 0.9rem; font-weight: 600;
}
.alert-banner-inner a { color: #ffb3a6; text-decoration: underline; }

/* ── Hero (homepage) ── */
.hero {
  position: relative; overflow: hidden; min-height: 78vh; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 80px 24px; background: var(--dark-soft);
}
/* Blurred, zoomed copy fills the whole hero; sharp photo sits on top.
   Small photos use background-size:contain (set in JS) so they're never
   upscaled — the blur fills the leftover space. */
.hero-blur, .hero-photo { position: absolute; inset: 0; background-position: center; background-repeat: no-repeat; }
.hero-blur { background-size: cover; background-position: center; filter: blur(12px) saturate(1.2) brightness(0.92); transform: scale(1.2); z-index: 0; }
.hero-photo { background-size: cover; z-index: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(10,13,18,0.5) 0%, rgba(10,13,18,0.28) 40%, rgba(10,13,18,0.72) 100%);
}
.hero-content { position: relative; z-index: 3; max-width: 860px; }
.hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 46px; height: 46px; border-radius: 50%; padding: 0;
  background: rgba(10,13,18,0.32); border: 1px solid rgba(255,255,255,0.45); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.hero-nav:hover { background: rgba(10,13,18,0.6); border-color: #fff; }
.hero-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hero-nav svg { width: 22px; height: 22px; display: block; }
.hero-nav.prev { left: 18px; }
.hero-nav.next { right: 18px; }
@media (max-width: 600px) {
  .hero-nav { width: 38px; height: 38px; }
  .hero-nav svg { width: 18px; height: 18px; }
  .hero-nav.prev { left: 8px; }
  .hero-nav.next { right: 8px; }
}
.hero .eyebrow { text-transform: uppercase; letter-spacing: 0.26em; font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.88); }
.hero .rule { width: 64px; height: 2px; background: var(--red-bright); margin: 20px auto; }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(0.95rem, 4.8vw, 3rem); line-height: 1.1; white-space: nowrap; text-shadow: 0 2px 24px rgba(0,0,0,0.4); }
.hero p.lede { margin-top: 18px; font-size: 1.06rem; color: rgba(255,255,255,0.92); line-height: 1.7; text-shadow: 0 1px 10px rgba(0,0,0,0.5); }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Page header (interior pages) ── */
.page-header { background: var(--dark); border-bottom: 3px solid var(--red); color: #fff; }
.page-header-inner { max-width: var(--wrap); margin: 0 auto; padding: 30px 24px; }
.page-header .eyebrow { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.7rem; font-weight: 600; color: #97a0ae; }
.page-header h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.15; margin-top: 6px; }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 13px 26px; font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; border-radius: 2px; cursor: pointer; border: none;
  font-family: var(--sans); text-align: center; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-bright); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,0.7); color: #fff; background: transparent; }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-outline { border: 1.5px solid var(--red); color: var(--red); background: transparent; }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.72rem; }
.btn-danger { background: #8f2114; color: #fff; }
.btn-danger:hover { background: #6f190f; }

/* ── Content ── */
.content-wrap { max-width: var(--wrap); margin: 0 auto; padding: 60px 24px; }
.content-wrap.narrow { max-width: 760px; }

section { margin-bottom: 48px; }
section:last-child { margin-bottom: 0; }
section h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
section h2 .accent, section h2::after { }
section p { font-size: 1.0625rem; line-height: 1.75; color: var(--ink); margin-bottom: 14px; }
section p:last-child { margin-bottom: 0; }
section ul { padding-left: 20px; font-size: 1.0625rem; line-height: 1.9; color: var(--ink); margin-bottom: 14px; }
section a.inline { color: var(--red); font-weight: 600; }
section a.inline:hover { text-decoration: underline; }

.kicker { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.74rem; font-weight: 700; color: var(--red); }

/* Centered intro block (homepage) */
.intro { max-width: 760px; margin: 0 auto; padding: 76px 24px 60px; text-align: center; }
.intro h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin: 14px 0 18px; line-height: 1.25; }
.intro p { color: var(--ink-soft); font-size: 1.06rem; }

/* ── Quick-link / card grid ── */
.links { max-width: var(--wrap); margin: 0 auto 90px; padding: 0 24px; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--edge); }
.link-card { padding: 36px 28px; border-bottom: 1px solid var(--edge); border-right: 1px solid var(--edge); display: flex; flex-direction: column; }
.link-card:first-child { border-left: 1px solid var(--edge); }
.link-card .num { font-family: var(--serif); font-style: italic; color: var(--red); font-size: 1rem; }
.link-card h3 { font-family: var(--serif); font-size: 1.3rem; margin: 8px 0 10px; }
.link-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 16px; flex: 1; }
.link-card a.more { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--red); border-bottom: 1px solid var(--red); padding-bottom: 2px; align-self: flex-start; }
.link-card a.more:hover { color: var(--red-bright); border-color: var(--red-bright); }

/* ── Info cards (interior pages) ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { background: var(--paper-2); border: 1px solid var(--edge); border-top: 3px solid var(--red); border-radius: 4px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.card p { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.65; flex: 1; }
.card .btn { margin-top: 8px; align-self: flex-start; }

/* ── Contact list ── */
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; flex-direction: column; gap: 3px; }
.contact-list .label { font-weight: 600; color: var(--ink); }
.contact-list a { color: var(--red); font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }

/* ── Alerts page ── */
.alert-card {
  background: var(--paper-2); border: 1px solid var(--edge); border-left: 5px solid #9ca3af;
  border-radius: 4px; padding: 20px 24px; margin-bottom: 16px; display: flex; gap: 16px; align-items: flex-start;
}
.alert-card.burn-ban { border-left-color: #d97706; }
.alert-card.road-closure { border-left-color: #ca8a04; }
.alert-card.emergency { border-left-color: var(--red); }
.alert-card.general { border-left-color: #2563eb; }
.alert-type-badge { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 2px; white-space: nowrap; flex-shrink: 0; }
.badge-burn-ban { background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; }
.badge-road-closure { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.badge-emergency { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.badge-general { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-body { flex: 1; }
.alert-body h3 { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.alert-body p { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.65; }
.alert-meta { font-size: 0.75rem; color: #9ca3af; margin-top: 8px; }
.no-alerts { text-align: center; padding: 60px 20px; color: #9ca3af; }
.no-alerts p { font-size: 1rem; }

/* ── Numbered steps (Join "What to Expect") ── */
.steps { padding-left: 24px; font-size: 1.0625rem; line-height: 1.7; color: var(--ink); margin-bottom: 8px; }
.steps li { margin-bottom: 9px; padding-left: 4px; }
.steps li::marker { color: var(--red); font-weight: 700; }

/* ── Work-category cards (Join "What We Do") ──
   Same white-card family as .card, but distinguished by a red serif heading
   and red-dot bullets instead of the red top border. */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 18px 0; }
.work-card { background: var(--paper-2); border: 1px solid var(--edge); border-radius: 4px; padding: 22px 24px; }
.work-card h3 { font-family: var(--serif); font-size: 1.15rem; color: var(--red); margin-bottom: 12px; }
.work-card ul { list-style: none; margin: 0; padding: 0; }
.work-card li { position: relative; padding-left: 16px; margin-bottom: 7px; font-size: 0.92rem; line-height: 1.5; color: var(--ink-soft); }
.work-card li:last-child { margin-bottom: 0; }
.work-card li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }

/* ── Message form (Join page) ── */
.message-form { background: var(--paper-2); border: 1px solid var(--edge); border-radius: 6px; padding: 24px; max-width: 540px; margin-top: 18px; }
.message-form .btn { margin-top: 4px; }
.form-status { font-size: 0.9rem; margin-top: 12px; min-height: 20px; line-height: 1.5; }
.form-status.ok { color: #15803d; font-weight: 600; }
.form-status.err { color: #b91c1c; }

/* ── Placeholder box ── */
.placeholder-box {
  background: #fbf3e6; border: 1px dashed #c9922e; border-radius: 4px;
  padding: 12px 16px; font-size: 0.85rem; color: #8a5a12; margin-bottom: 14px;
}

/* ── Live status cards (burn ban + fire weather + current conditions) ── */
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.status-card {
  background: var(--paper-2); border: 1px solid var(--edge); border-top: 3px solid #9ca3af;
  border-radius: 4px; padding: 22px 24px;
}
.status-card h3 { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); margin-bottom: 10px; }
.status-card .status-line { font-size: 1.15rem; font-weight: 700; color: var(--ink-soft); line-height: 1.35; }
.status-card.ok { border-top-color: #15803d; }
.status-card.ok .status-line { color: #15803d; }
.status-card.warn { border-top-color: #d97706; }
.status-card.warn .status-line { color: #b45309; }
.status-card.danger { border-top-color: var(--red); }
.status-card.danger .status-line { color: var(--red); }
.status-card .status-note { font-size: 0.87rem; color: var(--ink-soft); margin-top: 10px; line-height: 1.6; }
.status-card .status-note a { color: var(--red); font-weight: 600; }
.status-card .status-note a:hover { text-decoration: underline; }
.status-card .wx-big { font-family: var(--serif); font-size: 2.3rem; color: var(--ink); line-height: 1.1; }
.status-card .wx-detail { font-size: 0.9rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.6; }

/* ── Forecast grid (weather page) ── */
.forecast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.forecast-cell { background: var(--paper-2); border: 1px solid var(--edge); border-radius: 4px; padding: 14px 16px; }
.forecast-cell.night { background: #efede7; }
.forecast-cell .fname { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }
.forecast-cell .ftemp { font-family: var(--serif); font-size: 1.45rem; color: var(--ink); margin: 6px 0 2px; }
.forecast-cell .fdesc { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.45; }
.forecast-cell .fwind { font-size: 0.75rem; color: #9ca3af; margin-top: 6px; }

/* ── FAQ accordions ── */
.faq details { background: var(--paper-2); border: 1px solid var(--edge); border-radius: 4px; margin-bottom: 10px; }
.faq summary {
  cursor: pointer; padding: 16px 44px 16px 20px; font-weight: 600; font-size: 1rem;
  list-style: none; position: relative; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--red); font-size: 1.3rem; font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq .faq-a { padding: 0 20px 18px; }
.faq .faq-a p { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.7; margin-bottom: 10px; }
.faq .faq-a p:last-child { margin-bottom: 0; }
.faq .faq-a a { color: var(--red); font-weight: 600; }
.faq .faq-a a:hover { text-decoration: underline; }

/* ── Help Us Find You callout band (homepage) ── */
.callout-band { background: var(--dark); border-top: 3px solid var(--red); border-bottom: 3px solid var(--red); margin-bottom: 90px; }
.callout-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 44px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.callout-text { max-width: 720px; }
.callout-text h2 { font-family: var(--serif); color: #fff; font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin-bottom: 10px; line-height: 1.2; }
.callout-text p { color: #c2c8d2; font-size: 1rem; line-height: 1.7; }
.callout-band .btn { flex-shrink: 0; }

/* ── Facebook embed (homepage) ── */
.fb-embed-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.fb-embed-wrap iframe {
  border: 1px solid var(--edge); border-radius: 4px; background: var(--paper-2);
  width: 500px; max-width: 100%;
}

/* ── Computed next-meeting dates (contact page) ── */
.next-date { color: var(--red); font-weight: 700; font-size: 0.9rem; }

/* ── Admin ── */
.admin-wrap { max-width: 680px; margin: 0 auto; padding: 48px 24px; }
.admin-form { background: var(--paper-2); border: 1px solid var(--edge); border-radius: 6px; padding: 24px; margin-bottom: 32px; }
.admin-form h2 { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid #cfcabf; border-radius: 4px;
  font-size: 0.95rem; font-family: inherit; outline: none; background: #fff; color: var(--ink);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(181,48,29,0.15); }
.form-group textarea { min-height: 90px; resize: vertical; }
#post-status { font-size: 0.85rem; margin-top: 10px; min-height: 20px; }
#post-status.ok { color: #15803d; }
#post-status.err { color: #b91c1c; }
.admin-alerts h2 { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.admin-alert-row { background: var(--paper-2); border: 1px solid var(--edge); border-radius: 4px; padding: 14px 16px; margin-bottom: 10px; display: flex; gap: 12px; align-items: flex-start; }
.admin-alert-row .info { flex: 1; font-size: 0.9rem; }
.admin-alert-row .info strong { display: block; margin-bottom: 2px; }
.admin-alert-row .info span { color: var(--ink-soft); font-size: 0.8rem; }

/* ── Map page ── */
.map-legend {
  max-width: var(--wrap); margin: 0 auto; padding: 9px 24px; background: var(--dark); color: #d6dae1;
  font-size: 0.78rem; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid #2a313c;
}
#map-container { position: relative; }
#map { width: 100%; height: 100%; }

/* ── Footer ── */
footer.site-footer { background: var(--dark); color: #8a93a1; border-top: 3px solid var(--red); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 40px 24px; text-align: center; }
.footer-inner .fname { font-family: var(--serif); color: #fff; font-size: 1.15rem; }
.footer-inner .fsub { margin-top: 6px; font-size: 0.85rem; }
.footer-inner a { color: #c2c8d2; }
.footer-inner a:hover { color: #fff; }
.footer-inner .femergency { margin-top: 16px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-inner .femergency strong { color: #ff6b52; }
.footer-inner .fcopy { margin-top: 14px; font-size: 0.76rem; color: #6b7480; }

/* ── Utilities ── */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ── Responsive ── */
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  nav.primary {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding: 6px 0 12px; gap: 0;
  }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 12px 8px; border-bottom: 1px solid #232a35; margin-bottom: 0; text-align: center; }
  nav.primary a.active { border-bottom-color: var(--red); }
  .links-grid { grid-template-columns: 1fr; }
  .link-card, .link-card:first-child { border-left: 1px solid var(--edge); border-right: 1px solid var(--edge); }
  .content-wrap { padding: 40px 20px; }
}
