/* =========================================================
   Granite Peak HVAC Services — Main Stylesheet
   Design: "Cool Stone & Alpine Ice Blue"
   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.5; -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: Cool Stone & Alpine Ice Blue ---------- */
:root {
  --color-primary: #0369a1;        /* alpine ice blue — sky-700, ~5.9:1 on white */
  --color-primary-dark: #075985;   /* sky-800 */
  --color-accent: #0ea5e9;         /* sky-500, background/icon accent only */
  --color-accent-light: #7dd3fc;   /* sky-300, icy highlight */
  --color-secondary: #334155;      /* cool slate — secondary CTA accent */
  --color-dark: #0f172a;           /* stone-900, headings/footer */
  --color-text: #1e293b;           /* slate-800 */
  --color-text-muted: #475569;     /* slate-600, ~7.6:1 on white */
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;         /* stone-50 */
  --color-bg-stone: #eef2f6;       /* deeper stone tint for banded sections */
  --color-border: #e2e8f0;         /* slate-200 */
  --color-success: #15803d;        /* call CTA green, ~5.3:1 on white w/ white text */

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

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 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.15; color: var(--color-dark); }
h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem); }
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--stone { background: var(--color-bg-stone); }
.section__head { max-width: 720px; margin-bottom: var(--space-5); }
.section__head--center { max-width: 640px; margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  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-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-primary-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--on-dark { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.btn--on-dark:hover { background: rgba(255,255,255,0.12); }
.btn--call { background: var(--color-success); color: #fff; }
.btn--call:hover { background: #14652f; 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(255,255,255,0.97);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border);
  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-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: 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 (banner-style, mountain-skyline graphic — no photo) ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, #0c4a6e 0%, var(--color-primary) 55%, #0c78b8 100%);
  overflow: hidden;
  padding-block: var(--space-6) 0;
}
.hero__inner {
  position: relative; z-index: 2;
  max-width: 780px; margin-inline: auto; text-align: center;
  padding-bottom: var(--space-5);
}
.hero__eyebrow { color: var(--color-accent-light); font-weight: 700; letter-spacing: 0.06em; margin-bottom: var(--space-2); text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { color: #fff; }
.hero__inner > p { color: rgba(255,255,255,0.88); font-size: 1.1rem; max-width: 620px; margin-inline: auto; margin-top: var(--space-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); justify-content: center; }
.hero__trust { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); justify-content: center; }
.hero__trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: rgba(255,255,255,0.9); font-weight: 600; }

.hero__skyline { position: relative; z-index: 1; line-height: 0; }
.hero__skyline svg { width: 100%; height: auto; display: block; }

@media (min-width: 960px) {
  .hero__inner { padding-bottom: var(--space-6); }
}

/* ---------- 7. Stat Strip (honest trust points, not fabricated badges) ---------- */
.stat-strip { padding-block: var(--space-4); background: var(--color-dark); }
.stat-strip__grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr; text-align: center; }
@media (min-width: 640px) { .stat-strip__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .stat-strip__grid { grid-template-columns: repeat(4, 1fr); } }
.stat-strip__item { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; color: #fff; }
.stat-strip__icon { width: 40px; height: 40px; color: var(--color-accent-light); }
.stat-strip__label { font-weight: 700; font-size: 0.95rem; }

/* ---------- 8. Value cards (About section — icon cards, no team photo) ---------- */
.value-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 560px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
.value-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-3); box-shadow: var(--shadow-sm);
}
.value-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);
}
.value-card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.value-card p { font-size: 0.92rem; }

/* ---------- 9. Cards (Services) ---------- */
.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: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%; border-top: 3px solid var(--color-accent);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.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: 600; color: var(--color-primary); }

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

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

/* ---------- 11. Process (new section — how service works) ---------- */
.process { display: grid; gap: var(--space-4); grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .process { grid-template-columns: repeat(4, 1fr); } }
.process__step { position: relative; padding-top: var(--space-2); }
.process__num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-primary); color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem;
  margin-bottom: var(--space-2);
}
.process__step h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.process__step p { font-size: 0.92rem; }
.process__connector {
  display: none;
}
@media (min-width: 760px) {
  .process__step:not(:last-child)::after {
    content: ""; position: absolute; top: 24px; left: calc(50% + 44px); width: calc(100% - 44px);
    border-top: 2px dashed var(--color-border);
  }
}

/* ---------- 12. Service Areas ---------- */
.areas__list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.areas__list li {
  background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 999px;
  padding: 0.5rem 1rem; font-weight: 600; font-size: 0.9rem; color: var(--color-text);
}

/* ---------- 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.05rem;
}
.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); }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.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; color: var(--color-text);
}
.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); }
.contact-info__icon { flex: none; width: 22px; height: 22px; color: var(--color-primary); margin-top: 2px; }

/* ---------- 15. CTA Band (textured, mountain-line motif) ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--color-dark); color: #fff; text-align: center; padding-block: var(--space-5);
}
.cta-band__pattern { position: absolute; inset: 0; opacity: 0.5; z-index: 0; }
.cta-band__pattern svg { width: 100%; height: 100%; }
.cta-band__content { position: relative; z-index: 1; }
.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; }

/* ---------- 16. Footer ---------- */
.site-footer { background: var(--color-dark); color: #cbd3df; 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: repeat(4, 1fr); } }
.footer__heading { color: #fff; 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.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.85rem;
}
.social-links { display: flex; gap: 0.75rem; }
.social-links a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; }
.social-links a:hover { background: var(--color-primary); }

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