/*
Theme Name: Amherst HVAC
Theme URI: https://amhersthvac.com
Author: Amherst HVAC
Description: A clean, professional theme for HVAC contractors. Includes a hero homepage, a services page, a pricing page with tiered furnace and condenser options, and a Contact Form 7-ready contact page. Brand palette: navy, copper, and warm off-white.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: amherst-hvac
*/

:root {
  --color-navy: #173E5F;
  --color-navy-dark: #0E2740;
  --color-navy-light: #2A5478;
  --color-copper: #E36414;
  --color-copper-dark: #B8500F;
  --color-bg: #FAFAF7;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F5F1EA;
  --color-text: #1A2332;
  --color-text-muted: #6B7280;
  --color-text-light: #9CA3AF;
  --color-border: #E5E5E0;
  --color-border-strong: #D1D5DB;

  --container-max: 1200px;
  --content-max: 720px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;

  --transition: 0.2s ease;
  --shadow-sm: 0 1px 2px rgba(23, 62, 95, 0.05);
  --shadow-md: 0 4px 12px rgba(23, 62, 95, 0.08);
  --shadow-lg: 0 10px 30px rgba(23, 62, 95, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--color-navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-copper); }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  background: var(--color-navy);
  color: white;
  padding: 0.5rem 1rem;
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
}

.skip-link:focus { left: 0; color: white; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* === Header === */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-logo img {
  height: 60px;
  width: auto;
}

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

.main-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
}

.main-nav a:hover { color: var(--color-copper); }

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: var(--color-navy);
}

.main-nav .current-menu-item > a::after,
.main-nav .current_page_item > a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--color-copper);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: var(--color-copper);
  color: white !important;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background var(--transition), transform var(--transition);
}

.header-cta:hover { background: var(--color-copper-dark); color: white !important; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  margin: 5px 0;
  transition: var(--transition);
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0 var(--space-md);
  }
  .main-nav li { padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
  .main-nav .header-cta {
    margin: 1rem var(--space-md) 0;
    justify-content: center;
  }
  .menu-toggle { display: block; }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

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

.btn-secondary {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}
.btn-secondary:hover {
  background: var(--color-navy);
  color: white;
}

/* === Hero === */
.hero {
  padding: var(--space-2xl) 0;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: rgba(227, 100, 20, 0.1);
  color: var(--color-copper-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.1875rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual { position: relative; }

@media (max-width: 800px) {
  .hero { padding: var(--space-xl) 0; }
  .hero .container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .hero-visual { max-width: 480px; margin: 0 auto; }
}

/* === Section base === */
.section { padding: var(--space-2xl) 0; }

.section-alt { background: var(--color-surface); }

.section-eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-copper);
  margin-bottom: 0.75rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-lg);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0;
}

@media (max-width: 800px) {
  .section { padding: var(--space-xl) 0; }
}

/* === Service cards === */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition);
}

.service-card:hover {
  border-color: var(--color-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-card .icon {
  width: 48px;
  height: 48px;
  background: var(--color-navy);
  color: white;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

/* === Features grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.feature {
  text-align: center;
}

.feature .number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-copper);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature h3 { font-size: 1.1875rem; margin-bottom: 0.5rem; }
.feature p { color: var(--color-text-muted); }

/* === CTA strip === */
.cta-strip {
  background: var(--color-navy);
  color: white;
  padding: var(--space-xl) 0;
  text-align: center;
}

.cta-strip h2 { color: white; margin-bottom: 1rem; }
.cta-strip p { color: rgba(255,255,255,0.8); font-size: 1.125rem; margin-bottom: 2rem; }
.cta-strip .btn-primary { background: var(--color-copper); }

/* === Page hero === */
.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.page-hero h1 { margin-bottom: 1rem; }

.page-hero .lead {
  font-size: 1.1875rem;
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* === Service detail blocks (services page) === */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-xl);
}

.service-detail:last-child { margin-bottom: 0; }

.service-detail.reverse { grid-template-columns: 1.5fr 1fr; }
.service-detail.reverse .service-detail-visual { order: 2; }

.service-detail-visual {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
}

.service-detail h2 { margin-bottom: 1rem; }

.service-detail .features-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.service-detail .features-list li {
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.service-detail .features-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--color-copper);
  border-bottom: 2px solid var(--color-copper);
  transform: rotate(-45deg);
}

@media (max-width: 800px) {
  .service-detail,
  .service-detail.reverse {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  .service-detail.reverse .service-detail-visual { order: 0; }
}

/* === Pricing === */
.pricing-section { margin-bottom: var(--space-2xl); }
.pricing-section:last-child { margin-bottom: 0; }

.pricing-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.pricing-header h2 { margin-bottom: 0.5rem; }
.pricing-header p { color: var(--color-text-muted); max-width: 640px; margin: 0 auto; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
}

.pricing-card:hover {
  border-color: var(--color-navy);
  box-shadow: var(--shadow-md);
}

.pricing-card.featured {
  border-color: var(--color-copper);
  border-width: 2px;
}

.pricing-card.featured::before {
  content: "Most popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-copper);
  color: white;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pricing-tier-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-copper);
  margin-bottom: 0.5rem;
  display: block;
}

.pricing-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.pricing-card .price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 1rem 0 0.25rem;
}

.pricing-card .price-note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  flex: 1;
}

.pricing-card ul li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

.pricing-card ul li:last-child { border-bottom: 0; }

.pricing-card ul li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0.5rem;
  color: var(--color-copper);
  font-weight: 700;
}

.pricing-disclaimer {
  background: var(--color-surface-alt);
  border-left: 3px solid var(--color-copper);
  padding: var(--space-md);
  border-radius: 0;
  margin-top: var(--space-lg);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.pricing-disclaimer strong { color: var(--color-text); display: block; margin-bottom: 0.25rem; }

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-xl);
}

.contact-info-card,
.contact-form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.contact-info-card h2,
.contact-form-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-form-card .form-intro { color: var(--color-text-muted); margin-bottom: 1.5rem; }

.contact-detail {
  display: flex;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
  align-items: flex-start;
}

.contact-detail-icon {
  width: 40px; height: 40px;
  background: var(--color-navy);
  color: white;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

.contact-detail-content strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.125rem;
  font-weight: 600;
}

.contact-detail-content { font-size: 1rem; line-height: 1.5; }

/* CF7 form styling */
.wpcf7 .wpcf7-form-control-wrap { display: block; margin-bottom: 1rem; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: white;
  color: var(--color-text);
  transition: border-color var(--transition);
}

.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  outline: none;
  border-color: var(--color-copper);
  box-shadow: 0 0 0 3px rgba(227, 100, 20, 0.15);
}

.wpcf7 label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.wpcf7 textarea { min-height: 140px; resize: vertical; }

.wpcf7 input[type="submit"] {
  background: var(--color-copper);
  color: white;
  border: 0;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
  width: auto;
}

.wpcf7 input[type="submit"]:hover { background: var(--color-copper-dark); }

.contact-form-placeholder {
  background: var(--color-surface-alt);
  border: 1px dashed var(--color-border-strong);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.contact-form-placeholder strong {
  color: var(--color-text);
  display: block;
  margin-bottom: 0.5rem;
}

.contact-form-placeholder p { margin: 0; }

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-md); }
}

/* === Footer === */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,0.8);
  padding: var(--space-xl) 0 var(--space-md);
  margin-top: var(--space-2xl);
}

.site-footer h4 {
  color: white;
  font-size: 0.875rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand img {
  height: 64px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9375rem;
  max-width: 360px;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.5rem; }
.site-footer a { color: rgba(255,255,255,0.7); font-size: 0.9375rem; }
.site-footer a:hover { color: var(--color-copper); }

.footer-contact-item {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.7);
}

.footer-contact-item.small { font-size: 0.8125rem; opacity: 0.85; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* === Generic page === */
.entry-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.entry-content h1, .entry-content h2 { margin-top: 2rem; }
.entry-content :first-child { margin-top: 0; }
