/* =========================================================
   Service-area map (MapLibre + OpenStreetMap) — home page, hub, city heroes
   Loaded after styles.css
   ========================================================= */

/* ---------- Home-page section ---------- */
.areas-section { background: #0E1631; color: var(--tx-light); overflow: hidden; }
.areas-section .orb.cold { opacity: 0.22; top: -10rem; left: -8.75rem; }
.areas-section .orb.hot { opacity: 0.22; bottom: -12.5rem; right: -7.5rem; }
.areas-section .wrap { position: relative; z-index: 2; }
.areas-section .eyebrow { color: var(--hot); }
.areas-section .section-title { color: var(--tx-light); max-width: 18ch; }
.areas-section .section-sub { color: var(--tx-light-mut); max-width: 62ch; }
.areas-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.areas-head-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.areas-map-host { margin-top: 3rem; }
.areas-note { position: relative; margin-top: 1.5rem; padding: 1rem 1.25rem 1rem 3rem; max-width: 47.5rem; border-radius: 0.75rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); color: var(--tx-light); font-size: 1rem; line-height: 1.55; }
.areas-note::before { content: ""; position: absolute; left: 1.25rem; top: 1.25rem; width: 0.875rem; height: 0.875rem; border-radius: 50%; background: #D7261E; box-shadow: 0 0 0 0.25rem rgba(215,38,30,0.25); }

/* ---------- Full map component ---------- */
.fbm { font-family: var(--font-body); }
.fbm-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(17.5rem, 1fr); gap: 1.5rem; align-items: stretch; }
.fbm-stage { position: relative; height: 40rem; border-radius: 1.375rem; overflow: hidden; background: radial-gradient(120% 90% at 55% 50%, #182450, #0E1631); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 2.5rem 5.625rem -2.5rem rgba(0,0,0,0.8); isolation: isolate; }
.fbm-stage .fbm-canvas, .fbm-stage .fbm-canvas.maplibregl-map { position: absolute; inset: 0; }
.fbm-canvas .maplibregl-canvas { outline: none; }
.fbm-loading { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,0.45); font: 600 0.9rem var(--font-head); pointer-events: none; transition: opacity .5s; }
.fbm.is-ready .fbm-loading { opacity: 0; }
.fbm.is-fallback .fbm-loading { opacity: 1; font-size: 0; }
.fbm.is-fallback .fbm-loading::after { content: "The map couldn't load. Use the list to find your city."; font-size: 0.95rem; }

/* MapLibre chrome */
.fbm .maplibregl-ctrl-attrib, .c-map .maplibregl-ctrl-attrib { background: rgba(14,22,49,0.75) !important; color: rgba(255,255,255,0.6); font-size: 0.625rem; }
.fbm .maplibregl-ctrl-attrib a, .c-map .maplibregl-ctrl-attrib a { color: rgba(255,255,255,0.75); }
.fbm .maplibregl-ctrl-attrib-button, .c-map .maplibregl-ctrl-attrib-button { filter: invert(1); background-color: transparent; }
.fbm .maplibregl-ctrl-group { background: rgba(14,22,49,0.85); border: 1px solid rgba(255,255,255,0.14); box-shadow: none; }
.fbm .maplibregl-ctrl-group button + button { border-top-color: rgba(255,255,255,0.12); }
.fbm .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }
.fbm .maplibregl-cooperative-gesture-screen { background: rgba(14,22,49,0.6); font-family: var(--font-head); font-size: 1rem; }

/* pins */
.fbm-pin { position: relative; width: 0.875rem; height: 0.875rem; padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.fbm-pin-dot { position: absolute; inset: 0; border-radius: 50%; background: #fff; border: 0.1875rem solid #FF5A3C; box-shadow: 0 0 0 0.25rem rgba(255,90,60,0.18), 0 0 0.875rem rgba(255,90,60,0.8); transform: scale(0); transition: transform .45s cubic-bezier(.3,1.6,.5,1), background .2s; }
.fbm-pin-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #FF5A3C; opacity: 0; }
.fbm-pin-name { position: absolute; top: 50%; left: 1.25rem; transform: translateY(-50%); white-space: nowrap; color: #fff; font: 600 0.8125rem/1 var(--font-head); letter-spacing: 0.01em; text-shadow: 0 1px 2px #0E1631, 0 0 0.375rem #0E1631, 0 0 0.75rem rgba(14,22,49,0.9); opacity: 0; transition: opacity .5s, color .2s; pointer-events: none; }
.fbm-pin.lbl-l .fbm-pin-name { left: auto; right: 1.25rem; }
.fbm-pin.lbl-t .fbm-pin-name { left: 50%; top: -0.8125rem; transform: translateX(-50%); }
.fbm-pin.lbl-b .fbm-pin-name { left: 50%; top: 1.6875rem; transform: translateX(-50%); }
.fbm.is-live .fbm-pin-dot, .c-map.is-live .fbm-pin-dot { transform: scale(1); transition-delay: calc(var(--i, 0) * 55ms); }
.fbm.is-live .fbm-pin-name, .c-map.is-live .fbm-pin-name { opacity: 1; transition-delay: calc(200ms + var(--i, 0) * 55ms); }
.fbm.is-live .fbm-pin-ring, .c-map.is-live .is-focus .fbm-pin-ring { animation: fbmRing 3.4s ease-out infinite; animation-delay: calc(1s + var(--i, 0) * 170ms); }
@keyframes fbmRing { 0% { transform: scale(1); opacity: 0.8; } 70%, 100% { transform: scale(3.4); opacity: 0; } }
.fbm-pin:hover .fbm-pin-dot, .fbm-pin.is-active .fbm-pin-dot, .fbm-pin:focus-visible .fbm-pin-dot { background: #FF5A3C; border-color: #fff; transform: scale(1.5); transition-delay: 0s; }
.fbm-pin:hover .fbm-pin-name, .fbm-pin.is-active .fbm-pin-name { font-size: 0.9375rem; transition-delay: 0s; }
.fbm-pin:focus-visible { outline: 2px solid #fff; outline-offset: 0.25rem; border-radius: 50%; }
.fbm.has-active .fbm-pin:not(.is-active) .fbm-pin-name { color: rgba(255,255,255,0.5); }
.fbm.is-flown .fbm-pin:not(.is-active) .fbm-pin-name { opacity: 0; }

.fbm-hq { position: relative; width: 1.375rem; height: 1.375rem; pointer-events: none; }
.fbm-hq-core { position: absolute; inset: 0; border-radius: 50%; background: #D7261E; border: 0.1875rem solid #fff; box-shadow: 0 0 1.375rem rgba(255,90,60,0.9); }
.fbm-hq-core::after { content: ""; position: absolute; inset: 0.3125rem; background: #fff; transform: rotate(45deg); }
.fbm-hq-pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #FF5A3C; animation: fbmPulse 2.6s ease-out infinite; }
.fbm-hq-pulse.d2 { animation-delay: 1.3s; }
@keyframes fbmPulse { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(4); opacity: 0; } }
.fbm-hq-name { position: absolute; top: 1.875rem; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #fff; font: 800 0.75rem/1 "Archivo", var(--font-head); font-stretch: 115%; letter-spacing: 0.06em; text-shadow: 0 0 0.5rem #0E1631, 0 1px 2px #0E1631; }

.fbm-hint { position: absolute; left: 1rem; bottom: 2.25rem; padding: 0.5rem 0.8125rem; border-radius: 0.625rem; background: rgba(14,22,49,0.8); border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); font: 600 0.78rem var(--font-head); pointer-events: none; transition: opacity .3s; z-index: 3; }
.fbm.has-active .fbm-hint, .fbm.is-fallback .fbm-hint { opacity: 0; }
.fbm-back { position: absolute; left: 1rem; top: 1rem; z-index: 4; padding: 0.625rem 0.9375rem; border-radius: 0.625rem; background: #fff; color: #0E1631; font: 700 0.85rem var(--font-head); box-shadow: 0 0.625rem 1.875rem -0.625rem rgba(0,0,0,0.6); opacity: 0; transform: translateY(-0.375rem); pointer-events: none; transition: opacity .3s, transform .3s; }
.fbm.is-flown .fbm-back { opacity: 1; transform: none; pointer-events: auto; }
.fbm-back::before { content: "‹ "; }

/* card */
.fbm-card { position: absolute; left: 0; top: 0; z-index: 5; width: 17.5rem; padding: 1.125rem 1.125rem 1rem; border-radius: 1rem; background: #fff; color: #0E1631; box-shadow: 0 1.875rem 4.375rem -1.25rem rgba(0,0,0,0.7); opacity: 0; pointer-events: none; transition: opacity .2s; }
.fbm-card.open { opacity: 1; pointer-events: auto; }
.fbm-card-x { position: absolute; top: 0.5rem; right: 0.625rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; font-size: 1.3rem; line-height: 1; color: #4A556E; display: none; }
.fbm-card.sticky .fbm-card-x { display: grid; place-items: center; }
.fbm-card-county { display: block; font: 600 0.8rem var(--font-head); color: #D7261E; }
.fbm-card-name { display: block; font: 800 1.35rem/1.1 "Archivo", var(--font-head); font-stretch: 112%; letter-spacing: -0.01em; margin-top: 0.25rem; }
.fbm-card-meta { display: block; color: #4A556E; font-size: 0.86rem; margin-top: 0.375rem; }
.fbm-card-zips { display: block; color: #4A556E; font-size: 0.8rem; margin-top: 2px; }
.fbm-card-links { display: grid; gap: 0.5rem; margin-top: 0.875rem; }
.fbm-btn { display: block; padding: 0.6875rem 0.875rem; border-radius: 0.625rem; font: 700 0.9rem var(--font-head); background: #EEF3FB; color: #0E1631; transition: background .2s; }
.fbm-btn:hover { background: #DDE7F7; }
.fbm-btn.hot { background: #D7261E; color: #fff; }
.fbm-btn.hot:hover { background: #B81E17; }

/* panel */
.fbm-panel { display: flex; flex-direction: column; gap: 1.125rem; min-width: 0; }
.fbm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.625rem; }
.fbm-stat { padding: 1rem 0.75rem; border-radius: 0.875rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); text-align: center; }
.fbm-stat b { display: block; font: 800 1.55rem/1 "Archivo", var(--font-head); font-stretch: 112%; color: #FF8A6A; }
.fbm-stat span { display: block; margin-top: 0.375rem; font-size: 0.76rem; color: var(--tx-light-mut); }
.fbm-search { padding: 1.125rem; border-radius: 1rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); }
.fbm-search label { display: block; font: 700 0.95rem var(--font-head); color: var(--tx-light); margin-bottom: 0.625rem; }
.fbm-search-row { display: flex; align-items: center; gap: 0.625rem; padding: 0 0.875rem; border-radius: 0.625rem; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.14); transition: border-color .25s, box-shadow .25s; }
.fbm-search-row:focus-within { border-color: #FF5A3C; box-shadow: 0 0 0 0.25rem rgba(255,90,60,0.18); }
.fbm-search-row svg { width: 1.125rem; height: 1.125rem; color: var(--tx-light-mut); flex: none; }
.fbm-search input { flex: 1; min-width: 0; padding: 0.8125rem 0; background: none; border: none; outline: none; color: var(--tx-light); font: 500 1rem var(--font-body); }
.fbm-search input::placeholder { color: rgba(255,255,255,0.45); }
.fbm-search-msg { font-size: 0.9rem; font-weight: 600; }
.fbm-search-msg.ok, .fbm-search-msg.warn { margin-top: 0.625rem; }
.fbm-search-msg.ok { color: #7EE0A1; }
.fbm-search-msg.warn { color: #FFC58A; }
.fbm-list-head { font: 700 0.95rem var(--font-head); color: var(--tx-light); margin-bottom: -0.25rem; }
.fbm-list { display: flex; flex-direction: column; gap: 0.875rem; }
.fbm-county-name { display: block; font: 600 0.82rem var(--font-head); color: #FF8A6A; margin-bottom: 0.5rem; }
.fbm-chips { display: flex; flex-wrap: wrap; gap: 0.4375rem; }
.fbm-chip { padding: 0.4375rem 0.75rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.04); color: var(--tx-light); font: 600 0.84rem var(--font-head); transition: background .2s, border-color .2s; }
.fbm-chip:hover, .fbm-chip.is-active, .fbm-chip:focus-visible { background: #D7261E; border-color: #D7261E; color: #fff; outline: none; }

/* narrow */
.fbm.is-narrow .fbm-stage { height: 32.5rem; }
.fbm.is-narrow .fbm-pin-name { display: none; }
.fbm.is-narrow .fbm-pin.is-active .fbm-pin-name { display: block; }
.fbm.is-narrow .fbm-card { left: 0.625rem; right: 0.625rem; top: auto; bottom: 0.625rem; width: auto; transform: none !important; padding: 0.875rem; }
.fbm.is-narrow .fbm-card-zips { display: none; }
.fbm.is-narrow .fbm-card-links { grid-template-columns: 1fr 1fr; }
.fbm.is-narrow .fbm-btn { font-size: 0.82rem; padding: 0.625rem; text-align: center; }
.fbm.is-narrow .maplibregl-ctrl-top-right { display: none; }

@media (max-width: 1100px) {
  .fbm-layout { grid-template-columns: 1fr; }
  .fbm-stats { order: -1; }
}
@media (max-width: 640px) {
  .fbm-stats { gap: 0.5rem; }
  .fbm-stat b { font-size: 1.2rem; }
  .areas-head-cta .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .fbm-pin-ring, .fbm-hq-pulse { animation: none !important; }
}

/* footer service-area links (home page + all city pages) */
.footer-areas { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }
.footer-areas h5 { font-family: var(--font-head); font-size: 0.95rem; color: var(--tx-light); }
.footer-areas ul { list-style: none; margin-top: 1rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.625rem 1.25rem; }
.footer-areas a { color: var(--tx-light); opacity: 0.72; font-size: 0.9rem; transition: opacity .2s, color .2s; }
.footer-areas a:hover { opacity: 1; color: var(--hot); }
@media (max-width: 1100px) { .footer-areas ul { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .footer-areas ul { grid-template-columns: 1fr 1fr; } }

/* MapLibre's own controls are px-sized; size them in rem so they scale with the page */
.fbm .maplibregl-ctrl-group button { width: 1.875rem; height: 1.875rem; }
.fbm .maplibregl-ctrl-group button .maplibregl-ctrl-icon { background-size: contain; }
.fbm .maplibregl-ctrl-attrib, .c-map .maplibregl-ctrl-attrib { font-size: 0.625rem; }
