/* ============================================================
   AGENT 06 — Services (§05.04) + HVAC Help Center (§05.05)
   Gold Master reproduction styles.
   INTEGRATOR NOTE: the page <head> must load Playfair Display
   (weight 700) for the serif titles/headline; the stacks below
   fall back to Georgia if it is absent. No @import is used here
   so this file can be concatenated safely.
   All values derive from Agent 02 MEASUREMENT.md (@1440 column,
   scale x2.06 from the 699px gold capture) and pixel samples of
   the gold PNG taken by Agent 06. Class prefix "gm-" is scoped
   to these two sections to avoid collisions with other agents.
   ============================================================ */

.gm-services,
.gm-help {
  --gm-navy: #0f2f55;        /* heading ink core sampled from gold: rgb(15,47,85) */
  --gm-red: #e00e29;         /* Agent 02 build value, sampled across all CTAs */
  --gm-red-dark: #b80c22;    /* hover shade of --gm-red */
  --gm-body: #5b6472;        /* production --muted (authority C); gold body-ink samples straddle it; 5.9:1 on white */
  --gm-eyebrow: #37475e;     /* sampled eyebrow ink core: rgb(55,71,94) */
  --gm-browse: #384f6e;      /* sampled "Browse All" ink core: rgb(56,79,110) */
  --gm-band: #eef7fe;        /* Agent 02 build value, Help Center band */
  --gm-card-line: #e7eef5;   /* hairline card edge visible in gold crops */
  --gm-focus: #087fcb;       /* brand Air Blue (Agent 04 Color_Values.txt) */
  --gm-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --gm-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  font-family: var(--gm-sans);
  color: var(--gm-body);
  box-sizing: border-box;
}
.gm-services *,
.gm-help * { box-sizing: inherit; }

/* Gold container: x 38-665 of 699 = 89.7% of width (Agent 02 §1) */
.gm-container {
  width: 89.7%;
  max-width: 1292px;         /* 89.7% of the 1440 reference width */
  margin-inline: auto;
}

/* ---------------- §05.04 — Our HVAC Services ---------------- */

.gm-services {
  background: #ffffff;
  padding: 28px 0 18px;      /* title ink sits ~27px below section top @1440 */
}
.gm-services__title {
  font-family: var(--gm-serif);
  font-weight: 700;
  font-size: 40px;           /* Agent 02: ~19-20px native -> ~40px @1440 */
  line-height: 1.1;
  color: var(--gm-navy);
  text-align: center;
  margin: 0;
}
.gm-services__caption {
  font-size: 16px;           /* ~15px @1440 */
  line-height: 1.4;
  text-align: center;
  margin: 10px 0 0;
}
.gm-services__grid {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* each card ~29.5% of page width */
  gap: 24px;                              /* 9-13px native -> ~23px @1440 */
}
.gm-card {
  background: #ffffff;
  border: 1px solid var(--gm-card-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 47, 85, 0.06);
  display: flex;
  flex-direction: column;
}
.gm-card__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 765;  /* 2026-11-19 owner photos: frame = photo aspect (1.339), full photo shown uncropped, identical on all three cards */
  object-fit: cover;
}
.gm-card__body {
  padding: 14px 22px 16px;   /* text inset ~14px @1440 from card edge, rounded up for glyph bearings */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}
.gm-card__title {
  font-family: var(--gm-serif);
  font-weight: 700;
  font-size: 26px;           /* ~12.5px native -> ~26px @1440 */
  line-height: 1.15;
  color: var(--gm-navy);
  margin: 0;
}
.gm-card__text {
  font-size: 18px;           /* ~9.5-10px native; 18 x 1.35 = measured 24.7px line pitch */
  line-height: 1.35;
  margin: 8px 0 0;
}
.gm-card__link {
  margin-top: auto;          /* pins link to card bottom like gold */
  padding-top: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--gm-red);
  text-decoration: none;
}
.gm-card__link:hover { color: var(--gm-red-dark); text-decoration: underline; }

/* ---------------- §05.05 — HVAC Help Center band ---------------- */

.gm-help {
  background: var(--gm-band);   /* full-bleed pale blue #EEF7FE */
  padding: 24px 0 20px;         /* R-07: tightened 26/24 -> 24/20 (desktop rhythm) */
}
.gm-help__layout {
  display: grid;
  grid-template-columns: 4fr 5fr;  /* gold: left col ~40%, card zone ~50% of page */
  gap: 24px;                       /* R-07: 36 -> 24, returns width to the card zone */
  align-items: start;
}
.gm-help__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;              /* ~7px native -> ~14px @1440 */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gm-eyebrow);
  margin: 0;
}
.gm-help__dash {
  flex: none;
  width: 26px;
  height: 3px;
  background: var(--gm-red);    /* red dash before the eyebrow text */
}
.gm-help__headline {
  font-family: var(--gm-serif);
  font-weight: 700;
  font-size: 49px;              /* ~24px native -> ~49px @1440; wraps after "Questions" at gold column width */
  line-height: 1.08;            /* 24px native pitch */
  color: var(--gm-navy);
  margin: 14px 0 0;
}
.gm-help__copy {
  font-size: 18px;              /* ~9px native -> ~19px @1440 */
  line-height: 1.45;
  margin: 14px 0 0;
  max-width: 52ch;
}
.gm-help__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  background: var(--gm-red);
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  padding: 15px 30px;           /* gold button ~400 x 54 @1440 */
  border-radius: 6px;
  min-height: 44px;
}
.gm-help__cta:hover { background: var(--gm-red-dark); }

.gm-help__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;                    /* R-07: 40 -> 20; the returned width goes to card text columns so titles hold gold's 2 lines (see r07 BUILD-NOTES) */
}
.gm-article {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 47, 85, 0.06);
  display: flex;
  flex-direction: column;
}
.gm-article__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 100 / 57;       /* gold photo box: ~100 x 57 native */
  object-fit: cover;            /* placeholder crops are ~1.23:1; cover trims vertical excess, centered */
}
.gm-article__body {
  padding: 12px 10px 12px;      /* R-07: bottom 14 -> 12, inline 11 -> 10 (text-column width) */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}
.gm-article__title {
  font-family: var(--gm-serif);
  font-weight: 700;
  font-size: 21px;              /* R-07: 24 -> 21 type-metric tuning (Playfair retained, G-17 open); restores gold's 2-line title wraps without touching wording */
  line-height: 1.10;
  letter-spacing: -0.02em;
  color: var(--gm-navy);
  margin: 0;
}
.gm-article__summary {
  font-size: 16px;              /* ~8px native -> ~16px @1440 */
  line-height: 1.35;
  margin: 8px 0 0;
}
.gm-article__link {
  margin-top: auto;
  padding-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gm-red);
  text-decoration: none;
}
.gm-article__link:hover { color: var(--gm-red-dark); text-decoration: underline; }

.gm-help__browse {
  margin: 12px 0 0;             /* R-07: 18 -> 12 (desktop rhythm) */
  text-align: center;           /* centered under the card group (see BUILD-NOTES on the x-370 ambiguity) */
}
.gm-help__browse-link {
  font-size: 17px;
  font-weight: 600;
  color: var(--gm-browse);
  text-decoration: none;
}
.gm-help__browse-link:hover { text-decoration: underline; }

/* ---------------- Focus (WCAG AA visible focus) ---------------- */

.gm-services a:focus-visible,
.gm-help a:focus-visible {
  outline: 3px solid var(--gm-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------------- Responsive (brief §08: logical stacking, no redesign) ---------------- */

@media (max-width: 1080px) {
  .gm-services__title { font-size: 34px; }
  .gm-help__headline { font-size: 40px; }
  .gm-help__layout { grid-template-columns: 1fr; gap: 40px; }
  .gm-help__copy { max-width: 62ch; }
}

@media (max-width: 767px) {
  /* R-07 — mobile type scale + card geometry per R-03 MOBILE-REQUIREMENTS
     (TS table §5, card specs CD-1..CD-9). Breakpoint aligned to the
     refinement round's <=767px mobile definition (was 760px). */

  /* Services — CD-1/CD-2/CD-3 */
  .gm-services { padding: 30px 0 18px; }
  .gm-services__title { font-size: 27px; line-height: 1.2; }        /* TS: H2 26-28 */
  .gm-services__caption { margin-top: 8px; }
  .gm-services__grid { grid-template-columns: 1fr; gap: 18px; margin-top: 16px; }
  .gm-card__photo { aspect-ratio: 1024 / 765; }                     /* 2026-11-19: same frame as desktop — full owner photo, no crop at any width */
  .gm-card__body { padding: 16px 18px 18px; }                       /* CD-2: padding 16-20 */
  .gm-card__title { font-size: 21px; line-height: 1.25; }           /* CD-2 / TS: card titles 20-21 */
  .gm-card__text { font-size: 16px; line-height: 1.5; margin-top: 6px; }
  .gm-card__link {                                                  /* CD-3: real >=44px target */
    display: inline-flex; align-items: center;
    min-height: 44px; font-size: 16px; padding-top: 6px;
  }

  /* Help Center — CD-4..CD-8 */
  .gm-help { padding: 26px 0 22px; }
  .gm-help__layout { gap: 22px; }
  .gm-help__eyebrow { font-size: 12px; }                            /* TS: kicker 11-12 */
  .gm-help__headline { font-size: 27px; line-height: 1.2; margin-top: 12px; }  /* CD-4 / TS: H2 26-28 */
  .gm-help__copy { font-size: 16px; line-height: 1.55; margin-top: 12px; max-width: none; }
  .gm-help__cta {                                                   /* CD-5: 48-50px tall, label 16-17 */
    width: 100%; justify-content: center;
    font-size: 17px; min-height: 48px; padding: 12px 20px; margin-top: 16px;
  }
  .gm-help__cards { grid-template-columns: 1fr; gap: 16px; }        /* CD-8: gap 16 */
  .gm-article__photo { aspect-ratio: 100 / 57; }                    /* CD-6: ratio held (16:9 +/-10%) */
  .gm-article__body { padding: 16px; }                              /* CD-7 */
  .gm-article__title { font-size: 20px; line-height: 1.25; }        /* CD-7: 20-21, <=2 lines */
  .gm-article__summary { font-size: 15px; line-height: 1.5; margin-top: 6px; }  /* CD-7: 15-16 / 1.5 */
  .gm-article__link {                                               /* CD-7: >=44px target */
    display: inline-flex; align-items: center;
    min-height: 44px; font-size: 16px; padding-top: 6px;
  }
  .gm-help__browse { margin-top: 14px; }
  .gm-help__browse-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
}

@media (max-width: 360px) {
  /* R-07: at 320 the long Help CTA label wraps to 2 lines (wrapping, not
     clipping — TS rule (b)); trimmed block padding keeps the wrapped
     button proportionate. Single-line 48px height at 360/390 is governed
     by the min-height in the <=767 block and is unaffected. */
  .gm-help__cta { padding: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .gm-services *, .gm-help * { transition: none !important; }
}

/* ---------------- City pages integration (2026-11-19) — homepage Service Areas city grid.
   Tokens and card language mirror §05.04 (.gm-services / .gm-card) above. ---------------- */

.gm-cities {
  --gm-navy: #0f2f55;
  --gm-red: #e00e29;
  --gm-red-dark: #b80c22;
  --gm-body: #5b6472;
  --gm-card-line: #e7eef5;
  --gm-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --gm-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  font-family: var(--gm-sans);
  color: var(--gm-body);
  box-sizing: border-box;
  background: #ffffff;
  padding: 28px 0 26px;
}
.gm-cities * { box-sizing: inherit; }
.gm-cities__title {
  font-family: var(--gm-serif);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  color: var(--gm-navy);
  text-align: center;
  margin: 0;
}
.gm-cities__caption {
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  margin: 10px 0 0;
}
.gm-cities__grid {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gm-cities__note {
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  margin: 22px 0 0;
}
.gm-cities__note a { color: var(--gm-red); font-weight: 700; }
.gm-cities__note a:hover { color: var(--gm-red-dark); }
@media (max-width: 1080px) {
  .gm-cities__title { font-size: 34px; }
}
@media (max-width: 767px) {
  .gm-cities__title { font-size: 27px; line-height: 1.2; }
  .gm-cities__grid { grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 16px; }
}
@media (max-width: 420px) {
  .gm-cities__grid { grid-template-columns: 1fr; }
}
