/*
 * MJH site-wide contrast contract
 * Loaded last. Pairs every scoped foreground contract with its intended surface.
 */
:root{
  --mjh-light:#F3F0EA;
  --mjh-surface:#E8E3DA;
  --mjh-ink:#0D0B09;
  --mjh-dark:#0B0907;
  --mjh-accent:#E20C12;
  --mjh-gold:#F7B25C;
  --mjh-amber:#A96817;
  --mjh-on-dark:#FFFFFF;
  --mjh-light-muted:#0D0B09;
  --mjh-dark-muted:#E8E3DA;
  --mjh-light-border:rgba(13,11,9,.24);
  --mjh-dark-border:rgba(255,255,255,.24);
}

/* Light surfaces */
:where(.outcome-intro,.services-section,.visual-proof,.partner-fit,.evidence-section,.page-hero,.about-grid,.about-principles,.services-editorial,.detail-hero,.detail-body,.service-trust,.contact-layout,.legal,.privacy-policy main,.mjh-proof-section:not(.mjh-proof-visual)){
  color:var(--mjh-ink);
}
:where(.services-editorial,.detail-body,.service-trust,.contact-layout,.legal,.mjh-proof-section:not(.mjh-proof-visual)){
  background-color:var(--mjh-light);
}
:where(.outcome-intro,.services-section,.visual-proof,.partner-fit,.evidence-section,.page-hero,.about-grid,.about-principles,.services-editorial,.detail-hero,.detail-body,.service-trust,.contact-layout,.legal,.privacy-policy main,.mjh-proof-section:not(.mjh-proof-visual))
:where(h1,h2,h3,h4,h5,h6,strong,label){
  color:var(--mjh-ink);
}
:where(.outcome-intro,.services-section,.visual-proof,.partner-fit,.evidence-section,.page-hero,.about-grid,.about-principles,.services-editorial,.detail-hero,.detail-body,.service-trust,.contact-layout,.legal,.privacy-policy main,.mjh-proof-section:not(.mjh-proof-visual))
:where(p,li,dd,figcaption,.section-copy,.mjh-proof-note){
  color:var(--mjh-light-muted);
}
:where(.services-editorial,.detail-body,.service-trust,.contact-layout,.legal,.mjh-proof-section:not(.mjh-proof-visual)) a{
  color:var(--mjh-ink);
  text-decoration-color:var(--mjh-accent);
}
:where(.services-editorial,.detail-body,.service-trust,.contact-layout,.legal,.mjh-proof-section:not(.mjh-proof-visual)) a:hover,
:where(.services-editorial,.detail-body,.service-trust,.contact-layout,.legal,.mjh-proof-section:not(.mjh-proof-visual)) a:focus-visible{
  color:var(--mjh-ink);
  text-decoration-thickness:2px;
}
:where(.service-card,.services-editorial-list>a,.contact-form,.mjh-project-card,.proof-points>*,.partner-fit-grid>*,.values-v2>*){
  border-color:var(--mjh-light-border);
}
:where(.services-editorial-list>a):hover,
:where(.services-editorial-list>a):focus-visible{
  background:var(--mjh-surface);
  color:var(--mjh-ink);
  outline:2px solid var(--mjh-amber);
  outline-offset:2px;
}
.services-editorial-list .service-index{
  color:var(--mjh-ink);
}
.services-editorial-list .service-editorial-icon{
  color:var(--mjh-amber);
}

/* Dark surfaces, including every How We Work/process section */
:where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer){
  background-color:var(--mjh-dark);
  color:var(--mjh-on-dark);
}
:where(.dark-section.service-framework,.single-mjh_service .service-framework){
  background:var(--mjh-dark);
  color:var(--mjh-on-dark);
}
:where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer)
:where(h1,h2,h3,h4,h5,h6,strong,label),
:where(.dark-section.service-framework,.single-mjh_service .service-framework)
:where(h1,h2,h3,h4,h5,h6,strong,label){
  color:var(--mjh-on-dark);
}
:where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer)
:where(p,li,dd,figcaption,.section-copy,.mjh-experience-grid p),
:where(.dark-section.service-framework,.single-mjh_service .service-framework)
:where(p,li,dd,figcaption,.section-copy){
  color:var(--mjh-dark-muted);
}
:where(.dark-section.service-framework,.single-mjh_service .service-framework) .framework-grid{
  border-color:var(--mjh-dark-border);
}
:where(.dark-section.service-framework,.single-mjh_service .service-framework) .framework-grid article{
  background:var(--mjh-dark);
  border-color:var(--mjh-dark-border);
}
:where(.dark-section.service-framework,.single-mjh_service .service-framework) .framework-grid span,
:where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer) .kicker{
  color:var(--mjh-gold);
}
:where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer) a{
  color:var(--mjh-on-dark);
  text-decoration-color:var(--mjh-gold);
}
:where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer) a:hover,
:where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer) a:focus-visible{
  color:var(--mjh-gold);
}
:where(.dark-section,.global-section,.mjh-proof-visual) :where(article,.proof-points>*,.deal-grid>*,.framework-grid>*){
  border-color:var(--mjh-dark-border);
}

/* Header, dropdown and mobile navigation */
.site-header,.primary-nav,.primary-nav .sub-menu{
  color:var(--mjh-on-dark);
}
.primary-nav .sub-menu{
  background:var(--mjh-dark);
  border-color:var(--mjh-dark-border);
}
.primary-nav :where(a,button),.menu-toggle{
  color:var(--mjh-on-dark);
}
.primary-nav :where(a,button):hover,
.primary-nav :where(a,button):focus-visible,
.menu-toggle:hover,.menu-toggle:focus-visible,
.primary-nav .current-menu-item>a{
  color:var(--mjh-gold);
}
.primary-nav .sub-menu a{
  color:var(--mjh-dark-muted)!important;
}
.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu a:focus-visible{
  background:var(--mjh-surface);
  color:var(--mjh-ink)!important;
}
.primary-nav :where(a,button):focus-visible,.menu-toggle:focus-visible{
  outline:2px solid var(--mjh-gold);
  outline-offset:3px;
}

/* Buttons and CTAs */
:where(.button,.btn,.wp-element-button,.contact-form button,.contact-form input[type="submit"]){
  background:var(--mjh-accent);
  border-color:var(--mjh-accent);
  color:var(--mjh-on-dark);
}
:where(.button,.btn,.wp-element-button,.contact-form button,.contact-form input[type="submit"]):hover,
:where(.button,.btn,.wp-element-button,.contact-form button,.contact-form input[type="submit"]):focus-visible{
  background:var(--mjh-dark);
  border-color:var(--mjh-gold);
  color:var(--mjh-gold);
  outline:2px solid var(--mjh-gold);
  outline-offset:3px;
}

/* Forms, validation and notices */
.contact-form{
  background:var(--mjh-surface);
  color:var(--mjh-ink);
  border-color:var(--mjh-light-border);
}
.contact-form :where(input,select,textarea){
  background:var(--mjh-light);
  border-color:rgba(13,11,9,.38);
  color:var(--mjh-ink);
}
.contact-form :where(input,textarea)::placeholder{
  color:var(--mjh-light-muted);
  opacity:1;
}
.contact-form :where(input,select,textarea):focus{
  border-color:var(--mjh-amber);
  outline:3px solid rgba(169,104,23,.35);
}
.contact-form :where(.form-note,.notice,.message,.success,.error,.invalid,.wpcf7-not-valid-tip){
  color:var(--mjh-ink);
}
.contact-form :where(.error,.invalid,.wpcf7-not-valid-tip){
  border-left:3px solid var(--mjh-accent);
}

/* Footer metadata and proof/project details */
.site-footer :where(p,a,li,.footer-bottom),.mjh-footer-lead p{
  color:var(--mjh-dark-muted);
}
.site-footer strong,.site-footer a:hover,.site-footer a:focus-visible{
  color:var(--mjh-gold);
}
.mjh-project-card :where(h3,strong){
  color:var(--mjh-ink);
}
.mjh-project-card :where(p,figcaption,span){
  color:var(--mjh-light-muted);
}
.mjh-proof-visual .mjh-project-card :where(h3,strong){
  color:var(--mjh-on-dark);
}
.mjh-proof-visual .mjh-project-card :where(p,figcaption,span){
  color:var(--mjh-dark-muted);
}

/* Keyboard focus remains visible on every surface */
main a:focus-visible,footer a:focus-visible{
  outline:2px solid currentColor;
  outline-offset:3px;
}

@media (max-width:900px){
  .primary-nav{
    background:var(--mjh-dark);
    color:var(--mjh-on-dark);
  }
  .primary-nav .sub-menu{
    background:var(--mjh-dark);
    border-color:var(--mjh-dark-border);
  }
}
@media (max-width:640px){
  :where(.dark-section.service-framework,.single-mjh_service .service-framework) .framework-grid article{
    background:var(--mjh-dark);
    color:var(--mjh-on-dark);
  }
}

/* Specificity reinforcement against the established 2.2.0 cascade */
.mjh-contrast-contract :where(.outcome-intro,.services-section,.visual-proof,.partner-fit,.evidence-section,.page-hero,.about-grid,.about-principles,.services-editorial,.detail-hero,.detail-body,.service-trust,.contact-layout,.legal,.privacy-policy main,.mjh-proof-section:not(.mjh-proof-visual)) :where(h1,h2,h3,h4,h5,h6,strong,label){
  color:var(--mjh-ink);
}
.mjh-contrast-contract :where(.outcome-intro,.services-section,.visual-proof,.partner-fit,.evidence-section,.page-hero,.about-grid,.about-principles,.services-editorial,.detail-hero,.detail-body,.service-trust,.contact-layout,.legal,.privacy-policy main,.mjh-proof-section:not(.mjh-proof-visual)) :where(p,li,dd,figcaption,.section-copy,.mjh-proof-note){
  color:var(--mjh-light-muted);
}
.mjh-contrast-contract :where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer) :where(h1,h2,h3,h4,h5,h6,strong,label){
  color:var(--mjh-on-dark);
}
.mjh-contrast-contract :where(.hero,.dark-section,.global-section,.cta,.mjh-proof-visual,.mjh-footer-lead,.site-footer) :where(p,li,dd,figcaption,.section-copy,.mjh-experience-grid p){
  color:var(--mjh-dark-muted);
}
.mjh-contrast-contract .single-mjh_service .service-framework :where(h1,h2,h3,h4,h5,h6,strong,label){
  color:var(--mjh-on-dark);
}
.mjh-contrast-contract .single-mjh_service .service-framework :where(p,li,dd,figcaption,.section-copy){
  color:var(--mjh-dark-muted);
}
