/* Золотая магическая кнопка: PNG даёт кованую рамку, CSS — живое золото и частицы. */
.page--home .magic-cta,
.site-nav__download.magic-cta {
  position: relative;
  isolation: isolate;
  overflow: visible;
  color: #271500 !important;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 246, 190, 0.72);
}

.page--home .magic-cta::before,
.site-nav__download.magic-cta::before {
  position: absolute;
  z-index: -1;
  inset: 24% 8%;
  content: '';
  border-radius: 10px;
  background: linear-gradient(180deg, #fff2a1 0, #ffc928 36%, #f09a00 72%, #9f4e00 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -3px 6px rgba(103, 40, 0, 0.48),
    0 0 16px rgba(255, 185, 20, 0.65),
    0 0 34px rgba(255, 121, 0, 0.24);
  transition: filter 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.page--home .magic-cta::after,
.site-nav__download.magic-cta::after {
  position: absolute;
  z-index: 1;
  top: 27%;
  right: 18%;
  left: 18%;
  height: 18%;
  content: '';
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 228, 0.72), transparent);
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.page--home .magic-cta:hover,
.page--home .magic-cta:focus-visible,
.site-nav__download.magic-cta:hover,
.site-nav__download.magic-cta:focus-visible {
  color: #1d0e00 !important;
  text-shadow: 0 1px 0 #fff6c7, 0 0 8px rgba(255, 255, 210, 0.55);
}

.page--home .magic-cta:hover::before,
.page--home .magic-cta:focus-visible::before,
.site-nav__download.magic-cta:hover::before,
.site-nav__download.magic-cta:focus-visible::before {
  filter: saturate(1.2) brightness(1.16);
  box-shadow:
    inset 0 1px 0 #fffbd2,
    inset 0 -3px 6px rgba(103, 40, 0, 0.42),
    0 0 24px rgba(255, 209, 63, 0.95),
    0 0 58px rgba(255, 123, 0, 0.6);
  transform: scale(1.035);
}

.page--home .magic-cta:hover::after,
.page--home .magic-cta:focus-visible::after,
.site-nav__download.magic-cta:hover::after,
.site-nav__download.magic-cta:focus-visible::after {
  opacity: 1;
  transform: translateX(8%);
}

.magic-cta__particles {
  position: absolute;
  z-index: -2;
  inset: -18px;
  overflow: visible;
  pointer-events: none;
}

.magic-cta__particle {
  position: absolute;
  left: calc(var(--particle-x) * 1%);
  top: calc(var(--particle-y) * 1%);
  width: calc(2px + var(--particle-size) * 1px);
  height: calc(2px + var(--particle-size) * 1px);
  border-radius: 50%;
  background: #ffe568;
  box-shadow: 0 0 5px #fff3a8, 0 0 11px #ff9d00;
  opacity: 0.32;
  animation: magic-particle-drift calc(2.8s + var(--particle-speed) * 0.34s) ease-in-out infinite;
  animation-delay: calc(var(--particle-delay) * -0.21s);
  transition: opacity 160ms ease, filter 160ms ease;
}

.magic-cta:hover .magic-cta__particle,
.magic-cta:focus-visible .magic-cta__particle {
  opacity: 0.95;
  filter: brightness(1.35);
  animation-duration: calc(1.15s + var(--particle-speed) * 0.14s);
}

@keyframes magic-particle-drift {
  0%, 100% { transform: translate3d(0, 7px, 0) scale(0.55); }
  42% { transform: translate3d(calc((var(--particle-x) - 50) * 0.08px), -7px, 0) scale(1); }
  70% { transform: translate3d(calc((50 - var(--particle-x)) * 0.06px), -12px, 0) scale(0.72); }
}

@media (prefers-reduced-motion: reduce) {
  .magic-cta__particle { animation: none; }
  .page--home .magic-cta::before,
  .page--home .magic-cta::after,
  .site-nav__download.magic-cta::before,
  .site-nav__download.magic-cta::after { transition: none; }
}
