/* =====================================================================
   MOVIMENTO — abertura com o logo, entradas ao rolar e carrosséis
   automáticos. Usado pelo site e pela página do Preparatório 6º ano.
   ===================================================================== */

/* ---------- abertura (preloader) ---------- */
html.m-loading{overflow:hidden}
html.m-loading body>*:not(.m-pre){visibility:hidden}
.m-pre{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;
  background:radial-gradient(60% 50% at 50% 45%,#0f50cc 0,#071d4a 55%,#040f26 100%);
  transition:clip-path .8s cubic-bezier(.7,0,.2,1),opacity .5s ease .3s;clip-path:circle(150% at 50% 45%)}
.m-pre.out{clip-path:circle(0% at 50% 45%);opacity:0}
.m-pre__box{display:flex;flex-direction:column;align-items:center;gap:18px}
.m-pre svg{width:min(42vw,190px);height:auto;overflow:visible}
.m-pre .orb{fill:none;stroke:#a7b0bb;stroke-width:4.2;stroke-dasharray:1;stroke-dashoffset:1;animation:m-draw .9s cubic-bezier(.6,0,.2,1) forwards}
.m-pre .orb:nth-of-type(2){animation-delay:.12s}.m-pre .orb:nth-of-type(3){animation-delay:.24s}
.m-pre .half{transform-box:fill-box;opacity:0;animation:m-half .7s cubic-bezier(.2,.8,.2,1) .45s forwards}
.m-pre .half.l{transform:translateX(-26px)}.m-pre .half.r{transform:translateX(26px)}
.m-pre .grid,.m-pre .word{opacity:0;animation:m-fade .5s ease .9s forwards}
.m-pre .dot{fill:#18d3f2;filter:drop-shadow(0 0 4px #18d3f2)}
.m-pre .spin{transform-origin:60px 60px;animation:m-spin 2.4s linear infinite}
.m-pre__name{font:900 clamp(1.6rem,6vw,2.2rem)/1 'Barlow Condensed','Arial Narrow',Arial,sans-serif;letter-spacing:2px;color:#fff;text-align:center;opacity:0;transform:translateY(10px);animation:m-up .6s ease 1s forwards}
.m-pre__name small{display:block;color:#18d3f2;font-size:.55em;letter-spacing:6px;margin-top:4px}
.m-pre__bar{width:140px;height:3px;border-radius:3px;background:#ffffff1f;overflow:hidden}
.m-pre__bar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#18d3f2,#b8f54a);transform-origin:left;transform:scaleX(0);animation:m-bar 1.6s cubic-bezier(.4,0,.2,1) forwards}
@keyframes m-draw{to{stroke-dashoffset:0}}
@keyframes m-half{to{opacity:1;transform:none}}
@keyframes m-fade{to{opacity:1}}
@keyframes m-up{to{opacity:1;transform:none}}
@keyframes m-spin{to{transform:rotate(360deg)}}
@keyframes m-bar{to{transform:scaleX(1)}}

/* ---------- entradas ao rolar ---------- */
.m-rv{opacity:0;translate:0 34px;transition:opacity .75s ease,translate .85s cubic-bezier(.2,.75,.2,1),scale .85s cubic-bezier(.2,.75,.2,1);transition-delay:calc(var(--i,0) * 90ms)}
.m-rv[data-m="left"]{translate:-46px 0}
.m-rv[data-m="right"]{translate:46px 0}
.m-rv[data-m="zoom"]{translate:0 20px;scale:.92}
.m-rv[data-m="rise"]{translate:0 70px;scale:.96}
.m-rv.m-in{opacity:1;translate:0 0;scale:1}

/* títulos: sublinhado ciano que cresce quando entra */
.m-line{position:relative}
.m-line::after{content:"";display:block;width:64px;height:4px;border-radius:4px;margin-top:14px;background:linear-gradient(90deg,#18d3f2,#b8f54a);transform:scaleX(0);transform-origin:left;transition:transform .9s cubic-bezier(.2,.75,.2,1) .35s}
.m-line.m-center::after{margin-left:auto;margin-right:auto;transform-origin:center}
.m-line.m-in::after{transform:scaleX(1)}

/* brilho passando no botão principal */
.m-shine{position:relative;overflow:hidden;isolation:isolate}
.m-shine::before{content:"";position:absolute;z-index:1;top:0;bottom:0;left:-60%;width:40%;pointer-events:none;
  background:linear-gradient(100deg,transparent,#ffffff8c,transparent);transform:skewX(-20deg);animation:m-sweep 3.6s ease-in-out 1.2s infinite}
@keyframes m-sweep{0%{left:-60%}35%,100%{left:130%}}

/* foto do topo flutuando de leve */
.m-float{animation:m-floaty 6s ease-in-out infinite}
@keyframes m-floaty{50%{translate:0 -8px}}

/* ---------- carrossel automático ---------- */
.m-car{scroll-behavior:smooth}
.m-dots{display:flex;justify-content:center;gap:8px;margin-top:18px}
.m-dots button{width:9px;height:9px;padding:0;border:0;border-radius:9px;background:currentColor;opacity:.28;cursor:pointer;transition:width .3s,opacity .3s}
.m-dots button[aria-current="true"]{width:26px;opacity:1;background:#18d3f2}
.m-prog{height:4px;border-radius:4px;background:#ffffff26;margin-top:16px;overflow:hidden}
.m-prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,#18d3f2,#b8f54a);border-radius:4px;transition:width .5s ease}

@media (prefers-reduced-motion:reduce){
  .m-rv{opacity:1;translate:none;scale:none;transition:none}
  .m-line::after{transform:none;transition:none}
  .m-shine::before,.m-float{animation:none}
  .m-car{scroll-behavior:auto}
}
