/* SUP128 — MH Glass contrast correction + moving optical reflection.
   Dedicated CSS overlay only; all logos, existing animations and functional JS are untouched. */
:root{--mh128-edge:rgba(167,25,43,.26);--mh128-light:#fff8f9;--mh128-ink:#23191e;}
@keyframes mh128-optical-drift{
  0%,8%{background-position:-230% 0}
  42%,100%{background-position:230% 0}
}
@keyframes mh128-glass-breathe{
  0%,100%{box-shadow:0 8px 26px rgba(65,14,26,.095),inset 0 1px rgba(255,255,255,.76)}
  50%{box-shadow:0 12px 33px rgba(65,14,26,.135),inset 0 1px rgba(255,255,255,.91)}
}
@media(prefers-reduced-motion:reduce){
  :is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card),:is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card)::after{animation:none!important;transition:none!important}
}
@media(prefers-reduced-transparency:reduce){
  :is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card){backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
}
@supports not (backdrop-filter:blur(1px)){
  :is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card){background-color:rgba(255,250,251,.99)!important}
}

/* Glass sheen moves over the surface itself, not the text. */
@media(prefers-reduced-motion:no-preference){
  :is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card){animation:mh128-glass-breathe 11s ease-in-out infinite;}
  :is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card)::after{
    content:"";position:absolute;inset:0;display:block;
    pointer-events:none;z-index:1;border-radius:inherit;
    background-image:linear-gradient(108deg,transparent 28%,rgba(255,255,255,.018) 37%,rgba(255,255,255,.26) 47%,rgba(255,255,255,.045) 53%,transparent 64%);
    background-repeat:no-repeat;background-size:240% 100%;
    animation:mh128-optical-drift 10s cubic-bezier(.38,.09,.55,.93) infinite;
    opacity:.46;will-change:background-position;
  }
}
:is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card){
  position:relative;isolation:isolate;
  -webkit-backdrop-filter:blur(15px) saturate(145%);backdrop-filter:blur(15px) saturate(145%);
  border:1px solid var(--mh128-edge)!important;
  box-shadow:0 8px 28px rgba(48,12,23,.1),inset 0 1px rgba(255,255,255,.86)!important;
  border-radius:16px;overflow:hidden;
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
  :is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card):hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(48,12,23,.15),inset 0 1px rgba(255,255,255,.95)!important}
}
@media(max-width:700px){
  :is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card){-webkit-backdrop-filter:blur(9px) saturate(132%);backdrop-filter:blur(9px) saturate(132%)}
  :is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card)::after{animation-duration:14s;opacity:.28}
}

/* Site cards inherited LIGHT backgrounds from SUP118, while portal copy stayed WHITE.
   Restore intentionally dark frosted portal cards; keep the text fully readable. */
html body .portal-card.mh128-glass-motion,
html body .portal-card{
  background:linear-gradient(132deg,rgba(20,19,23,.92),rgba(56,35,42,.86))!important;
  background-color:#241b20!important;
  color:#fff!important;
  border-color:rgba(255,201,211,.29)!important;
}
html body .portal-card :is(h1,h2,h3,h4,strong){color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.23)}
html body .portal-card :is(p,small,.muted){color:#f0e9eb!important;opacity:1!important}
html body .portal-card :is(span,.eyebrow){color:#ffd9df!important;opacity:1!important}
html body .portal-card a.card-link{color:#ff9ca8!important;text-decoration-thickness:1.5px!important}
html body .portal-card a.card-link:hover{color:#fff!important}
/* Light cards retain ink; no near-white copy against light frosted panels. */
html body :is(.company-card,.card:not(.portal-card)):is(.mh128-glass-motion,body .portal-card,body .company-card,body article.card){
  background:linear-gradient(138deg,rgba(255,255,255,.94),rgba(254,241,245,.83))!important;
  color:#21191c!important;
}
html body :is(.company-card,.card:not(.portal-card)) :is(h2,h3,h4){color:#241b20!important}
html body :is(.company-card,.card:not(.portal-card)) p{color:#504249!important;opacity:1!important}
html body :is(.company-card,.card:not(.portal-card)) a{color:#9a1025}
