/* Power On v2: the services overview (/services/) and the service pages (/services/<service>/).
   Loads after core.css and pages/city.css (the hero grid, split sections, "Read more", numbered cards, check lists,
   compact reviews and the service rows come from there). Animates transform and opacity only. */

/* ---------- hero: a job photo on the right, or (overview, emergency) a typographic block ---------- */
.shero .lead { max-width: 54ch; }
.shero-t .chero-grid { align-items: start; }
.shero-t .chero-t { padding-top: 4px; }
/* a hero photo with a phone cut (<picture>): the picture fills the frame like a bare img */
.chero-f .wt-img > picture { display: block; width: 100%; height: 100%; }

/* the overview: the old hero tiles as a drawing-set title block */
.stiles-l { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--fg); border-left: 1px solid var(--rule); background: var(--bg-2); }
.stiles-l li { display: grid; align-content: start; gap: 6px; padding: 16px 18px 18px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.stiles-l .stiles-f { grid-column: 1 / -1; background: var(--bg-3); }
.stiles-t { color: var(--accent); font: 500 12px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.stiles-f .stiles-t { color: var(--fg); font: 500 clamp(20px, 1.7vw, 24px)/1.2 var(--font); letter-spacing: -0.015em; text-transform: none; }
.stiles-l p { color: var(--fg-2); font-size: 15px; line-height: 1.5; }

/* the emergency page: the safety line and the call note under the buttons */
.swarn { margin-top: 24px; padding-left: 14px; border-left: 2px solid var(--signal); color: var(--fg); font-size: 16px; line-height: 1.5; max-width: 52ch; }
.scall { margin-top: 28px; display: grid; gap: 10px; max-width: 56ch; padding-top: 20px; border-top: 1px solid var(--rule); }
.scall p { color: var(--fg-2); font-size: 16px; line-height: 1.6; }
.scall .scall-h { color: var(--fg); font-size: 17px; }
.scall .scall-h strong { font-weight: 600; }
.scall .tlink { justify-self: start; font-size: 17px; font-weight: 600; }

/* the homepage's 24-hour emergency card (home.css is homepage-only, so its rules are repeated here) */
.ssos { min-width: 0; }
.sos { --bg: var(--paper); --fg: var(--ink); --fg-2: #5E5952; --accent: #7D5E1B; --focus: var(--ink); --rule: var(--line); --btn-bg: var(--ink); --btn-fg: var(--paper);
  display: flex; flex-direction: column; align-items: flex-start; max-width: 420px; margin-left: auto;
  padding: clamp(24px, 2.4vw, 32px); background: var(--bg); color: var(--fg); border-top: 4px solid var(--signal); }
html[data-theme="light"] .sos { --bg: var(--ink); --fg: var(--paper); --fg-2: var(--mist); --accent: var(--signal); --focus: var(--signal); --rule: var(--line-d); --btn-bg: var(--signal); --btn-fg: var(--ink); }
.sos a:focus-visible { outline-color: var(--focus); }
.sos-l { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); }
.sos-l::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 28%, transparent); }
.sos .sos-h { margin-top: 16px; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500; }
.sos-t { margin-top: 10px; color: var(--fg-2); font-size: 16px; line-height: 1.45; }
.sos-btn { margin-top: 22px; width: 100%; min-height: 56px; background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); font-size: 17px; font-weight: 600; }
.sos-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sos-911 { margin-top: 14px; color: var(--fg-2); font-size: 11px; letter-spacing: .1em; }
.sos-more { margin-top: 18px; font-size: 15px; font-weight: 500; color: var(--fg); }
@media (max-width: 899px) { .sos { max-width: none; margin-left: 0; } }

/* ---------- numbered cards (the page's own service list) ---------- */
.csplit-b .scards { margin-top: clamp(32px, 4vw, 48px); }
/* the overview's process beside its sticky heading: two by two */
@media (min-width: 1024px) { .csplit-b .ssteps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 600px) { .csplit-b .scards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.scards li { position: relative; }
.scards h3 { font-size: clamp(19px, 1.5vw, 22px); }
.scard-i { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; color: var(--accent); }
.scard-i svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.scard-l { justify-self: start; margin-top: 4px; font-size: 15px; font-weight: 500; }
.sall li { scroll-margin-top: calc(var(--nav-h) + 24px); }
/* each overview tile leads with one real job photo (a 4:3 crop of its 400 / 800 file): one <img>, so it can become an
   icon later without touching the words */
.sall .scard-ph { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-3); margin-bottom: 8px; }
/* under the photo: the job's city and month, as the job cards write it (e.g. La Quinta, Oct 2026) */
.sall .scard-at { color: var(--accent); margin-top: -4px; }
.sall .scard-at time { color: var(--fg-2); }

/* ---------- a split section's check list and its side note ---------- */
.csplit-b .cc-list { margin-top: 0; }
.csplit-b .ctext + .cc-list, .csplit-b .more-btn + .cc-list { margin-top: clamp(32px, 4vw, 44px); }
.csplit-b .cc-svc-h { margin-top: clamp(40px, 4vw, 56px); }
.ssafe { margin-top: clamp(40px, 4vw, 56px); padding: clamp(22px, 2.4vw, 32px); border: 1px solid var(--rule); border-top: 3px solid var(--signal); background: var(--bg-2); max-width: 62ch; }
.ssafe h3 { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.2; }
.ssafe p { margin-top: 12px; color: var(--fg-2); font-size: 16px; line-height: 1.6; }
.ssafe .ssafe-call { color: var(--fg); }
.ssafe .ssafe-call a { color: var(--fg); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* ---------- recent work for this service (tools/v2/build-projects.cjs fills it; an empty one hides) ---------- */
.swork-sec .kw { margin-bottom: 14px; }
.swork-h { margin-bottom: clamp(32px, 4vw, 56px); max-width: 22ch; }
.swork-all { margin-top: 32px; }
.swork-sec:not(:has(.jobrow)) { display: none; }

/* ---------- work examples: the page's job photos, then two short notes with their links ---------- */
.sjob-l .ilink { position: relative; z-index: 2; }
.snotes { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); border-top: 1px solid var(--rule); }
.snote { display: grid; align-content: start; justify-items: start; gap: 16px; padding: 24px 0 8px; min-width: 0; }
.snote p { color: var(--fg-2); font-size: 16px; line-height: 1.6; max-width: 52ch; }
.snote strong { color: var(--fg); font-weight: 600; }
.snote .btn { white-space: normal; text-align: left; }
@media (max-width: 767px) { .snotes { grid-template-columns: minmax(0, 1fr); } .snote + .snote { border-top: 1px solid var(--rule); } }

/* ---------- steps: numbered columns ---------- */
.ssteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--gap); border-top: 1px solid var(--fg); counter-reset: none; }
.ssteps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ssteps li { display: grid; align-content: start; gap: 10px; padding: 24px 0 8px; min-width: 0; }
.ssteps-n { color: var(--accent); font: 500 12px/1 var(--mono); letter-spacing: .14em; }
.ssteps h3 { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.2; }
.ssteps p { color: var(--fg-2); font-size: 16px; line-height: 1.6; max-width: 40ch; }
@media (max-width: 1023px) { .ssteps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px) { .ssteps, .ssteps-4 { grid-template-columns: minmax(0, 1fr); } .ssteps li + li { border-top: 1px solid var(--rule); } }

/* ---------- related services: three across ---------- */
@media (min-width: 900px) { .srel { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.srel h3.csvc-t { font-size: 18px; }

/* ---------- the overview's four groups: the homepage's sheet index (home.css is homepage-only) ---------- */
.sheetgrid {
  background-color: var(--bg-2);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
}
.sheetgrid .wrap > * { position: relative; }
.sheets { border-top: 1px solid var(--fg); background: var(--bg-2); }
.sheets li { border-bottom: 1px solid var(--rule); }
.sheets a { position: relative; isolation: isolate; display: grid; grid-template-columns: 64px minmax(0, 1fr) 24px; grid-template-rows: auto auto; gap: 4px var(--gap); align-items: center;
  min-height: 64px; padding: 16px 14px; text-decoration: none; color: var(--fg); }
.sheets a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg-3); opacity: 0; transition: opacity 400ms var(--ease); }
.sheets .s-no { grid-row: 1 / span 2; align-self: start; padding-top: 6px; font: 500 13px/1 var(--mono); letter-spacing: .1em; color: var(--accent); }
.sheets .s-lead { display: none; }
.sheets .s-title { grid-column: 2; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; }
.sheets .s-scope { grid-column: 2; grid-row: 2; color: var(--fg-2); font-size: 15px; line-height: 1.45; }
.sheets .s-arr { grid-column: 3; grid-row: 1 / span 2; justify-self: end; opacity: 0; transform: translateX(-6px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.sheets a:hover::before, .sheets a:focus-visible::before { opacity: 1; }
.sheets a:hover .s-arr, .sheets a:focus-visible .s-arr { opacity: 1; transform: none; }
.svc-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 4vw, 56px) clamp(32px, 4vw, 64px); align-items: start; }
.svc-h { color: var(--fg); margin-bottom: 14px; }
@media (max-width: 899px) {
  .svc-cols { grid-template-columns: minmax(0, 1fr); }
  .sheets .s-arr { opacity: 1; transform: none; }
}
@media (max-width: 599px) {
  .sheets a { grid-template-columns: 56px minmax(0, 1fr) 24px; padding: 16px 12px; }
  .sheets .s-no { grid-row: 1; align-self: center; padding-top: 0; }
  .sheets .s-arr { grid-row: 1; }
  .sheets .s-scope { grid-column: 1 / -1; }
}

/* the examples are a second photo row on the page: landscape crops keep it shorter than the gallery row above */
.sjobs .wt-img { aspect-ratio: 4 / 3; }
/* phones: the hero photo's caption stacks (job name, then city and date) instead of squeezing into two columns */
@media (max-width: 599px) { .shero .chero-f figcaption { flex-direction: column; gap: 4px; } }

/* the maintenance plans page: five credential cells (License, Reviews, Coverage, Approval first, Reporting). One row
   from 900px; below that two balanced rows, three cells over two */
@media (min-width: 900px) { .cred.cred-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .cred.cred-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .cred.cred-5 li { grid-column: span 2; padding: 10px 10px 10px 12px; border-left: 1px solid var(--rule); }
  .cred.cred-5 li:nth-child(n+4) { grid-column: span 3; }
  .cred.cred-5 li:nth-child(1), .cred.cred-5 li:nth-child(4) { padding-left: 0; border-left: 0; }
  .cred.cred-5 li:nth-child(3), .cred.cred-5 li:nth-child(5) { padding-right: 0; }
}
/* narrow phones: three cells to a row are narrow, so their small print wraps anywhere it needs to */
@media (max-width: 599px) { .cred.cred-5 .csub .nw { white-space: normal; } }
/* Electrical Repairs hero: the owner's service-call records film (4:3) over its first frame; core.js starts it after load */
.chero-f.chero-vid .wt-img { aspect-ratio: 4 / 3; max-height: none; }
@media (min-width: 900px) {
  .chero:has(.chero-vid) .chero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: center; }
  .chero:has(.chero-vid) h1 { text-wrap: balance; }
}
.chero-f.chero-vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the film opens on a frame with a thin dark edge: a slight zoom keeps the box full bleed (still and film alike) */
.chero-f.chero-vid .wt-img img, .chero-f.chero-vid video { transform: scale(1.045); }

/* Emergency strip (Repairs and Emergency pages only): a thin red bar right under the header */
.emg-strip { margin-top: var(--nav-h); background: #B3261E; color: #FFFFFF; }
.emg-strip-in { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; min-height: 40px; padding: 8px var(--pad); font: 500 12px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.emg-strip-t { display: inline-flex; align-items: center; gap: 9px; }
.emg-strip-t::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #FFFFFF; }
.emg-strip a { color: #FFFFFF; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.emg-strip a:hover { text-decoration-thickness: 2px; }
.emg-strip a:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }
.emg-strip + .phero { padding-top: clamp(24px, 3vw, 40px); }
/* Emergency page: the number shows twice up top, the red strip and the yellow call card; the header number stays off */
body:has(.ssos) .nav-phone { display: none; }
/* Emergency page: the owner's photo of burnt light pole wiring, under the call card */
.sos-photo { max-width: 420px; margin: 20px 0 0 auto; }
@media (max-width: 899px) { .sos-photo { max-width: none; margin-left: 0; } }
/* desktop: the photo above the call card (owner, Nov 14); phones keep the card first, then the photo */
@media (min-width: 900px) { .ssos { display: flex; flex-direction: column; align-items: flex-end; } .ssos .sos, .ssos .sos-photo { width: 100%; } .ssos .sos-photo { order: -1; margin: 0 0 20px; } }
.sos-photo-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
@media (max-width: 599px) { .sos-photo-img { aspect-ratio: 1 / 1; } }
.sos-photo-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.sos-photo figcaption { margin-top: 12px; display: flex; justify-content: space-between; gap: 16px; color: var(--fg-3); }
.sos-photo figcaption span:first-child { color: var(--fg-2); }
