/* =========================================================
   Everline Heating & Air — Main Stylesheet
   Design direction: "Editorial Bold" — near-black/white base,
   sparing emerald accent, serif display type, thin rule dividers
   instead of boxed cards, asymmetric magazine-style layout.
   Mobile-first, performance-conscious, accessible (WCAG 2.1 AA).
   ========================================================= */

/* ---------- 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 {
  /* Everline Heating & Air — Editorial Bold: near-black/white base, sparing emerald accent */
  --color-primary: #111827;
  --color-primary-dark: #030712;
  --color-secondary: #059669;
  --color-dark: #030712;
  --color-text: #111827;
  --color-text-muted: #4b5563;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f5f2;
  --color-border: #e0ddd6;
  --color-success: #047857;
  --color-star: #b45309;

  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Shape language: sharp corners, no drop shadows by default */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

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

  --header-height: 84px;
}

/* ---------- 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.08; color: var(--color-primary); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.75rem, 5vw + 1rem, 5.25rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 3vw + 1rem, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 1.5vw + 1rem, 1.55rem); font-weight: 600; }
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-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--color-secondary);
}

.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: 1000; transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- 4. Buttons (sharp corners, no shadow) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 2rem; border-radius: 0;
  font-weight: 700; font-size: 0.92rem; letter-spacing: 0.02em;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap; border: 2px solid transparent;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--secondary { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn--secondary:hover { background: var(--color-primary); color: #fff; }
.btn--call { background: var(--color-success); color: #fff; }
.btn--call:hover { background: #036049; }
.btn--block { width: 100%; }

/* ---------- 5. Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900; background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--color-primary); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: var(--space-3); }
.brand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; color: var(--color-primary); }
.brand img { height: 38px; 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.88rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-text); transition: color 0.15s; position: relative; padding-bottom: 4px;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--color-secondary); transition: right 0.2s ease;
}
.nav__list a:hover { color: var(--color-primary); }
.nav__list a:hover::after { right: 0; }

.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: 26px; height: 2px; background: var(--color-primary); }

.mobile-nav {
  position: fixed; inset: var(--header-height) 0 0 0; background: var(--color-primary-dark); 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: 1rem 0.5rem; font-family: var(--font-heading); font-size: 1.4rem; font-weight: 600;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,0.15);
}

@media (max-width: 959px) {
  .site-header { height: auto; min-height: var(--header-height); padding-block: 0.6rem; }
  .brand { font-size: 1.05rem; }
  .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; }
}

/* ---------- 6. Hero (asymmetric editorial layout) ---------- */
.hero {
  position: relative; padding-block: var(--space-6) var(--space-5);
  background: var(--color-bg);
  overflow: hidden;
}
.hero__inner { display: grid; gap: var(--space-5); align-items: start; position: relative; }
.hero__eyebrow { color: var(--color-primary); font-weight: 700; margin-bottom: var(--space-2); }
.hero h1 { max-width: 14ch; }
.hero__lede { max-width: 46ch; font-size: 1.1rem; margin-top: var(--space-3); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.hero__trust { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-5); font-size: 0.88rem; color: var(--color-text-muted); font-weight: 600; }
.hero__trust-item { display: inline-flex; align-items: center; }
.hero__trust-sep { color: var(--color-secondary); font-weight: 400; padding-inline: var(--space-2); }

.hero__media { position: relative; }
.hero__media img { width: 100%; height: auto; }
.hero__media-tag {
  position: absolute; left: -1px; bottom: -1px; background: var(--color-primary-dark); color: #fff;
  padding: 0.6rem 1.1rem; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  border-left: 3px solid var(--color-secondary);
}

@media (min-width: 960px) {
  .hero__inner { grid-template-columns: 1.15fr 0.85fr; }
  .hero__media { margin-top: 3.5rem; }
}

/* ---------- 7. Trust chips (plain text, thin vertical rule — no pills) ---------- */
.trust-strip { padding-block: var(--space-3); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.trust-strip__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0; row-gap: var(--space-1); font-weight: 600; font-size: 0.92rem; color: var(--color-primary); }
.trust-strip__item { padding-inline: var(--space-3); }
.trust-strip__item:first-child { padding-left: 0; }
.trust-strip__sep { color: var(--color-secondary); font-weight: 400; }

/* ---------- 8. Rule dividers (replace boxed cards between blocks) ---------- */
.hr-rule { border: none; border-top: 1px solid var(--color-border); margin-block: var(--space-5); }
.hr-rule--tight { margin-block: var(--space-3); }

/* ---------- 9. Grid / Services (sharp, borderless cards; huge faint numerals) ---------- */
.grid { display: grid; gap: 0; }
.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--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 {
  position: relative;
  background: transparent;
  border: none;
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-3) var(--space-3) 0;
  overflow: hidden;
  height: 100%;
}
.grid--3 .card { border-right: 1px solid var(--color-border); padding-right: var(--space-3); }
.grid--3 .card:last-child { border-right: none; }
@media (max-width: 959px) { .grid--3 .card { border-right: none; padding-right: 0; } }

.card__num {
  position: absolute; top: -0.35em; right: 0.1em; font-family: var(--font-heading);
  font-size: 6.5rem; font-weight: 900; color: var(--color-bg-alt); line-height: 1;
  z-index: 0; user-select: none; pointer-events: none;
}
.section--alt .card__num { color: rgba(17,24,39,0.05); }
.card__title { margin-bottom: 0.5rem; position: relative; z-index: 1; }
.card p, .card ul { position: relative; z-index: 1; }
.card__list { display: flex; flex-direction: column; gap: 0.35rem; margin-top: var(--space-2); }
.card__list li { font-size: 0.92rem; color: var(--color-text-muted); }
.card__list li::before { content: "\2014  "; color: var(--color-secondary); font-weight: 700; }

.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---------- 10. About / Owner card ---------- */
.about__grid { display: grid; gap: var(--space-5); }
@media (min-width: 960px) { .about__grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; } }
.owner-card__frame { border: 1px solid var(--color-border); }
.owner-card__frame img { width: 100%; }

/* ---------- 11. Why Choose Us (numbered list, rule dividers, no icon badges) ---------- */
.why-us__list { display: flex; flex-direction: column; }
.why-us__item { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: baseline; padding-block: var(--space-3); border-top: 1px solid var(--color-border); }
.why-us__item:last-child { border-bottom: 1px solid var(--color-border); }
.why-us__item-num { font-family: var(--font-heading); font-weight: 900; font-size: 2.75rem; color: var(--color-bg-alt); line-height: 1; }
.section--alt .why-us__item-num { color: rgba(17,24,39,0.06); }
.why-us__item h3 { margin-bottom: 0.35rem; }

/* ---------- 12. Service Areas (plain text list w/ thin rule separators) ---------- */
.areas__list { display: flex; flex-wrap: wrap; }
.areas__list li {
  font-weight: 700; font-family: var(--font-heading); font-size: 1.15rem; color: var(--color-primary);
  padding: 0.6rem 1.4rem 0.6rem 0; margin-right: 1.4rem; border-bottom: 2px solid var(--color-border);
  flex: 1 1 200px;
}

/* ---------- 13. FAQ (rule dividers, serif question) ---------- */
.faq { max-width: 840px; }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:first-child { border-top: 1px solid var(--color-border); }
.faq-item__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-3) 0; text-align: left; font-family: var(--font-heading); font-weight: 700; color: var(--color-primary); font-size: 1.2rem;
}
.faq-item__icon { transition: transform 0.2s ease; flex: none; margin-left: var(--space-2); color: var(--color-secondary); font-weight: 700; font-size: 1.4rem; }
.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-3); max-width: 68ch; }

/* ---------- 14. Contact / Map (underline-style inputs) ---------- */
.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-3); }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-primary); }
.field input, .field textarea, .field select {
  padding: 0.75rem 0; border: none; border-bottom: 2px solid var(--color-border); border-radius: 0; width: 100%;
  background: transparent; color: var(--color-text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--color-primary); }
.map-embed { border: 1px solid var(--color-border); overflow: hidden; }
.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); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border); }
.contact-info__item:last-of-type { border-bottom: none; }
.contact-info__icon { color: var(--color-secondary); flex: none; font-weight: 700; }

/* ---------- 15. CTA Band ---------- */
.cta-band { background: var(--color-primary-dark); color: #fff; text-align: center; padding-block: var(--space-6); position: relative; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band p { color: #d1d5db; max-width: 50ch; margin-inline: auto; margin-top: var(--space-2); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-4); }
.cta-band .btn--secondary { color: #fff; border-color: #fff; }
.cta-band .btn--secondary:hover { background: #fff; color: var(--color-primary-dark); }

/* ---------- 16. Footer ---------- */
.site-footer { background: var(--color-primary-dark); color: #9ca3af; padding-block: var(--space-6) var(--space-3); }
.footer__grid { display: grid; gap: var(--space-4); }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer__grid > div { padding-top: var(--space-3); border-top: 1px solid rgba(255,255,255,0.15); }
.footer__heading { color: #fff; font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: var(--space-2); }
.footer__list li { margin-bottom: 0.6rem; }
.footer__list a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15); 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.85rem;
}
.footer__bottom a:hover { color: #fff; }

/* ---------- 17. Floating Buttons (mobile) ---------- */
.floating-actions { position: fixed; right: var(--space-2); bottom: var(--space-2); z-index: 950; display: flex; flex-direction: column; gap: 0.5rem; }
.floating-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.9rem 1.2rem; border-radius: 0;
  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; color: var(--color-secondary); }

/* ---------- 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, .floating-actions, .site-footer, .mobile-nav { display: none; }
}
