/* ========================================================
   Exeter Heating & Cooling — stylesheet
   ======================================================== */

:root {
  --navy: #14324A;
  --navy-dark: #0E2436;
  --rust: #C1521B;
  --rust-dark: #9F4315;
  --sky: #3E8FB0;
  --bg: #F6F7F5;
  --bg-alt: #ECEFEA;
  --ink: #1B242C;
  --ink-soft: #4A5560;
  --line: #D7DCD6;
  --radius: 4px;
  --max: 1120px;
  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4.5vw, 2.85rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }

a { color: var(--sky); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.logo span { color: var(--rust); }

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  row-gap: 10px;
}

nav.primary-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

nav.primary-nav a:hover { color: var(--rust); }

nav.primary-nav a.active {
  color: var(--rust);
  font-weight: 600;
  border-bottom: 2px solid var(--rust);
  padding-bottom: 2px;
}

.call-btn {
  background: var(--rust);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}

.call-btn:hover { background: var(--rust-dark); }

.lang-switch {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--navy) !important;
  text-decoration: none;
}
.lang-switch:hover { border-color: var(--rust); color: var(--rust) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 1.1rem;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(62,143,176,0.18) 0%, rgba(62,143,176,0) 70%);
  pointer-events: none;
}

.hero h1 { color: #fff; position: relative; z-index: 1; }

.hero p.lede {
  color: #C9D4DB;
  font-size: 1.1rem;
  max-width: 56ch;
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { background: var(--rust-dark); }

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
}
.btn-secondary:hover { border-color: #fff; }

/* ---------- Mini contact card in hero ---------- */
.hero-form {
  background: #fff;
  color: var(--ink);
  padding: 24px;
  border-radius: var(--radius);
}

.hero-form h3 { margin-bottom: 4px; }
.hero-form p { font-size: 0.9rem; margin-bottom: 16px; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }

.section-head { max-width: 62ch; margin-bottom: 32px; }

hr.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ---------- Service blocks (alternating) ---------- */
.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px 0;
}

.service-block:not(:last-child) { border-bottom: 1px solid var(--line); }

.service-block.reverse .block-media { order: -1; }

.block-media {
  background: var(--bg-alt);
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  border: 1px solid var(--line);
  padding: 16px;
}

.block-media svg { width: 72px; height: 72px; }

/* ---------- Lists ---------- */
ul.plain { list-style: none; padding: 0; margin: 0 0 1em; }
ul.plain li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--sky);
  border-radius: 50%;
}

/* ---------- Trust strip ---------- */
.trust-strip {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip div {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

/* ---------- FAQ (native details/summary, no JS needed) ---------- */
details.faq {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  font-family: var(--font-heading);
  list-style: none;
}

details.faq summary::-webkit-details-marker { display: none; }

details.faq summary::after {
  content: "+";
  float: right;
  color: var(--rust);
  font-size: 1.2rem;
}

details.faq[open] summary::after { content: "\2212"; }

details.faq p { margin-top: 10px; }

/* ---------- Service area chips ---------- */
.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.area-list span {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--navy);
  font-weight: 500;
}

/* ---------- Map embed ---------- */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Contact form ---------- */
form.lead-form {
  display: grid;
  gap: 14px;
}

form.lead-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

form.lead-form input,
form.lead-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
}

form.lead-form textarea { min-height: 100px; resize: vertical; }

form.lead-form button {
  background: var(--rust);
  color: #fff;
  border: none;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  justify-self: start;
}
form.lead-form button:hover { background: var(--rust-dark); }

.form-note { font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy-dark);
  color: #C9D4DB;
  padding: 40px 0 24px;
  margin-top: 40px;
}

footer.site-footer a { color: #C9D4DB; }
footer.site-footer h3 { color: #fff; font-size: 1rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  font-size: 0.8rem;
  color: #93A2AC;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Mobile sticky call bar ---------- */
.mobile-call-bar {
  display: none;
}

@media (max-width: 680px) {
  .mobile-call-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--rust);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
  }
  .mobile-call-bar svg { width: 18px; height: 18px; flex-shrink: 0; }
  body { padding-bottom: 58px; }
}

/* ---------- Local roots callout ---------- */
.local-roots {
  border-left: 3px solid var(--sky);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
}
.local-roots p { color: var(--ink-soft); font-style: italic; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .service-block, .service-block.reverse { grid-template-columns: 1fr; }
  .service-block.reverse .block-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; padding: 14px 20px; }
}

@media (max-width: 680px) {
  nav.primary-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
    display: none;
  }
  nav.primary-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .footer-grid { grid-template-columns: 1fr; }
  nav.primary-nav .call-btn { display: none; }
}
