/* Apex Fabric Care — inner-page motion layer (Nov 22 night). NOT loaded on the home page.
   Everything here is decorative: transform / opacity only, switched off for reduced motion, and tilt is mouse-only on wide screens. */

@keyframes fxBob{0%,100%{translate:0 0}50%{translate:0 -5px}}
@keyframes fxDrift{0%{transform:translate3d(-3%,0,0) scale(1)}100%{transform:translate3d(3%,-3%,0) scale(1.1)}}
@keyframes fxRing{0%{box-shadow:0 0 0 0 rgba(220,196,142,.5)}70%,100%{box-shadow:0 0 0 18px rgba(220,196,142,0)}}
@keyframes fxFloor{from{background-position:0 0,0 0}to{background-position:0 0,0 48px}}

/* ---------- dark hero: drifting gold light + a slow perspective floor ---------- */
.page-hero{overflow:hidden}
.page-hero>.wrap{position:relative;z-index:1}
.page-hero::before{content:"";position:absolute;inset:-25% -12% -10% -12%;z-index:0;pointer-events:none;
  background:radial-gradient(38% 46% at 22% 32%,rgba(200,169,107,.17),rgba(200,169,107,0) 70%),radial-gradient(34% 42% at 82% 22%,rgba(130,160,185,.11),rgba(130,160,185,0) 70%);
  animation:fxDrift 18s ease-in-out infinite alternate;translate:calc(var(--hx,0)*16px) calc(var(--hy,0)*10px);transition:translate .7s ease-out}
.page-hero::after{content:"";position:absolute;left:-10%;right:-10%;bottom:0;height:48%;z-index:0;pointer-events:none;opacity:.75;
  background:repeating-linear-gradient(90deg,rgba(200,169,107,.14) 0 1px,transparent 1px 72px),repeating-linear-gradient(0deg,rgba(200,169,107,.14) 0 1px,transparent 1px 48px);
  transform:perspective(700px) rotateX(64deg);transform-origin:50% 100%;-webkit-mask-image:linear-gradient(0deg,#000,transparent 90%);mask-image:linear-gradient(0deg,#000,transparent 90%);
  animation:fxFloor 7s linear infinite}
.page-hero .btn-primary{animation:fxRing 3.8s ease-out 1.4s 3}

/* ---------- floating icon badges ---------- */
.dx-ico,.ac-pin{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;color:#0B0C0C;background:linear-gradient(180deg,#DCC48E,#C8A96B);
  box-shadow:0 14px 24px -12px rgba(60,45,15,.65),inset 0 1px 0 rgba(255,255,255,.45);animation:fxBob 5.2s ease-in-out infinite}
.dx-ico{margin:0 0 14px}
.dx-ico svg,.ac-pin svg{width:30px;height:30px;overflow:hidden}
.region-grid.dist>.region-card:nth-child(2) .dx-ico{animation-delay:-1.2s}
.region-grid.dist>.region-card:nth-child(3) .dx-ico{animation-delay:-2.4s}
.region-grid.dist>.region-card:nth-child(4) .dx-ico{animation-delay:-3.6s}
.pk-ico{animation:fxBob 4.8s ease-in-out infinite}
.pk-grid>li:nth-child(2) .pk-ico{animation-delay:-.7s}.pk-grid>li:nth-child(3) .pk-ico{animation-delay:-1.4s}.pk-grid>li:nth-child(4) .pk-ico{animation-delay:-2.1s}
.pk-grid>li:nth-child(5) .pk-ico{animation-delay:-2.8s}.pk-grid>li:nth-child(6) .pk-ico{animation-delay:-3.5s}.pk-grid>li:nth-child(7) .pk-ico{animation-delay:-4.2s}
.area-card2{position:relative}
.ac-pin{position:absolute;top:16px;right:16px;width:40px;height:40px;border-radius:12px}.ac-pin svg{width:23px;height:23px}
.area-card2 h3{padding-right:52px}

/* the little scenes inside the badges */
@keyframes dxWalk{0%,18%{transform:translate(0,0)}30%,48%{transform:translate(7px,-6px)}60%,78%{transform:translate(14px,-12px)}92%,100%{transform:translate(0,0)}}
@keyframes dxBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2.5px)}}
@keyframes dxBlink{0%,100%{opacity:1}45%{opacity:.18}}
@keyframes dxDriftA{0%,100%{transform:translateX(-2px)}50%{transform:translateX(3px)}}
@keyframes dxDriftB{0%,100%{transform:translateX(3px)}50%{transform:translateX(-2px)}}
@keyframes dxSpin{to{transform:rotate(360deg)}}
@keyframes dxPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.28);opacity:.6}}
@keyframes dxWave{to{transform:translateX(16px)}}
@keyframes dxBeat{0%,100%{transform:scale(1)}30%{transform:scale(1.22)}55%{transform:scale(.96)}}
.dxa-walk{animation:dxWalk 5s ease-in-out infinite}
.dxa-sun{animation:dxBob 3.6s ease-in-out infinite}
.dxa-win rect{animation:dxBlink 3.4s ease-in-out infinite}.dxa-win rect:nth-child(2){animation-delay:-.9s}.dxa-win rect:nth-child(3){animation-delay:-1.8s}.dxa-win rect:nth-child(4){animation-delay:-2.6s}
.dxa-f1{animation:dxDriftA 5s ease-in-out infinite}.dxa-f2{animation:dxDriftB 6s ease-in-out infinite}.dxa-f3{animation:dxDriftB 4.6s ease-in-out infinite}.dxa-f4{animation:dxDriftA 5.6s ease-in-out infinite}
.dxa-rays{transform-origin:16px 16px;animation:dxSpin 22s linear infinite}
.dxa-core,.dxa-sun2,.dxa-pulse{transform-origin:center;transform-box:fill-box;animation:dxPulse 3.4s ease-in-out infinite}
.dxa-door{animation:dxBlink 4s ease-in-out infinite}
.dxa-w1{animation:dxWave 3.2s linear infinite}.dxa-w2{animation:dxWave 4.4s linear infinite reverse}
.dxa-heart{transform-origin:16px 20px;animation:dxBeat 2.4s ease-in-out infinite}

/* ---------- steps: a gold rail that draws itself as the steps scroll in ---------- */
.ax-read .step{position:relative;overflow:hidden}
.ax-read .step::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,#E6D3A0,#C8A96B);transform-origin:50% 0;transition:transform .9s cubic-bezier(.2,.7,.2,1)}
html.fx-ready .steps:not(.fx-in) .step::before{transform:scaleY(0)}
.steps .step:nth-child(2)::before{transition-delay:.1s}.steps .step:nth-child(3)::before{transition-delay:.2s}.steps .step:nth-child(4)::before{transition-delay:.3s}.steps .step:nth-child(5)::before{transition-delay:.4s}.steps .step:nth-child(6)::before{transition-delay:.5s}

/* ---------- blog guides: reading progress + stain-age scale that draws itself ---------- */
.fx-prog{position:fixed;left:0;right:0;top:0;height:4px;z-index:9999;pointer-events:none;background:rgba(200,169,107,.16)}
.fx-prog i{display:block;height:100%;transform-origin:0 50%;transform:scaleX(0);background:linear-gradient(90deg,#C8A96B,#E6D3A0)}
.article .agescale li{position:relative;border-top-width:1px}
.article .agescale li::before{content:"";position:absolute;left:-1px;right:-1px;top:-1px;height:6px;border-radius:14px 14px 0 0;background:var(--c,#C8A96B);transform-origin:0 50%;transition:transform .9s cubic-bezier(.2,.7,.2,1)}
html.fx-ready .agescale:not(.fx-in) li::before{transform:scaleX(0)}
html.fx-ready .agescale:not(.fx-in) li{opacity:.0;translate:0 14px}
.article .agescale li{transition:opacity .6s ease,translate .7s cubic-bezier(.2,.7,.2,1)}
.agescale li:nth-child(2),.agescale li:nth-child(2)::before{transition-delay:.14s}.agescale li:nth-child(3),.agescale li:nth-child(3)::before{transition-delay:.28s}.agescale li:nth-child(4),.agescale li:nth-child(4)::before{transition-delay:.42s}

/* ---------- 3D tilt + light on cards (JS adds .fx-t / .fx-gl, mouse only) ---------- */
.region-card,.step,.pcard,.fact,.post-card,.rvl-pf,.article .agescale li{position:relative}
.fx-t{transform-style:flat;will-change:transform}
.fx-t.on,.fx-t:not(.rv){transform:perspective(900px) rotateX(var(--fx-rx,0deg)) rotateY(var(--fx-ry,0deg))}
.fx-t{transition:transform .45s cubic-bezier(.2,.7,.2,1),box-shadow .3s,border-color .3s,opacity .7s!important;transition-delay:0s!important}
.fx-t.fx-live{transition:transform .08s linear,box-shadow .3s,border-color .3s!important;box-shadow:0 34px 52px -28px rgba(40,30,10,.55)}
.fx-gl{position:absolute;inset:0;z-index:2;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .25s;
  background:radial-gradient(360px circle at var(--mx,50%) var(--my,30%),rgba(214,184,120,.30),rgba(214,184,120,0) 60%)}
.fx-live>.fx-gl{opacity:1}
.post-card img{transition:transform .7s ease}
.post-card.fx-live img{transform:scale(1.05)}
.rvl-pf img{transition:transform .7s ease}
.rvl-pf.fx-live img{transform:scale(1.04)}

/* ---------- phones and reduced motion: still, quiet, fast ---------- */
@media(max-width:900px){
  .page-hero::after{animation:none;height:34%}
  .page-hero::before{translate:none}
}
@media(max-width:560px){.dx-ico{width:48px;height:48px;border-radius:14px}.dx-ico svg{width:27px;height:27px}.ac-pin{top:14px;right:14px}}
@media(prefers-reduced-motion:reduce){
  .page-hero::before,.page-hero::after,.page-hero .btn-primary,.dx-ico,.ac-pin,.pk-ico,.dx-ico *,.ac-pin *{animation:none!important}
  .page-hero::before{translate:none!important}
  .ax-read .step::before,.article .agescale li::before{transition:none!important}
  html.fx-ready .steps:not(.fx-in) .step::before,html.fx-ready .agescale:not(.fx-in) li::before{transform:none}
  html.fx-ready .agescale:not(.fx-in) li{opacity:1;translate:none}
  .article .agescale li{transition:none!important}
  .fx-t,.fx-t.fx-live{transform:none!important;transition:none!important}
}
html.fx-calm .fx-gl{display:none}
