/* ══════════════════════════════════════════════════════════════
   BUILD 20261202c: round 4 (Kaden 12/02, "everything we did for Jeremy [Moody's]... with every other client").
   Written from _src/r4.css by build.py into site/assets/r4.css (loaded after pristine.css), so a rebuild
   reproduces it. His palette only: navy #003760, blue #2B7BB9 / #1F6AA5, pale #E5F2FF; square corners.
   ══════════════════════════════════════════════════════════════ */

/* ── 1. the header: Pristine exception (standard item 13; Eric's own ask, builds k and l). His header stays the
   SOLID navy bar from pristine.css on every page, never see-through. Only its height is named here, because the
   sticky hub map sits under it (--hdr-h = .header__inner min-height: 76px, 96px from 900px). ── */
:root{--hdr-h:76px}
@media (min-width:900px){ :root{--hdr-h:96px} }

/* ── 2. area pages: a dark real-map header (OpenStreetMap, his navy), the place pinned at 70% across ── */
.hero.hero--map{background-image:none; background-color:#06203a}
.hero__map{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:70% 50%; z-index:0}
.hero__shade{position:absolute; inset:0; z-index:1; pointer-events:none;
  background:linear-gradient(90deg, rgba(0,30,54,.95) 0%, rgba(0,34,60,.84) 36%, rgba(0,34,60,.25) 64%, rgba(0,34,60,0) 100%)}
/* review nit (20261202c): on narrower screens the cover crop put the baked-in pin under the lede text on most pages.
   900-1099px: crop further left so the pin sits right of the text; under 900px the text runs full width, so the crop
   starts at the left edge and the pin falls off to the right (or, at ~899px, stays clear of the text). Measured on all
   27 map headers at 320-1366px: no pin under text. */
@media (max-width:1099px){ .hero__map{object-position:30% 50%} }
@media (max-width:899px){
  .hero__shade{background:linear-gradient(180deg, rgba(0,30,54,.66), rgba(0,30,54,.88))}
  .hero__map{object-position:0% 50%}
}
.hero__credit{position:absolute; right:10px; bottom:6px; z-index:3; font-size:.68rem; color:rgba(255,255,255,.62)}
.hero__credit a{color:inherit}

/* ── 3. /areas/: the map beside a town index (desktop); chips under the map (phones) ── */
.svcarea{display:grid; gap:var(--s5); grid-template-columns:1fr; grid-template-areas:"head" "map" "list"}
.svcarea__head{grid-area:head} .svcarea__map{grid-area:map; min-width:0} .svcarea__list{grid-area:list; min-width:0}
.svcarea__head h2{margin-bottom:var(--s3)}
.svcarea__head .lede{margin:0}
@media (min-width:1000px){
  /* review fix (20261202c): the map is sized to the window, so the whole frame, Algonac, the commercial pointer and
     the OpenStreetMap credit stay in view under the sticky header (map-hub.webp is 950x1372; ~100px is the caption) */
  .svcarea{--rmap-w:clamp(340px, calc((100vh - var(--hdr-h) - 104px) * 950 / 1372), 600px);
    grid-template-columns:minmax(0, var(--rmap-w)) minmax(300px,480px); grid-template-areas:"map head" "map list";
    grid-template-rows:auto 1fr; column-gap:var(--s7); align-items:start; justify-content:center}
  .svcarea__map{position:sticky; top:calc(var(--hdr-h) + 16px)}
}
.svcarea__grp{margin:var(--s5) 0 var(--s3); font:700 .78rem/1.3 var(--font-ui); letter-spacing:.12em; text-transform:uppercase; color:var(--signal-ink)}
.svcarea__grp:first-child{margin-top:0}
.svcarea__grp span{display:block; margin-top:3px; font-weight:500; letter-spacing:0; text-transform:none; font-size:.86rem; color:var(--steel)}
.svcarea__list ul{list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px}
.svcarea__list a{text-decoration:none}
.svcarea__list li a{display:inline-flex; align-items:baseline; gap:8px; min-height:40px; padding:9px 14px; border:1px solid var(--hair);
  background:#fff; color:var(--ink)}
.svcarea__list li a b{font-weight:700; font-size:.95rem}
.svcarea__list li a span{font-size:.8rem; color:var(--steel); white-space:nowrap}
.svcarea__list li a:hover{border-color:var(--signal-ink); color:var(--signal-ink)}
.svcarea__list li.is-home a{background:var(--signal-wash); border-color:rgba(31,106,165,.35)}
.svcarea__list li.is-home a span{color:var(--signal-ink); font-weight:700}
.svcarea__more{margin:var(--s5) 0 0; font-size:.92rem; color:var(--steel)}
.svcarea__more a{font-weight:700; color:var(--signal-ink); text-decoration:underline; text-underline-offset:3px}
@media (min-width:1000px){
  .svcarea__list ul{flex-direction:column; flex-wrap:nowrap; gap:0; border-top:1px solid var(--hair)}
  .svcarea__list li a{display:flex; justify-content:space-between; border:0; border-bottom:1px solid var(--hair); background:none; padding:8px 4px; min-height:0}
  .svcarea__list li.is-home a{background:var(--signal-wash); padding-inline:8px}
}

/* the road map: one dashed line (St. Clair County), the towns pinned, Home base marked */
.rmap{margin:0}
.rmap__frame{position:relative; overflow:hidden; border:1px solid var(--hair); background:#ECEDEA; box-shadow:0 30px 70px -48px rgba(0,30,60,.6)}
.rmap__frame img{display:block; width:100%; height:auto}
.rmap__frame svg{position:absolute; inset:0; width:100%; height:100%}
.rmap figcaption{display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 20px; padding-top:var(--s3); font-size:.85rem; color:var(--steel)}
.rmap figcaption a, .mapnote a, .placemap small a{color:inherit}
.rm-area{fill:rgba(43,123,185,.12); stroke:#1F6AA5; stroke-width:3; stroke-dasharray:12 9; stroke-linejoin:round}
.rm-dot{fill:#1F6AA5; stroke:#fff; stroke-width:4}
.rm-town--home .rm-dot{fill:var(--navy); stroke:#fff; stroke-width:4}
.rm-halo{fill:rgba(43,123,185,.25); stroke:#1F6AA5; stroke-width:2}
.rm-town text{fill:#071A2E; font:700 21px var(--font-ui); paint-order:stroke; stroke:#fff; stroke-width:6px; stroke-linejoin:round}
.rm-town--home text{font-size:24px; font-weight:800; fill:var(--navy)}
.rm-town:hover text{fill:#1F6AA5}
.rm-far text{fill:#1F4E79; font:700 19px var(--font-ui); paint-order:stroke; stroke:#fff; stroke-width:6px; stroke-linejoin:round}
.rm-far path{fill:none; stroke:#1F4E79; stroke-width:3}
@media (max-width:719px){
  .rm-town text{font-size:40px; stroke-width:10px} .rm-town--home text{font-size:44px}
  .rm-dot{r:14} .rm-town--home .rm-dot{r:18} .rm-halo{r:34}
  .rm-far text{font-size:34px; stroke-width:9px}
}
@media (min-width:1000px){
  /* the window-sized desktop map keeps its labels readable (smaller than the sizes the phone map already uses) */
  .rm-town text{font-size:31px; stroke-width:8px} .rm-town--home text{font-size:35px}
  .rm-dot{r:13} .rm-town--home .rm-dot{r:16} .rm-halo{r:30}
  .rm-far text{font-size:28px; stroke-width:8px}
}
.mapnote{margin:var(--s4) 0 0; font-size:.78rem; color:var(--steel)}

/* town cards: the town's own street map with a pin, a tag line, job chips and a checked local note */
.tgrid{display:grid; gap:var(--s5); grid-template-columns:1fr}
@media (min-width:640px){ .tgrid{grid-template-columns:1fr 1fr} }
@media (min-width:1100px){ .tgrid{grid-template-columns:repeat(4,1fr)} }
.tgrid + .tgrid__head{margin-top:var(--s8)}
.tgrid__head{margin:0 0 var(--s5); max-width:700px}
.tgrid__head h3{margin:0 0 var(--s2)}
.tgrid__head p{margin:0; color:var(--steel)}
.tcard{display:flex; flex-direction:column; background:#fff; border:1px solid var(--hair); overflow:hidden; text-decoration:none; color:var(--ink);
  transition:transform .28s var(--ease-out), box-shadow .28s var(--ease-out), border-color .28s var(--ease-out)}
.tcard:hover{transform:translateY(-3px); box-shadow:0 22px 44px -26px rgba(0,30,60,.45); border-color:rgba(31,106,165,.35)}
.tcard__img{position:relative; display:block; aspect-ratio:16/10; overflow:hidden; background:#ECEDEA}
.tcard__img img{display:block; width:100%; height:100%; object-fit:cover; transition:transform .5s var(--ease-out)}
.tcard:hover .tcard__img img{transform:scale(1.05)}
.tcard__dist{position:absolute; left:12px; top:12px; background:var(--navy); color:#fff; padding:5px 11px; font:700 .74rem var(--font-ui); letter-spacing:.02em}
.tcard__body{display:flex; flex-direction:column; gap:8px; padding:var(--s5); flex:1}
.tcard__h{font-family:var(--font-display); font-size:1.55rem; line-height:1.1; color:var(--ink)}
.tcard__when{display:none; font:700 .76rem var(--font-ui); letter-spacing:.02em; color:var(--signal-ink)}
.tcard__tag{color:var(--ink); font-weight:600; font-size:.98rem; line-height:1.35}
.tcard__chips{display:flex; flex-wrap:wrap; gap:6px}
.tcard__chips i{font-style:normal; font:700 .72rem var(--font-ui); letter-spacing:.03em; padding:4px 9px; background:var(--signal-wash); color:#1F4E79}
.tcard__fact{color:var(--steel); font-size:.9rem; line-height:1.5}
.tcard__fact b{display:block; font:800 .68rem var(--font-ui); letter-spacing:.1em; text-transform:uppercase; color:var(--steel); margin-bottom:3px}
.tcard__foot{margin-top:auto; padding-top:var(--s3); display:flex; justify-content:space-between; align-items:center; gap:10px;
  border-top:1px solid var(--hair); font-size:.78rem; color:var(--steel)}
.tcard__go{display:inline-flex; align-items:center; gap:4px; font-weight:700; font-size:.88rem; color:var(--ink); white-space:nowrap}
.tcard__go svg{flex:0 0 18px}
.tcard__foot > span:first-child{min-width:0}
/* review fix (20261202c): the ZIPs keep their own line and the "<Town> page" link moves under them when the card is
   narrow (it was squeezing them to one ZIP per line in the 4-column grid) */
.tcard__foot{flex-wrap:wrap; row-gap:6px}
.tcard__foot > span:first-child{flex:1 1 auto}
.tcard__go{margin-left:auto}
.tcard:hover .tcard__go{color:var(--signal-ink)}
.tcard--home{grid-column:1 / -1}
@media (min-width:760px){
  .tcard--home{flex-direction:row}
  .tcard--home .tcard__img{flex:0 0 52%; aspect-ratio:auto; min-height:280px}
  .tcard--home .tcard__body{padding:var(--s6)}
  .tcard--home .tcard__h{font-size:2.3rem}
  .tcard--home .tcard__tag{font-size:1.12rem}
}
/* the pin at the centre of a town's street map */
.pin{position:absolute; left:50%; top:50%; width:18px; height:18px; margin:-9px 0 0 -9px; border-radius:50%;
  background:#2B7BB9; border:3px solid #fff; box-shadow:0 0 0 7px rgba(43,123,185,.28), 0 4px 12px rgba(0,0,0,.35)}
.tcard--home .pin{background:var(--navy)}
/* phones: compact rows, the small street map with its pin on the left, so every town fits in a short scroll */
@media (max-width:639px){
  .tgrid{gap:10px}
  .tcard, .tcard--home{flex-direction:row; align-items:stretch}
  .tcard .tcard__img, .tcard--home .tcard__img{flex:0 0 108px; width:108px; aspect-ratio:auto; min-height:0}
  .tcard__dist{display:none}
  .tcard .pin{width:14px; height:14px; margin:-7px 0 0 -7px; border-width:2px; box-shadow:0 0 0 5px rgba(43,123,185,.28)}
  .tcard__body, .tcard--home .tcard__body{padding:12px 14px; gap:5px}
  .tcard__h, .tcard--home .tcard__h{font-size:1.3rem}
  .tcard__when{display:block}
  .tcard__tag, .tcard--home .tcard__tag{font-size:.88rem}
  .tcard__chips i{font-size:.66rem; padding:3px 7px}
  .tcard__chips i:nth-child(n+3){display:none}
  .tcard__fact{font-size:.82rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
  .tcard__fact b{display:none}
  .tcard__foot{display:none}
}

/* ── 4. town pages: the town's street map with its ZIP codes and the drive (in the route section) ── */
.placemap{margin:0 0 var(--s5); border:1px solid var(--hair); overflow:hidden; background:#fff}
.placemap__img{position:relative; display:block; aspect-ratio:16/9; overflow:hidden; background:#ECEDEA}
.placemap__img img{display:block; width:100%; height:100%; object-fit:cover}
.placemap figcaption{display:grid; gap:2px; padding:var(--s4) var(--s5)}
.placemap figcaption b{color:var(--ink); font-size:1rem}
.placemap figcaption span{color:var(--steel); font-size:.92rem}
.placemap figcaption small{color:var(--steel); font-size:.72rem; margin-top:4px}

/* ── 5. /services/: "Which one do I need?" ── */
.pickguide h2, .pickguide .lede, .pickguide dl, .pickguide__note{max-width:920px}
.pickguide dl{margin:var(--s5) 0 0; border-top:1px solid var(--hair)}
.pickguide dl > div{display:grid; gap:4px 24px; padding:var(--s4) 0; border-bottom:1px solid var(--hair)}
@media (min-width:720px){ .pickguide dl > div{grid-template-columns:1.5fr 1fr; align-items:baseline} }
.pickguide dt{color:var(--ink); font-weight:600}
.pickguide dd{margin:0}
.pickguide dd a{color:var(--signal-ink); font-weight:700; text-decoration:underline; text-underline-offset:3px}
.pickguide__note{margin-top:var(--s5); color:var(--steel); font-size:.95rem}
