/* HENGDE contrast contract — loaded after the shared visual system.
 * Presentation only: no layout, content, tracking or form behaviour changes.
 */

/* The homepage uses the production hero background but its own copy classes. */
body.hd-v3 .hd-clarity-home .clarity-hero.hd-page-hero--production .clarity-hero-copy h1,
body.hd-v3 .hd-clarity-home .clarity-hero.hd-page-hero--production .clarity-hero-copy h2 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(3, 20, 35, .22);
}

body.hd-v3 .hd-clarity-home .clarity-hero.hd-page-hero--production .clarity-hero-copy h1 span {
  color: #67c8ff;
}

body.hd-v3 .hd-clarity-home .clarity-hero.hd-page-hero--production .clarity-kicker,
body.hd-v3 .hd-clarity-home .clarity-hero.hd-page-hero--production .clarity-text-link {
  color: #8bd6ff;
}

body.hd-v3 .hd-clarity-home .clarity-hero.hd-page-hero--production .clarity-intro {
  color: #d7e4ef;
}

body.hd-v3 .hd-clarity-home .clarity-hero.hd-page-hero--production .clarity-location,
body.hd-v3 .hd-clarity-home .clarity-hero.hd-page-hero--production .hd31-hero-status {
  color: #b9ccdc;
}

/*
 * Capacity and project templates still carry the legacy white `.ls-hero`
 * surface.  Its body-qualified selector otherwise wins over the shared dark
 * hero background while the visual system correctly turns the copy white.
 */
body.hd-v3 .ls-main .ls-hero.hd-page-hero--production {
  background: linear-gradient(125deg, #071d32 0%, #0b2845 48%, #123b61 100%);
}

body.hd-v3 .ls-main .ls-hero.hd-page-hero--project {
  background: linear-gradient(120deg, #071d32 0%, #123b61 100%);
}

body.hd-v3 .ls-main .hd-page-hero--production .ls-text-link,
body.hd-v3 .ls-main .hd-page-hero--project .ls-text-link {
  color: #8bd6ff;
}

/* Homepage inquiry heading sits on the shared dark CTA surface; the form stays white. */
body.hd-v3 .hd-clarity-home .clarity-inquiry.hd-section--cta > .shell > .clarity-section-heading h2 {
  color: #fff;
}

body.hd-v3 .hd-clarity-home .clarity-inquiry.hd-section--cta > .shell > .clarity-section-heading p:not(.clarity-kicker) {
  color: #d7e4ef;
}

body.hd-v3 .hd-clarity-home .clarity-inquiry.hd-section--cta > .shell > .clarity-section-heading .clarity-kicker,
body.hd-v3 .hd-clarity-home .clarity-inquiry.hd-section--cta > .shell > .clarity-section-heading .clarity-text-link {
  color: #8bd6ff;
}

/* Reusable dark sections must not inherit ink intended for white cards. */
body.hd-v3 .hd-section--dark > .shell > .section-heading h1,
body.hd-v3 .hd-section--dark > .shell > .section-heading h2,
body.hd-v3 .hd-section--dark > .shell > .section-heading h3,
body.hd-v3 .hd-section--cta > .shell > .section-heading h1,
body.hd-v3 .hd-section--cta > .shell > .section-heading h2,
body.hd-v3 .hd-section--cta > .shell > .section-heading h3,
body.hd-v3 .hd-section--dark > .shell > .split-heading h1,
body.hd-v3 .hd-section--dark > .shell > .split-heading h2,
body.hd-v3 .hd-section--dark > .shell > .split-heading h3,
body.hd-v3 .hd-section--cta > .shell > .split-heading h1,
body.hd-v3 .hd-section--cta > .shell > .split-heading h2,
body.hd-v3 .hd-section--cta > .shell > .split-heading h3 {
  color: #fff;
}

body.hd-v3 .hd-section--dark > .shell > .section-heading p,
body.hd-v3 .hd-section--cta > .shell > .section-heading p,
body.hd-v3 .hd-section--dark > .shell > .split-heading p,
body.hd-v3 .hd-section--cta > .shell > .split-heading p {
  color: #d7e4ef;
}

body.hd-v3 .hd-section--dark > .shell > .section-heading .section-kicker,
body.hd-v3 .hd-section--cta > .shell > .section-heading .section-kicker,
body.hd-v3 .hd-section--dark > .shell > .split-heading .section-kicker,
body.hd-v3 .hd-section--cta > .shell > .split-heading .section-kicker {
  color: #8bd6ff;
}

/* Legacy dark cards used across projects, evidence and editorial pages. */
body.hd-v3 .project-inquiry-callout h2,
body.hd-v3 .project-inquiry-callout h3,
body.hd-v3 .hd-news-cta h2,
body.hd-v3 .hd-news-cta h3,
body.hd-v3 .entrance-card span {
  color: #fff;
}

body.hd-v3 .project-inquiry-callout a:not(.button-orange),
body.hd-v3 .hd-news-cta a:not(.v5-btn),
body.hd-v3 .ls-main .ls-line-inquiry a:not(.button-orange):not(.hd-visual-button) {
  color: #8bd6ff;
}

/* Preserve readable foregrounds inside white cards nested in dark sections. */
body.hd-v3 .hd-section--dark :is(.content-card, .clarity-card, .project-form),
body.hd-v3 .hd-section--cta :is(.content-card, .clarity-card, .project-form) {
  color: #14263a;
}

body.hd-v3 .hd-section--dark :is(.content-card, .clarity-card, .project-form) :is(h1, h2, h3, h4),
body.hd-v3 .hd-section--cta :is(.content-card, .clarity-card, .project-form) :is(h1, h2, h3, h4) {
  color: #14263a;
}

body.hd-v3 .hd-section--dark :is(.content-card, .clarity-card, .project-form) p,
body.hd-v3 .hd-section--cta :is(.content-card, .clarity-card, .project-form) p {
  color: #5e6d7e;
}

@media (forced-colors: active) {
  body.hd-v3 .hd-page-hero,
  body.hd-v3 .hd-section--dark,
  body.hd-v3 .hd-section--cta,
  body.hd-v3 .project-inquiry-callout,
  body.hd-v3 .hd-news-cta {
    border: 1px solid CanvasText;
  }
}
