/* Algogenix Systems: interactive effects (Settings → General → Interactive effects). */

/* Reading progress bar. */
.agx-fx-progress { position: fixed; left: 0; top: 0; z-index: 99999; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--agx-brand), var(--agx-accent)); pointer-events: none; }
body.admin-bar .agx-fx-progress { top: 32px; }
@media (max-width: 782px) { body.admin-bar .agx-fx-progress { top: 46px; } }

/* Hero: animated network behind the content. */
.agx-fx .agx-hero { position: relative; isolation: isolate; overflow: hidden; }
.agx-fx-net { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.agx-fx-net.is-on { opacity: 1; }
.agx-fx .agx-hero::before { content: ""; position: absolute; z-index: -2; width: 620px; height: 620px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--agx-accent) 18%, transparent), transparent 65%); filter: blur(10px); animation: agx-fx-blob 14s ease-in-out infinite alternate; pointer-events: none; }
.agx-fx .agx-hero::after { content: ""; position: absolute; z-index: -2; width: 520px; height: 520px; left: -160px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--agx-brand) 14%, transparent), transparent 65%); filter: blur(10px); animation: agx-fx-blob 17s ease-in-out infinite alternate-reverse; pointer-events: none; }
@keyframes agx-fx-blob { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 40px) scale(1.12); } }

/* Hero headline highlight: slow shimmer. */
.agx-fx .agx-hero .agx-grad { background-size: 220% 100%; animation: agx-fx-shimmer 6s ease-in-out infinite alternate; background-image: linear-gradient(90deg, var(--agx-brand) 0%, var(--agx-accent) 50%, var(--agx-brand) 100%); }
@keyframes agx-fx-shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Hero image: floats and follows the pointer slightly. */
.agx-fx .agx-hero__art img { transform: translate3d(var(--px, 0), var(--py, 0), 0); transition: transform .5s cubic-bezier(.2, .8, .2, 1); animation: agx-fx-float 7s ease-in-out infinite; }
@keyframes agx-fx-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Cards: 3D tilt with a light that follows the pointer. */
.agx .agx-fx-tilt { position: relative; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; will-change: transform; }
.agx .agx-fx-tilt.is-tilting { transition: transform .08s linear, box-shadow .3s; --ty: -5px; }
.agx .agx-fx-tilt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px); }
.agx .agx-fx-tilt::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 45%), radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--agx-accent) 10%, transparent), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.agx .agx-fx-tilt.is-tilting::after { opacity: 1; }

/* Buttons that lean toward the pointer. */
.agx .agx-fx-mag { transform: translate(var(--bx, 0), var(--by, 0)); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, background .2s; }
.agx .agx-fx-mag:hover { transform: translate(var(--bx, 0), calc(var(--by, 0px) - 2px)); }

/* Numbers that count up. */
.agx-fx-count { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
	.agx-fx .agx-hero::before, .agx-fx .agx-hero::after, .agx-fx .agx-hero .agx-grad, .agx-fx .agx-hero__art img { animation: none !important; }
	.agx-fx-net { display: none; }
}
