/*
 * ARCHMETAL final colour system
 * Accessibility and cascade reconciliation layer.
 */

:root {
  --am-readable-blue: #00689d;
  --am-readable-blue-hover: #004f78;
  --am-readable-orange: #8e3500;
  --am-ink: #17191c;
  --am-copy: #34393f;
  --am-muted: #555b62;
  --am-soft: #686d74;
  --am-line: #aeb4ba;
  --am-focus: #d88900;
}

/* Primary controls: white copy now reaches AA contrast in every state. */
.mafref-blue-button,
.mafref-video-pill,
.mafref-lead button[type="submit"] {
  color: #fff !important;
  background: var(--am-readable-blue) !important;
  border-color: var(--am-readable-blue) !important;
}

.mafref-blue-button:hover,
.mafref-blue-button:focus-visible,
.mafref-video-pill:hover,
.mafref-video-pill:focus-visible,
.mafref-lead button[type="submit"]:hover,
.mafref-lead button[type="submit"]:focus-visible {
  color: #fff !important;
  background: var(--am-readable-blue-hover) !important;
  border-color: var(--am-readable-blue-hover) !important;
}

.mafref-video-card button {
  color: #fff !important;
  background: #b91c1c !important;
}

/* Light sections: restore secondary copy that was too close to the surface. */
.mafref-why__head > span,
.mafref-section-label,
.mafref-eyebrow {
  color: #5c6168 !important;
}

.mafref-story-grid span,
.mafref-project-card__meta,
.mafref-project-card small {
  color: #50555c !important;
}

.mafref-consent,
.mafref-consent span,
.mafref-consent label {
  color: #4e545b !important;
}

.mafref-legal-note span {
  color: #595f66 !important;
}

.mafref-legal-note h2,
.mafref-legal-note h3,
.mafref-legal-note strong {
  color: var(--am-ink) !important;
}

.mafref-legal-note p {
  color: #4f555c !important;
}

.mafref-legal-note a {
  color: var(--am-readable-blue) !important;
  text-decoration-color: currentColor !important;
}

.mafref-legal-note a:hover,
.mafref-legal-note a:focus-visible {
  color: var(--am-readable-blue-hover) !important;
}

.mafref-footer__slogan,
.mafref-footer__meta,
.mafref-footer small {
  color: #62676e !important;
}

body.home .contact-footer small,
body.home footer small,
body.home .mafref-footer-wrap .contact-footer small.text-soft,
body.home .contact-footer > div > div:first-child > p {
  color: #62676e !important;
}

/* The contacts heading reuses the light-section class on a dark surface. */
.mafref-contacts .mafref-why__head > span {
  color: #d7dce0 !important;
}

/* Form copy, placeholders and borders no longer disappear into white. */
.mafref-lead input,
.mafref-lead textarea,
.mafref-lead select {
  color: var(--am-ink) !important;
  background: #fff !important;
  border-color: var(--am-line) !important;
}

.mafref-lead input::placeholder,
.mafref-lead textarea::placeholder {
  color: #666c73 !important;
  opacity: 1 !important;
}

.mafref-lead input:hover,
.mafref-lead textarea:hover,
.mafref-lead select:hover {
  border-color: #6d747b !important;
}

/*
 * Internal pages use a light presentation. Old dark-theme variables were
 * still reaching these nodes, producing near-white headings on white cards.
 */
body:not(.home) {
  --gm-accent: var(--am-readable-blue) !important;
  --gm-accent-hover: var(--am-readable-blue-hover) !important;
}

body:not(.home) .akk-inner,
body:not(.home) .akk-main,
body:not(.home) .akk-article {
  color: var(--am-ink) !important;
}

body:not(.home) .akk-prose {
  color: var(--am-copy) !important;
}

body:not(.home) .akk-prose h1,
body:not(.home) .akk-prose h2,
body:not(.home) .akk-prose h3,
body:not(.home) .akk-prose h4,
body:not(.home) .akk-prose strong {
  color: var(--am-ink) !important;
}

body:not(.home) .akk-prose p,
body:not(.home) .akk-prose li {
  color: var(--am-copy) !important;
}

body:not(.home) .akk-prose a {
  color: var(--am-readable-orange) !important;
  text-decoration-color: currentColor !important;
}

body:not(.home) .akk-prose a:hover,
body:not(.home) .akk-prose a:focus-visible {
  color: #632500 !important;
}

body:not(.home) .akk-breadcrumb,
body:not(.home) .akk-breadcrumb a,
body:not(.home) .akk-section-index,
body:not(.home) .akk-article__grid aside span {
  color: var(--am-readable-blue) !important;
}

body:not(.home) .akk-article__grid aside,
body:not(.home) .akk-article__grid aside p {
  color: #4d535a !important;
}

/* White facts and feature cards. */
body:not(.home) .am-detail-grid article,
body:not(.home) .am-product-facts article,
body:not(.home) .akk-detail-grid article,
body:not(.home) .akk-feature-grid article {
  color: var(--am-ink) !important;
}

body:not(.home) .am-detail-grid h2,
body:not(.home) .am-detail-grid h3,
body:not(.home) .am-product-facts h2,
body:not(.home) .am-product-facts h3,
body:not(.home) .akk-detail-grid h2,
body:not(.home) .akk-detail-grid h3,
body:not(.home) .akk-feature-grid h2,
body:not(.home) .akk-feature-grid h3 {
  color: var(--am-ink) !important;
}

body:not(.home) .am-detail-grid p,
body:not(.home) .am-product-facts p,
body:not(.home) .akk-detail-grid p,
body:not(.home) .akk-feature-grid p {
  color: #4d535a !important;
}

/* Dark process cards retain their dark character with explicit light copy. */
body:not(.home) .am-detail-process article {
  color: #fff !important;
  background: #2d3136 !important;
  border-color: #4f565e !important;
}

body:not(.home) .am-detail-process h2,
body:not(.home) .am-detail-process h3,
body:not(.home) .am-detail-process h4,
body:not(.home) .am-detail-process strong {
  color: #fff !important;
}

body:not(.home) .am-detail-process p,
body:not(.home) .am-detail-process li {
  color: #e1e5e9 !important;
}

/* The process heading sits outside the dark cards on a white surface. */
body:not(.home) .am-detail-process > div:first-child .akk-section-index {
  color: var(--am-readable-blue) !important;
}

body:not(.home) .am-detail-process > div:first-child h2 {
  color: var(--am-ink) !important;
}

/* Notes use a warm light surface, not the dark card palette. */
body:not(.home) .am-detail-note h2,
body:not(.home) .am-detail-note h3 {
  color: var(--am-ink) !important;
}

body:not(.home) .am-detail-note p {
  color: #4d535a !important;
}

body:not(.home) .am-detail-grid img,
body:not(.home) .am-detail-note img,
body:not(.home) .am-editorial-files img {
  opacity: 1 !important;
  filter: none !important;
}

body:not(.home) .am-detail-note > span {
  background: #e3edf2 !important;
}

/* Editorial data, project passports, downloads and gallery captions. */
body:not(.home) .am-editorial-data h2,
body:not(.home) .am-editorial-data h3,
body:not(.home) .am-editorial-files h2,
body:not(.home) .am-editorial-files strong,
body:not(.home) .am-editorial-gallery h2,
body:not(.home) .am-case-passport h2,
body:not(.home) .am-case-passport h3,
body:not(.home) .am-case-passport dd {
  color: var(--am-ink) !important;
}

body:not(.home) .am-editorial-data p,
body:not(.home) .am-editorial-data__chips span,
body:not(.home) .am-editorial-gallery span,
body:not(.home) .am-editorial-files small,
body:not(.home) .am-case-passport p,
body:not(.home) .am-case-passport dt,
body:not(.home) .am-case-passport li {
  color: #4d535a !important;
}

/* Search and archive accents used the original decorative cyan as text. */
body:not(.home) .am-search-form button {
  color: #fff !important;
  background: var(--am-readable-blue) !important;
}

body:not(.home) .am-search-form button:hover,
body:not(.home) .am-search-form button:focus-visible {
  background: var(--am-readable-blue-hover) !important;
}

body:not(.home) .akk-archive-card > span,
body:not(.home) .akk-archive-card b {
  color: var(--am-readable-blue) !important;
}

body:not(.home) .akk-archive-card:hover > span,
body:not(.home) .akk-archive-card:focus-visible > span,
body:not(.home) .akk-archive-card:hover b,
body:not(.home) .akk-archive-card:focus-visible b {
  color: var(--am-readable-blue-hover) !important;
}

/* Monochrome assets and line icons gain enough edge contrast. */
.mafref-trust-grid img,
.mafref-logo-rail img {
  opacity: .88 !important;
  filter: grayscale(1) contrast(1.25) !important;
}

.mafref-advantage-grid img {
  background: #e5eef3 !important;
  filter: contrast(1.28) saturate(.82) !important;
}

/* Stronger photo scrim prevents project captions from washing out. */
.mafref-project-card::after {
  background: linear-gradient(180deg, rgba(8, 12, 15, .06) 24%, rgba(8, 12, 15, .88) 100%) !important;
}

.mafref-project-card,
.mafref-project-card h2,
.mafref-project-card h3,
.mafref-project-card p,
.mafref-project-card span {
  color: #fff !important;
}

.mafref-project-card > div {
  z-index: 2 !important;
}

.mafref-project-card h2,
.mafref-project-card h3,
.mafref-project-card p,
.mafref-project-card span {
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 4px 18px rgba(0, 0, 0, .65);
}

/* Slider arrows use a solid dark control instead of translucent grey. */
.mafref-hero__control button {
  color: #fff !important;
  background: #4e545b !important;
  border-color: #4e545b !important;
}

.mafref-hero__control button:hover,
.mafref-hero__control button:focus-visible {
  color: #fff !important;
  background: #34393f !important;
  border-color: #34393f !important;
}

/* High-visibility keyboard focus on both dark and light surfaces. */
body :where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--am-focus) !important;
  outline-offset: 3px !important;
}

@media (max-width: 767px) {
  .mafref-why__head > span {
    color: #5c6168 !important;
  }

  .mafref-story-grid span {
    color: #50555c !important;
  }
}
