/* Power On v2: the service area page (/service-areas/).
   The map, its Power On mark and the "Built for Coachella Valley conditions" row are the homepage's; their rules are
   copied here from assets/v2/home.css (that file is homepage-only), so keep the two in step when either changes. */

/* ---------- from home.css: the service area map and the conditions row ---------- */
.area-lead { color: var(--fg-2); max-width: 60ch; margin-bottom: clamp(32px, 4vw, 56px); }
.area-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
/* no script, or the map could not load: the box steps aside and the city list stands alone */
.area-grid.no-map, html:not(.js) .area-grid { grid-template-columns: 1fr; }
.area-grid.no-map .area-map, html:not(.js) .area-map { display: none; }
/* the height is reserved up front, so the map arriving never moves the page */
.amap { position: relative; isolation: isolate; height: clamp(340px, 38vw, 500px); background: var(--bg-3); border: 1px solid var(--rule); }
.amap-note { margin-top: 12px; color: var(--fg-3); font-size: 11px; letter-spacing: .06em; }
@media (max-width: 899px) {
  .area-grid { grid-template-columns: 1fr; }
  .amap { height: 360px; }
}
/* Leaflet, restyled to the v2 tokens (the id keeps these ahead of Leaflet's own sheet, which loads later) */
#area-map.leaflet-container { background: var(--bg-3); font-family: var(--font); }
#area-map .leaflet-tile-pane { filter: grayscale(1) sepia(.14) contrast(.92) brightness(1.03); }
html[data-theme="dark"] #area-map .leaflet-tile-pane { filter: grayscale(1) invert(1) sepia(.16) brightness(.82) contrast(.94); }
#area-map .amap-cover { stroke: var(--accent); stroke-opacity: .9; fill: var(--accent); fill-opacity: .07; }
#area-map .leaflet-bar { margin: 12px; border: 1px solid var(--rule); border-radius: 0; box-shadow: none; }
#area-map .leaflet-bar a { width: 40px; height: 40px; line-height: 38px; border-radius: 0; color: var(--fg); background: var(--bg-2); border-bottom: 1px solid var(--rule); font: 400 20px/38px var(--font); }
#area-map .leaflet-bar a:last-child { border-bottom: 0; }
#area-map .leaflet-bar a:hover, #area-map .leaflet-bar a:focus-visible { color: var(--bg-2); background: var(--fg); }
#area-map .leaflet-bar a.leaflet-disabled { color: var(--fg-3); background: var(--bg-2); }
#area-map .leaflet-control-attribution { padding: 2px 8px; color: var(--fg-2); background: var(--bg-2); font: 400 10px/1.6 var(--font); }
#area-map .leaflet-control-attribution a { color: var(--fg); }
/* the Power On mark (decorative, JS only): above the tiles and the coverage outline, under markers and popups,
   8px above the attribution. Transparent, no plate: a soft halo in the page colour keeps it readable on busy tiles
   (a static filter on a non-moving image, never animated) */
#area-map .amap-logo { position: absolute; left: 0; top: 0; padding: 4px 6px; pointer-events: none; background: none; }
#area-map .amap-logo img { display: block; width: 110px; height: auto; max-width: none;
  filter: drop-shadow(0 0 2px var(--bg)) drop-shadow(0 0 6px color-mix(in srgb, var(--bg) 70%, transparent)); }
@media (max-width: 599px) { #area-map .amap-logo img { width: 80px; } }
/* a city marker is a small square with a brass dot, centred on the city. Eleven names cannot all fit at the
   opening zoom, so the name shows on hover, focus, while its popup is open, and for every city once zoomed in */
.amark { display: inline-flex; align-items: center; width: max-content; height: 24px; min-width: 24px; padding: 0 7px; white-space: nowrap;
  color: var(--fg); background: var(--bg-2); border: 1px solid color-mix(in srgb, var(--fg) 34%, transparent); box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
  font: 500 11px/1.1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  transform: translate(-12px, -50%); transition: transform 200ms var(--ease); }
.amark::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; background: var(--accent); }
.amark-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.z-lab .amark-l, .amark:hover .amark-l, .amark.is-active .amark-l, .leaflet-marker-icon:focus-visible .amark-l { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin-left: 7px; }
.amark:hover, .amark.is-active, .leaflet-marker-icon:focus-visible .amark { transform: translate(-12px, -50%) translateY(-3px); border-color: var(--accent); }
/* a city page's own city: always named, in the accent colour */
.amark.is-here { border-color: var(--accent); }
.amark.is-here .amark-l { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin-left: 7px; }
/* the city page's own city: a larger badge and name than the others, kept above them */
.amark.is-here { height: 32px; padding: 0 10px; font-size: 13px; transform: translate(-15px, -50%); }
.amark.is-here::before { width: 10px; height: 10px; }
.amark.is-here .amark-l { margin-left: 9px; }
.amark.is-here:hover, .amark.is-here.is-active, .leaflet-marker-icon:focus-visible .amark.is-here { transform: translate(-15px, -50%) translateY(-3px); }
#area-map .leaflet-marker-icon:has(.is-here) { z-index: 1000 !important; }
#area-map .leaflet-marker-icon:focus-visible { outline: none; }
#area-map .leaflet-marker-icon:focus-visible .amark { outline: 2px solid var(--focus); outline-offset: 2px; }
#area-map .leaflet-popup-content-wrapper { padding: 0; color: var(--fg); background: var(--bg-2); border: 1px solid var(--rule); border-radius: 0; box-shadow: 0 18px 46px rgba(0, 0, 0, .32); }
#area-map .leaflet-popup-tip { background: var(--bg-2); box-shadow: none; }
#area-map .leaflet-popup-content { margin: 16px 40px 16px 18px; font: 400 14px/1.45 var(--font); }
#area-map a.leaflet-popup-close-button { top: 4px; right: 4px; width: 32px; height: 32px; color: var(--fg-2); font: 400 22px/32px var(--font); }
#area-map a.leaflet-popup-close-button:hover { color: var(--fg); }
.apop strong { display: block; margin-bottom: 4px; font-size: 17px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.apop > span { display: block; margin-bottom: 12px; color: var(--fg-2); font-size: 13px; }
.apop-a { display: flex; flex-wrap: wrap; gap: 8px; }
#area-map .apop .apop-c { display: inline-block; min-height: 0; padding: 4px 0; border: 0; color: var(--fg); font-size: 14px; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.apop-s { margin: 6px 0 12px; padding-top: 8px; border-top: 1px solid var(--rule); }
#area-map .apop .apop-s a { display: block; min-height: 0; padding: 5px 0; border: 0; color: var(--fg-2); font-size: 13px; white-space: normal; }
#area-map .apop .apop-s a:hover, #area-map .apop .apop-c:hover { color: var(--accent); }
#area-map .apop a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; white-space: nowrap; color: var(--fg); border: 1px solid var(--fg); font-size: 13px; font-weight: 500; text-decoration: none; }
#area-map .apop a.apop-q { color: var(--btn-fg); background: var(--btn-bg); border-color: var(--btn-bg); }
@media (max-width: 899px) {
  .apop { max-width: min(238px, calc(100vw - 110px)); }
}
/* built for the valley: four facts in one compact row */
.cond { margin-top: clamp(48px, 6vw, 88px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--rule); }
.cond-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(32px, 5vw, 80px); align-items: start; margin-bottom: clamp(28px, 3vw, 40px); }
.cond-head p { color: var(--fg-2); max-width: 60ch; }
.cond-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.cond-row li { display: grid; gap: 10px; align-content: start; padding: 22px clamp(16px, 2vw, 28px) 4px; min-width: 0; }
.cond-row li:first-child { padding-left: 0; }
.cond-row li + li { border-left: 1px solid var(--rule); }
.cond-i { width: 40px; height: 40px; margin-bottom: 4px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.cond-row strong { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
.cond-row li > span:last-child { color: var(--fg-2); font-size: 15px; line-height: 1.45; }
@media (max-width: 899px) {
  .cond-head { grid-template-columns: 1fr; }
  .cond-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cond-row li, .cond-row li:first-child { padding: 18px 14px 18px 0; }
  .cond-row li + li { border-left: 0; }
  .cond-row li:nth-child(even) { padding-left: 16px; padding-right: 0; border-left: 1px solid var(--rule); }
  .cond-row li:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 479px) {
  .cond-row { grid-template-columns: 1fr; }
  .cond-row li, .cond-row li:first-child, .cond-row li:nth-child(even) { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; padding: 16px 0; border-left: 0; }
  .cond-row li + li { border-left: 0; border-top: 1px solid var(--rule); }
  .cond-i { grid-row: 1 / span 2; margin: 0; }
  .cond-row strong, .cond-row li > span:last-child { grid-column: 2; }
}
/* ---------- from home.css: the city list ---------- */
.area-list { overflow: hidden; padding: 6px; margin: -6px; }
.city-line { display: flex; flex-wrap: wrap; margin-left: -1.1em; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.55; letter-spacing: -0.015em; font-weight: 500; }
.city-line li::before { content: "\00B7"; display: inline-block; width: 1.1em; text-align: center; color: var(--fg-3); font-weight: 400; }
.city-line a { position: relative; color: var(--fg); text-decoration: none; }
.city-line a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 600ms var(--ease); }
.city-line a:hover::after, .city-line a:focus-visible::after { transform: scaleX(1); }
.area-list .tlink-row { margin-top: 24px; }

/* ---------- this page ---------- */
.phero h1 { max-width: 18ch; }
.sa-ask { color: var(--fg-2); }
.sa-ask a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.sec-head { margin-bottom: 28px; }
.area-list > .label { color: var(--fg-3); margin-bottom: 12px; }
/* the map's fallback line shows only when there is no map: scripts off, or the map could not load */
.map-fallback { display: none; margin-bottom: 20px; color: var(--fg-2); max-width: 60ch; }
html:not(.js) .map-fallback, .area-grid.no-map .map-fallback { display: block; }

/* city cards: name (the link to the city page), its main services, the card's paragraph, a recent job photo */
.acards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 1023px) { .acards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 679px) { .acards { grid-template-columns: minmax(0, 1fr); } }
.acard { display: grid; align-content: start; gap: 14px; min-width: 0;
  padding: clamp(20px, 2vw, 28px); background: var(--bg-2); border: 1px solid var(--rule); border-top: 1px solid var(--fg); }
.acard-n { font-size: clamp(22px, 2vw, 28px); line-height: 1.15; letter-spacing: -0.015em; font-weight: 500; }
.acard-n a { color: var(--fg); text-decoration: none; }
.acard-n a:hover { color: var(--accent); }
/* every service carries a leading middot; the list is pulled left and its first 1.2em clipped,
   so the dot that starts each wrapped line is hidden and only the inner dots show */
.acard-s { display: flex; flex-wrap: wrap; margin-left: -1.2em; clip-path: inset(0 0 0 1.2em); color: var(--fg-2); font-size: 14px; line-height: 1.6; }
.acard-s > span:not(.sr-only)::before { content: "\00B7"; display: inline-block; width: 1.2em; text-align: center; color: var(--accent); }
.acard-d { color: var(--fg-2); font-size: 15px; line-height: 1.55; }
/* a recent job from that city: a small photo beside its caption */
.acard-f { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; margin: 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.acard-f img { width: 112px; height: 84px; object-fit: cover; background: var(--bg-3); }
.acard-f figcaption { color: var(--fg-2); font-size: 14px; line-height: 1.5; }
.acard-f .label { display: block; margin-bottom: 4px; color: var(--accent); }
.acard-more { margin-top: 2px; }

/* services across the valley: two columns of drawing-set rows */
/* What we do: the heading in the sticky left column (core.css .csplit) at the city pages' heading size, 1024px and up */
@media (min-width: 1024px) { .csplit-h h2 { font-size: clamp(28px, 2.9vw, 44px); line-height: 1.06; letter-spacing: -0.025em; } }
.asvc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); border-top: 1px solid var(--fg); }
@media (max-width: 899px) { .asvc { grid-template-columns: minmax(0, 1fr); } }
.asvc li { border-bottom: 1px solid var(--rule); }
.asvc a { position: relative; isolation: isolate; display: grid; gap: 6px; height: 100%; padding: 20px 16px 18px; color: var(--fg); text-decoration: none; }
.asvc a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg-2); opacity: 0; transition: opacity 400ms var(--ease); }
.asvc h3 { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; }
.asvc p { color: var(--fg-2); font-size: 15px; line-height: 1.5; max-width: 52ch; }
.asvc-more { margin-top: 4px; font-size: 14px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.asvc .arr { display: inline-block; transition: transform 400ms var(--ease); }
.asvc a:hover::before, .asvc a:focus-visible::before { opacity: 1; }
.asvc a:hover .arr, .asvc a:focus-visible .arr { transform: translateX(4px); }
.asvc a:hover h3 { color: var(--accent); }
