/* Home page motion layer. Additive only: remove this file + home-fx.js to get the old page back. */

/* Header */
.brand img{animation:fxLogoPulse 4.5s ease-in-out infinite}
@keyframes fxLogoPulse{0%,100%{filter:drop-shadow(0 0 0 rgba(190,90,255,0))}50%{filter:drop-shadow(0 0 10px rgba(190,90,255,.75))}}
.main-nav a{position:relative}
.main-nav a::after{content:"";position:absolute;left:50%;right:50%;bottom:6px;height:1px;background:linear-gradient(90deg,transparent,#f5dfaa,transparent);transition:left .35s,right .35s}
.main-nav a:hover::after,.main-nav a.active::after{left:12%;right:12%}
@media(max-width:780px){.main-nav.open{animation:fxMenu .3s ease-out}}
@keyframes fxMenu{from{opacity:0;transform:translateY(-8px);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}

/* Hero */
#page-home .hero-scene{position:relative;overflow:hidden}
.fx-particles{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}
#page-home .hero-copy{z-index:2}
.fx-title .fx-ch{display:inline-block;opacity:0;transform:translateY(.45em) rotateX(60deg);filter:blur(6px);animation:fxCh .7s cubic-bezier(.2,.75,.25,1) forwards}
@keyframes fxCh{to{opacity:1;transform:none;filter:none}}
.fx-title{position:relative}
/* Gold glint travels letter by letter across the title every few seconds. */
.fx-title.fx-glint .fx-ch{opacity:1;transform:none;filter:none;animation:fxGlintCh 6s var(--gd,0s) ease-in-out infinite}
@keyframes fxGlintCh{0%,8%,100%{color:inherit;text-shadow:inherit}3%{color:#fff4d6;text-shadow:0 0 18px #f5dfaa,0 0 4px #fff}}
.fx-rise{opacity:0;transform:translateY(14px);animation:fxRise .7s cubic-bezier(.2,.75,.25,1) forwards}
@keyframes fxRise{to{opacity:1;transform:none}}
#page-home .hero-actions .button.primary{animation:fxGlow 2.8s ease-in-out infinite}
@keyframes fxGlow{0%,100%{box-shadow:0 0 16px #e6bc6940,inset 0 0 0 3px #72552733}50%{box-shadow:0 0 30px #e6bc69a0,inset 0 0 0 3px #72552733}}

/* Simulator */
.sim-head>b{display:inline-flex;align-items:center;gap:6px}
.sim-head>b i{width:7px;height:7px;border-radius:50%;background:#58e695;box-shadow:0 0 0 0 rgba(88,230,149,.6);animation:fxLive 1.6s infinite}
@keyframes fxLive{0%{box-shadow:0 0 0 0 rgba(88,230,149,.6)}100%{box-shadow:0 0 0 9px rgba(88,230,149,0)}}
.sim-track{overflow:visible}
.sim-track>span{position:absolute;left:0;top:0;height:1px;width:var(--fx-p,0%);background:#fff3cf;box-shadow:0 0 8px #f5dfaa}
.sim-track::after{animation:fxArrow 1.4s ease-in-out infinite}
@keyframes fxArrow{0%,100%{transform:translateX(0)}50%{transform:translateX(5px)}}
.sim-end-right.fx-tick,.sim-total-row>b.fx-tick{animation:fxTick .25s ease-out}
@keyframes fxTick{0%{transform:translateY(-4px);color:#fff7dd;text-shadow:0 0 14px #f5dfaa}100%{transform:none}}
.sim-total-row>b{font-variant-numeric:tabular-nums}
.sim-code b{font-variant-numeric:tabular-nums}
.sim-code b.fx-rolling{color:#f5dfaa;text-shadow:0 0 10px #e6bc6980}
.simulator-card{position:relative}
.simulator-card::after{content:"";position:absolute;inset:-1px;pointer-events:none;border:1px solid transparent;
background:linear-gradient(90deg,transparent,#f5dfaa,transparent) border-box;-webkit-mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;
background-size:40% 100%;background-repeat:no-repeat;animation:fxBorder 5s linear infinite;opacity:.8}
@keyframes fxBorder{0%{background-position:-60% 0}100%{background-position:160% 0}}

/* Price cards */
.fx-reveal{opacity:0;transform:translateY(26px) scale(.98);transition:opacity .7s cubic-bezier(.2,.75,.25,1),transform .7s cubic-bezier(.2,.75,.25,1)}
.fx-reveal.fx-in{opacity:1;transform:none}
.price-card{transition:transform .35s,box-shadow .35s,border-color .35s}
.price-card:hover{transform:translateY(-6px);border-color:#e6c27f;box-shadow:0 18px 40px -18px #e6bc69aa,0 0 0 1px #e6c27f55}
.price-card .tier-icon{transition:transform .5s,filter .5s}
.price-card:hover .tier-icon{transform:scale(1.07) rotate(-2deg);filter:drop-shadow(0 0 18px #e6bc6999)}
.price-card.featured::before{content:"TERLARIS";position:absolute;top:-10px;left:50%;transform:translateX(-50%);z-index:2;padding:3px 10px;font:700 9px Arial;letter-spacing:2px;color:#110e09;
background:linear-gradient(110deg,#9d753a,#f5dfaa 45%,#be985a);background-size:200% 100%;animation:fxBadge 3s linear infinite;box-shadow:0 0 14px #e6bc6970}
@keyframes fxBadge{0%{background-position:100% 0}100%{background-position:-100% 0}}

/* Steps */
.steps-grid article{position:relative}
.steps-grid article::after{content:"";position:absolute;left:-1px;top:0;width:1px;height:0;background:linear-gradient(#f5dfaa,#e6bc69);box-shadow:0 0 8px #f5dfaa;transition:height .9s cubic-bezier(.2,.75,.25,1)}
.steps-grid article.fx-in::after{height:100%}
.steps-grid article>span{transition:text-shadow .6s,color .6s}
.steps-grid article.fx-in>span{color:#ffe7b0;text-shadow:0 0 16px #e6bc69}

/* Page change */
.page.active{animation:fxPage .5s cubic-bezier(.2,.75,.25,1)}
@keyframes fxPage{from{opacity:0;filter:blur(8px);transform:translateY(8px)}to{opacity:1;filter:none;transform:none}}

@media (prefers-reduced-motion:reduce){
  .fx-title .fx-ch,.fx-rise,.fx-reveal{opacity:1!important;transform:none!important;filter:none!important;animation:none!important;transition:none!important}
  .brand img,.fx-title.fx-glint .fx-ch,.sim-head>b i,.sim-track::after,.simulator-card::after,.price-card.featured::before,#page-home .hero-actions .button.primary,.page.active{animation:none!important}
  .fx-particles{display:none}
}
