/* Живой фон и эффекты для всех страниц.
   Яркость и скорость настраиваются в config.js (блок fx). */

/* ---------- фон: плавающие пятна света ---------- */
/* Блоки страницы делаем прозрачными, чтобы за ними был виден живой фон. */
body > div:first-of-type { background: transparent !important; }
#how, #start, #price, #faq { background: transparent !important; }
[style*="linear-gradient(180deg, #1A120B"] { background: transparent !important; }
[style*="border-bottom: 1px solid #1E1E23"] { background: transparent !important; }

.fx-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.fx-aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.fx-aurora i:nth-child(1) {
  width: max(56vw, 460px); height: max(56vw, 460px);
  left: -14vw; top: -18vw;
  background: #FF8A3D;
  opacity: calc(var(--fx-i, 1) * 0.30);
  animation: fx-a calc(34s / var(--fx-speed, 1)) ease-in-out infinite alternate;
}
.fx-aurora i:nth-child(2) {
  width: max(46vw, 400px); height: max(46vw, 400px);
  right: -12vw; top: 16vh;
  background: #FFB347;
  opacity: calc(var(--fx-i, 1) * 0.20);
  animation: fx-b calc(41s / var(--fx-speed, 1)) ease-in-out infinite alternate;
}
.fx-aurora i:nth-child(3) {
  width: max(50vw, 420px); height: max(50vw, 420px);
  left: 10vw; bottom: -26vw;
  background: #E5502A;
  opacity: calc(var(--fx-i, 1) * 0.24);
  animation: fx-c calc(38s / var(--fx-speed, 1)) ease-in-out infinite alternate;
}
.fx-aurora i:nth-child(4) {
  width: max(30vw, 280px); height: max(30vw, 280px);
  left: 42vw; top: 34vh;
  background: #FF8A3D;
  opacity: calc(var(--fx-i, 1) * 0.13);
  animation: fx-d calc(29s / var(--fx-speed, 1)) ease-in-out infinite alternate;
}
@keyframes fx-a { from { transform: translate3d(0, 0, 0) scale(1); }    to { transform: translate3d(16vw, 12vh, 0) scale(1.2); } }
@keyframes fx-b { from { transform: translate3d(0, 0, 0) scale(1.1); }  to { transform: translate3d(-14vw, 14vh, 0) scale(0.9); } }
@keyframes fx-c { from { transform: translate3d(0, 0, 0) scale(1); }    to { transform: translate3d(18vw, -12vh, 0) scale(1.25); } }
@keyframes fx-d { from { transform: translate3d(-8vw, -6vh, 0) scale(0.9); } to { transform: translate3d(10vw, 10vh, 0) scale(1.3); } }

/* ---------- переливающийся акцент ---------- */
.fx-shimmer {
  background: linear-gradient(100deg, #FF8A3D 0%, #FFC26B 25%, #FF6B2C 50%, #FFC26B 75%, #FF8A3D 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  animation: fx-shimmer calc(8s / var(--fx-speed, 1)) ease-in-out infinite alternate;
}
@keyframes fx-shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* ---------- карточки: стекло, подсветка под курсором, подъём ---------- */
.fx-glow {
  position: relative;
  isolation: isolate;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.fx-glow[style*="background: #111114"] {
  background-color: rgba(17, 17, 20, 0.72) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.fx-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 138, 61, 0.16), transparent 62%);
}
.fx-glow:hover::before { opacity: 1; }
.fx-glow:hover {
  border-color: rgba(255, 138, 61, 0.45) !important;
  box-shadow: 0 18px 50px -20px rgba(255, 138, 61, 0.35);
}
.fx-lift {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.fx-lift:hover { transform: translateY(-4px); }

/* ---------- кнопки ---------- */
a[style*="background: #FF8A3D"],
button[type="submit"][style*="background: #FF8A3D"] {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a[style*="background: #FF8A3D"]:hover,
button[type="submit"][style*="background: #FF8A3D"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(255, 138, 61, 0.55);
}
a[style*="border: 1px solid #34343B"],
button[style*="border: 1px solid #34343B"] {
  transition: transform 0.2s ease, border-color 0.2s ease;
}
a[style*="border: 1px solid #34343B"]:hover,
button[style*="border: 1px solid #34343B"]:hover {
  border-color: rgba(255, 138, 61, 0.7) !important;
  transform: translateY(-2px);
}

/* ---------- живые детали демо ---------- */
.fx-live { animation: fx-live calc(2s / var(--fx-speed, 1)) ease-out infinite; }
@keyframes fx-live {
  0%   { box-shadow: 0 0 0 0 rgba(229, 52, 58, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(229, 52, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 52, 58, 0); }
}
.fx-bell { animation: fx-bell-glow calc(3.6s / var(--fx-speed, 1)) ease-in-out infinite; }
.fx-bell svg { transform-origin: 50% 12%; animation: fx-ring calc(3.6s / var(--fx-speed, 1)) ease-in-out infinite; }
@keyframes fx-bell-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0); }
  50%      { box-shadow: 0 0 28px 2px rgba(255, 138, 61, 0.35); }
}
@keyframes fx-ring {
  0%, 55%, 100% { transform: rotate(0); }
  60% { transform: rotate(-14deg); }
  66% { transform: rotate(12deg); }
  72% { transform: rotate(-9deg); }
  78% { transform: rotate(6deg); }
  84% { transform: rotate(0); }
}
.fx-pop { animation: fx-pop 0.45s ease-out; }
@keyframes fx-pop {
  0%   { transform: scale(0.94); opacity: 0.4; }
  60%  { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); }
}

/* ---------- плавное появление блоков при прокрутке ---------- */
.fx-js .fx-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fx-js .fx-reveal.fx-in { opacity: 1; transform: none; }

/* ---------- без анимации ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-aurora i, .fx-shimmer, .fx-live, .fx-bell, .fx-bell svg, .fx-pop { animation: none !important; }
  .fx-js .fx-reveal { opacity: 1; transform: none; transition: none; }
  .fx-lift:hover, a[style*="background: #FF8A3D"]:hover { transform: none; }
}
.fx-still .fx-aurora i, .fx-still .fx-shimmer, .fx-still .fx-live,
.fx-still .fx-bell, .fx-still .fx-bell svg { animation: none !important; }
