/* =====================================================================
   Rapid Repairs site stylesheet v4 (mobile-first, no external fonts or frameworks)
   ===================================================================== */

/* ---------------------------------------------------------------------
   BRAND: the ONLY block to change for brand colors and type.
   v4: sampled from Tommy's own materials (Nov 23), not guessed:
     - navy, light blue and steel blue: the panels and heading ink of
       "Brochure, RR.pdf" (a scan, so values are medians of large areas);
     - orange: the hammer in the letterhead logo (image1.jpeg, 112 x 53 px).
       The sampled #e5471d only reaches 4.0:1 with white text, so buttons use
       a slightly deeper shade of it (--cta) and #e5471d stays for accents;
     - type: the letterhead sets the name in Arial Black, the brochure uses
       bold Arial caps. Both ship with Mac and Windows, so no web fonts load.
       iPhones have no Arial Black and fall back to bold Arial.
   [CONFIRM WITH TOMMY] if Susan's brand files have exact hex codes, swap
   them in here and re-check contrast (webaim.org/resources/contrastchecker):
     - white on --cta and --cta-hover:        4.5:1 or better (now 4.8 / 6.2)
     - white on --navy and on --brand:        4.5:1 or better (now 16.6 / 13.8)
     - --ink on --sky and --sky-soft:         4.5:1 or better (now 12.9 / 15.6)
     - --navy on --steel:                     4.5:1 or better (now 5.5)
     - --focus on white and on --navy:        3:1 or better   (now 4.0 / 4.1)
   --------------------------------------------------------------------- */
:root {
  --navy:       #011b4e;  /* brochure navy panels and heading ink (sampled #011749-#012052) */
  --brand:      #0a2a66;  /* a step lighter: links, icons, icon badges on white */
  --sky:        #bde5f3;  /* brochure light-blue panel (sampled #b4e0f0-#c1e9f6) */
  --sky-soft:   #e7f5fb;  /* the same light blue, washed out for page tops */
  --steel:      #529fb4;  /* brochure steel-blue panels (sampled #4d9aab-#55a3b8); backgrounds and rules only */
  --hammer:     #e5471d;  /* logo hammer orange, as sampled: accents only (logo bar, eyebrow chevron, rules) */
  --cta:        #cf3e15;  /* the same orange a shade deeper, so white button text passes 4.5:1 */
  --cta-hover:  #b23410;
  --cta-text:   #ffffff;
  --focus:      #e5471d;  /* keyboard focus ring (works on white and on navy) */
  --font:         Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-display: "Arial Black", "Arial Bold", Arial, "Helvetica Neue", Helvetica, sans-serif;
}
/* --------------------------- end brand block -------------------------- */

/* DESIGN TOKENS: neutrals, type scale, spacing, radius, shadow, motion */
:root {
  --ink: #0d1a33;
  --ink-soft: #3f4d63;
  --line: #d6dde8;
  --line-strong: #7a8699;
  --bg: #ffffff;
  --on-dark: #ffffff;
  --on-dark-soft: #d3def0;
  --on-dark-line: rgba(255, 255, 255, .22);
  --confirm-bg: #fff1b8;
  --confirm-ink: #574000;
  --ok: #17663a;

  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: 1.3125rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem);
  --fs-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);

  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem;
  --section: clamp(2.75rem, 1.75rem + 4vw, 5rem);
  --max: 72rem;
  --gutter: max(1.125rem, env(safe-area-inset-left, 0px));

  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(1, 27, 78, .06), 0 1px 3px rgba(1, 27, 78, .08);
  --shadow-md: 0 2px 4px rgba(1, 27, 78, .06), 0 14px 32px rgba(1, 27, 78, .14);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: .16s;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }  /* clears the sticky phone header */
@media (min-width: 960px) { html { scroll-padding-top: 6rem; } }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.6; color: var(--ink); background: var(--bg); overflow-x: clip; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; color: var(--navy); font-family: var(--font-display); font-weight: 900; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); line-height: 1.25; }
p { margin: 0; }
h1, h2, h3, p, li { overflow-wrap: break-word; }
ul, ol { margin: 0; padding-left: 1.25em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.flow > * + * { margin-top: var(--s-4); }
.flow > * + h2, .flow > * + h3 { margin-top: var(--s-6); }
.flow > h2 + *, .flow > h3 + * { margin-top: var(--s-3); }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-left: var(--gutter); padding-right: max(1.125rem, env(safe-area-inset-right, 0px)); }
.section { padding-block: var(--section); }
.section--sky { background: var(--sky-soft); }
.section--steel { background: var(--steel); }
.section-head { max-width: 46rem; margin-bottom: var(--s-6); }
.section-head > * + * { margin-top: var(--s-3); }
/* Eyebrow: uppercase bold Arial with the brochure's roof chevron */
.eyebrow { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; flex: none; width: 1.1rem; height: .7rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Cpath d='M2 12 11 3l9 9' fill='none' stroke='%23e5471d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.lead { font-size: var(--fs-md); color: var(--ink-soft); max-width: 42rem; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--fs-sm); }
.narrow { max-width: 46rem; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: .5rem; top: .5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Draft markers: visible on purpose until launch */
mark.confirm, mark.launch { background: var(--confirm-bg); color: var(--confirm-ink); padding: .05em .35em; border-radius: 4px; font: 600 .86em/1.4 var(--font); letter-spacing: 0; text-transform: none; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Buttons: 52px tall, 44px minimum for the small ones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 52px; padding: .75rem 1.3rem; border: 2px solid transparent; border-radius: 10px; font: 700 1.0625rem/1.15 var(--font); text-decoration: none; cursor: pointer; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn--cta { background: var(--cta); color: var(--cta-text); box-shadow: 0 1px 2px rgba(1, 27, 78, .25); }
.btn--cta:hover { background: var(--cta-hover); color: var(--cta-text); box-shadow: 0 6px 16px rgba(1, 27, 78, .25); }
.btn--outline { background: var(--bg); border-color: var(--brand); color: var(--brand); }
.btn--outline:hover { background: var(--sky-soft); color: var(--navy); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--sky); color: var(--navy); }
.btn--ghost { border-color: var(--on-dark-line); color: var(--on-dark); background: transparent; }
.btn--ghost:hover { border-color: var(--on-dark); color: var(--on-dark); }
.btn--sm { min-height: 44px; padding: .5rem 1rem; font-size: var(--fs-sm); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.more { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-weight: 700; text-decoration: none; }
.more .icon { width: 1.1em; height: 1.1em; transition: transform var(--fast) var(--ease); }
.more:hover .icon { transform: translateX(3px); }

/* Header with Tommy's refined logo (SVG, PNG fallback) */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); z-index: 50; }
.header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo actions" "nav nav"; align-items: center; column-gap: var(--s-3); min-height: 64px; }
.logo { grid-area: logo; display: inline-flex; align-items: center; justify-self: start; min-height: 44px; padding-block: 4px; text-decoration: none; }
.logo picture { display: block; }
.logo-img { display: block; height: 54px; width: auto; }
.header-actions { grid-area: actions; display: flex; align-items: center; gap: var(--s-2); }
.header-phone { display: none; align-items: center; gap: .45rem; min-height: 44px; font-weight: 700; text-decoration: none; color: var(--navy); white-space: nowrap; }
.header-quote { display: none; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; min-width: 44px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--navy); font: 700 var(--fs-sm) var(--font); cursor: pointer; }
.site-nav { grid-area: nav; }
.site-nav ul { list-style: none; margin: 0; padding: var(--s-2) 0 var(--s-4); }
.site-nav a { display: flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--sky-soft); }
@media (min-width: 960px) {
  .site-header { position: sticky; top: 0; }
  .nav-toggle { display: none; }
  .header-phone, .header-quote { display: inline-flex; }
  .header-inner { min-height: 76px; grid-template-columns: auto 1fr auto; grid-template-areas: "logo nav actions"; }
  .logo-img { height: 64px; }
  .site-nav, .no-js .site-nav { display: block; border: 0; }
  .site-nav ul { display: flex; justify-content: center; gap: 1.4rem; padding: 0; }
  .site-nav a { min-height: 44px; min-width: 44px; justify-content: center; border: 0; font-size: var(--fs-sm); box-shadow: inset 0 -3px 0 transparent; transition: box-shadow var(--fast) var(--ease); }
  .site-nav a:hover, .site-nav a[aria-current] { color: var(--navy); box-shadow: inset 0 -3px 0 var(--hammer); }
  .header-call, .nav-m { display: none; }
  .header-actions { gap: var(--s-4); }
}

/* Phone and tablet header (under 960 px): sticky bar with the logo, a Call button and Menu.
   Menu opens a dropdown panel over the page (no layout shift) with every page and Call / Free Estimate.
   site.js handles open/close, Escape, tap outside, the focus trap and returning focus. The desktop header is above and unchanged. */
.nav-icon-close { display: none; }
@media (max-width: 959.98px) {
  .site-header { position: sticky; top: 0; }
  .header-actions { gap: var(--s-2); }
  .header-call { min-width: 44px; padding-inline: .85rem; }
  .nav-toggle[aria-expanded="true"] { border-color: var(--navy); background: var(--sky-soft); }
  .nav-toggle[aria-expanded="true"] .nav-icon-open { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-icon-close { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1;
    max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); overflow-y: auto; overscroll-behavior: contain;
    padding: 0 max(1rem, env(safe-area-inset-right, 0px)) var(--s-4) max(1rem, env(safe-area-inset-left, 0px));
    background: var(--bg); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-md) var(--r-md);
    box-shadow: 0 14px 28px rgba(1, 27, 78, .22), 0 0 0 100vmax rgba(1, 27, 78, .45);  /* second shadow dims the page */
    clip-path: inset(0 0 -100vmax 0);  /* ...below the header only, so the Call button stays clear */
    visibility: hidden; opacity: 0; transform: translateY(-.5rem); pointer-events: none;
    transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease), visibility 0s linear var(--fast);
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }
  .site-nav ul { padding: var(--s-2) 0 var(--s-3); }
  .site-nav li a { min-height: 48px; padding-inline: .75rem; border-radius: 8px; border-bottom: 0; }
  .site-nav li + li a { box-shadow: 0 -1px 0 var(--sky-soft); }
  .site-nav li a:hover { background: var(--sky-soft); }
  .site-nav .nav-sub a { min-height: 44px; padding-left: 2rem; font-weight: 600; font-size: var(--fs-sm); }
  .site-nav a[aria-current="page"] { color: var(--navy); background: var(--sky-soft); box-shadow: inset 4px 0 0 var(--hammer); }
  .site-nav a[aria-current="page"]::after { content: "Current page"; content: "Current page" / ""; margin-left: auto; font-size: var(--fs-xs); font-weight: 700; color: var(--cta-hover); }
  .nav-cta { display: grid; gap: var(--s-2); }
  /* the panel's buttons keep their own button colors (the list's link colors don't apply) */
  .site-nav .nav-cta .btn { min-height: 50px; border-width: 2px; }
  .site-nav .nav-cta .btn--cta { color: var(--cta-text); border-bottom-color: transparent; }
  .site-nav .nav-cta .btn--outline { color: var(--brand); border-bottom-color: var(--brand); }
  /* Without JavaScript the list simply shows under the header */
  .no-js .site-header { position: static; }
  .no-js .site-nav { position: static; visibility: visible; opacity: 1; transform: none; pointer-events: auto; box-shadow: none; clip-path: none; max-height: none; }
  .no-js .nav-toggle { display: none; }
}
@media (max-width: 379px) {
  .logo-img { height: 44px; }
  .header-call { padding-inline: .7rem; }
  .nav-toggle { padding-inline: .6rem; }
}
@media (prefers-reduced-motion: reduce) { .site-nav { transition: none !important; transform: none !important; } }

/* Phone: sticky bottom bar with Call, Text and Free Estimate */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: var(--s-2); padding: .5rem max(.625rem, env(safe-area-inset-right, 0px)) calc(.5rem + env(safe-area-inset-bottom, 0px)) max(.625rem, env(safe-area-inset-left, 0px)); background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(1, 27, 78, .12); transition: transform .2s var(--ease); }
.mobile-cta .btn { min-height: 50px; padding: .4rem .5rem; font-size: 1rem; gap: .4rem; white-space: nowrap; }
body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
/* Out of the way while someone types in the estimate form (the keyboard needs the room) */
body:has(.quote-form :is(input, select, textarea):focus) .mobile-cta { transform: translateY(110%); }
@media (max-width: 359px) { .mobile-cta .btn { font-size: .9375rem; } .mobile-cta .icon { display: none; } }
@media (min-width: 960px) { .mobile-cta { display: none; } body { padding-bottom: 0; } }

/* Trust strip: license numbers, experience and reply time, right under the headline */
.trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.trust li { display: flex; gap: .55rem; align-items: flex-start; padding: .6rem .7rem; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.trust .icon { width: 1.25rem; height: 1.25rem; margin-top: .1rem; color: var(--brand); }
.trust-label { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.3; }
.trust-value { display: block; font-weight: 700; line-height: 1.3; color: var(--navy); }
.trust--dark li { background: rgba(255, 255, 255, .08); border-color: var(--on-dark-line); }
.trust--dark .icon { color: var(--sky); }
.trust--dark .trust-label { color: var(--on-dark-soft); }
.trust--dark .trust-value { color: var(--on-dark); }
@media (min-width: 640px) { .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Estimate form card (Home, every service page, Services, Contact) */
.estimate { background: var(--bg); color: var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow-md); border: 1px solid var(--line); padding: var(--s-5) var(--s-4); scroll-margin-top: 1rem; }
.estimate-head { margin-bottom: var(--s-4); }
.estimate-head h2 { font-size: var(--fs-lg); }
.estimate-head p { margin-top: var(--s-1); color: var(--ink-soft); font-size: var(--fs-sm); }
@media (min-width: 640px) { .estimate { padding: var(--s-6); } }
@media (min-width: 960px) { .estimate { scroll-margin-top: 6rem; } }

/* Home hero: real photo behind navy, headline + call on the left, the form on the right (desktop) */
.hero { position: relative; isolation: isolate; background: var(--navy); color: var(--on-dark); padding-block: var(--s-5) var(--s-6); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; max-height: 40rem; object-fit: cover; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(1, 27, 78, .80) 0, rgba(1, 27, 78, .9) 22rem, var(--navy) 40rem); }
.hero-grid { display: grid; gap: var(--s-5); grid-template-areas: "copy" "trust" "form"; }
.hero-grid > * { min-width: 0; }
.hero-copy { grid-area: copy; }
.hero-copy > * + * { margin-top: var(--s-3); }
.hero .trust { grid-area: trust; }
.hero .estimate { grid-area: form; }
.hero h1 { color: var(--on-dark); font-size: clamp(1.875rem, 1.2rem + 3.4vw, 3.25rem); line-height: 1.06; }
.hero-kicker { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sky); }
.hero-promise { font-size: var(--fs-md); color: var(--on-dark-soft); max-width: 34rem; }
.hero .btn-row { margin-top: var(--s-4); }
.hero .btn-row .btn { flex: 1 1 12rem; }
.hero-note { font-size: var(--fs-sm); color: var(--on-dark-soft); }
.hero-note a { color: var(--on-dark); font-weight: 700; }
.hero :focus-visible { outline-color: #fff; }
.hero .estimate :focus-visible { outline-color: var(--focus); }
@media (min-width: 960px) {
  .hero { padding-block: var(--s-7); }
  .hero::before { background: linear-gradient(90deg, rgba(1, 27, 78, .95) 0, rgba(1, 27, 78, .86) 50%, rgba(1, 27, 78, .55) 100%); }
  .hero-bg { max-height: none; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-areas: "copy form" "trust form"; column-gap: var(--s-7); row-gap: var(--s-6); align-items: start; }
  .hero .btn-row .btn { flex: 0 1 auto; }
  .hero .trust { grid-template-columns: 1fr 1fr; }
}

/* Inner-page hero (light blue, like the brochure's name panel). The --split version holds the form. */
.page-hero { position: relative; background: var(--sky-soft); border-bottom: 4px solid var(--sky); padding-block: var(--s-5) var(--s-6); }
.page-hero .flow > * + * { margin-top: var(--s-3); }
.page-hero .btn-row { margin-top: var(--s-4); }
.page-hero .trust { margin-top: var(--s-5); }
.split { display: grid; gap: var(--s-5); }
.split > * { min-width: 0; }
@media (min-width: 960px) {
  .page-hero { padding-block: var(--s-7); }
  .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); column-gap: var(--s-7); align-items: start; }
  .page-hero .trust { grid-template-columns: 1fr 1fr; }
}
.breadcrumbs { font-size: var(--fs-sm); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .4rem; padding: 0; margin: 0; }
.breadcrumbs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--ink-soft); }
.icon-badge { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--r-md); background: var(--sky); color: var(--navy); flex: none; }
.icon-badge .icon { width: 1.5rem; height: 1.5rem; }

/* Grids */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.grid > * { min-width: 0; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: 1fr 1fr; } }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
.two-col > * { min-width: 0; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: start; } .two-col--center { align-items: center; } }

/* Service cards: one tap target each, icon instead of a repeated photo */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-4); align-items: start; padding: var(--s-4); background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--steel); border-radius: var(--r-md); transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card:focus-within { border-color: var(--brand); }
.card-body > * + * { margin-top: var(--s-2); }
.card h3 { font-size: var(--fs-md); }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card p { color: var(--ink-soft); font-size: var(--fs-sm); }
.card .more { color: var(--brand); font-size: var(--fs-sm); min-height: 0; }
.card:hover .more .icon { transform: translateX(3px); }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); } .card { grid-template-columns: 1fr; padding: var(--s-5); } }
@media (min-width: 760px) { .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } }

/* Photos */
.photo { position: relative; margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--sky-soft); }
.photo figcaption { font-size: var(--fs-sm); color: var(--ink-soft); margin-top: var(--s-2); }
.photo figcaption strong { color: var(--ink); }
.photo--portrait { max-width: 22rem; }
.photo--portrait img { aspect-ratio: 4 / 5; }
.photo--3x2 img { aspect-ratio: 3 / 2; }
.photo--map img { object-fit: contain; border: 1px solid var(--line); }
/* Job told start to finish: numbered photos, 2 across from tablet up */
.seq { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); counter-reset: seq; }
.seq > li { counter-increment: seq; min-width: 0; }
.seq figcaption::before { content: counter(seq) ". "; font-weight: 700; color: var(--navy); }
@media (min-width: 640px) { .seq { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .seq--3 { grid-template-columns: repeat(3, 1fr); } }
.link-list { list-style: none; padding: 0; margin: 0; }

/* Before / after slider. Works with any two same-size images. */
.ba { margin: 0; --pos: 50%; }
.ba-frame { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--sky-soft); touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; box-shadow: var(--shadow-sm); }
.ba-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; pointer-events: none; }
.ba-img--before { position: absolute; inset: 0; height: 100%; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-label { position: absolute; top: .625rem; padding: .25rem .625rem; border-radius: var(--r-pill); background: rgba(1, 27, 78, .85); color: #fff; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.ba-label--before { left: .625rem; }
.ba-label--after { right: .625rem; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(1, 27, 78, .25); pointer-events: none; }
.ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23011b4e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 2px 10px rgba(1, 27, 78, .35); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba-frame:has(.ba-range:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.ba figcaption { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--ink-soft); }
.ba figcaption strong { color: var(--ink); }
.no-js .ba-frame { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; cursor: default; }
.no-js .ba-img--before { position: static; clip-path: none; order: -1; }
.no-js .ba-handle, .no-js .ba-range { display: none; }

/* How it works (Home only) and the thank-you steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.steps li { counter-increment: step; position: relative; padding-left: 4rem; min-height: 3rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font: 900 1.25rem/1 var(--font-display); }
.steps h3 { font-size: var(--fs-md); }
.steps p { margin-top: var(--s-1); color: var(--ink); }
.section--steel .steps p { color: var(--navy); }
@media (min-width: 800px) { .steps:not(.steps--stack) { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); } }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 78% no-repeat; }
.checklist strong { display: block; }
@media (min-width: 640px) { .checklist--2 { grid-template-columns: 1fr 1fr; column-gap: var(--s-5); } }

.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.panel > * + * { margin-top: var(--s-4); }
.panel h2 { font-size: var(--fs-lg); line-height: 1.25; }
@media (min-width: 640px) { .panel { padding: var(--s-6); } }

/* Chips: systems, regions */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li { padding: .4rem .85rem; background: var(--bg); border: 1px solid var(--steel); border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 700; color: var(--navy); }

/* Emergency band (Roofing page) */
.emergency { display: grid; gap: var(--s-4); align-items: center; background: var(--navy); color: var(--on-dark); border-radius: var(--r-lg); padding: var(--s-6) var(--s-5); border-left: 8px solid var(--hammer); }
.emergency h2 { color: var(--on-dark); }
.emergency p { color: var(--on-dark-soft); margin-top: var(--s-2); }
.emergency :focus-visible { outline-color: #fff; }
@media (min-width: 768px) { .emergency { padding: var(--s-6); } }
@media (min-width: 768px) and (max-width: 899px) { .emergency { grid-template-columns: 1fr auto; } }

/* FAQ accordion (native details, no script needed) */
.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 56px; padding: var(--s-3) var(--s-5); font-weight: 700; color: var(--navy); cursor: pointer; list-style: none; border-radius: var(--r-md); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--brand); transition: transform var(--fast) var(--ease); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .answer { padding: 0 var(--s-5) var(--s-5); color: var(--ink-soft); }
.faq .answer > * + * { margin-top: var(--s-3); }

.mini-steps { margin: 0; padding-left: 1.3em; display: grid; gap: var(--s-2); color: var(--ink-soft); }
.mini-steps strong { color: var(--ink); }

/* Estimate form */
.quote-form { display: grid; gap: var(--s-4); }
.form-row { display: grid; gap: var(--s-4); }
@media (min-width: 480px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--navy); }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 50px; padding: .65rem .85rem; font: 400 1rem/1.4 var(--font); font-size: max(16px, 1rem); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: 10px; transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23011b4e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right .8rem center / 1.1rem no-repeat; }
.field textarea { min-height: 5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--sky); }
.quote-form .btn { width: 100%; }
.form-fine { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.5; }
.form-fine a { color: var(--brand); }
.form-photo { display: flex; gap: .45rem; align-items: flex-start; }
.form-photo .icon { width: 1.15rem; height: 1.15rem; color: var(--brand); margin-top: .05rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: var(--s-4); border-radius: var(--r-sm); background: var(--confirm-bg); color: var(--confirm-ink); font-weight: 600; }
[hidden] { display: none !important; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.contact-list strong { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }

/* Thank-you page */
.thanks-mark { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--ok); color: #fff; }
.thanks-mark .icon { width: 2rem; height: 2rem; stroke-width: 2.6; }

/* Footer, with the closing call to action folded into its top */
.site-footer { background: var(--navy); color: var(--on-dark-soft); font-size: var(--fs-sm); }
.site-footer a { color: var(--on-dark); }
/* Buttons keep their own text colors in the footer (the rule above outranks .btn--light, which left white text on the white button) */
.site-footer .btn--light, .site-footer .btn--light:hover { color: var(--navy); }
.site-footer :focus-visible { outline-color: #fff; }
.footer-cta { display: grid; gap: var(--s-5); padding-block: var(--s-7) var(--s-6); border-bottom: 1px solid var(--on-dark-line); }
.footer-cta h2 { color: var(--on-dark); font-size: var(--fs-xl); }
.footer-cta p { margin-top: var(--s-2); font-size: var(--fs-base); color: var(--on-dark-soft); }
.footer-cta .btn-row .btn { flex: 1 1 12rem; }
@media (min-width: 900px) { .footer-cta { grid-template-columns: 1.2fr 1fr; align-items: center; gap: var(--s-7); } }
.footer-grid { display: grid; gap: var(--s-6); padding-block: var(--s-6); }
.footer-logo { display: inline-block; margin-bottom: var(--s-4); padding: .5rem .75rem; background: #fff; border-radius: var(--r-md); }
.footer-logo picture, .footer-logo-img { display: block; }
.footer-logo-img { height: 84px; width: auto; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1.3fr; } }
.site-footer h2 { color: var(--on-dark); font: 700 var(--fs-xs)/1.3 var(--font); text-transform: uppercase; letter-spacing: .12em; margin-bottom: var(--s-3); }
.footer-cta h2 { font-family: var(--font-display); font-weight: 900; text-transform: none; letter-spacing: -.01em; font-size: var(--fs-xl); margin: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-1); }
.site-footer p + ul { margin-top: var(--s-3); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.footer-bottom { border-top: 1px solid var(--on-dark-line); padding-block: var(--s-4) var(--s-5); display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; justify-content: space-between; font-size: var(--fs-xs); }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }

/* Motion: subtle and optional */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .btn:hover, .card:hover { transform: none; }
}

/* A photo slot with no real photo yet sits inside <template data-photo-slot> and is never shown.
   A two-column row with a hidden slot as a direct child becomes one readable column. */
@media (min-width: 900px) { .two-col:has(> template[data-photo-slot]) { grid-template-columns: minmax(0, 1fr); max-width: 46rem; } }

/* Phones: keep the hero short so the estimate form starts on the first screen.
   Call stays in the hero; Text lives in the sticky bar; trust items lose their boxes. */
@media (max-width: 639px) {
  .hero { padding-top: var(--s-4); }
  .hero-kicker, .page-hero .eyebrow { display: none; }
  .hero-grid { gap: var(--s-4); }
  .hero-promise, .page-hero .lead { font-size: var(--fs-base); }
  .page-hero { padding-block: var(--s-2) var(--s-5); }
  .page-hero .trust { margin-top: var(--s-4); }
  .trust { gap: var(--s-2) var(--s-3); }
  .trust li, .trust--dark li { padding: 0; background: none; border: 0; }
  .trust .icon { width: 1.125rem; height: 1.125rem; }
  .trust-label { font-size: .6875rem; }
  .trust-value { font-size: var(--fs-sm); }
}
@media (max-width: 479px) {
  .hero .btn-row .btn--ghost, .page-hero .split .btn-row .btn--outline { display: none; }
}
/* Contact: on phones the form comes right after the heading; call/text and details follow it */
.split--contact { grid-template-areas: "intro" "form" "more"; }
.split--contact .contact-intro { grid-area: intro; }
.split--contact .estimate { grid-area: form; }
.split--contact .contact-more { grid-area: more; }
@media (min-width: 960px) { .split--contact { grid-template-areas: "intro form" "more form"; } }

/* v7: real photos ship as WebP with a JPG fallback inside <picture>; the wrapper must not change layout. */
picture { display: contents; }  /* .logo picture and .footer-logo picture override this (display: block) */
