/* Site-wide text contrast guard. Loaded last to prevent white-on-white and dark-on-dark regressions. */

:root{
  --contrast-heading:#15171d;
  --contrast-body:#404958;
  --contrast-muted:#667080;
  --contrast-inverse:#f8fafc;
  --contrast-inverse-body:#c7ced8;
}

/* Default readable treatment for all light surfaces. */
.page section:not(.dark):not(.contrast-band):not(.advantage-section):not(.home-final-cta):not(.launch-cta):not(.hero):not(.home-hero):not(.page-hero-dark):not(.public-hero),
.page .card,
.page .enterprise-card,
.page .qsb-panel,
.page .platform-point,
.page .priority-list,
.page .solution-row,
.page .timeline-item,
.page .resource-card,
.page .profile-card:not(.dark){
  color:var(--contrast-body);
}

.page section:not(.dark):not(.contrast-band):not(.advantage-section):not(.home-final-cta):not(.launch-cta):not(.hero):not(.home-hero):not(.page-hero-dark):not(.public-hero) h1,
.page section:not(.dark):not(.contrast-band):not(.advantage-section):not(.home-final-cta):not(.launch-cta):not(.hero):not(.home-hero):not(.page-hero-dark):not(.public-hero) h2,
.page section:not(.dark):not(.contrast-band):not(.advantage-section):not(.home-final-cta):not(.launch-cta):not(.hero):not(.home-hero):not(.page-hero-dark):not(.public-hero) h3,
.page section:not(.dark):not(.contrast-band):not(.advantage-section):not(.home-final-cta):not(.launch-cta):not(.hero):not(.home-hero):not(.page-hero-dark):not(.public-hero) h4,
.page .card h1,.page .card h2,.page .card h3,.page .card h4,
.page .enterprise-card h1,.page .enterprise-card h2,.page .enterprise-card h3,.page .enterprise-card h4,
.page .qsb-panel h1,.page .qsb-panel h2,.page .qsb-panel h3,.page .qsb-panel h4,
.page .solution-row h3,
.page .priority-list h3,
.page .timeline-item h3{
  color:var(--contrast-heading)!important;
}

.page section:not(.dark):not(.contrast-band):not(.advantage-section):not(.home-final-cta):not(.launch-cta):not(.hero):not(.home-hero):not(.page-hero-dark):not(.public-hero) p,
.page section:not(.dark):not(.contrast-band):not(.advantage-section):not(.home-final-cta):not(.launch-cta):not(.hero):not(.home-hero):not(.page-hero-dark):not(.public-hero) li,
.page section:not(.dark):not(.contrast-band):not(.advantage-section):not(.home-final-cta):not(.launch-cta):not(.hero):not(.home-hero):not(.page-hero-dark):not(.public-hero) span:not(.availability):not(.section-tag):not(.eyebrow-red):not(.home-kicker):not(.public-kicker),
.page .card p,.page .card li,
.page .enterprise-card p,.page .enterprise-card li,
.page .qsb-panel p,.page .qsb-panel li,
.page .solution-row p,.page .solution-row li,
.page .priority-list p,
.page .timeline-item p{
  color:var(--contrast-body)!important;
}

/* Explicit inverse treatment for all dark surfaces. */
.hero,.home-hero,.page-hero-dark,.public-hero,
.dark,.contrast-band,.advantage-section,.home-final-cta,.launch-cta,
.cta-panel,.resource-feature,
.dark .enterprise-card,.dark .card{
  color:var(--contrast-inverse);
}

.hero h1,.hero h2,.hero h3,.hero h4,
.home-hero h1,.home-hero h2,.home-hero h3,.home-hero h4,
.page-hero-dark h1,.page-hero-dark h2,.page-hero-dark h3,.page-hero-dark h4,
.public-hero h1,.public-hero h2,.public-hero h3,.public-hero h4,
.dark h1,.dark h2,.dark h3,.dark h4,
.contrast-band h1,.contrast-band h2,.contrast-band h3,.contrast-band h4,
.advantage-section h1,.advantage-section h2,.advantage-section h3,.advantage-section h4,
.home-final-cta h1,.home-final-cta h2,.home-final-cta h3,.home-final-cta h4,
.launch-cta h1,.launch-cta h2,.launch-cta h3,.launch-cta h4,
.cta-panel h1,.cta-panel h2,.cta-panel h3,.cta-panel h4,
.resource-feature h1,.resource-feature h2,.resource-feature h3,.resource-feature h4{
  color:var(--contrast-inverse)!important;
}

.hero p,.hero li,.hero span,
.home-hero p,.home-hero li,.home-hero span,
.page-hero-dark p,.page-hero-dark li,.page-hero-dark span,
.public-hero p,.public-hero li,.public-hero span,
.dark p,.dark li,
.contrast-band p,.contrast-band li,
.advantage-section p,.advantage-section li,
.home-final-cta p,.home-final-cta li,
.launch-cta p,.launch-cta li,
.cta-panel p,.cta-panel li,
.resource-feature p,.resource-feature li{
  color:var(--contrast-inverse-body)!important;
}

/* Every red CTA/banner surface uses white copy. White controls inside remain dark. */
.page :is(section,div,article)[class*="cta"],
.page :is(section,div,article).red-panel,
.page :is(section,div,article).red-band,
.page :is(section,div,article).brand-panel,
.page :is(section,div,article).brand-band{
  color:#fff;
}

.page :is(section,div,article)[class*="cta"] :is(h1,h2,h3,h4,p,li,span,strong,small,em),
.page :is(section,div,article).red-panel :is(h1,h2,h3,h4,p,li,span,strong,small,em),
.page :is(section,div,article).red-band :is(h1,h2,h3,h4,p,li,span,strong,small,em),
.page :is(section,div,article).brand-panel :is(h1,h2,h3,h4,p,li,span,strong,small,em),
.page :is(section,div,article).brand-band :is(h1,h2,h3,h4,p,li,span,strong,small,em){
  color:#fff!important;
}

.page :is(section,div,article)[class*="cta"] :is(.btn,.button,button,a.btn),
.page :is(section,div,article).red-panel :is(.btn,.button,button,a.btn),
.page :is(section,div,article).red-band :is(.btn,.button,button,a.btn),
.page :is(section,div,article).brand-panel :is(.btn,.button,button,a.btn),
.page :is(section,div,article).brand-band :is(.btn,.button,button,a.btn){
  color:#15171d!important;
}

.page :is(section,div,article)[class*="cta"] :is(.btn-primary,.btn-red,.nav-cta),
.page :is(section,div,article).red-panel :is(.btn-primary,.btn-red),
.page :is(section,div,article).red-band :is(.btn-primary,.btn-red){
  color:#fff!important;
}

/* Preserve intentional brand accents. */
.home-hero h1 span,
.eyebrow-red,.home-kicker,.public-kicker,.section-tag,
.solution-number,.card-kicker,.service-kicker,.resource-meta,
.solution-row a,.resource-card-link a{
  color:#e22a33!important;
}

/* White badges placed on red surfaces keep red label text. */
.page :is(section,div,article)[class*="cta"] :is(.section-tag,.eyebrow-red,.home-kicker,.public-kicker),
.page :is(section,div,article).red-panel :is(.section-tag,.eyebrow-red,.home-kicker,.public-kicker),
.page :is(section,div,article).red-band :is(.section-tag,.eyebrow-red,.home-kicker,.public-kicker){
  color:#d61f26!important;
}

/* Forms and tables require explicit readable values. */
input,select,textarea,option,table,th,td,summary,details,label{
  color:var(--contrast-heading)!important;
}
input::placeholder,textarea::placeholder{
  color:#737d8c!important;
  opacity:1;
}
th{font-weight:800}
td{color:var(--contrast-body)!important}

/* Footer always remains inverse. */
.footer,.footer h1,.footer h2,.footer h3,.footer h4,.footer p,.footer a,.footer span{
  color:var(--contrast-inverse-body)!important;
}
.footer h1,.footer h2,.footer h3,.footer h4,.footer-title{
  color:var(--contrast-inverse)!important;
}

/* Keep navigation readable in both desktop and mobile states. */
.site-header .brand,.site-header .brand strong{color:var(--contrast-heading)!important}
.site-header .brand span{color:#727c8b!important}
.site-header .navlinks>a,.site-header .navdrop-trigger{color:#252a33!important}
.site-header .nav-cta{color:#fff!important}
.site-header .navdrop-menu a{color:#343b47!important}
.site-header .navdrop-menu a:hover{color:#a71920!important}

/* Production mobile navigation: full-screen panel below the header, no hero overlap. */
@media(max-width:980px){
  :root{--mobile-header-height:100px}
  .site-header{position:sticky;top:0;z-index:1000}
  .site-header .nav{min-height:var(--mobile-header-height)}
  .site-header .brand .title{display:block}
  .site-header .mobile-toggle{display:block;position:relative;z-index:1002}
  .site-header .navlinks{
    position:fixed!important;
    z-index:1001!important;
    top:var(--mobile-header-height)!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    width:100%!important;
    height:calc(100dvh - var(--mobile-header-height))!important;
    max-height:none!important;
    margin:0!important;
    padding:22px 22px calc(34px + env(safe-area-inset-bottom))!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    background:#fff!important;
    border:0!important;
    border-top:1px solid #e4e7ec!important;
    border-radius:0!important;
    box-shadow:none!important;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(-12px)!important;
    transition:opacity .22s ease,transform .22s ease,visibility .22s ease!important;
  }
  .site-header .navlinks.open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:none!important;
  }
  .site-header .navlinks>a,
  .site-header .navdrop-trigger{
    width:100%!important;
    min-height:52px;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    padding:14px 16px!important;
    border-radius:12px!important;
    color:#252a33!important;
    font-size:17px!important;
  }
  .site-header .nav-cta{
    margin:8px 0 0!important;
    justify-content:center!important;
    color:#fff!important;
  }
  .site-header .navdrop{width:100%}
  .site-header .navdrop-menu{
    position:static!important;
    width:100%!important;
    min-width:0!important;
    max-height:0;
    margin:0!important;
    padding:0 8px!important;
    overflow:hidden;
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
    transition:max-height .25s ease,padding .25s ease!important;
  }
  .site-header .navdrop.open .navdrop-menu{
    max-height:420px;
    padding:4px 8px 10px!important;
  }
  .site-header .navdrop-menu a{
    min-height:46px;
    display:flex;
    align-items:center;
    padding:11px 14px!important;
    color:#343b47!important;
    font-size:15px!important;
  }
  body.nav-open{overflow:hidden!important;touch-action:none}
}

@media(max-width:640px){
  :root{--mobile-header-height:96px}
  .site-header .brand .title strong{font-size:13px}
  .site-header .brand .title span{font-size:10px}
  .site-header .logo-wrap{width:44px;height:44px}
}
