/**
 * ClimaCall heading design system.
 *
 * Typography follows the visual language established on /why_climacall/.
 * Sizing is normalized for primary page titles while lower-level heading sizes
 * remain owned by each component to protect cards, FAQs, tables, and tools.
 */

:root {
  --cc-heading-font: "Outfit", var(--e-global-typography-primary-font-family), Arial, sans-serif;
  --cc-heading-navy: #0f172a;
  --cc-heading-tracking: -0.03em;
}

body #content.site-main :is(h1, h2, h3, h4, h5, h6),
body #primary.site-main :is(h1, h2, h3, h4, h5, h6),
body .betterdocs-wrapper :is(h1, h2, h3, h4, h5, h6),
body .climacall-docs-heading :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--cc-heading-font);
  font-optical-sizing: auto;
}

body #content.site-main h1,
body #primary.site-main h1,
body .betterdocs-wrapper h1,
body .climacall-docs-heading h1 {
  font-weight: 850;
  letter-spacing: var(--cc-heading-tracking);
  line-height: 0.99;
  text-wrap: balance;
}

body.page #content.site-main h1 {
  font-size: clamp(42px, 6vw, 76px);
}

body.single-post #content.site-main h1,
body.single-hvac_resource #primary.site-main h1,
body.post-type-archive-docs .climacall-docs-heading h1,
body.single-docs .betterdocs-wrapper h1 {
  font-size: clamp(38px, 4.8vw, 58px);
  line-height: 1.03;
}

body #content.site-main h2,
body #primary.site-main h2,
body .betterdocs-wrapper h2 {
  font-weight: 850;
  letter-spacing: var(--cc-heading-tracking);
  line-height: 1.06;
  text-wrap: balance;
}

body #content.site-main h3,
body #primary.site-main h3,
body .betterdocs-wrapper h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

body #content.site-main :is(h4, h5, h6),
body #primary.site-main :is(h4, h5, h6),
body .betterdocs-wrapper :is(h4, h5, h6) {
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

/* Preserve compact card and utility headings while sharing the same typeface. */
body .climacall-rc-card h3,
body .elementor-accordion-title,
body .elementor-tab-title,
body .betterdocs-category-header h2,
body .betterdocs-category-items h3 {
  line-height: 1.2;
  text-wrap: pretty;
}

@media (max-width: 767px) {
  body.page #content.site-main h1 {
    font-size: clamp(40px, 12vw, 56px);
    line-height: 0.99;
  }

  body.single-post #content.site-main h1,
  body.single-hvac_resource #primary.site-main h1,
  body.post-type-archive-docs .climacall-docs-heading h1,
  body.single-docs .betterdocs-wrapper h1 {
    font-size: clamp(36px, 10vw, 48px);
    line-height: 1.04;
  }

  body #content.site-main h2,
  body #primary.site-main h2,
  body .betterdocs-wrapper h2 {
    line-height: 1.08;
  }
}
