/* Camada de efeitos (estudio-efeitos-camada). Apagar este arquivo e efeitos.js devolve o site base.
   Só vale com html.fx (ligada pelo efeitos.js). */

/* 1. Brilhos lavanda em deriva lenta atrás da abertura */
.fx .abertura { isolation: isolate; }
.fx .brilho {
  position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(199 166 216 / .55), rgb(199 166 216 / 0));
  will-change: transform;
}
.fx .brilho--a { width: 620px; height: 620px; right: -6%; top: -8%; animation: deriva-a 26s ease-in-out infinite alternate; }
.fx .brilho--b { width: 420px; height: 420px; left: -14%; bottom: 4%; opacity: .7; animation: deriva-b 32s ease-in-out infinite alternate; }
.fx .brilho--c { width: 300px; height: 300px; left: 38%; top: 6%; opacity: .45; background: radial-gradient(closest-side, rgb(255 255 255 / .9), rgb(255 255 255 / 0)); animation: deriva-a 22s ease-in-out infinite alternate-reverse; }
@keyframes deriva-a { to { transform: translate(-60px, 50px) scale(1.12); } }
@keyframes deriva-b { to { transform: translate(70px, -40px) scale(.9); } }
.fx main { overflow-x: clip; }

/* 2. O fio se desenha e termina no coração */
.fx .fio path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: desenhar 3.2s .4s cubic-bezier(.45,.05,.25,1) forwards; }
@keyframes desenhar { to { stroke-dashoffset: 0; } }
.fx .linha-coracao span { transform: scaleX(0); animation: abrir .9s .2s cubic-bezier(.2,.7,.2,1) forwards; }
.fx .linha-coracao span:first-child { transform-origin: right; }
.fx .linha-coracao span:last-child { transform-origin: left; }
.fx .linha-coracao svg { animation: pulsar 1.2s 1.1s ease-out both; }
@keyframes abrir { to { transform: scaleX(1); } }
@keyframes pulsar { 0% { transform: scale(0); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* 3. Retrato: moldura com halo e a borboleta pousando */
.fx .arco { animation: surgir 1.1s .1s cubic-bezier(.2,.7,.2,1) both; }
.fx .abertura__retrato::before {
  content: ""; position: absolute; inset: -14px; z-index: 1; border-radius: 50%;
  border: 1px solid rgb(143 133 144 / .45);
  transform: rotate(-6deg) translate(10px, 6px);
  animation: surgir 1.3s .35s cubic-bezier(.2,.7,.2,1) both;
}
.fx .borboleta { animation: pousar 1.6s 1.2s cubic-bezier(.2,.7,.2,1) both, flutuar 7s 2.8s ease-in-out infinite; }
@keyframes surgir { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes pousar { from { opacity: 0; transform: translate(40px, -30px) rotate(18deg); } }
@keyframes flutuar { 50% { transform: translateY(-8px) rotate(-4deg); } }
.fx .arte { animation: aparecer 2s .6s ease both; }
@keyframes aparecer { from { opacity: 0; } }

/* 4. Textos da abertura entram em sequência */
.fx .abertura__texto > * { animation: subir .8s cubic-bezier(.2,.7,.2,1) both; }
.fx .abertura__texto > :nth-child(2) { animation-delay: .08s; }
.fx .abertura__texto > :nth-child(3) { animation-delay: .16s; }
.fx .abertura__texto > :nth-child(4) { animation-delay: .24s; }
.fx .abertura__texto > :nth-child(5) { animation-delay: .32s; }
.fx .abertura__texto > :nth-child(6) { animation-delay: .4s; }
@keyframes subir { from { opacity: 0; transform: translateY(16px); } }

/* 5. Entradas ao rolar (escalonadas por --i) */
.fx .revela { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
.fx .revela.visto { opacity: 1; transform: none; }

/* 6. Faixa com o lema, rolando devagar, pontas esfumadas */
.faixa { overflow: hidden; padding: 18px 0; border-bottom: 1px solid rgb(143 133 144 / .2); background: var(--creme);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.faixa__trilho { display: flex; width: max-content; animation: rolar 48s linear infinite; }
.faixa:hover .faixa__trilho { animation-play-state: paused; }
.faixa__grupo { display: flex; align-items: center; gap: 36px; padding-right: 36px; white-space: nowrap; font: 500 1.35rem/1 var(--f-display); color: var(--tinta-2); }
.faixa__grupo em { font: 1.6rem/1 var(--f-script); color: var(--ameixa); font-style: normal; }
.faixa__grupo i { width: 6px; height: 6px; border-radius: 50%; background: var(--lilas); }
@keyframes rolar { to { transform: translateX(-50%); } }

/* 7. Luz que atravessa o botão principal */
.fx .abertura .botao, .fx .contato .botao { position: relative; overflow: hidden; }
.fx .abertura .botao::after, .fx .contato .botao::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .28), transparent);
  animation: luz 7s 2.5s ease-in-out infinite;
}
@keyframes luz { 0%, 70% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(220%) skewX(-20deg); } }

/* 8. Cartões respondem ao toque/mouse */
.fx .servicos article, .fx .passos li { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
@media (hover: hover) {
  .fx .servicos article:hover, .fx .passos li:hover { transform: translateY(-4px); box-shadow: var(--sombra); }
}

/* 9. Brilho suave atrás do contato final */
.fx .contato { position: relative; overflow: hidden; isolation: isolate; }
.fx .contato::before { content: ""; position: absolute; z-index: -1; width: 700px; height: 700px; left: 50%; top: 40%; translate: -50% -50%;
  background: radial-gradient(closest-side, rgb(199 166 216 / .45), transparent); animation: respirar 10s ease-in-out infinite; }
@keyframes respirar { 50% { transform: scale(1.12); opacity: .75; } }

@media (max-width: 820px) {
  .fx .brilho--a { width: 380px; height: 380px; right: -30%; top: -4%; }
  .fx .brilho--b, .fx .brilho--c { display: none; }
  .faixa__grupo { font-size: 1.15rem; gap: 26px; padding-right: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx *, .fx *::before, .fx *::after { animation: none !important; }
  .fx .fio path { stroke-dashoffset: 0; }
  .fx .linha-coracao span { transform: none; }
  .fx .revela { opacity: 1; transform: none; }
  .faixa__trilho { animation: none; }
}
