/*
 * XGene Stage 9 RC1g — focused corrective release.
 * Scope: Expert single geometry, article CTA contrast, unmistakable governed-404 motion.
 * Preserves RC1f scrollbar/mobile/reduced-motion behavior.
 */

/* 1) Expert single: fully escape Astra content-container geometry and attach the
      hero directly to the site header with full-viewport background while
      retaining the enterprise shell for internal alignment. */
body.single-xg-expert .site-content,
body.single-xg-expert #content,
body.single-xg-expert #primary,
body.single-xg-expert .content-area,
body.single-xg-expert #main,
body.single-xg-expert .xg-expert-profile,
body.single-xg-expert .xg-expert-profile__article,
body.single-xg-expert .xg-expert-profile__article.ast-article-single{
  width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important
}
body.single-xg-expert .site-content>.ast-container,
body.single-xg-expert #content>.ast-container,
body.single-xg-expert .ast-container#content{
  width:100%!important;max-width:none!important;margin:0!important;padding:0!important
}
body.single-xg-expert .xg-expert-hero{
  position:relative!important;left:50%!important;right:auto!important;
  width:100vw!important;max-width:none!important;
  margin:0 0 0 -50vw!important;
  padding:clamp(3.6rem,5.2vw,5.7rem) 0!important;
  border-radius:0!important
}
body.single-xg-expert .xg-expert-hero__grid{
  width:min(88rem,calc(100% - 3rem))!important;max-width:none!important;margin:0 auto!important;padding:0!important
}
body.single-xg-expert .xg-expert-context,
body.single-xg-expert .xg190-related,
body.single-xg-expert .xg-expert-next{margin-top:0!important}
body.single-xg-expert .xg-expert-context>.xg-shell,
body.single-xg-expert .xg190-related>.xg-shell,
body.single-xg-expert .xg-expert-next>.xg-shell{width:min(88rem,calc(100% - 3rem))!important;max-width:none!important}

/* 2) Article CTA: classify known decision CTA links via JS and give both
      actions explicit high-contrast button tokens. */
body.single-xg-article .xg-rc1g-book-cta{
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  background:#0b2e4a!important;border-color:#0b2e4a!important;
  text-decoration:none!important
}
body.single-xg-article .xg-rc1g-contact-cta{
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  background:#0aa6a6!important;border-color:#078989!important;
  text-decoration:none!important;box-shadow:0 8px 20px rgb(10 166 166 / 18%)!important
}
body.single-xg-article .xg-rc1g-contact-cta:hover,
body.single-xg-article .xg-rc1g-contact-cta:focus-visible{
  background:#087f86!important;border-color:#066d72!important;color:#fff!important;-webkit-text-fill-color:#fff!important
}

/* 3) Governed 404: actual motion path. The local image moves through a curved
      flight path toward the recovery portal while the portal and route field
      animate independently. */
.xg-404-dog-scene--motion{overflow:hidden!important;perspective:900px}
.xg-404-dog-motion{
  position:absolute;z-index:5;left:3%;bottom:9%;width:15rem;max-width:34%;margin:0;
  filter:drop-shadow(0 22px 22px rgb(0 0 0 / 26%));
  transform-origin:50% 78%;will-change:transform,opacity;
}
.xg-404-dog-motion img{display:block;width:100%;height:auto;border-radius:1.3rem;clip-path:inset(0 round 1.3rem)}
.xg-404-dog-motion:after{content:"";position:absolute;left:14%;right:10%;bottom:-.55rem;height:1.25rem;border-radius:50%;background:rgb(63 222 229 / 32%);filter:blur(11px);transform:scaleX(.9)}
.xg-404-dog-scene--motion .xg-404-dog-scene__portal{animation:xg404g-portal 2.8s ease-in-out infinite!important}
.xg-404-dog-scene--motion .xg-404-dog-scene__portal:before{animation:xg404g-ring-a 5s linear infinite}
.xg-404-dog-scene--motion .xg-404-dog-scene__portal:after{animation:xg404g-ring-b 4.2s linear infinite reverse}
.xg-404-dog-scene--motion .xg-404-dog-scene__404 strong{animation:xg404g-404 2.8s ease-in-out infinite}
.xg-404-dog-scene--motion .xg-404-dog-scene__path span{animation:xg404g-path 1.6s ease-in-out infinite}
.xg-404-dog-scene--motion .xg-404-dog-scene__path span:nth-child(2){animation-delay:.18s}.xg-404-dog-scene--motion .xg-404-dog-scene__path span:nth-child(3){animation-delay:.36s}.xg-404-dog-scene--motion .xg-404-dog-scene__path span:nth-child(4){animation-delay:.54s}.xg-404-dog-scene--motion .xg-404-dog-scene__path span:nth-child(5){animation-delay:.72s}
@keyframes xg404g-portal{0%,100%{transform:translateY(-53%) scale(.96);box-shadow:0 0 0 1rem rgb(10 166 166 / 7%),0 0 2.8rem rgb(21 190 230 / 26%),inset 0 0 1.5rem rgb(26 221 233 / 14%)}50%{transform:translateY(-53%) scale(1.055);box-shadow:0 0 0 1.7rem rgb(10 166 166 / 9%),0 0 5rem rgb(21 190 230 / 50%),inset 0 0 2.8rem rgb(26 221 233 / 26%)}}
@keyframes xg404g-ring-a{to{transform:rotate(378deg)}}
@keyframes xg404g-ring-b{to{transform:rotate(-384deg)}}
@keyframes xg404g-404{0%,100%{transform:scale(1);filter:drop-shadow(0 12px 26px rgb(0 0 0 / 18%))}50%{transform:scale(1.045);filter:drop-shadow(0 0 18px rgb(91 238 244 / 42%))}}
@keyframes xg404g-path{0%,100%{opacity:.28;transform:scale(.72)}50%{opacity:1;transform:scale(1.3)}}

@media(max-width:1100px){
  body.single-xg-expert .xg-expert-hero__grid,
  body.single-xg-expert .xg-expert-context>.xg-shell,
  body.single-xg-expert .xg190-related>.xg-shell,
  body.single-xg-expert .xg-expert-next>.xg-shell{width:min(100% - 2rem,88rem)!important}
  .xg-404-dog-motion{display:none!important}
}
@media(prefers-reduced-motion:reduce){
  .xg-404-dog-motion,.xg-404-dog-scene--motion .xg-404-dog-scene__portal,
  .xg-404-dog-scene--motion .xg-404-dog-scene__portal:before,
  .xg-404-dog-scene--motion .xg-404-dog-scene__portal:after,
  .xg-404-dog-scene--motion .xg-404-dog-scene__404 strong,
  .xg-404-dog-scene--motion .xg-404-dog-scene__path span{animation:none!important}
  .xg-404-dog-motion{transform:translate3d(8rem,-1rem,0) rotate(-2deg)!important;opacity:1!important}
}
