/* ==========================================================================
   Miami/Grove Heat & Air — styles.css
   Mobile-first. Plain CSS, no build step.
   ========================================================================== */

:root {
  /* Brand colors */
  --color-navy: #1A5276;
  --color-navy-dark: #123c56;
  /* Lighter blue used only for hover states on the dark footer — true
     --color-navy fails contrast (1.4:1) against --color-navy-dark. */
  --color-blue-hover: #5DADE2;
  --color-red: #C0392B;
  --color-orange: #E67E22;
  --color-orange-dark: #c96c15;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-off-white: #F7F9FA;
  --color-gray-100: #EDF1F3;
  --color-gray-300: #CBD5DA;
  --color-gray-600: #5B6B73;
  --color-gray-900: #1E2A30;

  /* Type */
  --font-heading: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container-max: 1180px;
  --radius: 10px;
  --shadow-card: 0 2px 10px rgba(26, 82, 118, 0.10);
  --header-height: 84px;
  --bottom-bar-height: 64px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--color-gray-900);
  background: var(--color-white);
  padding-bottom: var(--bottom-bar-height);
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-navy-dark);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--color-navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--color-orange-dark); }

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

section { padding: 56px 0; }

.section-sub {
  color: var(--color-gray-600);
  font-size: 1.05rem;
  max-width: 60ch;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* Focus states — visible everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 14px 22px;
  min-height: 48px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-orange-dark); color: var(--color-white); }

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

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

.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-sm { padding: 10px 16px; min-height: 40px; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-header { display: none; }

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-100);
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 12px;
}

.logo img { height: 68px; width: auto; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-navy-dark);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone svg { color: var(--color-orange); flex-shrink: 0; }
.header-phone:hover { color: var(--color-orange-dark); }

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.hero {
  background-image: url("/images/hero-services.jpg");
  background-size: cover;
  /* Mobile: form stacks below the text, so the full width is free —
     center on the Armstrong unit. Desktop position (both units, clear
     of the side-by-side form) is set in the 960px breakpoint below. */
  background-position: 38% center;
  background-repeat: no-repeat;
  color: var(--color-white);
  padding: 40px 0 48px;
}

/* No overlay on the photo itself — text gets a drop shadow instead so it
   stays readable against the bright sky/siding in the background photo. */
.hero-copy h1,
.hero-sub,
.hero-trust-mini li {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.hero-inner {
  display: grid;
  gap: 32px;
}

.hero-copy h1 { color: var(--color-white); }
.hero-sub {
  font-size: 1.1rem;
  color: #DCE8EF;
  max-width: 55ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 20px 0;
}

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

.hero-trust-mini {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.9rem;
  color: #B9CEDA;
}
.hero-trust-mini li { position: relative; padding-left: 18px; }
.hero-trust-mini li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-orange);
  font-weight: 700;
}

/* Estimate form (in hero) */
.hero-form-wrap {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

.estimate-form {
  background: var(--color-white);
  color: var(--color-gray-900);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.estimate-form h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6em;
}

.form-row {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-navy-dark);
}

.required { color: var(--color-red); }

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--color-gray-300);
  border-radius: 8px;
  background: var(--color-white);
  color: var(--color-gray-900);
  min-height: 48px;
}

.form-row textarea { min-height: 90px; resize: vertical; }

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--color-navy);
}

.form-disclaimer {
  font-size: 0.85rem;
  color: var(--color-gray-600);
  text-align: center;
  margin: 10px 0 0;
}

/* Honeypot field — hidden from real users, visible to bots/screen readers off */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* ---------------------------------------------------------------------- */
/* Trust bar                                                               */
/* ---------------------------------------------------------------------- */
.trust-bar {
  background: var(--color-off-white);
  padding: 20px 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-navy-dark);
}

.trust-bar .dot { color: var(--color-orange); }

/* ---------------------------------------------------------------------- */
/* Services                                                                */
/* ---------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 28px;
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.service-card img { margin-bottom: 12px; }
.service-card h3 { margin-bottom: 0.4em; }
.service-card p { margin: 0; color: var(--color-gray-600); font-size: 0.95rem; }

.service-icon {
  display: block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  font-size: 26px;
  text-align: center;
  color: var(--color-navy);
  background: var(--color-off-white);
  border: 2px solid var(--color-orange);
  border-radius: 50%;
  margin-bottom: 12px;
}

.service-icon-ac {
  background: var(--color-navy-dark);
  color: var(--color-white);
}

.service-icon-furnace {
  background: var(--color-red);
  color: var(--color-white);
}

.service-icon-install {
  background: var(--color-orange);
  color: var(--color-white);
}

.service-icon-commercial {
  background: var(--color-navy);
  color: var(--color-white);
}

/* fa-business-time's glyph sits off-center within its own character box
   (shifted up/left) — nudge just the glyph, not the circle, to compensate. */
.service-icon-commercial::before {
  display: inline-block;
  transform: translate(3px, 5px);
}

.service-icon-dryer-vent {
  background: var(--color-red);
  color: var(--color-white);
}

.service-icon-duct {
  background: var(--color-orange);
  color: var(--color-white);
}

.service-icon-heatpump {
  background: var(--color-navy-dark);
  color: var(--color-white);
}

.service-icon-tuneup {
  background: var(--color-orange);
  color: var(--color-white);
}

.services-cta { text-align: center; margin-top: 32px; }

/* ---------------------------------------------------------------------- */
/* Brands                                                                  */
/* ---------------------------------------------------------------------- */
.brands { text-align: center; }
.brands .section-sub { margin-left: auto; margin-right: auto; }

.brands-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 28px 0;
}

.brands-logos img {
  height: 56px;
  width: auto;
  max-width: 220px;
}

.brands-note { color: var(--color-gray-600); }

/* ---------------------------------------------------------------------- */
/* Why choose us                                                          */
/* ---------------------------------------------------------------------- */
.why-us { background: var(--color-navy); color: var(--color-white); }
.why-us h2 { color: var(--color-white); }

.why-us-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

.why-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 22px;
}

.why-card h3 { color: var(--color-white); }
.why-card p { color: #CBDDE7; margin: 0; }

/* ---------------------------------------------------------------------- */
/* Service area                                                           */
/* ---------------------------------------------------------------------- */
.service-area-inner {
  display: grid;
  gap: 28px;
}

.town-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.town-list li {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-navy-dark);
  padding-left: 20px;
  position: relative;
}
.town-list li::before {
  content: "📍";
  position: absolute;
  left: 0;
  font-size: 0.85em;
}

.service-area-graphic {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--color-off-white);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.service-area-graphic img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------------- */
/* FAQ / accordion                                                        */
/* ---------------------------------------------------------------------- */
.accordion { margin-top: 24px; border-top: 1px solid var(--color-gray-100); }

.accordion-item { border-bottom: 1px solid var(--color-gray-100); }
.accordion-item h3 { margin: 0; font-size: 1rem; }

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-navy-dark);
  padding: 18px 30px 18px 0;
  cursor: pointer;
  position: relative;
}

.accordion-trigger::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--color-orange);
  font-weight: 400;
  line-height: 1;
}

.accordion-trigger[aria-expanded="true"]::after {
  content: "\2212"; /* minus sign */
}

.accordion-panel {
  padding: 0 0 20px;
  color: var(--color-gray-600);
}
.accordion-panel p { margin: 0; }

/* ---------------------------------------------------------------------- */
/* Final CTA band                                                        */
/* ---------------------------------------------------------------------- */
.final-cta {
  background: var(--color-red);
  color: var(--color-white);
  text-align: center;
}
.final-cta h2 { color: var(--color-white); }
.final-cta p { color: #F6DAD5; }

.final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}

.final-cta .btn-outline {
  color: var(--color-white);
  border-color: var(--color-white);
}
.final-cta .btn-outline:hover { background: var(--color-white); color: var(--color-red); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                 */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy-dark);
  color: #BFD3DF;
  padding: 48px 0 24px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-col h3 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 0.6em;
}

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

.footer-col .btn { margin-top: 8px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-size: 0.85rem;
  text-align: center;
}

.footer-bottom p { margin: 0; }

/* ---------------------------------------------------------------------- */
/* Mobile sticky bottom bar                                               */
/* ---------------------------------------------------------------------- */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 600;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--color-navy-dark);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}

.mobile-bottom-bar .btn { flex: 1; }

/* ---------------------------------------------------------------------- */
/* Breakpoints                                                            */
/* ---------------------------------------------------------------------- */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .why-us-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .service-area-inner { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .mobile-bottom-bar { display: none; }
  .btn-header { display: inline-flex; }

  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  /* Form sits beside the text here, so shift the crop right to clear
     both AC units of the form's left edge. */
  .hero { background-position: 85% center; }

  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .why-us-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------------------------------------------------------------------- */
/* Reduced motion                                                        */
/* ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------------------------------------------------------------------- */
/* Legal pages (privacy policy, etc.)                                     */
/* ---------------------------------------------------------------------- */
.legal-content {
  max-width: 75ch;
}

.legal-content h2 {
  margin-top: 1.6em;
}

.legal-content ul {
  color: var(--color-gray-600);
  padding-left: 1.3em;
  margin-bottom: 1em;
}

.legal-content li { margin-bottom: 0.4em; }
