/* =========================================================
   Cedarpoint Heating & Cooling — Main Stylesheet
   "Cedar Timberline" design system: pine green + cedarwood sienna,
   timber-plank shape language (sharp/structured, not organic-rounded).
   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 — "Cedar Timberline" ---------- */
:root {
  /* Cedarpoint Heating & Cooling — pine green + cedarwood sienna */
  --color-primary: #1f4d3a;       /* deep pine/teal-forest green */
  --color-primary-dark: #163827;  /* hover / depth */
  --color-secondary: #a0522d;     /* cedarwood sienna accent */
  --color-secondary-dark: #8a4526;
  --color-dark: #241a12;          /* espresso-brown, headings/footer */
  --color-text: #2b241d;          /* warm dark-brown body text */
  --color-text-muted: #675a4c;    /* warm taupe secondary text */
  --color-bg: #faf8f3;            /* soft warm off-white background */
  --color-bg-alt: #eef2ea;        /* pale sage-tinted alt sections */
  --color-border: #ddd6c7;        /* soft warm border */
  --color-success: #2f6b48;       /* call CTA green, distinct from primary */
  --color-star: #a0522d;          /* reserved token, unused (no reviews on this site) */

  --font-heading: "Bitter", "Georgia", serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;

  /* Sharper, structured "timber plank" shape language — deliberately less
     rounded than a soft organic system, evokes cut lumber edges */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 3px rgba(36, 26, 18, 0.10);
  --shadow-md: 0 8px 22px rgba(36, 26, 18, 0.12);
  --shadow-lg: 0 18px 40px rgba(36, 26, 18, 0.16);

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

  --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.18; color: var(--color-dark); }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.5rem); }
h3 { font-size: clamp(1.2rem, 1.5vw + 1rem, 1.5rem); }
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-secondary);
  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: 1000; transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- 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: 700; font-size: 0.95rem; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--color-secondary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-secondary-dark); transform: translateY(-2px); 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: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--block { width: 100%; }

/* ---------- 5. Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900; background: rgba(250,248,243,0.96);
  backdrop-filter: blur(8px); border-bottom: 3px solid var(--color-primary);
  height: var(--header-height);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; 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; color: var(--color-text); transition: color 0.15s; }
.nav__list a:hover, .nav__list a[aria-current="page"] { color: var(--color-secondary); }

.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: var(--header-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-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; }
  .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; }
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; padding-block: var(--space-6);
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  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-secondary); font-weight: 700; margin-bottom: var(--space-1); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.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.85rem; color: var(--color-primary-dark);
  font-weight: 700; background: #fff; border: 1px solid var(--color-border); border-left: 3px solid var(--color-secondary);
  padding: 0.5rem 0.85rem; border-radius: var(--radius-sm);
}
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero__media { border-left: 6px solid var(--color-secondary); border-radius: var(--radius-lg); overflow: hidden; }
.hero__media img { border-radius: 0; }

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

/* ---------- 7. Cards (Services / Features / Reviews) ---------- */
.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); }
}

/* "Timber plank" card: sharp corners, thick left accent border like a cut board edge */
.card {
  background: #fff; border: 1px solid var(--color-border); border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-3); box-shadow: var(--shadow-sm); transition: transform 0.15s ease, box-shadow 0.15s ease, border-left-color 0.15s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-left-color: var(--color-secondary); }
.card__icon {
  width: 52px; height: 52px; 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; font-size: 1.3rem;
}
.card__title { margin-bottom: 0.4rem; }
.card__link { display: inline-block; margin-top: var(--space-2); font-weight: 700; color: var(--color-secondary); }

.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.badge-row img { height: 48px; width: auto; opacity: 0.92; }

/* ---------- 8. 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); }
.why-us__item-icon { flex: none; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* ---------- 9. 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);
  border-left: 3px solid var(--color-secondary);
  padding: 0.5rem 1rem; font-weight: 700; font-size: 0.9rem; color: var(--color-primary-dark);
}

/* ---------- 10. 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.05rem;
  font-family: var(--font-heading);
}
.faq-item__q:hover { color: var(--color-secondary); }
.faq-item__icon { transition: transform 0.2s ease; flex: none; margin-left: var(--space-2); color: var(--color-secondary); }
.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); }

/* ---------- 11. 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); }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; font-size: 0.9rem; 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%;
  background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--color-secondary); outline-offset: 1px; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); border-top: 4px solid var(--color-primary); }
.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); }
.contact-info__icon { flex: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--color-bg-alt); color: var(--color-primary); display: flex; align-items: center; justify-content: center; }

/* ---------- 12. CTA Band ---------- */
.cta-band { background: var(--color-primary); color: #fff; text-align: center; padding-block: var(--space-5); position: relative; }
.cta-band::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--color-secondary); }
.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); }
.cta-band .btn--call { background: var(--color-secondary); }

/* ---------- 13. Footer ---------- */
.site-footer { background: var(--color-dark); color: #d9d0c3; padding-block: var(--space-6) var(--space-3); border-top: 6px solid var(--color-secondary); }
.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-family: var(--font-heading); font-size: 1rem; margin-bottom: var(--space-2); }
.footer__list li { margin-bottom: 0.5rem; }
.footer__list a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.14); 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;
}
.social-links { display: flex; gap: 0.75rem; }
.social-links a { width: 38px; height: 38px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.social-links a:hover { background: var(--color-secondary); }

/* ---------- 14. 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.9rem;
}
.floating-btn--call { background: var(--color-success); color: #fff; }
.floating-btn--quote { background: var(--color-secondary); color: #fff; }

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

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

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

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