/* Costantin · animações e interações (motion.css) */
.progress{position:fixed;top:0;left:0;height:3px;width:100%;background:var(--red);transform-origin:0 50%;transform:scaleX(0);z-index:50;pointer-events:none;box-shadow:0 0 10px #ed432b88}

/* Revelar ao rolar */
.js-motion .rv{opacity:0;translate:0 28px;transition:opacity .8s cubic-bezier(.2,.7,.2,1) var(--d,0s),translate .8s cubic-bezier(.2,.7,.2,1) var(--d,0s)}
.js-motion .rv.in{opacity:1;translate:0 0}

/* Entrada do topo */
.js-motion .hero h1,.js-motion .hero .intro,.js-motion .hero .actions,.js-motion .hero-meta,.js-motion .hero .eyebrow{animation:rise .9s cubic-bezier(.2,.7,.2,1) both}
.js-motion .hero .eyebrow{animation-delay:.05s}
.js-motion .hero h1{animation-delay:.15s}
.js-motion .hero .intro{animation-delay:.3s}
.js-motion .hero .actions{animation-delay:.42s}
.js-motion .hero-meta{animation-delay:.55s}
.js-motion .stage .mascot{animation:pop 1s cubic-bezier(.2,.8,.2,1.15) .25s both}
.js-motion .float.first{animation:pop .8s cubic-bezier(.2,.8,.2,1.2) .7s both,bob 5s ease-in-out 1.6s infinite}
.js-motion .float.second{animation:pop .8s cubic-bezier(.2,.8,.2,1.2) .9s both,bob 6s ease-in-out 1.8s infinite reverse}
.js-motion .tag{animation:fade .8s 1.1s both}
@keyframes rise{from{opacity:0;translate:0 30px}to{opacity:1;translate:0 0}}
@keyframes pop{from{opacity:0;scale:.85}to{opacity:1;scale:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes bob{0%,100%{translate:0 0}50%{translate:0 -12px}}

/* Órbita com faísca */
.orbit{animation:spin 18s linear infinite}
.orbit i{position:absolute;width:12px;height:12px;border-radius:50%;background:var(--red);top:-6px;left:calc(50% - 6px);box-shadow:0 0 0 6px #ed432b22,0 0 18px #ed432b}
@keyframes spin{to{rotate:360deg}}

/* Paralaxe do mouse */
.stage .mascot,.stage .symbol{translate:calc(var(--px,0)*var(--k,10px)) calc(var(--py,0)*var(--k,10px));transition:translate .25s ease-out}
.stage .symbol{--k:-22px;rotate:var(--sr,0deg)}

/* Faixa com corrente elétrica */
.stripe{position:relative;overflow:hidden}
.stripe:after{content:'';position:absolute;left:-30%;bottom:-1px;width:30%;height:2px;background:linear-gradient(90deg,transparent,var(--red),transparent);animation:current 3.5s linear infinite}
@keyframes current{to{left:100%}}

/* Botões */
.btn span{display:inline-block;transition:transform .25s}
.btn:hover span{transform:translate(3px,-3px)}

/* Cartões com inclinação e brilho */
.service{position:relative;overflow:hidden;transition:transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s,border-color .35s;transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))}
.service:before{content:'';position:absolute;inset:0;background:radial-gradient(260px circle at var(--mx,50%) var(--my,50%),#ed432b26,transparent 70%);opacity:0;transition:opacity .3s;pointer-events:none}
.service:hover{box-shadow:0 22px 50px #1d1e1b1f;border-color:#ed432b66}
.service:hover:before{opacity:1}
.service-icon{transition:transform .4s cubic-bezier(.2,.8,.2,1.3)}
.service:hover .service-icon{transform:scale(1.25) rotate(-8deg)}

/* Etapas: linha que se preenche */
.step{position:relative}
.step:before{content:'';position:absolute;top:-1px;left:0;height:2px;width:0;background:var(--red);transition:width 1.1s cubic-bezier(.2,.7,.2,1) calc(var(--d,0s) + .2s)}
.step.in:before{width:100%}

/* Quadro elétrico interativo */
.breaker{cursor:pointer;transition:background .3s,transform .15s}
.breaker:active{transform:scale(.96)}
.breaker:before{transition:top .25s cubic-bezier(.3,1.6,.5,1),border-color .25s}
.breaker:after{transition:background .3s,box-shadow .3s}
.breaker.on:after{background:#3ccf6a;box-shadow:0 0 8px #3ccf6a}
.breaker.off:before{top:38px;border-bottom-color:#9a9c90}
.breaker.off{background:linear-gradient(90deg,#d6d6d0,#ecece6 25%,#e2e2dc)}
.board-hint{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px;letter-spacing:.08em;margin-top:18px;color:#575c4c}
.board-hint b{color:var(--ink)}
.board-hint button{border:1px solid #b9bcae;background:#fff;border-radius:20px;padding:7px 12px;font-size:11px;font-weight:700}
.board-hint button:hover{border-color:var(--red);color:var(--red)}
.board.dark .board-inner{background:#ecece6}
.board .pulse{display:inline-block;width:8px;height:8px;border-radius:50%;background:#3ccf6a;margin-right:6px;box-shadow:0 0 0 0 #3ccf6a88;animation:ping 1.8s infinite}
.board.dark .pulse{background:#c33;animation:none}
@keyframes ping{70%{box-shadow:0 0 0 8px #3ccf6a00}100%{box-shadow:0 0 0 0 #3ccf6a00}}

/* Lista de verificação */
.js-motion .checks li{opacity:0;translate:-14px 0;transition:opacity .6s var(--d,0s),translate .6s var(--d,0s)}
.js-motion .checks.in li{opacity:1;translate:0 0}

/* Mascote acenando */
.about-art img{transition:transform .6s cubic-bezier(.2,.8,.2,1.3);transform-origin:50% 90%}
.about-inner:hover .about-art img{transform:rotate(-3deg) scale(1.03)}

/* FAQ */
summary:after{transition:transform .3s}
details[open] summary:after{transform:rotate(180deg)}
details[open] p{animation:rise .5s both}

/* Casinha de bloquinhos */
.service-icon.house-icon{font-size:0;line-height:0}
.service:hover .service-icon.house-icon{transform:none}
.house-icon svg{display:block;overflow:visible}
.house-icon .b{fill:var(--red)}
.house-icon .b.roof{fill:#c9301b}
.service:hover .house-icon .b{animation:block .45s cubic-bezier(.3,1.5,.5,1) calc(var(--i) * .045s) both}
@keyframes block{from{opacity:0;transform:translateY(-14px)}to{opacity:1;transform:none}}

/* Personagem em PNG transparente + espaço dos pés */
.stage .mascot{background:transparent;border-radius:0;margin-bottom:62px;filter:drop-shadow(0 18px 22px #1d1e1b26)}
.stage .tag{bottom:6px}
.about-art{background:transparent}
.about-art img{filter:drop-shadow(0 14px 20px #0003)}
.symbol,.brand img{mix-blend-mode:normal}
@media(max-width:720px){.stage .mascot{margin-bottom:50px}.stage .tag{bottom:4px}}

/* Raio piscando */
.service:hover .service-icon.bolt-icon,.service:hover .service-icon.wall-icon{transform:none}
.bolt-icon,.wall-icon{font-size:0;line-height:0}
.bolt-icon svg,.wall-icon svg{display:block;overflow:visible}
.bolt-icon .bolt{fill:var(--red);stroke:var(--red);stroke-width:1.2;stroke-linejoin:round;stroke-dasharray:110;stroke-dashoffset:0;animation:flicker 3.2s steps(1) infinite;filter:drop-shadow(0 0 4px #ed432b99)}
.js-motion .service.featured:not(.in) .bolt{stroke-dashoffset:110;fill-opacity:0}
.js-motion .service.featured.in .bolt{animation:strike .9s ease-out .3s both,flicker 3.2s steps(1) 1.3s infinite}
.bolt-icon .spark{stroke:#ffb4a6;stroke-width:2;stroke-linecap:round;opacity:0}
.service:hover .bolt-icon .spark{animation:spark .9s ease-out calc(var(--i)*.08s) infinite}
.service:hover .bolt-icon .bolt{animation:flicker .9s steps(1) infinite;filter:drop-shadow(0 0 9px #ed432b)}
@keyframes strike{0%{stroke-dashoffset:110;fill-opacity:0}60%{stroke-dashoffset:0;fill-opacity:0}70%{fill-opacity:1;filter:drop-shadow(0 0 14px #ff6a50)}100%{fill-opacity:1}}
@keyframes flicker{0%,100%{opacity:1}6%{opacity:.35}8%{opacity:1}11%{opacity:.55}13%{opacity:1}52%{opacity:1}54%{opacity:.6}56%{opacity:1}}
@keyframes spark{0%{opacity:0;transform:scale(.6)}30%{opacity:1}100%{opacity:0;transform:scale(1.4)}}
.bolt-icon .spark{transform-origin:20px 20px;transform-box:view-box}

/* Parede que quebra e se reconstrói */
.wall-icon .brick{fill:var(--red);transform-box:fill-box;transform-origin:center}
.wall-icon .crack{fill:none;stroke:var(--ink);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:30;stroke-dashoffset:30;opacity:0}
.service:hover .wall-icon .crack{animation:crack 1.6s ease both}
.service:hover .wall-icon .brick{animation:shake .35s ease .25s}
.service:hover .wall-icon .brick.br{animation:rebuild 1.6s cubic-bezier(.4,0,.3,1) calc(.35s + var(--j)*.06s) both}
@keyframes crack{0%{opacity:1;stroke-dashoffset:30}25%{opacity:1;stroke-dashoffset:0}40%{opacity:0;stroke-dashoffset:0}100%{opacity:0}}
@keyframes shake{25%{transform:translateX(-1px)}50%{transform:translateX(1px)}75%{transform:translateX(-1px)}}
@keyframes rebuild{0%{transform:none;opacity:1}30%{transform:translate(calc(var(--r)*6px),16px) rotate(calc(var(--r)*35deg));opacity:0;fill:#9a9c90}45%{transform:translateY(-16px);opacity:0;fill:var(--red)}75%{transform:translateY(1px);opacity:1}100%{transform:none;opacity:1}}

@media(prefers-reduced-motion:reduce){
  .bolt-icon *,.wall-icon *{animation:none!important;stroke-dashoffset:0!important;fill-opacity:1!important}
  .service:hover .house-icon .b{animation:none}
  .js-motion .rv,.js-motion .checks li{opacity:1!important;translate:none!important}
  .orbit,.stripe:after,.float,.pulse{animation:none!important}
  .js-motion .hero *{animation:none!important}
}
