/* ==========================================================================
   Joseth HVAC Air Conditioning & Heating
   Brand palette sampled directly from the client's own logo artwork
   (house/sun/snowflake mark + JOSETH HVAC wordmark) and their existing
   stylesheet's navy. Blue + gold on navy.

   NOTE: the cyan (#4caac9) on the current josethhvac.com is the Webador
   template's default accent, NOT the Joseth HVAC brand. It is deliberately
   not used here.

   Contrast (WCAG AA) — measured, not assumed:
     #16202E on #FFFFFF ............ 14.9:1  body text        PASS AA/AAA
     #55637A on #FFFFFF .............. 5.8:1  muted text       PASS AA
     #0060C0 on #FFFFFF .............. 6.1:1  links/buttons    PASS AA
     #FFFFFF on #0060C0 .............. 6.1:1  primary button   PASS AA
     #FFD020 on #021935 ............. 11.9:1  gold on navy     PASS AA/AAA
     #FFFFFF on #021935 ............. 18.9:1  dark sections    PASS AA/AAA
     #C8D4E4 on #021935 ............. 13.2:1  muted on navy    PASS AA/AAA
     #0090F0 .................. accents/rules only, never body text (3.4:1)
   ========================================================================== */

:root {
  /* Brand */
  --navy:        #021935;  /* logo card background + client's own CSS */
  --navy-deep:   #01101F;
  --blue:        #0060C0;  /* wordmark blue — primary action colour */
  --blue-dark:   #00408F;
  --blue-bright: #0090F0;  /* mark outline — accents only */
  --gold:        #FFD020;  /* "AIR CONDITIONING & HEATING" + sun/swoosh */

  /* Neutrals */
  --ink:         #16202E;
  --ink-muted:   #55637A;
  --on-navy:     #FFFFFF;
  --on-navy-mut: #C8D4E4;
  --surface:     #FFFFFF;
  --surface-alt: #F2F6FB;
  --border:      #DCE4EF;

  /* Type — Archivo (semi-condensed grotesque) for headings, echoing the
     compressed bold logo wordmark; Inter for body legibility at 17px.
     Only upright weights are loaded, so nothing here uses italic — a
     synthesised oblique on a grotesque looks like a mistake. */
  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --wrap: 1120px;
  --radius: 10px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  overflow-x: hidden;          /* belt-and-braces against 375px overflow */
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 .5em;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(1.85rem, 5.2vw, 3.1rem); font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.075rem, 2vw, 1.25rem); font-weight: 600; }

p { margin: 0 0 1rem; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--on-navy);
  padding: .75rem 1.25rem; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.wrap-narrow { max-width: 780px; }

/* The header is sticky, so anchored sections must clear it or the heading
   lands underneath. Generous enough for the two-row header under 900px. */
section[id] { scroll-margin-top: 118px; }
@media (min-width: 901px) { section[id] { scroll-margin-top: 84px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }

.btn-secondary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-secondary:hover { background: #F0BE00; border-color: #F0BE00; color: var(--navy); }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }

.btn-call { background: var(--blue); color: #fff; border-color: var(--blue); padding: .6rem 1.1rem; }
.btn-call:hover { background: var(--blue-dark); color: #fff; }

/* ---------- header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  padding-block: .7rem;
}
.brand { display: block; flex: 0 0 auto; line-height: 0; }
.brand img { width: auto; height: 58px; }

.site-nav { margin-inline-start: auto; }
.site-nav ul {
  display: flex; flex-wrap: wrap; gap: 1.35rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  display: inline-block;          /* inline elements ignore vertical padding
                                     for layout — this makes the tap target real */
  color: var(--navy); text-decoration: none;
  font-weight: 500; font-size: .95rem;
  padding-block: .35rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--blue); border-bottom-color: var(--gold); }

.header-call { flex: 0 0 auto; white-space: nowrap; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 82% -18%, rgba(0,144,240,.30), transparent 62%),
    linear-gradient(170deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-navy);
  padding-block: clamp(2.75rem, 7vw, 5rem);
  border-bottom: 4px solid var(--gold);
}
.hero-inner { max-width: 850px; }

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .9rem;
}
.hero h1 { color: #fff; margin-bottom: .65em; }

.lede {
  font-size: clamp(1.03rem, 2.1vw, 1.2rem);
  color: var(--on-navy-mut);
  max-width: 63ch;
  margin-bottom: 1.4rem;
}

/* Set in caps because that is how the client sets it themselves — on the
   business card and the van graphics it reads COMFORT TODAY, PEACE OF MIND
   ALWAYS. Caps also suit a grotesque where italic would not. */
.tagline {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .055em;
  font-size: clamp(.95rem, 1.9vw, 1.15rem);
  line-height: 1.35;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin: 0 0 1.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.9rem; }

.trust-strip {
  display: flex; flex-wrap: wrap; gap: .55rem;
  list-style: none; margin: 0 0 1.5rem; padding: 0;
}
.trust-strip li {
  font-size: .875rem; font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  padding: .4rem .95rem;
}

.lang-note {
  font-size: .95rem; color: var(--on-navy-mut);
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 1.1rem; margin: 0;
}
.lang-note strong { color: var(--gold); }
.lang-note a { color: #fff; }
.lang-note a:hover { color: var(--gold); }

/* ---------- sections ---------- */
.section { padding-block: clamp(2.75rem, 6.5vw, 4.75rem); }
.section-alt { background: var(--surface-alt); }

.section-dark {
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-navy);
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .answer { color: var(--on-navy-mut); }

.answer {
  font-size: clamp(1.02rem, 2vw, 1.13rem);
  color: var(--ink);
  max-width: 68ch;
  margin-bottom: 2rem;
  border-left: 3px solid var(--blue-bright);
  padding-left: 1.05rem;
}

.note { color: var(--ink-muted); font-size: .97rem; margin-top: 1.5rem; }

/* ---------- service cards ---------- */
.cards {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}
.section-alt .card { background: var(--surface); }
.card h3 { color: var(--navy); }
.card p { color: var(--ink-muted); margin: 0; font-size: .98rem; }

/* ---------- areas ---------- */
.areas-grid {
  display: grid; gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.area-block h3 { color: var(--navy); margin-bottom: .8rem; }

.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.pill-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: .45rem .9rem;
  font-size: .93rem; font-weight: 500;
  color: var(--navy);
}

/* ---------- why ---------- */
.why-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  margin-bottom: 2.5rem;
}
.why-item { border-top: 3px solid var(--gold); padding-top: 1rem; }
.why-item h3 { margin-bottom: .35em; }
.why-item p { color: var(--ink-muted); margin: 0; font-size: .97rem; }

.founder-quote {
  margin: 0;
  background: var(--surface-alt);
  border-left: 5px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.75rem 1.75rem 1.4rem;
}
.section-alt .founder-quote { background: var(--surface); }
.founder-quote p {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.45;
  letter-spacing: -.005em;
  color: var(--navy);
  margin-bottom: 1rem;
}
.founder-quote footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.founder-quote cite { font-style: normal; font-weight: 700; color: var(--navy); }
.founder-quote .role { color: var(--ink-muted); font-size: .9rem; }

/* ---------- recent work ---------- */
.work-inner {
  display: grid; gap: 2.25rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .work-inner { grid-template-columns: 1.15fr .85fr; gap: 3rem; }
}
.work-copy p:not(.answer) { color: var(--ink-muted); }
/* The source collage is a tall 597x1063 portrait. Capped so it does not
   dominate the section when the grid collapses to one column. */
.work-figure { margin: 0; max-width: 440px; margin-inline: auto; }
.work-figure img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 2.5rem 1.1rem 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { display: inline; margin: 0; color: var(--navy); }
.faq summary:hover h3 { color: var(--blue); }

.faq summary::after {
  content: "+";
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-body); font-size: 1.6rem; font-weight: 400;
  line-height: 1; color: var(--blue);
}
.faq details[open] summary::after { content: "\2013"; }

.faq details > p {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  max-width: 68ch;
  padding-right: 1rem;
}

/* ---------- contact ---------- */
.contact-inner {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .contact-inner { grid-template-columns: 1.6fr .8fr; gap: 3.5rem; }
}
.section-dark .answer { border-left-color: var(--gold); }

.contact-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.contact-list li {
  display: flex; flex-wrap: wrap; gap: .35rem 1rem;
  align-items: baseline;
  padding: .8rem 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.contact-list .label {
  flex: 0 0 8.5rem;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--gold);
}
.contact-list .value { color: #fff; font-size: 1.05rem; font-weight: 500; overflow-wrap: anywhere; }
.contact-list a.value:hover { color: var(--gold); }

.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.contact-social h3 { margin-bottom: .9rem; }
.social-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.social-list a {
  color: #fff; text-decoration: none; font-weight: 500;
  display: inline-block;
  border-bottom: 2px solid rgba(255,255,255,.3);
  padding-bottom: .15rem;
}
.social-list a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy-mut);
  padding-block: 2.5rem;
  border-top: 4px solid var(--gold);
}
.footer-inner { display: grid; gap: 1.75rem; }
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer-legal { grid-column: 1 / -1; }
}
.footer-name { color: #fff; font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; margin: 0 0 .3rem; }
.footer-addr { margin: 0 0 .3rem; font-size: .95rem; }
.footer-tag {
  font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .055em;
  color: var(--gold); margin: 0; font-size: .8rem;
}

.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer-nav a { color: var(--on-navy-mut); text-decoration: none; font-size: .93rem; }
.footer-nav a:hover { color: var(--gold); }

.footer-legal {
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .85rem;
}

/* ---------- header: stacked layout below a single-row fit ----------
   Above 900px the header sits on one row. Below it, brand and the call
   button share row 1 and the nav drops to row 2, which keeps the sticky
   header short instead of letting it wrap to three rows. */
@media (max-width: 900px) {
  .header-inner { justify-content: space-between; row-gap: .45rem; }
  .brand img { height: 50px; }
  .site-nav { order: 3; flex-basis: 100%; margin-inline-start: 0; }
  .site-nav ul { gap: .35rem 1.05rem; }
  .site-nav a { font-size: .9rem; padding-block: .15rem; }
  .header-call { font-size: .92rem; padding: .5rem .9rem; }
}

/* ==================================================================
   TOWN PAGES  (generated by build/generate.js — do not hand-edit those)
   ================================================================== */

.breadcrumb { padding-block: 1rem .25rem; }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem;
  list-style: none; margin: 0; padding: 0;
  font-size: .85rem; color: var(--ink-muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: #AFBBCC; }
/* inline-block + padding so the crumb is a real touch target, not 18px of text */
.breadcrumb a {
  display: inline-block; padding-block: .45rem;
  color: var(--ink-muted); text-decoration: none;
}
.breadcrumb a:hover { color: var(--blue); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--navy); font-weight: 500; }

/* Town hero is shorter than the homepage hero — no long lede, no logo. */
.hero-town { padding-block: clamp(1.9rem, 5vw, 3.4rem); }

/* The town-specific facts. These ARE the differentiators, so they carry real
   visual weight instead of being buried in prose. */
.fact-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}
.fact-list li {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .95rem 1.1rem;
  font-size: .97rem;
}
.section-alt .fact-list li { background: var(--surface); }

/* Pills that contain links (nearby towns, hub children) */
.pill-list li.has-link { padding: 0; }
.pill-list li > a {
  display: block; padding: .45rem .9rem;
  color: var(--blue); text-decoration: none; font-weight: 600;
}
.pill-list li > a:hover { color: var(--blue-dark); text-decoration: underline; }

.es-note { color: var(--on-navy-mut); font-size: .95rem; margin: 0; }
.es-note a { color: #fff; }
.es-note a:hover { color: var(--gold); }

/* ---------- sticky mobile call bar ----------
   Hidden by default; only shown on small screens, where it replaces the
   sticky header. Calling is the conversion on a trades site, so the number
   stays reachable at every scroll position. */
.call-bar { display: none; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .brand img { height: 44px; }

  /* A two-row sticky header costs ~17% of a 375x812 screen. Below 640px the
     header scrolls away and the call bar takes over the persistent CTA. */
  .site-header { position: static; }
  .header-call { display: none; }

  /* 22px nav links were well under a comfortable touch target. */
  .site-nav a { font-size: .9rem; padding-block: .6rem; }
  .site-nav ul { gap: 0 1.15rem; }
  .footer-nav a { display: inline-block; padding-block: .5rem; }

  .hero-actions .btn, .contact-actions .btn { flex: 1 1 100%; }
  .contact-list .label { flex-basis: 100%; }

  .call-bar {
    display: flex; gap: .5rem;
    position: fixed; inset: auto 0 0 0; z-index: 60;
    padding: .55rem .75rem calc(.55rem + env(safe-area-inset-bottom));
    background: var(--navy);
    border-top: 3px solid var(--gold);
  }
  .call-bar .btn { flex: 1 1 0; padding: .7rem .5rem; font-size: .95rem; min-height: 46px; }

  /* keep the call bar from covering the end of the footer */
  body { padding-bottom: 76px; }
}
