:root {
  --navy: #1b2b5e;
  --blue: #1d4f91;
  --blue-dark: #163c6e;
  --green: #24702f;
  --ink: #16202f;
  --muted: #475265;
  --bg: #f4f6f9;
  --line: #dde3ec;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; font: 400 18px/1.65 Heebo, system-ui, sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--navy); font-weight: 800; text-wrap: balance; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; top: -100px; right: 16px; background: #fff; padding: 8px 16px; z-index: 30; }
.skip:focus { top: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 12px; font-weight: 700; font-size: 18px; white-space: nowrap; text-decoration: none; transition: background-color .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: #fff; color: var(--navy); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 32px; height: 88px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 56px; height: 56px; }
.brand b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; }
.brand small { display: block; font-size: 17px; color: var(--muted); }
.top nav { display: flex; gap: 28px; margin-inline-start: auto; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 20px; }
.top nav a:hover { color: var(--blue); }
.top .btn { min-height: 54px; padding: 0 22px; font-size: 20px; }

/* hero */
.hero { padding: 64px 0 80px; background: linear-gradient(#fff, var(--bg)); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--green); font-weight: 700; }
h1 { margin: 0 0 16px; font-size: clamp(46px, 7vw, 78px); line-height: 1.05; letter-spacing: -.01em; }
.lead { margin: 0 0 28px; max-width: 36ch; font-size: 21px; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 40px 0 0; padding: 0; list-style: none; }
.facts li { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.facts b { display: block; font-size: 28px; font-weight: 800; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; }
.facts span { font-size: 15px; color: var(--muted); }
.portrait { position: relative; margin: 0; }
.portrait img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 24px; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 24px 48px -16px rgba(16,24,40,.3); outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.portrait figcaption { position: absolute; inset-inline: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(255,255,255,.95); border-radius: 14px; font-weight: 700; color: var(--navy); }
.portrait figcaption .ic { color: var(--green); }

/* sections */
section { padding: 88px 0; }
.alt { background: var(--bg); }
.head { margin-bottom: 40px; }
.head h2 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 42px); line-height: 1.2; }
.head p { margin: 0; max-width: 62ch; color: var(--muted); }

.about { display: grid; grid-template-columns: .75fr 1.2fr .8fr; gap: 48px; align-items: start; }
.about > .timeline { margin-top: 8px; }
.about-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px; outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.about p { margin: 0 0 16px; }
.timeline { margin: 32px 0 0; padding: 0; list-style: none; border-inline-start: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 24px 22px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); }
.timeline b { display: block; color: var(--navy); font-variant-numeric: tabular-nums; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 21px; line-height: 1.3; }
.card h3 .ic { color: var(--green); stroke-width: 2.6; }
.card p { margin: 0; color: var(--muted); }

.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.scope { margin-top: 48px; }
.scope h3 { margin: 0 0 16px; font-size: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; }
.chips .ic { width: 18px; height: 18px; color: var(--green); stroke-width: 2.6; }

.verify { background: var(--navy); color: #fff; padding: 64px 0; }
.verify .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.verify h2 { margin: 0 0 8px; color: #fff; font-size: clamp(28px, 3.5vw, 36px); }
.verify p { margin: 0 0 24px; max-width: 56ch; color: #d6dcea; }
.verify img { width: 200px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; }
.verify .btn { background: #fff; color: var(--navy); }
.verify .btn:hover { background: #e8edf7; }

.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.logos li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.logos img { width: 100%; height: 76px; object-fit: scale-down; }
.logos span { font-size: 14px; line-height: 1.3; color: var(--muted); }

.contact { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.contact span { min-width: 0; overflow-wrap: anywhere; }
.contact a { display: flex; align-items: center; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.contact a:hover { border-color: var(--blue); }
.contact .ic { width: 26px; height: 26px; color: var(--blue); }
.contact small { display: block; color: var(--muted); font-size: 15px; }
.contact b { display: block; font-size: 19px; }

footer { padding: 48px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
footer img { width: 210px; height: auto; margin-bottom: 12px; }

.callbar { display: none; }

@media (max-width: 1100px) and (min-width: 861px) {
  .about { grid-template-columns: .8fr 1.2fr; }
  .about > .timeline { grid-column: 2; }
}
@media (max-width: 860px) {
  section { padding: 64px 0; }
  .top nav { display: none; }
  .top .btn { margin-inline-start: auto; }
  .hero { padding: 40px 0 56px; }
  .hero .wrap, .about { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-width: 420px; }
  .verify img { display: none; }
  .callbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .callbar .btn { flex: 1; }
  body { padding-bottom: 80px; }
}
@media (max-width: 480px) {
  .top .btn span { display: none; }
  .brand small { font-size: 14px; }
  .top .wrap { height: 72px; }
  .brand img { width: 44px; height: 44px; }
  .brand b { font-size: 24px; }
  .lead { font-size: 19px; }
  .facts { gap: 8px; }
  .facts li { padding: 12px; }
  .facts b { font-size: 24px; }
  .facts span { font-size: 14px; line-height: 1.4; }
  .cta { flex-direction: column; }
  .photos { grid-template-columns: 1fr; }
  .logos { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---- shared by the service pages and the homepage FAQ ---- */
.crumbs { padding-top: 20px; font-size: 15px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin-inline-end: 6px; }
.crumbs a { color: var(--muted); }

.page-hero { padding: 32px 0 56px; background: linear-gradient(#fff, var(--bg)); }
.page-hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.15; }
.page-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }

.prose > * { max-width: 76ch; }
.prose h2 { margin: 48px 0 12px; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.25; }
.prose h3 { margin: 28px 0 8px; font-size: 22px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }

.table-wrap { overflow-x: auto; margin: 16px 0; }
.cmp { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 17px; }
.cmp th, .cmp td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp th { background: var(--bg); color: var(--navy); font-weight: 700; }
.cmp tr:last-child td { border-bottom: 0; }

.faq { display: grid; gap: 12px; max-width: 900px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.faq summary { padding: 18px 20px; font-weight: 700; font-size: 19px; color: var(--navy); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 18px; color: var(--ink); }
.faq details > div p { margin: 0 0 10px; }

.areas { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.addr { display: grid; gap: 12px; }
.addr a { display: flex; gap: 14px; align-items: center; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.addr a:hover { border-color: var(--blue); }
.addr .ic { width: 26px; height: 26px; color: var(--blue); }
.addr small { display: block; color: var(--muted); font-size: 15px; }

.card a.more { display: inline-block; margin-top: 10px; font-weight: 700; }
.verify-lic { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }

.cta-band { background: var(--navy); color: #fff; padding: 56px 0; }
.cta-band h2 { margin: 0 0 8px; color: #fff; font-size: clamp(26px, 3.5vw, 36px); }
.cta-band p { margin: 0 0 24px; color: #d6dcea; max-width: 60ch; }
.cta-band .cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }

.foot { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; align-items: start; }
.foot-h { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--navy); }
.foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.foot a { color: var(--muted); }
.foot p { margin: 0 0 6px; }

@media (max-width: 860px) {
  .page-hero .wrap, .areas, .foot { grid-template-columns: 1fr; }
  .page-hero img { max-width: 520px; }
}
.updated { margin: 16px 0 0; font-size: 15px; color: var(--muted); }
.updated a { color: inherit; font-weight: 700; }
.author { display: flex; gap: 20px; align-items: center; margin-block: 56px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; max-width: 900px; }
.author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; flex: none; }
.author p { margin: 0; color: var(--muted); font-size: 17px; }
.author .author-name { margin-bottom: 6px; color: var(--navy); font-weight: 800; font-size: 19px; }
.author .author-name a { color: inherit; }
@media (max-width: 480px) { .author { flex-direction: column; align-items: flex-start; } }

/* homepage SEO additions */
.hero h1 .sub { display: block; margin-top: 10px; font-size: .42em; font-weight: 700; color: var(--blue); letter-spacing: 0; }
.portrait figcaption a { color: inherit; text-decoration: underline; }
#about .chips { margin: 0 0 20px; }
#contact .wrap > p { margin: 24px 0 0; }

/* footer legal row, sample certificate, accessibility widget */
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
.foot-legal a { color: var(--muted); }
.sample { margin: 20px 0 8px; max-width: 420px; }
.sample img { width: 100%; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 28px -14px rgba(16,24,40,.35); }
.sample figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }
.verify a { color: #fff; }
.verify .sample-cert { display: grid; gap: 8px; justify-items: center; text-decoration: none; font-size: 15px; }
.verify .sample-cert img { display: block; width: 200px; aspect-ratio: auto; border-radius: 8px; background: #fff; box-shadow: 0 16px 32px -12px rgba(0,0,0,.5); }
@media (max-width: 860px) {
  .verify .sample-cert img { display: block; width: 160px; }
  .callbar { padding-inline-end: 72px; } /* room for the accessibility widget button (bottom-left, inside its own shadow DOM) */
}

/* ---- phones: a shorter homepage. Text stays in the HTML (Google indexes it); details live on the service pages ---- */
@media (max-width: 860px) {
  .top { position: static; } /* the fixed call bar already carries the call button */
  footer { padding: 32px 0; }
  footer .foot > div:first-child img { display: none; }
  .foot { gap: 20px; }
  .foot ul { grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 15px; }
  .faq summary { padding: 16px 18px; font-size: 17px; }

  /* section order: hero, inspections, clients, about, steps, certificate, FAQ, contact */
  main:has(> .hero) { display: flex; flex-direction: column; }
  #services { order: 1; } #clients { order: 2; } #about { order: 3; } #process { order: 4; }
  main > .verify { order: 5; } #faq { order: 6; } #contact { order: 7; }
  main:has(> .hero) > section { padding: 44px 0; }
  main:has(> .hero) .head { margin-bottom: 20px; }
  #services .head p, #clients .head p, #contact .head p { display: none; }

  /* hero: photo first, buttons left to the call bar */
  .hero { padding: 12px 0 36px; }
  .hero .wrap { gap: 20px; }
  .portrait { order: -1; }
  .portrait img { aspect-ratio: 16 / 10; object-position: 50% 35%; border-radius: 18px; }
  .portrait figcaption { position: static; display: block; margin-top: 8px; padding: 0; background: none; font-size: 14px; }
  .portrait figcaption .ic { display: inline-block; width: 18px; height: 18px; margin-inline-end: 4px; vertical-align: -4px; }
  .kicker { font-size: 16px; }
  .lead { margin-bottom: 0; }
  .hero .cta { display: none; }
  .facts { margin-top: 20px; }
  .facts li { padding: 10px 12px; }
  .facts span { display: block; font-size: 13px; line-height: 1.35; }

  /* inspections: 2-column tap tiles, each opens its service page */
  #services .cards { display: flex; flex-wrap: wrap; gap: 10px; }
  #services .card { position: relative; flex: 0 0 calc(50% - 5px); display: flex; align-items: center; min-height: 76px; padding-block: 12px; padding-inline: 12px 34px; }
  #services .card h3 { margin: 0; font-size: 17px; }
  #services .card h3 .ic, #services .card p { display: none; }
  #services .card a.more { position: absolute; inset: 0; margin: 0; font-size: 0; color: transparent; border-radius: 16px; }
  #services .card a.more::after { content: "›"; position: absolute; inset-inline-end: 12px; top: 50%; translate: 0 -55%; font-size: 30px; font-weight: 400; color: var(--blue); }
  #services .photos, #services .scope { display: none; }

  /* clients: a swipeable row that drifts by itself (script in index.html, which also appends the second copy) */
  #clients .logos { display: flex; gap: 0; overflow-x: auto; margin-inline: -20px; padding: 0 20px 6px; scrollbar-width: none; }
  #clients .logos::-webkit-scrollbar { display: none; }
  #clients .logos li { flex: 0 0 128px; margin-inline-end: 10px; padding: 14px 10px 10px; }
  #clients .logos li[aria-hidden] { display: flex; }
  #clients .logos img { height: 56px; }
  #clients .logos span { font-size: 13px; }

  /* about: round headshot beside the heading, figures as a checklist, compact timeline */
  .about { display: block; }
  .about-photo { float: right; width: 88px; height: 88px; margin: 0 0 8px 14px; aspect-ratio: 1; border-radius: 50%; object-position: 50% 20%; }
  .about .head h2 { font-size: 26px; }
  #about .timeline { clear: both; margin-top: 28px; font-size: 16px; line-height: 1.45; }
  #about .timeline li { padding: 0 20px 14px; }
  #about .timeline li::before { top: 6px; }
  #about .timeline b { display: inline; margin-inline-end: 8px; }
  #about .chips { clear: both; flex-direction: column; gap: 8px; }
  #about .chips li { align-items: flex-start; padding: 0; border: 0; background: none; font-size: 17px; line-height: 1.45; }
  #about .chips .ic { margin-top: 4px; }

  /* steps only */
  #process .prose > p, #process .prose > h3 { display: none; }
  #about, #process { padding-top: 0; } /* white after white: the previous section's bottom padding is enough */
  #process .prose > h2 { margin-top: 8px; }

  /* certificate: text with a small sample beside it */
  main > .verify { padding: 40px 0; }
  .verify .wrap { flex-wrap: nowrap; align-items: flex-start; gap: 16px; }
  .verify .wrap > div { flex: 1; min-width: 0; }
  .verify h2 { font-size: 24px; }
  .verify p { margin-bottom: 16px; font-size: 16px; }
  .verify .btn { padding: 0 16px; font-size: 16px; }
  .verify .sample-cert { font-size: 13px; }
  .verify .sample-cert img { width: 104px; }

  /* contact: tighter cards */
  .contact { gap: 10px; }
  .contact a { padding: 14px 16px; }
  #contact .wrap > p { font-size: 16px; }
}
.logos li[aria-hidden] { display: none; } /* the carousel copy, phones only */
@media (max-width: 860px) and (prefers-reduced-motion: reduce) { #clients .logos li[aria-hidden] { display: none; } } /* no drift: plain swipe row */
