/* =========================================================
   Westbrook Heating & Air — Main Stylesheet
   Design direction: "Modern Corporate Navy"
   Deep indigo-navy palette, structured grid, minimal shadows,
   small consistent border-radius, corporate/professional tone.
   Mobile-first, performance-conscious, accessible.
   ========================================================= */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100svh; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; }

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

/* ---------- 2. Design Tokens ---------- */
:root {
  /* Westbrook Heating & Air — Modern Corporate Navy palette */
  --color-primary: #312e81;       /* deep indigo-navy */
  --color-primary-dark: #1e1b4b;  /* darker indigo-navy, hover / utility bar */
  --color-secondary: #475569;     /* cool steel-gray */
  --color-dark: #181635;          /* near-black navy, headings / footer */
  --color-text: #1f2733;
  --color-text-muted: #52596b;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f5f9;
  --color-border: #e0e2ea;
  --color-success: #166534;       /* call CTA green, verified ≥4.5:1 on white text */
  --color-star: #ffb400;

  --font-heading: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  /* small, consistent, "professional corporate" radius scale — never sharp, never heavily rounded */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;

  /* minimal shadow language */
  --shadow-sm: 0 1px 2px rgba(15, 15, 35, 0.06);
  --shadow-md: 0 2px 10px rgba(15, 15, 35, 0.08);
  --shadow-lg: 0 6px 20px rgba(15, 15, 35, 0.10);

  --container-width: 1200px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --utility-bar-height: 40px;
  --header-height: 76px;
}

/* ---------- 3. Base Typography ---------- */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.22; color: var(--color-dark); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.2vw + 1rem, 2.3rem); }
h3 { font-size: clamp(1.1rem, 1.3vw + 1rem, 1.35rem); }
p { color: var(--color-text-muted); }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section { padding-block: var(--space-6); }
.section--alt { background: var(--color-bg-alt); }
.section__head { max-width: 720px; margin-bottom: var(--space-5); }
.eyebrow {
  display: inline-block;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  margin-bottom: var(--space-1);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 0; top: -60px; background: var(--color-primary); color: #fff;
  padding: 0.75rem 1.25rem; z-index: 1100; transition: top 0.2s ease; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* Visible, consistent focus styling (never removed) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.btn--secondary { background: #fff; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn--secondary:hover { background: var(--color-bg-alt); }
.btn--call { background: var(--color-success); color: #fff; }
.btn--call:hover { background: #14532d; }
.btn--block { width: 100%; }

/* ---------- 5. Utility Bar (above main header) ---------- */
.utility-bar {
  background: var(--color-primary-dark);
  color: #e7e6f5;
  font-size: 0.83rem;
}
.utility-bar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--utility-bar-height);
  gap: var(--space-2);
}
.utility-bar__item { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.utility-bar__item a { color: #ffffff; font-weight: 600; }
.utility-bar__item a:hover { text-decoration: underline; }
.utility-bar__sep { opacity: 0.5; }
.utility-bar__areas { display: none; color: #c7c6e8; }

@media (min-width: 760px) {
  .utility-bar__areas { display: inline; }
}

/* ---------- 6. Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900; background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 0.65rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: var(--color-dark); }
.brand img { height: 40px; width: auto; }

.nav { display: none; }
.nav__list { display: flex; gap: var(--space-4); align-items: center; }
.nav__list a { font-weight: 600; font-size: 0.94rem; color: var(--color-text); transition: color 0.15s; position: relative; }
.nav__list a:hover, .nav__list a[aria-current="page"] { color: var(--color-primary); }

.header__cta { display: flex; align-items: center; gap: var(--space-2); }
.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; padding: 0.5rem; }
.nav-toggle span { width: 24px; height: 2px; background: var(--color-dark); border-radius: 2px; }

.mobile-nav {
  position: fixed; inset: calc(var(--header-height) + var(--utility-bar-height)) 0 0 0; background: #fff; z-index: 899;
  transform: translateY(-110%); transition: transform 0.25s ease; overflow-y: auto;
}
.mobile-nav.is-open { transform: translateY(0); }
.mobile-nav__list { display: flex; flex-direction: column; padding: var(--space-3); gap: var(--space-1); }
.mobile-nav__list a { display: block; padding: 0.85rem 0.5rem; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--color-border); }

@media (max-width: 959px) {
  .site-header { height: auto; min-height: var(--header-height); padding-block: 0.6rem; }
  .mobile-nav { inset: auto 0 0 0; top: unset; }
  .brand { font-size: 1rem; }
  .header__cta .btn--call,
  .header__cta .btn--primary { display: none; }
}

@media (min-width: 960px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* recompute mobile-nav offset with JS-free CSS var fallback: header is auto-height on mobile,
   so anchor mobile-nav just under the fixed header via top offset determined at runtime by browser flow */
@media (max-width: 959px) {
  .mobile-nav { position: fixed; top: 0; inset-inline: 0; bottom: 0; padding-top: calc(var(--utility-bar-height) + 64px); }
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative; padding-block: var(--space-6);
  background: linear-gradient(160deg, var(--color-bg-alt) 0%, #fff 55%);
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}
.hero__inner { display: grid; gap: var(--space-5); align-items: center; }
.hero__eyebrow { color: var(--color-primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: var(--space-1); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.hero__trust { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.hero__trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--color-secondary); font-weight: 700; }
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); }

@media (min-width: 960px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; }
}

/* ---------- 8. Trust Chips (rectangular, corporate badge feel) ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 0.55rem 1rem; font-weight: 700; font-size: 0.85rem; color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.trust-chip__dot { width: 6px; height: 6px; border-radius: 1px; background: var(--color-primary); flex: none; }

/* ---------- 9. Cards (Services / Features) ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-3); box-shadow: var(--shadow-sm); transition: box-shadow 0.15s ease, border-color 0.15s ease;
  height: 100%;
  border-top: 3px solid var(--color-primary);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.card__icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--color-bg-alt);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-2);
  color: var(--color-primary); font-family: var(--font-heading); font-weight: 700;
}
.card__title { margin-bottom: 0.4rem; }
.card__link { display: inline-block; margin-top: var(--space-2); font-weight: 700; color: var(--color-primary); }

/* ---------- 10. Owner / Trust Card (About section) ---------- */
.owner-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.owner-card img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.owner-card__body { padding: var(--space-3); border-top: 3px solid var(--color-primary); }
.owner-card__name { font-family: var(--font-heading); font-weight: 700; color: var(--color-dark); font-size: 1.05rem; }
.owner-card__role { color: var(--color-secondary); font-weight: 600; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- 11. Why Choose Us ---------- */
.why-us__list { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .why-us__list { grid-template-columns: repeat(2, 1fr); } }
.why-us__item {
  display: flex; gap: var(--space-2); background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-3); box-shadow: var(--shadow-sm);
}
.why-us__item-icon {
  flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--color-primary);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ---------- 12. Service Areas ---------- */
.areas__list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.areas__list li {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem; font-weight: 700; font-size: 0.88rem; color: var(--color-dark);
  box-shadow: var(--shadow-sm);
}

/* ---------- 13. FAQ ---------- */
.faq { max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-2) 0; text-align: left; font-weight: 700; color: var(--color-dark); font-size: 1.02rem;
  font-family: var(--font-heading);
}
.faq-item__icon { transition: transform 0.2s ease; flex: none; margin-left: var(--space-2); color: var(--color-primary); }
.faq-item[data-open="true"] .faq-item__icon { transform: rotate(45deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-item__a-inner { padding-bottom: var(--space-2); }

/* ---------- 14. Contact / Map ---------- */
.contact__grid { display: grid; gap: var(--space-4); }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 1fr 1fr; } }
.contact-form { display: grid; gap: var(--space-2); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3); box-shadow: var(--shadow-sm); }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; font-size: 0.88rem; color: var(--color-dark); }
.field input, .field textarea, .field select {
  padding: 0.8rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); }
.map-embed iframe { width: 100%; height: 100%; min-height: 360px; border: 0; }

.contact-info__item { display: flex; gap: var(--space-2); align-items: flex-start; margin-bottom: var(--space-2); }

/* ---------- 15. CTA Band ---------- */
.cta-band { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%); color: #fff; text-align: center; padding-block: var(--space-5); }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-3); }
.cta-band .btn--secondary { background: #fff; border-color: #fff; color: var(--color-primary); }

/* ---------- 16. Footer (structured multi-column, corporate) ---------- */
.site-footer { background: var(--color-dark); color: #c6c8d6; padding-block: var(--space-6) var(--space-3); border-top: 3px solid var(--color-primary); }
.footer__grid { display: grid; gap: var(--space-4); }
@media (min-width: 760px) { .footer__grid { grid-template-columns: repeat(4, 1fr); } }
.footer__heading { color: #fff; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-2); }
.footer__list li { margin-bottom: 0.55rem; font-size: 0.92rem; }
.footer__list a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--space-5); padding-top: var(--space-3);
  display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between; font-size: 0.83rem;
}

/* ---------- 17. Floating Buttons ---------- */
.floating-actions { position: fixed; right: var(--space-2); bottom: var(--space-2); z-index: 950; display: flex; flex-direction: column; gap: 0.6rem; }
.floating-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.9rem 1.1rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-weight: 700; font-size: 0.88rem;
}
.floating-btn--call { background: var(--color-success); color: #fff; }
.floating-btn--quote { background: var(--color-primary); color: #fff; }

@media (min-width: 960px) {
  .floating-actions { display: none; } /* desktop uses header CTA */
}

/* ---------- 18. Breadcrumb ---------- */
.breadcrumb { padding-block: var(--space-2); font-size: 0.85rem; color: var(--color-text-muted); }
.breadcrumb a { color: var(--color-primary); font-weight: 600; }
.breadcrumb__sep { margin-inline: 0.4rem; }

/* ---------- 19. Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }

/* ---------- 20. Print ---------- */
@media print {
  .site-header, .utility-bar, .floating-actions, .site-footer, .mobile-nav { display: none; }
}
