/* WyseAge FX layer: one coherent 3D + colour system shared by every page.
   Product colours: AccountingWorx emerald, StrataWorx indigo, PropertyWorx cyan, CRMWorx ember. */
:root{--aw3:61,219,166;--sw3:139,124,246;--pw3:34,211,238;--crm3:255,106,69}
body{background:transparent}
main,header.nav,footer.foot{position:relative;z-index:1}
header.nav{z-index:50}

/* ---------- ambient aurora (fixed, behind everything) ---------- */
.fx-aurora{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:var(--bg)}
.fx-aurora i{position:absolute;width:56vmax;height:56vmax;border-radius:50%;filter:blur(90px);opacity:.2;will-change:transform;
  transform:translate3d(0,calc(var(--sy,0)*var(--k,-.04)*1px),0)}
.fx-aurora i:nth-child(1){left:-18vmax;top:-12vmax;background:rgb(var(--aw3));animation:fxDrift1 26s ease-in-out infinite}
.fx-aurora i:nth-child(2){right:-20vmax;top:6vmax;background:rgb(var(--sw3));--k:-.07;animation:fxDrift2 32s ease-in-out infinite}
.fx-aurora i:nth-child(3){left:12vmax;bottom:-30vmax;background:rgb(var(--pw3));--k:-.03;opacity:.15;animation:fxDrift2 38s ease-in-out infinite reverse}
.fx-aurora i:nth-child(4){right:6vmax;bottom:-34vmax;background:rgb(var(--crm3));--k:-.05;opacity:.12;animation:fxDrift1 44s ease-in-out infinite}
@keyframes fxDrift1{50%{margin:6vmax 0 0 8vmax}}
@keyframes fxDrift2{50%{margin:-5vmax 7vmax 0 0}}

/* cursor spotlight */
.fx-spot{position:fixed;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(520px circle at var(--mx,50%) var(--my,30%),rgba(var(--aw3),.07),rgba(var(--sw3),.05) 40%,transparent 70%)}

/* perspective grid floor (guide pages and 404) */
.fx-floor{position:fixed;left:-25vw;right:-25vw;bottom:0;height:46vh;z-index:0;pointer-events:none;perspective:420px;
  -webkit-mask:linear-gradient(to top,#000 5%,transparent 95%);mask:linear-gradient(to top,#000 5%,transparent 95%);opacity:.55}
.fx-floor::before{content:"";position:absolute;inset:-100% 0 0 0;transform-origin:50% 100%;transform:rotateX(68deg);
  background:
    linear-gradient(rgba(var(--aw3),.35) 1px,transparent 1px) 0 0/100% 64px,
    linear-gradient(90deg,rgba(var(--sw3),.35) 1px,transparent 1px) 0 0/64px 100%;
  animation:fxGrid 5s linear infinite}
@keyframes fxGrid{to{background-position:0 64px,0 0}}

/* ---------- 3D product ring (guide pages, 404) ---------- */
.fx-ring{position:absolute;right:20px;top:70px;width:300px;height:300px;perspective:900px;pointer-events:none;z-index:0}
.fx-ring-tilt{position:absolute;inset:0;transform-style:preserve-3d;
  transform:rotateX(calc(-14deg + var(--py,0)*-10deg)) rotateY(calc(var(--px,0)*14deg));transition:transform .25s ease-out}
.fx-ring-spin{position:absolute;inset:0;transform-style:preserve-3d;animation:fxSpinY 22s linear infinite}
@keyframes fxSpinY{to{transform:rotateY(360deg)}}
.fx-face{position:absolute;left:50%;top:50%;width:112px;height:112px;margin:-56px;border-radius:26px;display:grid;place-items:center;
  transform:rotateY(calc(var(--i)*90deg)) translateZ(150px);
  background:linear-gradient(150deg,rgba(var(--c),.30),rgba(var(--c),.06));border:1.5px solid rgba(var(--c),.7);
  box-shadow:0 0 44px -6px rgba(var(--c),.6),inset 0 0 30px rgba(var(--c),.18);backface-visibility:visible}
.fx-face img{width:64px;height:64px;border-radius:16px}
.fx-halo{position:absolute;left:50%;top:50%;width:230px;height:230px;margin:-115px;border-radius:50%;
  background:conic-gradient(from 0deg,rgba(var(--aw3),.0),rgba(var(--aw3),.55),rgba(var(--sw3),.55),rgba(var(--pw3),.55),rgba(var(--crm3),.5),rgba(var(--aw3),0));
  filter:blur(26px);opacity:.55;animation:fxSpinZ 14s linear infinite}
@keyframes fxSpinZ{to{transform:rotate(360deg)}}
.fx-disc{position:absolute;left:50%;top:50%;width:340px;height:340px;margin:-170px;border-radius:50%;border:1px dashed rgba(255,255,255,.22);
  transform:rotateX(74deg);animation:fxDisc 18s linear infinite}
@keyframes fxDisc{to{transform:rotateX(74deg) rotateZ(360deg)}}

/* guide + 404 headline: moving colour through the type */
body.article .page-h1,body[data-fx] .page-h1{background:linear-gradient(100deg,#fff 15%,#9ff0d3 38%,#b9b0ff 55%,#8fe9f7 70%,#fff 90%);
  background-size:260% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:fxShift 9s ease-in-out infinite alternate}
body[data-fx] .page-h1 .gold{color:transparent;background:inherit;-webkit-background-clip:text;background-clip:text}
@keyframes fxShift{to{background-position:100% 0}}

/* guide cards: each one takes a product colour */
body.article .blk:nth-child(4n+1),body.article .qa:nth-child(4n+1){--c:var(--aw3)}
body.article .blk:nth-child(4n+2),body.article .qa:nth-child(4n+2){--c:var(--sw3)}
body.article .blk:nth-child(4n+3),body.article .qa:nth-child(4n+3){--c:var(--pw3)}
body.article .blk:nth-child(4n+4),body.article .qa:nth-child(4n+4){--c:var(--crm3)}
body.article .blk{border-color:rgba(var(--c),.28);background:linear-gradient(160deg,rgba(var(--c),.10),#0c121e 55%)}
body.article .blk::before{-webkit-text-stroke-color:rgba(var(--c),.6)}
body.article .blk::after{background:radial-gradient(circle at var(--gx,50%) var(--gy,0%),rgba(var(--c),.22),transparent 55%)}
body.article .blk:hover{border-color:rgba(var(--c),.9);box-shadow:0 24px 60px -24px rgba(var(--c),.6)}
body.article .blk h2{background:linear-gradient(90deg,#fff,rgb(var(--c)));-webkit-background-clip:text;background-clip:text;color:transparent}
body.article .qa summary::before{color:rgb(var(--c))}
body.article .qa:hover,body.article .qa[open]{border-color:rgba(var(--c),.7)}
body.article .qa[open]{box-shadow:0 18px 50px -20px rgba(var(--c),.55)}
body.article .more a{color:rgb(var(--aw3));border-bottom:1px solid currentColor}

/* ---------- homepage: new sections get colour + depth ---------- */
#problem,#roadmap,#aws,#team{position:relative;overflow-x:clip}
#problem .wrap,#roadmap .wrap,#aws .wrap,#team .wrap{position:relative;z-index:1}
:where(#problem,#roadmap,#aws,#team) .aud-grid{perspective:1200px}
:where(#problem,#roadmap,#aws,#team) .aud:nth-child(4n+1){--c:var(--aw3)}
:where(#problem,#roadmap,#aws,#team) .aud:nth-child(4n+2){--c:var(--sw3)}
:where(#problem,#roadmap,#aws,#team) .aud:nth-child(4n+3){--c:var(--pw3)}
:where(#problem,#roadmap,#aws,#team) .aud:nth-child(4n+4){--c:var(--crm3)}
:where(#problem,#roadmap,#aws,#team) .aud{position:relative;overflow:hidden;min-height:230px;border-color:rgba(var(--c),.28);
  background:linear-gradient(165deg,rgba(var(--c),.13),var(--card) 62%)}
:where(#problem,#roadmap,#aws,#team) .aud::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,transparent,rgb(var(--c)),transparent);background-size:200% 100%;animation:fxBar 4s linear infinite}
@keyframes fxBar{from{background-position:200% 0}to{background-position:-200% 0}}
:where(#problem,#roadmap,#aws,#team) .aud .k{color:rgb(var(--c));display:inline-flex;align-items:center;gap:10px;font-weight:600}
:where(#problem,#roadmap,#aws,#team) .aud .k::before{content:"";width:9px;height:9px;border-radius:50%;background:rgb(var(--c));
  box-shadow:0 0 0 0 rgba(var(--c),.6);animation:fxPulse 2.4s ease-out infinite}
@keyframes fxPulse{70%{box-shadow:0 0 0 12px rgba(var(--c),0)}100%{box-shadow:0 0 0 0 rgba(var(--c),0)}}
:where(#problem,#roadmap,#aws,#team) .aud h3{font:600 1.35rem/1.15 var(--display);letter-spacing:-.02em;color:var(--fg)}
:where(#problem,#roadmap,#aws,#team) .aud:hover{border-color:rgba(var(--c),.9);box-shadow:0 26px 70px -26px rgba(var(--c),.7)}
:where(#problem,#roadmap,#aws,#team) .head h2 .gold{background:linear-gradient(90deg,rgb(var(--aw3)),rgb(var(--sw3)),rgb(var(--pw3)),rgb(var(--aw3)));
  background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:fxFlow 8s linear infinite}
@keyframes fxFlow{to{background-position:-300% 0}}
/* roadmap: stage connectors */
#roadmap .aud-grid{counter-reset:rm}
#roadmap .aud{counter-increment:rm}
#roadmap .aud::after{content:counter(rm,decimal-leading-zero);position:absolute;font:700 3.2rem/1 var(--display);letter-spacing:-.05em;
  color:transparent;-webkit-text-stroke:1.2px rgba(var(--c),.45);opacity:1;background:none;inset:12px 16px auto auto;pointer-events:none}
#roadmap .aud:first-child{box-shadow:0 0 0 1px rgba(var(--aw3),.5),0 24px 70px -30px rgba(var(--aw3),.8)}

/* floating 3D cubes behind sections */
.fx-cubew{position:absolute;z-index:0;pointer-events:none;perspective:700px;transform:translate3d(0,var(--py,0px),0)}
.fx-cube{position:relative;width:var(--s,72px);height:var(--s,72px);transform-style:preserve-3d;animation:fxCube var(--t,20s) linear infinite}
.fx-cube i{position:absolute;inset:0;border:1.5px solid rgba(var(--c),.55);background:linear-gradient(135deg,rgba(var(--c),.18),rgba(var(--c),.02));
  box-shadow:inset 0 0 20px rgba(var(--c),.18)}
.fx-cube i:nth-child(1){transform:translateZ(calc(var(--s,72px)/2))}
.fx-cube i:nth-child(2){transform:rotateY(180deg) translateZ(calc(var(--s,72px)/2))}
.fx-cube i:nth-child(3){transform:rotateY(90deg) translateZ(calc(var(--s,72px)/2))}
.fx-cube i:nth-child(4){transform:rotateY(-90deg) translateZ(calc(var(--s,72px)/2))}
.fx-cube i:nth-child(5){transform:rotateX(90deg) translateZ(calc(var(--s,72px)/2))}
.fx-cube i:nth-child(6){transform:rotateX(-90deg) translateZ(calc(var(--s,72px)/2))}
@keyframes fxCube{from{transform:rotateX(-20deg) rotateY(0)}to{transform:rotateX(340deg) rotateY(360deg)}}

/* ---------- AWS orbit diagram ---------- */
.fx-orbit{position:relative;height:420px;margin-top:clamp(20px,3vw,40px);perspective:1000px;border:1px solid var(--line-2);border-radius:var(--r);overflow:hidden;
  background:radial-gradient(circle at 50% 55%,rgba(var(--sw3),.18),transparent 60%),linear-gradient(180deg,#0d1522,#0a0f18)}
.fx-plane{position:absolute;inset:0;transform-style:preserve-3d;transform:rotateX(62deg) translateY(-6%)}
.fx-ringline{position:absolute;left:50%;top:50%;border-radius:50%;border:1.5px dashed rgba(255,255,255,.22);transform:translate(-50%,-50%)}
.fx-ringline.a{width:380px;height:380px}
.fx-ringline.b{width:560px;height:560px;border-color:rgba(var(--aw3),.28)}
.fx-spin{position:absolute;inset:0;transform-style:preserve-3d;animation:fxSpinZ 24s linear infinite}
.fx-node{position:absolute;left:50%;top:50%;width:0;height:0;transform-style:preserve-3d;transform:rotateZ(calc(var(--i)*90deg)) translateX(190px)}
.fx-bb{position:absolute;left:-36px;top:-36px;width:72px;height:72px;border-radius:20px;display:grid;place-items:center;transform-style:preserve-3d;
  background:linear-gradient(150deg,rgba(var(--c),.35),rgba(var(--c),.08));border:1.5px solid rgba(var(--c),.8);box-shadow:0 0 36px -4px rgba(var(--c),.7);
  animation:fxUnspin 24s linear infinite}
.fx-bb img{width:44px;height:44px;border-radius:12px}
@keyframes fxUnspin{from{transform:rotateZ(calc(var(--i)*-90deg)) rotateX(-62deg)}to{transform:rotateZ(calc(var(--i)*-90deg - 360deg)) rotateX(-62deg)}}
.fx-core{position:absolute;left:50%;top:50%;width:150px;height:150px;margin:-75px 0 0 -75px;border-radius:50%;display:grid;place-items:center;text-align:center;z-index:2;
  background:radial-gradient(circle at 35% 30%,#2a3a5c,#0e1626 70%);border:1.5px solid rgba(255,255,255,.28);
  box-shadow:0 0 70px rgba(var(--sw3),.55),inset 0 0 30px rgba(var(--aw3),.25);animation:fxBreath 4s ease-in-out infinite}
.fx-core b{display:block;font:700 1.15rem/1.1 var(--display);letter-spacing:-.02em}
.fx-core span{display:block;font:500 .72rem/1.3 var(--body);color:var(--soft);margin-top:4px}
@keyframes fxBreath{50%{transform:scale(1.07)}}
.fx-cap{position:absolute;left:0;right:0;bottom:14px;text-align:center;font:500 .85rem var(--body);color:var(--muted);z-index:2}

/* ---------- small screens + accessibility ---------- */
@media(max-width:900px){.fx-ring{display:none}.fx-orbit{height:340px}.fx-plane{transform:rotateX(62deg) scale(.7)}.fx-cubew{display:none}}
@media(prefers-reduced-motion:reduce){
  .fx-aurora i,.fx-floor::before,.fx-ring-spin,.fx-halo,.fx-disc,.fx-cube,.fx-spin,.fx-bb,.fx-core,
  body.article .page-h1,body[data-fx] .page-h1,.aud::before,.aud .k::before,.head h2 .gold{animation:none!important}
}

/* hide the legacy flat orbs: the 3D ring replaces them */
body.article .page::before,body.article .page::after{display:none}
