/* Quarkium — fundo vivo: matriz de pontos, gradiente azul (#006eff) e granulação.
   Marcação (nesta ordem, dentro de um elemento com data-qfx):
   .qfx-dots, .qfx-aurora > .qfx-rise > (.qfx-base + .qfx-flow), .qfx-grain.
   Os pontos e o grão são desenhados por quark-fx.js. */
[data-qfx] { position: relative; isolation: isolate; overflow: hidden; }
.qfx-dots, .qfx-aurora, .qfx-grain { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; }
.qfx-dots { background-image: radial-gradient(circle, #2B2B2B 1px, transparent 1.6px); background-size: 16px 16px; }
.qfx-dots.has-canvas { overflow: hidden; background-image: none; }
.qfx-dots canvas { display: block; width: 100%; height: 100%; }

.qfx-aurora { --aurora-strength: .45; overflow: hidden; }
/* Espelha o horizonte para o topo. Em --aurora-strength fica a força do gradiente (a Central usa .45). */
.qfx-aurora.is-top { --aurora-strength: .78; transform: scaleY(-1); }
.qfx-rise, .qfx-base, .qfx-flow { position: absolute; inset: 0; display: block; transform-origin: 50% 100%; }
/* Horizonte em curva: cantos mais altos e claros que o centro. */
.qfx-base {
  background:
    linear-gradient(to top, rgba(214, 234, 255, .82) 0%, rgba(110, 176, 255, .46) 2.5%, rgba(0, 110, 255, 0) 11%),
    radial-gradient(ellipse 115% 100% at 50% 4%, rgba(0, 110, 255, 0) 56%, rgba(0, 66, 160, .16) 67%, rgba(0, 88, 214, .34) 76%, rgba(0, 110, 255, .58) 86%, rgba(66, 150, 255, .72) 94%, rgba(168, 208, 255, .86) 104%),
    linear-gradient(to top, rgba(0, 110, 255, .62) 0%, rgba(0, 110, 255, .36) 9%, rgba(0, 82, 196, .17) 21%, rgba(0, 55, 140, .06) 34%, rgba(0, 40, 110, 0) 48%);
  animation: qfx-breathe 8s ease-in-out infinite alternate;
}
/* Reflexos que deslizam devagar de um lado ao outro. */
.qfx-flow {
  left: -25%; right: -25%;
  background:
    radial-gradient(ellipse 24% 24% at 32% 104%, rgba(80, 170, 255, .55), rgba(0, 110, 255, 0) 100%),
    radial-gradient(ellipse 30% 19% at 70% 106%, rgba(0, 110, 255, .62), rgba(0, 110, 255, 0) 100%);
  animation: qfx-drift 13s ease-in-out infinite alternate;
}
/* Entrada: começa alongado e recolhe até a posição final. */
.qfx-rise { animation: qfx-settle 2.8s cubic-bezier(.33, 0, .15, 1) both; }
.qfx-grain { background-repeat: repeat; }

@keyframes qfx-settle { 0% { opacity: 0; transform: scaleY(2.15); } 16% { opacity: var(--aurora-strength); } 100% { opacity: var(--aurora-strength); transform: scaleY(1); } }
@keyframes qfx-breathe { from { transform: scaleY(1); } to { transform: scaleY(1.08); } }
@keyframes qfx-drift { from { transform: translateX(-11%) scaleY(.92); opacity: .6; } to { transform: translateX(11%) scaleY(1.14); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .qfx-rise { animation: none; opacity: var(--aurora-strength); }
  .qfx-base, .qfx-flow { animation: none; }
}
