/* Civil Insight v3.8.157 — homepage-only typography system.
   Outfit: section headings and story headlines.
   Manrope: descriptions, navigation, filters, metadata and actions.
   Scoped to the homepage to preserve standalone article and Learning Hub typography. */

body.home.wp-theme-civilworks-au {
  --cwa-font-text: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cwa-font-title: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--cwa-font-text);
  font-weight: 400;
}

/* Keep all homepage sections on the same type system, regardless of
   whether they have a concrete-grey or charcoal background. */
body.home.wp-theme-civilworks-au :is(
  #main-content, #main-content p, #main-content li,
  #main-content small, #main-content time, #main-content .meta,
  #main-content .kicker, #main-content .ci-editorial-label,
  #main-content .textlink, #main-content .cwa-news-frontpage__region,
  .site-header nav, .site-header a, .site-footer
) {
  font-family: var(--cwa-font-text) !important;
}

/* Main section names: semibold Outfit, original colours preserved.
   Override the legacy all-caps 11px label so it matches the approved mockup. */
body.home.wp-theme-civilworks-au #main-content :is(
  #home-news-heading, .section-head > h2,
  .section-head .cwa-section-title,
  .industry-innovations .cwa-section-title
) {
  font-family: var(--cwa-font-title) !important;
  font-size: clamp(1.32rem, 2.25vw, 1.65rem) !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: 1.22 !important;
  letter-spacing: -0.035em !important;
  text-transform: none !important;
  text-wrap: balance;
}

/* Article and editorial headlines: Outfit Medium, not heavy Bold. */
body.home.wp-theme-civilworks-au #main-content :is(
  .cwa-news-lead__headline h3,
  .cwa-news-compact h3,
  .cwa-news-country-list h3,
  .article-card h3,
  .cwa-knowledge-heading,
  .cwa-knowledge-feed h3,
  .company-card h3,
  .ci-innovation-hero h3,
  .ci-innovation-item h3,
  .innovation-empty h3
),
body.home.wp-theme-civilworks-au #main-content :is(
  .cwa-news-lead__headline h3 a,
  .cwa-news-compact h3 a,
  .cwa-news-country-list h3 a,
  .article-card h3 a,
  .cwa-knowledge-feed h3 a,
  .company-card h3 a,
  .ci-innovation-hero h3 a,
  .ci-innovation-item h3 a
) {
  font-family: var(--cwa-font-title) !important;
  font-weight: 500 !important;
  letter-spacing: -0.018em !important;
  line-height: 1.30;
}

/* Lighter supporting copy, without lowering contrast of the dark sections. */
body.home.wp-theme-civilworks-au #main-content :is(
  p, .company-excerpt, .cwa-company-subtitle, .company-sector,
  .cwa-knowledge-intro p, .cwa-news-lead__excerpt,
  .ci-innovation-copy p, .innovation-empty p,
  .card-facts, .cwa-news-filter-status
) {
  font-family: var(--cwa-font-text) !important;
  font-weight: 400 !important;
  line-height: 1.75;
}

/* Interface text: regular navigation and medium controls, no bold patches. */
body.home.wp-theme-civilworks-au :is(
  .site-header nav a, .site-footer a,
  .site-header .menu a, .topicbar a,
  #main-content .card-tail time,
  #main-content .cwa-news-compact time
) {
  font-family: var(--cwa-font-text) !important;
  font-weight: 400 !important;
}
body.home.wp-theme-civilworks-au :is(
  #main-content .textlink,
  #main-content .cwa-region-tabs a,
  #main-content .cwa-knowledge-tab,
  #main-content .cwa-knowledge-more,
  #main-content .ci-innovation-button,
  #main-content .ci-story-arrow,
  #main-content .card-cta,
  #main-content .region-grid a,
  .site-header button, .site-header .btn,
  .topicbar button, .topicbar summary
) {
  font-family: var(--cwa-font-text) !important;
  font-weight: 500 !important;
}
body.home.wp-theme-civilworks-au #main-content :is(
  .meta, .kicker, .ci-editorial-label,
  .cwa-news-frontpage__region, .card-facts dt
) {
  font-family: var(--cwa-font-text) !important;
  font-weight: 500 !important;
}

@media (max-width: 600px) {
  body.home.wp-theme-civilworks-au #main-content :is(
    #home-news-heading, .section-head > h2,
    .section-head .cwa-section-title,
    .industry-innovations .cwa-section-title
  ) {
    font-size: clamp(1.25rem, 5vw, 1.48rem) !important;
    letter-spacing: -0.025em !important;
  }
}


/* v3.8.157 — Knowledge & Perspectives specificity fix.
   The live homepage uses .cwa-knowledge-story-title (h4) and a subject rail,
   not the older h3 article card markup. Previous selectors therefore missed
   the visible headlines. The topic-rail stylesheet also explicitly forced
   Prata with !important and two ID selectors; these targeted overrides win
   that cascade without changing layout or animations. */
html[data-theme] body.home.wp-theme-civilworks-au #main-content #knowledge-perspective .section-head h2.cwa-section-title {
  font-family: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: clamp(1.32rem, 2.25vw, 1.65rem) !important;
  font-weight: 600 !important;
  line-height: 1.22 !important;
  letter-spacing: -0.035em !important;
  text-transform: none !important;
  font-style: normal !important;
}

/* Actual heading and article elements rendered in template-parts/home-knowledge.php
   and template-parts/knowledge-story.php, including AJAX-loaded filtered results. */
html[data-theme] body.home.wp-theme-civilworks-au #main-content #knowledge-perspective :is(
  .cwa-knowledge-heading,
  .cwa-knowledge-story-title,
  .cwa-knowledge-story-title a,
  .cwa-knowledge-empty h4
) {
  font-family: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-weight: 500 !important;
  font-style: normal !important;
  letter-spacing: -0.018em !important;
}

/* Match the approved soft reading typography in this specific section. */
html[data-theme] body.home.wp-theme-civilworks-au #main-content #knowledge-perspective :is(
  .cwa-knowledge-intro p,
  .cwa-knowledge-summary,
  .cwa-knowledge-label,
  .cwa-knowledge-meta,
  .cwa-knowledge-meta span,
  .cwa-knowledge-name,
  .cwa-knowledge-description,
  .cwa-knowledge-status,
  .cwa-knowledge-fallback,
  .cwa-knowledge-more,
  .cwa-knowledge-empty p,
  .section-head .textlink
) {
  font-family: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-weight: 400 !important;
}

/* Filters and action text remain distinct but not visually heavy. */
html[data-theme] body.home.wp-theme-civilworks-au #main-content #knowledge-perspective :is(
  .cwa-knowledge-tab,
  .cwa-knowledge-tab .cwa-knowledge-name,
  .cwa-knowledge-more,
  .cwa-knowledge-meta a,
  .cwa-knowledge-fallback,
  .section-head .textlink
) {
  font-family: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-weight: 500 !important;
}
html[data-theme] body.home.wp-theme-civilworks-au #main-content #knowledge-perspective .cwa-knowledge-tab .cwa-knowledge-description {
  font-family: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-weight: 400 !important;
}
