/* Service-area map (shared copy of the homepage map styles, scoped to body.map-page). Keep in sync with home.css. */
/* ===== Service area map (replaces the featured-projects slider on the homepage) ===== */
body.map-page .service-map{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:clamp(28px,4vw,64px);align-items:center;max-width:1320px;margin:0 auto;padding:clamp(60px,8vw,110px) 6%}
body.map-page .service-map-copy h2{font-size:clamp(30px,3.3vw,48px);line-height:1.06;margin:0 0 18px}
body.map-page .service-map-copy>p:not(.eyebrow){color:var(--muted);line-height:1.75;max-width:520px;margin:0}
.area-chips{display:flex;flex-wrap:wrap;gap:8px;list-style:none;margin:24px 0 30px;padding:0}
.area-chips a{display:inline-block;padding:7px 13px;border:1px solid #3c4942;border-radius:999px;color:var(--ink);font-size:13px;text-decoration:none;transition:border-color .2s,color .2s,background .2s,transform .2s}
.area-chips a:hover,.area-chips a:focus-visible,.area-chips a.is-lit{border-color:#a6e0c6;color:#a6e0c6;background:rgb(40 103 91 / 28%);transform:translateY(-1px)}
.service-map-actions{display:flex;flex-wrap:wrap;align-items:center;gap:22px}

.co-map{position:relative;perspective:1600px;cursor:pointer}
.co-map-stage{transform:rotateX(var(--rx,14deg)) rotateY(var(--ry,0deg)) rotateZ(-2.5deg);transform-origin:50% 60%;transition:transform .45s cubic-bezier(.2,.8,.2,1);will-change:transform}
.co-map-svg{display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 28px 36px rgb(0 0 0 / 50%))}
.co-county{fill:#232c29;stroke:#3a4641;stroke-width:1.1;stroke-linejoin:round;transition:fill .25s}
.co-county:not(.is-served):hover{fill:#28322e}
.co-county.is-served{fill:#2a5047;stroke:#4f8374}
.co-county.is-served:hover,.co-county.is-served.is-active{fill:#3d8a79}
.co-state{fill:none;stroke:#d6c48c;stroke-width:2.6;stroke-linejoin:round;pointer-events:none}
.co-city-hit{fill:transparent}
.co-city-dot{fill:var(--cream);stroke:#122e29;stroke-width:2.5;transform-box:fill-box;transform-origin:center;transition:transform .2s,fill .2s}
.co-city:hover .co-city-dot,.co-city.is-active .co-city-dot{transform:scale(1.45);fill:#a6e0c6}
.co-denver-dot{fill:#ffffcc;stroke:#122e29;stroke-width:2.5}
.co-denver-pulse{fill:none;stroke:#ffffcc;stroke-width:2;transform-box:fill-box;transform-origin:center;animation:co-pulse 2.6s ease-out infinite}
@keyframes co-pulse{0%{transform:scale(1);opacity:.9}75%,100%{transform:scale(3.2);opacity:0}}
.co-pin-body{fill:#fffde6;stroke:#122e29;stroke-width:1.5;filter:drop-shadow(0 6px 8px rgb(0 0 0 / 45%));transition:transform .25s;transform-box:fill-box;transform-origin:50% 100%}
.co-denver:hover .co-pin-body{transform:scale(1.06)}
.co-map-tip{position:absolute;z-index:3;margin:0;transform:translate(-50%,calc(-100% - 12px));background:#fffde6;color:#122e29;padding:7px 12px;border-radius:7px;font-size:13px;font-weight:700;white-space:nowrap;pointer-events:none;box-shadow:0 8px 20px rgb(0 0 0 / 45%)}
.co-map-tip::after{content:"";position:absolute;left:50%;bottom:-6px;width:12px;height:12px;background:#fffde6;transform:translateX(-50%) rotate(45deg)}
.co-map-legend{display:flex;align-items:center;justify-content:center;gap:9px;margin:26px 0 0;color:var(--muted);font-size:13px}
.co-map-swatch{width:16px;height:16px;border-radius:3px;background:#2a5047;border:1px solid #4f8374}
@media(prefers-reduced-motion:reduce){.co-map-stage{transition:none}.co-denver-pulse{animation:none;opacity:0}}

/* slide-out panel */
.area-panel{position:fixed;top:0;right:0;bottom:0;z-index:90;width:min(430px,92vw);overflow-y:auto;overscroll-behavior:contain;background:#16201d;border-left:1px solid #3c4942;box-shadow:-24px 0 60px rgb(0 0 0 / 50%);padding:38px 30px 44px;transform:translateX(105%);transition:transform .38s cubic-bezier(.2,.8,.2,1)}
.area-panel.is-open{transform:none}
.area-panel-backdrop{position:fixed;inset:0;z-index:89;background:rgb(8 14 12 / 58%);opacity:0;transition:opacity .3s}
body.area-panel-open .area-panel-backdrop{opacity:1}
body.area-panel-open{overflow:hidden}
.area-panel-close{position:absolute;top:14px;right:14px;width:40px;height:40px;border-radius:50%;border:1px solid #4c675c;background:transparent;color:var(--cream);font-size:24px;line-height:1;cursor:pointer}
.area-panel-close:hover{background:#28675b}
body.map-page .area-panel h2{font-size:28px;line-height:1.1;margin:0 0 10px;padding-right:40px}
.area-panel-intro{color:var(--muted);line-height:1.6;margin:0 0 22px}
.area-group{padding:16px 0 16px 14px;border-left:3px solid transparent;border-top:1px solid #2c3833;transition:border-color .3s,background .3s}
.area-group.is-focus{border-left-color:#a6e0c6;background:rgb(40 103 91 / 16%)}
body.map-page .area-group h3{font-size:16px;margin:0 0 10px;letter-spacing:.2px}
.area-group h3 a{color:var(--cream);text-decoration:none}
.area-group h3 a:hover{color:#a6e0c6}
.area-group ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.area-group li a{display:inline-block;padding:5px 11px;border-radius:999px;background:#1f2a26;border:1px solid #33413b;color:var(--ink);font-size:13px;text-decoration:none;transition:background .2s,border-color .2s,color .2s}
.area-group li a:hover,.area-group li a:focus-visible{background:#28675b;border-color:#3d8a79;color:#fffde6}
.area-panel-actions{display:flex;flex-wrap:wrap;align-items:center;gap:18px;margin-top:26px;padding-top:22px;border-top:1px solid #2c3833}

@media(max-width:900px){
  body.map-page .service-map{grid-template-columns:1fr}
  .co-map{order:-1;max-width:640px;margin:0 auto;width:100%}
}
@media(max-width:760px){
  .area-panel{top:auto;left:0;width:100%;max-height:84vh;border-left:0;border-top:1px solid #3c4942;border-radius:18px 18px 0 0;padding:30px 22px calc(34px + env(safe-area-inset-bottom));transform:translateY(105%)}
  .area-panel.is-open{transform:none}
}
.area-panel-close{position:sticky;top:-22px;float:right;z-index:2;margin:-16px -8px 0 12px;background:#16201d;box-shadow:0 0 0 6px #16201d}

/* ===== Zoomed Front Range map (v2) ===== */
.co-map-stage{transform:rotateX(var(--rx,8deg)) rotateY(var(--ry,0deg)) rotateZ(-1.5deg)}
.co-bg{fill:#1b2421}
.co-county{stroke-width:1.5}
.co-county.is-served{fill:#27493f;stroke:#4f8374}
.co-frame-line{fill:none;stroke:#d6c48c;stroke-width:3;pointer-events:none}
.co-terrain{font-family:var(--font-pencil);font-size:26px;letter-spacing:4px;text-transform:uppercase;fill:rgb(255 255 204 / 32%);pointer-events:none}
.co-label{font-family:var(--font-main);font-size:15px;font-weight:700;fill:#f0f2ed;paint-order:stroke;stroke:#14201c;stroke-width:4px;stroke-linejoin:round;pointer-events:none;transition:fill .2s}
.co-city.is-active .co-label,.co-city:hover .co-label{fill:#a6e0c6}
.co-city-dot{transform-box:fill-box}
.co-edge{cursor:pointer}
.co-edge rect{fill:#122e29;stroke:#d6c48c;stroke-width:1.5;transition:fill .2s}
.co-edge text{font-family:var(--font-main);font-size:15px;font-weight:700;fill:#fffde6;pointer-events:none}
.co-edge:hover rect{fill:#28675b}
.co-hq{cursor:pointer}
.co-hq-leader{fill:none;stroke:#fffde6;stroke-width:2.5;stroke-dasharray:2 8;stroke-linecap:round;opacity:.85}
.co-hq-dot{fill:#fffde6;stroke:#122e29;stroke-width:3}
.co-hq-pulse{fill:none;stroke:#fffde6;stroke-width:2;transform-box:fill-box;transform-origin:center;animation:co-pulse 2.6s ease-out infinite}
.co-hq-badge{animation:co-float 4.5s ease-in-out infinite}
.co-hq-glow{fill:url(#co-hq-glowg);opacity:.8;transition:opacity .3s}
.co-hq:hover .co-hq-glow{opacity:1}
.co-hq-ring{fill:url(#co-hq-ringg);stroke:#fffde6;stroke-width:3;filter:drop-shadow(0 8px 10px rgb(0 0 0 / 50%));transition:stroke-width .25s}
.co-hq:hover .co-hq-ring{stroke-width:5}
.co-hq-face{fill:#fffde6}
.co-hq-inner{fill:none;stroke:#3d8a79;stroke-width:1.5;stroke-dasharray:3 4}
.co-hq-tag rect{fill:#122e29;stroke:#a6e0c6;stroke-width:1.5}
.co-hq-tag text{font-family:var(--font-main);font-size:14px;font-weight:800;letter-spacing:1.6px;text-transform:uppercase;fill:#fffde6}
@keyframes co-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@media(prefers-reduced-motion:reduce){.co-hq-badge,.co-hq-pulse{animation:none}}

/* Phones/tablets: heading on top, then the map, then the city chips and buttons (desktop layout unchanged) */
@media(max-width:900px){
  body.map-page .service-map{gap:0}
  body.map-page .service-map-copy{display:contents}
  body.map-page .co-map{order:1;margin:30px auto 8px}
  body.map-page .area-chips{order:2}
  body.map-page .service-map-actions{order:3}
}

/* ===== Map zoom / pan ===== */
.co-map-svg{--z:1;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.co-zoom{transform-origin:0 0;transition:transform .28s ease}
.co-k{transform:scale(calc(1 / var(--z)));transition:transform .28s ease}
.co-map.is-dragging .co-zoom,.co-map.is-dragging .co-k{transition:none}
.co-county,.co-hq-leader{vector-effect:non-scaling-stroke}
.co-map.is-zoomed .co-map-svg{touch-action:none;cursor:grab}
.co-map.is-dragging .co-map-svg{cursor:grabbing}
.co-zoom-ctrl{position:absolute;top:14px;right:14px;z-index:4;display:flex;flex-direction:column;gap:6px}
.co-zoom-ctrl button{width:40px;height:40px;display:grid;place-items:center;padding:0;border-radius:10px;border:1px solid #d6c48c;background:rgb(18 46 41 / 92%);color:#fffde6;font:700 22px/1 var(--font-main);cursor:pointer;box-shadow:0 4px 12px rgb(0 0 0 / 40%);transition:background .2s,transform .12s}
.co-zoom-ctrl button:hover{background:#28675b}
.co-zoom-ctrl button:active{transform:translateY(1px)}
.co-zoom-ctrl button:disabled{opacity:.4;cursor:default}
.co-zoom-ctrl button[data-zoom="reset"]{font-size:18px}
.co-zoom-hint{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);margin:0;padding:6px 12px;border-radius:999px;background:rgb(18 46 41 / 88%);color:#fffde6;font-size:12px;pointer-events:none;opacity:0;transition:opacity .3s}
.co-zoom-hint.is-shown{opacity:1}
@media(prefers-reduced-motion:reduce){.co-zoom,.co-k{transition:none}}

/* ===== Full-state map: screen-constant markers + zoom-revealed labels ===== */
.co-map-svg{--lk:.57;--mk:.55;--tk:.4}
.co-lk{transform:scale(var(--lk));transition:transform .28s ease}
.co-mk{transform:scale(var(--mk));transition:transform .28s ease}
.co-tk{transform:scale(var(--tk));transition:transform .28s ease}
.co-map.is-dragging .co-lk,.co-map.is-dragging .co-mk,.co-map.is-dragging .co-tk{transition:none}
.co-state{fill:none;stroke:#d6c48c;stroke-width:2.5;vector-effect:non-scaling-stroke;pointer-events:none}
.co-mountains{pointer-events:none}
.co-city .co-label{display:none}
.co-city.t0 .co-label,.lv1 .co-city.t1 .co-label,.lv2 .co-city.t2 .co-label,.lv3 .co-city.t3 .co-label{display:inline}
.co-city.t2,.co-city.t3{display:none}
.lv1 .co-city.t2,.lv2 .co-city.t3{display:inline}
.co-map.is-zoomed .co-map-svg{touch-action:pan-y;cursor:grab}
.co-map.is-exploring .co-map-stage{transform:none}
.co-touch-hint{display:none}
@media(hover:none){.co-touch-hint{display:inline}}
@media(prefers-reduced-motion:reduce){.co-lk,.co-mk,.co-tk{transition:none}}

.section-rule{position:relative;height:1px;width:min(1100px,88%);margin:0 auto;background:linear-gradient(90deg,transparent,rgb(166 210 189 / 40%) 22%,rgb(166 210 189 / 40%) 78%,transparent)}
.section-rule span{position:absolute;left:50%;top:50%;width:7px;height:7px;border-radius:50%;background:#a6e0c6;transform:translate(-50%,-50%);box-shadow:0 0 0 6px #1c2220,0 0 14px rgb(166 224 198 / 55%)}
@media(max-width:600px){.co-zoom-ctrl{top:10px;right:10px;gap:5px}.co-zoom-ctrl button{width:34px;height:34px;font-size:19px;border-radius:9px}.co-zoom-ctrl button[data-zoom="reset"]{font-size:15px}}
/* Touch: the map owns gestures so the page doesn't scroll while zooming/dragging it */
.co-map-svg,.co-map.is-zoomed .co-map-svg{touch-action:none;overscroll-behavior:contain}
