/* =============================================================================
   Slate Peak HVAC Solutions — styles.css
   CONFIG: brand tokens live in :root. Update colors, spacing, and header
   height here if the visual system changes.
   ============================================================================= */

:root {
  --slate: #263640;
  --slate-800: #1b282f;
  --slate-600: #3a4e5a;
  --slate-400: #5c7380;
  --cyan: #00d4e8;
  --cyan-dark: #00a8b8;
  --coral: #ff6542;
  --coral-dark: #e14e2c;
  --ice: #f4fafb;
  --white: #ffffff;
  --line: #d7e8ec;
  --text: #24343c;
  --text-muted: #4a5f6a;
  --focus: #00d4e8;
  --shadow: 0 10px 28px rgba(38, 54, 64, 0.12);
  --shadow-sm: 0 4px 14px rgba(38, 54, 64, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 4.5rem;
  --max: 1200px;
  --gutter: clamp(1rem, 3vw, 1.75rem);
  --font-display: "Plus Jakarta Sans", system-ui, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", system-ui, "Segoe UI", sans-serif;
  --peak: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html:focus-within {
  scroll-behavior: auto;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.3vw + 1rem, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--ice);
  min-height: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--cyan-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--slate);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--slate);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 1000;
  background: var(--coral);
  color: var(--white);
  padding: 0.65rem 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

.container {
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.section {
  padding: clamp(3rem, 6vw, 5.25rem) 0;
  scroll-margin-top: calc(var(--header-h) + 0.85rem);
}

.section-ice {
  background: var(--ice);
}

.section-white {
  background: var(--white);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.55rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 42rem;
}

/* Geometric ridge divider used between some bands */
.ridge {
  height: 12px;
  background: linear-gradient(90deg, var(--cyan) 0 42%, var(--coral) 58% 100%);
  clip-path: polygon(0 100%, 8% 0, 50% 70%, 92% 0, 100% 100%);
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.btn-primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(255, 101, 66, 0.28);
}

.btn-primary:hover {
  background: var(--coral-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--white);
  color: var(--slate);
  border-color: var(--slate);
}

.btn-secondary:hover {
  background: var(--slate);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-cyan {
  background: var(--cyan);
  color: var(--slate-800);
  box-shadow: 0 8px 18px rgba(0, 212, 232, 0.25);
}

.btn-cyan:hover {
  background: var(--cyan-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--slate);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}

.text-link {
  font-weight: 700;
  color: var(--slate);
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--slate);
  color: var(--white);
  min-height: var(--header-h);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--cyan), var(--coral)) 1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo-link {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.logo-link img {
  height: clamp(36px, 6vw, 52px);
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.55rem 0.55rem;
  border-radius: 6px;
  position: relative;
}

.nav-list a:hover,
.nav-list a[aria-current="true"] {
  color: var(--cyan);
}

.nav-list a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.2rem;
  height: 2px;
  background: var(--coral);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.header-phone {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  margin: 0 auto;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -7px;
}

.menu-toggle span::after {
  top: 7px;
}

.menu-toggle[aria-expanded="true"] span {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  background: linear-gradient(165deg, var(--slate-800) 0%, var(--slate) 62%, #1f3a44 100%);
  color: var(--white);
  overflow: hidden;
  padding: clamp(2.4rem, 6vw, 4.8rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -8% -18% 40%;
  height: 70%;
  background: linear-gradient(135deg, rgba(0, 212, 232, 0.14), rgba(255, 101, 66, 0.18));
  clip-path: polygon(18% 0, 100% 12%, 82% 100%, 0 78%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  color: var(--white);
  max-width: 16ch;
}

.hero p {
  color: #d7ecef;
  max-width: 38rem;
}

.hero-image-wrap {
  position: relative;
}

.hero-image-wrap img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  clip-path: polygon(8% 0, 100% 0, 100% 86%, 92% 100%, 0 100%, 0 12%);
  box-shadow: var(--shadow);
}

.hero-caption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #b7cdd3;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding: 0;
  list-style: none;
}

.hero-pills li {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 212, 232, 0.35);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

/* ----- Benefits strip ----- */
.benefits {
  background: var(--white);
  padding: 0;
  margin-top: -1.6rem;
  position: relative;
  z-index: 2;
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  border: 1px solid var(--line);
}

.benefit {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
}

.benefit svg {
  width: 44px;
  height: 44px;
}

.benefit strong {
  display: block;
  font-family: var(--font-display);
  color: var(--slate);
  font-size: 0.98rem;
}

.benefit span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ----- About ----- */
.about-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 86% 100%, 0 100%);
  box-shadow: var(--shadow);
}

.section-media {
  margin: 1.25rem 0 1.6rem;
}

.section-media img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.photo-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ----- Why choose us ----- */
.why-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.why-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 40%;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--coral));
}

.why-card svg {
  width: 36px;
  height: 36px;
  margin-bottom: 0.65rem;
}

.why-card p {
  color: var(--text-muted);
  margin: 0;
}

/* ----- Services ----- */
.service-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.service-card {
  background: var(--ice);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

a.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: inherit;
}

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  background: var(--slate);
}

.icon-tile svg {
  width: 30px;
  height: 30px;
}

.service-card p {
  color: var(--text-muted);
  flex: 1;
}

.card-link {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--coral);
  text-decoration: none;
  margin-top: 0.35rem;
}

.service-details {
  display: grid;
  gap: 1.1rem;
  margin-top: 2.4rem;
}

.service-article {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--cyan);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.2rem;
  scroll-margin-top: calc(var(--header-h) + 0.85rem);
}

.service-article:nth-child(even) {
  border-left-color: var(--coral);
}

.service-article p:last-of-type {
  margin-bottom: 0.5rem;
}

.service-media {
  margin: 1rem 0;
}

.service-media img {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ----- CTA bands ----- */
.cta-band {
  background: var(--slate);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  width: 48%;
  height: 140%;
  right: -8%;
  top: -20%;
  background: linear-gradient(160deg, rgba(0, 212, 232, 0.16), rgba(255, 101, 66, 0.22));
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.cta-band .container {
  position: relative;
  z-index: 1;
}

.cta-band h2,
.cta-band p {
  color: var(--white);
  max-width: 40rem;
}

.final-cta {
  background: linear-gradient(135deg, var(--slate-800), var(--slate) 50%, #2a4550);
  text-align: center;
}

.final-cta h2,
.final-cta p {
  color: var(--white);
  margin-inline: auto;
}

.final-cta .btn-row {
  justify-content: center;
}

/* ----- Service area / map ----- */
.area-layout {
  display: grid;
  gap: 1.5rem;
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.area-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-weight: 600;
  color: var(--slate);
  font-size: 0.92rem;
}

.map-shell {
  min-height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #dce8eb;
}

#service-map {
  height: 380px;
  width: 100%;
}

.map-fallback {
  padding: 1.25rem;
}

.caveat {
  font-size: 0.95rem;
  color: var(--text-muted);
}

address {
  font-style: normal;
  font-weight: 700;
  color: var(--slate);
}

/* ----- FAQ ----- */
.faq-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: calc(var(--header-h) + 0.85rem);
}

.faq-item h3 {
  margin: 0;
}

.faq-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate);
  padding: 1rem 3rem 1rem 1.15rem;
  min-height: 52px;
  position: relative;
}

.faq-trigger::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--coral);
  border-bottom: 2px solid var(--coral);
  transform: translateY(-70%) rotate(45deg);
}

.faq-item.is-open .faq-trigger::after {
  transform: translateY(-30%) rotate(225deg);
}

.faq-panel {
  padding: 0 1.15rem 1.05rem;
  color: var(--text-muted);
}

.js .faq-panel {
  display: none;
}

.js .faq-item.is-open .faq-panel {
  display: block;
}

/* ----- Contact / form ----- */
.contact-grid {
  display: grid;
  gap: 1.75rem;
}

.contact-card {
  background: var(--ice);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
}

.contact-card a {
  color: var(--slate);
  font-weight: 700;
  text-decoration: none;
}

.contact-card a:hover {
  color: var(--coral);
}

.lead-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 0.35rem;
}

.req {
  color: var(--coral);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid #c5d5da;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font: inherit;
  background: var(--white);
  color: var(--text);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.consent input:focus {
  border-color: var(--cyan-dark);
}

.field.error input,
.field.error textarea {
  border-color: var(--coral);
}

.field-error {
  display: none;
  color: #b42318;
  font-size: 0.88rem;
  margin-top: 0.3rem;
}

.field.error .field-error {
  display: block;
}

.consent-wrap.error .field-error {
  display: block;
  margin: 0 0 0.75rem;
}

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.65rem;
  align-items: start;
  margin: 0.5rem 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.consent input {
  width: 22px;
  height: 22px;
  margin-top: 0.15rem;
  accent-color: var(--coral);
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.form-status {
  min-height: 1.4rem;
  margin: 0.6rem 0 0;
  font-weight: 700;
}

.form-status.error {
  color: #b42318;
}

.form-status.success {
  color: #1b6b4a;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--slate-800);
  color: #d5e4e8;
  padding: 2.5rem 0 6.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.site-footer a {
  color: var(--cyan);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.disclaimer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #b7c6cb;
}

/* ----- Floating call ----- */
.float-call {
  display: none;
}

/* ----- Reveal ----- */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 280ms ease, transform 280ms ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  a.service-card:hover {
    transform: none;
  }
}

/* ----- Breakpoints ----- */
@media (min-width: 640px) {
  .benefits-grid {
    grid-template-columns: 1fr 1fr;
    padding: 1.1rem;
  }

  .why-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .hero-grid,
  .about-grid,
  .area-layout,
  .contact-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .why-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

@media (max-width: 999px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-phone,
  .header-cta {
    display: none;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--slate-800);
    padding: 0.75rem 1rem 1.25rem;
    transform: translateY(-120%);
    visibility: hidden;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    transform: none;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list a {
    display: block;
    padding: 0.85rem 0.75rem;
    font-size: 1.05rem;
    min-height: 44px;
  }

  .float-call {
    display: inline-flex;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 30;
    min-height: 48px;
    padding: 0.7rem 1.1rem;
    background: var(--coral);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(255, 101, 66, 0.35);
  }

  .float-call:hover {
    color: var(--white);
    background: var(--coral-dark);
  }

  body {
    padding-bottom: 0.5rem;
  }
}

@media (min-width: 1000px) {
  .header-inner {
    gap: 1.25rem;
  }
}
