/* =========================================================================
   Affordable HVAC — front-end styles
   Palette: Forest #1E4B38 · Leaf #3E8E5F · Sage #8FAE9C · Pine Ink #12251C · Mist #EAF2EC
   ========================================================================= */

/* ---- Fonts (bundled, GDPR-safe, no CDN) -------------------------------- */

@font-face {
  font-family: "Barlow Condensed";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/BarlowCondensed-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/BarlowCondensed-ExtraBold.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/Archivo-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/Archivo-SemiBold.woff2") format("woff2");
}

/* ---- Tokens ------------------------------------------------------------ */

:root {
  --forest: #1e4b38;
  --leaf: #3e8e5f;
  --leaf-lt: #6fbf8e;
  --sage: #8fae9c;
  --pine-ink: #12251c;
  --moss: #5f6f66;
  --mist: #eaf2ec;
  --white: #ffffff;

  --font-heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Archivo", "Segoe UI", Roboto, sans-serif;

  --content: 720px;
  --wide: 1160px;
  --radius: 8px;
  --shadow: 0 6px 24px rgba(18, 37, 28, 0.10);
  --header-h: 76px;
}

/* ---- Base --------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--pine-ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--forest);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--leaf);
}

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

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

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 200;
  background: var(--forest);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 6px 6px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  clip-path: none;
  height: auto;
  width: auto;
  color: var(--white);
}

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

/* ---- Buttons ------------------------------------------------------------ */

.ahvac-btn,
.wp-block-button__link {
  display: inline-block;
  background: var(--leaf);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 2px solid var(--leaf);
  border-radius: 6px;
  padding: 0.65em 1.5em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ahvac-btn:hover,
.wp-block-button__link:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
}

.ahvac-btn--outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.ahvac-btn--outline:hover {
  background: var(--forest);
  color: var(--white);
}

.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--forest);
  border: 2px solid var(--forest);
}

.is-style-outline .wp-block-button__link:hover {
  background: var(--forest);
  color: var(--white);
}

/* On dark (forest) backgrounds, outline buttons flip to mist */
.has-forest-background-color .is-style-outline .wp-block-button__link,
.has-pine-ink-background-color .is-style-outline .wp-block-button__link {
  color: var(--mist);
  border-color: var(--mist);
}

.has-forest-background-color .is-style-outline .wp-block-button__link:hover,
.has-pine-ink-background-color .is-style-outline .wp-block-button__link:hover {
  background: var(--mist);
  color: var(--forest);
}

/* ---- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--mist);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow);
}

.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header__brand img,
.site-header__brand .custom-logo {
  display: block;
  width: auto;
  height: 52px;
}

.site-nav__list {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 6px;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a {
  background: var(--mist);
  color: var(--forest);
}

.site-nav__list .sub-menu {
  display: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav__call--menu {
  display: none;
}

.site-nav__call-icon::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.45em;
  vertical-align: -0.1em;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.4.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.8 21 3 13.2 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.4.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.8 21 3 13.2 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2z"/></svg>') center / contain no-repeat;
}

/* Mobile nav */

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle__bars {
  display: block;
  width: 26px;
}

.nav-toggle__bars span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--forest);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle__bars span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--mist);
    box-shadow: var(--shadow);
    padding: 12px 20px 20px;
  }

  .nav-open .site-nav {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .site-nav__list a {
    padding: 12px 8px;
    border-bottom: 1px solid var(--mist);
    border-radius: 0;
  }

  .site-nav__call--menu {
    display: inline-block;
    margin-top: 14px;
  }

  .site-nav__call--bar {
    font-size: 1rem;
    padding: 0.5em 0.9em;
  }
}

@media (max-width: 560px) {
  .site-nav__call--bar {
    display: none; /* floating button covers mobile */
  }
}

/* ---- Page scaffolding ----------------------------------------------------- */

.ahvac-page__header {
  background: var(--forest);
  color: var(--mist);
  padding: clamp(36px, 6vw, 64px) 20px;
}

.ahvac-page__header-inner {
  max-width: var(--wide);
  margin: 0 auto;
}

.ahvac-page__header h1 {
  color: var(--mist);
  margin: 0;
}

.ahvac-page__meta {
  color: var(--sage);
  margin: 0.5em 0 0;
}

.ahvac-page__content {
  max-width: var(--content);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 20px 72px;
}

.ahvac-page__content .alignwide {
  max-width: var(--wide);
  margin-left: calc(50% - min(50vw, var(--wide) / 2) + 20px);
  margin-right: calc(50% - min(50vw, var(--wide) / 2) + 20px);
}

/* Landing template: blocks manage their own width */

.ahvac-landing > * {
  max-width: var(--content);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.ahvac-landing > .alignwide {
  max-width: var(--wide);
}

.ahvac-landing > .alignfull {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* ---- Blog teasers (dormant) ---------------------------------------------- */

.ahvac-teaser {
  padding: 24px 0;
  border-bottom: 1px solid var(--mist);
}

.ahvac-teaser__title {
  margin-bottom: 0.2em;
}

.ahvac-teaser__title a {
  text-decoration: none;
  color: var(--forest);
}

.ahvac-teaser__meta {
  color: var(--moss);
  font-size: 0.9rem;
  margin-bottom: 0.6em;
}

.ahvac-pagination {
  padding: 24px 0;
}

/* ---- Quote form ------------------------------------------------------------ */

.ahvac-quote-form {
  background: var(--white);
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 36px);
  box-shadow: var(--shadow);
}

.ahvac-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 18px;
}

.ahvac-quote-form label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest);
  margin-bottom: 4px;
}

.ahvac-quote-form input[type="text"],
.ahvac-quote-form input[type="tel"],
.ahvac-quote-form input[type="email"],
.ahvac-quote-form select,
.ahvac-quote-form textarea {
  width: 100%;
  font: inherit;
  color: var(--pine-ink);
  background: var(--white);
  border: 1.5px solid var(--sage);
  border-radius: 6px;
  padding: 10px 12px;
}

.ahvac-quote-form input:focus,
.ahvac-quote-form select:focus,
.ahvac-quote-form textarea:focus {
  border-color: var(--leaf);
  outline: 2px solid var(--leaf);
  outline-offset: 0;
}

.ahvac-hp {
  position: absolute !important;
  left: -9999px !important;
  height: 1px;
  overflow: hidden;
}

.ahvac-form-notice {
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-weight: 600;
}

.ahvac-form-notice.is-success {
  background: var(--mist);
  color: var(--forest);
  border-left: 4px solid var(--leaf);
}

.ahvac-form-notice.is-error {
  background: #fbeae7;
  color: #8c2f1d;
  border-left: 4px solid #c0442c;
}

/* ---- Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--forest);
  color: var(--mist);
  margin-top: 0;
}

.site-footer a {
  color: var(--leaf-lt);
}

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

.site-footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) 20px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
}

.site-footer__brand img {
  height: 56px;
  width: auto;
}

.site-footer__tagline {
  color: var(--sage);
  margin-top: 14px;
  max-width: 34ch;
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__list a {
  display: inline-block;
  padding: 5px 0;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer__phone a {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.7rem;
  text-decoration: none;
}

.site-footer__contact p {
  margin: 0 0 8px;
}

.site-footer__areas {
  color: var(--sage);
  font-size: 0.95rem;
}

.site-footer__legal {
  border-top: 1px solid rgba(234, 242, 236, 0.18);
}

.site-footer__legal p {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 18px 20px;
  color: var(--sage);
  font-size: 0.88rem;
}

/* ---- Floating call button (mobile) --------------------------------------------- */

.ahvac-float-call {
  display: none;
}

@media (max-width: 782px) {
  .ahvac-float-call {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 150;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--leaf);
    color: var(--white);
    box-shadow: 0 8px 24px rgba(18, 37, 28, 0.35);
  }

  .ahvac-float-call:hover {
    background: var(--forest);
    color: var(--white);
  }
}

/* ---- Pattern helpers ---------------------------------------------------------- */

.ahvac-eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--leaf);
}

.has-forest-background-color .ahvac-eyebrow,
.has-pine-ink-background-color .ahvac-eyebrow {
  color: var(--leaf-lt);
}

.ahvac-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 100%;
}

.ahvac-card .wp-block-group__inner-container {
  height: 100%;
}

.ahvac-review-card {
  background: var(--white);
  border-left: 4px solid var(--leaf);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 100%;
}

.ahvac-stars {
  color: #d9a441;
  letter-spacing: 0.15em;
}

/* Trust bar items */
.ahvac-trust {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}

/* Full-height hero cover fine-tuning */
.ahvac-hero .wp-block-cover__inner-container > * {
  max-width: 760px;
}

/* Tables (rebate comparisons etc.) */
.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}

.wp-block-table td,
.wp-block-table th {
  border: 1px solid var(--sage);
  padding: 10px 14px;
}

.wp-block-table thead {
  background: var(--mist);
}

/* Separator */
hr.wp-block-separator {
  border: 0;
  border-top: 2px solid var(--mist);
}
