/**
 * Horizon Canvas — assets/css/colours.css.
 *
 * Final paint roles shared across templates. Layouts keep their composition;
 * contrast panels, photographic captions and cards inherit their own text roles.
 * No filters are applied to logos, photographs or rendered roof materials.
 *
 * @package Horizon_Canvas
 * @author Dwayne Silvera
 * @since 1.0.0
 */
body.rmsih-body {
  background: var(--horizon-background) !important;
}
#rmsih[class] {
  --hc-heading: var(--horizon-heading);
  --hc-text: var(--horizon-text);
  --hc-muted: var(--horizon-muted);
  --hc-link: var(--horizon-link);
  background: var(--horizon-background) !important;
  color: var(--hc-text);
}
#rmsih[class] main :is(h1, h2, h3, h4, h5, h6):not(:where(.original-slider *)) {
  color: var(--hc-heading) !important;
}
#rmsih[class] main :is(p, li, dt, dd, blockquote, address, label):not(:where(.original-slider *)) {
  color: var(--hc-text) !important;
}
#rmsih[class] main :is(.small, figcaption, .illustration-note, .advisory-illustration-note) {
  color: var(--hc-muted) !important;
}
#rmsih[class] main .eyebrow {
  color: var(--hc-link) !important;
}
#rmsih[class]
  main
  a:not(
    :where(
      .original-slider *,
      .cta,
      .pill,
      .service-card,
      .rms-photo-link,
      .service-related-card,
      .rmsre-component *,
      .wp-block-button__link
    )
  ) {
  color: var(--hc-link);
}
/* Page surfaces follow the palette, including content and search fallbacks. */
#rmsih[class]
  :is(
    .legacy-content,
    .advisory-inspection,
    .service-details,
    .service-related,
    .gallery-contact,
    .gallery-opening
  ) {
  background-color: var(--horizon-background) !important;
}
#rmsih[class]
  :is(
    .services,
    .about-people,
    .safety-approach,
    .service-overview,
    .policy-document,
    .safety-gallery-content
  ) {
  --hc-heading: var(--horizon-panel-text);
  --hc-text: var(--horizon-panel-text);
  --hc-muted: var(--horizon-panel-text);
  --hc-link: var(--horizon-panel-text);
  background: var(--horizon-panel) !important;
  color: var(--hc-text);
}
#rmsih[class]
  :is(
    .certificate-card,
    .team-value,
    .safety-card,
    .service-information-item,
    .service-related-card,
    .service-point,
    .environment,
    .environment-card,
    .safety-environment,
    .safety-document,
    .advisory-point-panels,
    .diagram-note
  ) {
  --hc-heading: var(--horizon-card-heading);
  --hc-text: var(--horizon-card-text);
  --hc-muted: var(--horizon-card-text);
  --hc-link: var(--horizon-card-text);
  background: var(--horizon-surface) !important;
  color: var(--hc-text);
  border-color: var(--horizon-border) !important;
}
#rmsih[class] :is(.team-value summary, .service-information-item summary, .service-related-card) {
  color: var(--hc-heading);
}
/* Image-backed sections deliberately retain a readable photographic text role. */
#rmsih[class]
  :is(
    .hero,
    .service-immersive-hero,
    .project-image,
    .service-card,
    .gallery-hover-copy,
    .advisory-case-visual,
    .rms-photo-dialog
  ) {
  --hc-heading: var(--horizon-photo-text);
  --hc-text: var(--horizon-photo-text);
  --hc-muted: var(--horizon-photo-text);
  --hc-link: var(--horizon-photo-text);
  color: var(--horizon-photo-text);
}
#rmsih[class] .gallery-hover-title {
  color: var(--horizon-photo-text);
}
#rmsih[class] :is(.statement, .advisory-statement, .contact) {
  --hc-heading: var(--horizon-accent-text);
  --hc-text: var(--horizon-accent-text);
  --hc-muted: var(--horizon-accent-text);
  --hc-link: var(--horizon-accent-text);
  color: var(--horizon-accent-text);
  background: var(--horizon-accent-panel) !important;
}
#rmsih[class] .contact::before {
  background: var(--horizon-accent-panel) !important;
}
#rmsih[class] :is(.contact-method, .service-point, .team-value, .service-information-item) {
  border-color: var(--horizon-border) !important;
}
/* The same independent button roles apply to every page and native content form. */
#rmsih[class]
  :is(
    .cta,
    .pill,
    .rmst-search button,
    .wp-block-button__link,
    .entry-content form button,
    input[type='submit'],
    .roof-controls button,
    .layer-controls button,
    .rmsre-play,
    .rmsre-retry
  ) {
  background: var(--horizon-button) !important;
  color: var(--horizon-button-text) !important;
  border-color: var(--horizon-button) !important;
}
#rmsih[class]
  :is(
    .cta,
    .pill,
    .rmst-search button,
    .wp-block-button__link,
    .entry-content form button,
    input[type='submit'],
    .roof-controls button,
    .layer-controls button,
    .rmsre-play,
    .rmsre-retry
  ):is(:hover, :focus-visible) {
  background: var(--horizon-button-hover) !important;
  color: var(--horizon-button-hover-text) !important;
  border-color: var(--horizon-button-hover) !important;
}
#rmsih[class] :is(.cta, .pill, .wp-block-button__link) :is(span, strong, em) {
  color: inherit !important;
}
#rmsih[class]
  :is(.entry-content, .rmst-search)
  :is(input:not([type='submit']):not([type='checkbox']):not([type='radio']), textarea, select) {
  background: var(--horizon-surface) !important;
  color: var(--horizon-card-text);
  border-color: var(--horizon-border) !important;
}
#rmsih[class] :is(.entry-content, .rmst-search) :is(input, textarea)::placeholder {
  color: var(--horizon-card-text);
  opacity: 0.7;
}
/* Header and footer remain independent of the page/background controls. */
#rmsih[class] .site-header,
#rmsih[class] .site-header #rms-navigation,
#rmsih[class] .site-header .sub-menu,
#rmsih[class] .header-search form {
  background: var(--horizon-menu) !important;
  border-color: var(--horizon-border) !important;
  color: var(--horizon-menu-text);
}
#rmsih[class] .site-header :is(.rms-menu a, .menu-toggle, .submenu-toggle, .header-search summary) {
  color: var(--horizon-menu-text) !important;
}
#rmsih[class]
  .site-header
  :is(.rms-menu a, .menu-toggle, .submenu-toggle, .header-search summary):is(
    :hover,
    :focus-visible
  ),
#rmsih[class] .site-header .rms-menu :is(.current-menu-item, .current-menu-ancestor) > a {
  color: var(--horizon-menu-hover) !important;
}
#rmsih[class] .site-header nav a::after {
  background: var(--horizon-menu-hover) !important;
}
#rmsih[class] .horizon-footer-band {
  background: var(--horizon-footer) !important;
}
#rmsih[class] .site-footer {
  color: var(--horizon-footer-text);
  background: transparent !important;
}
#rmsih[class] .site-footer :is(a, p, h3, small, .footer-bottom, .footer-brand) {
  color: var(--horizon-footer-text) !important;
}
#rmsih[class] .site-footer::before {
  background: var(--horizon-border) !important;
}
#rmsih[class] .site-footer a:is(:hover, :focus-visible) {
  text-decoration: underline;
}
/* The Spatial stage keeps its own studio treatment; its heading follows the page. */
#rmsih[class] .rmsre-component > h2 {
  color: var(--hc-heading) !important;
}

#rmsih[class]
  main
  :is(h1, h2, h3, h4, h5, h6):not(:where(.original-slider *))
  :is(span, strong, em),
#rmsih[class] .text-button span {
  color: inherit !important;
}

#rmsih[class] .chapter-guide {
  background: var(--horizon-menu) !important;
  border-color: var(--horizon-border) !important;
  color: var(--horizon-menu-text);
}
#rmsih[class] .chapter-guide a {
  color: var(--horizon-menu-text);
}
#rmsih[class] .chapter-guide a:is([aria-current], :hover, :focus-visible) {
  background: var(--horizon-button) !important;
  color: var(--horizon-button-text) !important;
}

/* Statement lettering is an explicit role: older yellow span colours must not win. */
#rmsih[class] main :is(.statement, .advisory-statement) span {
  color: var(--horizon-accent-text) !important;
  -webkit-text-fill-color: currentColor !important;
}
