/* APIOS Movimento. Curva "sai rápido e assenta" (0.22, 1, 0.36, 1); a velocidade geral vem de --apm-v. */
html { --apm-v: 1; } html.apm-v-suave { --apm-v: 1.35; } html.apm-v-rapida { --apm-v: .7; }
:root { --apm-curva: cubic-bezier(.22, 1, .36, 1); }

/* títulos palavra por palavra */
.apm-palavras { perspective: 600px; }
.apm-palavras .apm-p { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.apm-palavras .apm-pi { display: inline-block; opacity: 0; transform: translateY(.6em) rotateX(75deg); transform-origin: 50% 100%; transition: opacity calc(.5s * var(--apm-v)) var(--apm-curva), transform calc(.6s * var(--apm-v)) var(--apm-curva); transition-delay: calc(var(--i, 0) * 45ms * var(--apm-v)); }
.apm-palavras.apm-visto .apm-pi { opacity: 1; transform: none; }
.apm-palavras .apm-pi.apm-sub { text-decoration: underline; text-decoration-color: inherit; }
.apm-palavras:not(.apm-visto) a { text-decoration-color: transparent; }

/* elementos que sobem */
.apm-sobe { opacity: 0; transform: translateY(22px); transition: opacity calc(.6s * var(--apm-v)) var(--apm-curva), transform calc(.7s * var(--apm-v)) var(--apm-curva); transition-delay: calc(var(--i, 0) * 80ms * var(--apm-v)); }
.apm-sobe.apm-visto { opacity: 1; transform: none; }

/* linha que se desenha antes do texto */
.anima-linha { position: relative; padding-left: 44px; }
.anima-linha::before { content: ""; position: absolute; left: 0; top: .72em; width: 32px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform calc(.6s * var(--apm-v)) var(--apm-curva) .25s; }
.anima-linha.apm-visto::before { transform: scaleX(1); }

/* barra de progresso */
.anima-progresso { position: relative; }
.anima-progresso::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform calc(1s * var(--apm-v)) var(--apm-curva); }
.anima-progresso.apm-visto::after { transform: scaleX(1); }

/* botão magnético */
.apm-ima { transform: translate(var(--mx, 0px), var(--my, 0px)); transition: transform .35s var(--apm-curva) !important; will-change: transform; }

/* letreiro corrido */
.apm-letreiro { overflow: hidden; width: 100%; opacity: .12; font-size: clamp(32px, 6vw, 72px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; pointer-events: none; user-select: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.apm-letreiro-faixa { display: inline-flex; gap: .6em; align-items: center; animation: apm-corre var(--apm-dur, 40s) linear infinite; }
.apm-letreiro-faixa i { font-style: normal; opacity: .6; }
@keyframes apm-corre { to { transform: translateX(-50%); } }

/* número enorme ao fundo */
.apm-numero { position: absolute; top: 50%; z-index: 0; font-size: clamp(160px, 28vw, 448px); font-weight: 800; letter-spacing: -.06em; line-height: 1; color: currentColor; opacity: .035; pointer-events: none; user-select: none; transform: translate(var(--nx, 0px), calc(-50% + var(--ny, 0px))); transition: transform .9s var(--apm-curva); }
.apm-numero-esq { left: -2rem; } .apm-numero-dir { right: -2rem; }
.apm-numero span { display: block; opacity: 0; transform: scale(.85); filter: blur(10px); transition: opacity calc(.8s * var(--apm-v)) var(--apm-curva), transform calc(.8s * var(--apm-v)) var(--apm-curva), filter calc(.8s * var(--apm-v)) var(--apm-curva); }
.apm-numero.apm-visto span { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
	.apm-palavras .apm-pi, .apm-sobe, .apm-numero span { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
	.anima-linha::before, .anima-progresso::after { transform: scaleX(1); transition: none; }
	.apm-letreiro-faixa { animation: none; }
	.apm-ima { transform: none; }
}
