/* ===== Живая графика и декор ===== */

/* Фоновые «пятна» по всей странице */
.page-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-decor__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  will-change: transform;
}

.page-decor__blob--1 {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  top: -8%;
  right: -12%;
  background: radial-gradient(circle, rgba(61, 107, 94, 0.45), transparent 70%);
  animation: blob-float-a 28s ease-in-out infinite;
}

.page-decor__blob--2 {
  width: min(45vw, 400px);
  height: min(45vw, 400px);
  bottom: 20%;
  left: -15%;
  background: radial-gradient(circle, rgba(196, 165, 116, 0.4), transparent 70%);
  animation: blob-float-b 32s ease-in-out infinite;
}

.page-decor__blob--3 {
  width: min(35vw, 320px);
  height: min(35vw, 320px);
  top: 45%;
  right: 10%;
  background: radial-gradient(circle, rgba(90, 143, 127, 0.35), transparent 70%);
  animation: blob-float-c 24s ease-in-out infinite;
}

.page-decor__grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(61, 107, 94, 0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 107, 94, 0.8) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

@keyframes blob-float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(1.08); }
}

@keyframes blob-float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.05); }
}

@keyframes blob-float-c {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 25px); }
}

main,
.header,
.footer {
  position: relative;
  z-index: 1;
}

/* Hero: искры и плавающие иконки */
.hero__sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(196, 165, 116, 0.8);
  animation: sparkle-twinkle 3s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 35%; left: 28%; animation-delay: 0.4s; width: 4px; height: 4px; }
.sparkle:nth-child(3) { top: 22%; right: 22%; animation-delay: 0.8s; }
.sparkle:nth-child(4) { top: 55%; right: 15%; animation-delay: 1.2s; }
.sparkle:nth-child(5) { bottom: 30%; left: 18%; animation-delay: 0.2s; width: 5px; height: 5px; }
.sparkle:nth-child(6) { bottom: 22%; right: 35%; animation-delay: 1.6s; }
.sparkle:nth-child(7) { top: 48%; left: 45%; animation-delay: 0.6s; width: 3px; height: 3px; }
.sparkle:nth-child(8) { top: 12%; right: 40%; animation-delay: 1s; }

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.hero__float-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.float-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  color: var(--primary);
  animation: float-icon-bob 5s ease-in-out infinite;
}

.float-icon svg {
  width: 28px;
  height: 28px;
}

.float-icon--1 { top: 15%; right: 8%; animation-delay: 0s; }
.float-icon--2 { top: 42%; right: 2%; animation-delay: -1.5s; width: 44px; height: 44px; }
.float-icon--3 { bottom: 28%; right: 12%; animation-delay: -3s; }
.float-icon--4 { top: 28%; left: 5%; animation-delay: -2s; width: 48px; height: 48px; }

@keyframes float-icon-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

/* Волна-разделитель секций */
.section-wave {
  display: block;
  width: 100%;
  line-height: 0;
  color: var(--bg);
  margin-top: -1px;
}

.section-wave--alt {
  color: var(--bg-alt);
}

.section-wave--surface {
  color: var(--surface);
}

.section-wave svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Лента преимуществ — светлые карточки */
.features-strip {
  position: relative;
  width: 100%;
  padding: 0.5rem 0 0.25rem;
  overflow: hidden;
}

.features-strip__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, 90%);
  height: 120px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(61, 107, 94, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.features-strip__track {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: max-content;
  flex-wrap: nowrap;
  animation: features-scroll 40s linear infinite;
  padding: 0.35rem 0;
  will-change: transform;
}

@keyframes features-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(calc(-1 * var(--marquee-offset, 50%)), 0, 0); }
}

.feature-chip {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1.15rem 0.65rem 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(44, 40, 37, 0.08);
  border-radius: var(--radius-pill);
  box-shadow:
    0 2px 12px rgba(30, 56, 50, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 107, 94, 0.22);
  box-shadow: 0 8px 24px rgba(30, 56, 50, 0.12);
}

.feature-chip__icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(61, 107, 94, 0.35);
}

.feature-chip__icon svg {
  width: 20px;
  height: 20px;
}

.feature-chip__text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Галерея: фон и карточки */
.gallery__glow--1 {
  animation: gallery-glow-drift 16s ease-in-out infinite;
}

.gallery__glow--2 {
  animation: gallery-glow-drift 18s ease-in-out infinite reverse;
}

.gallery-card__media img {
  animation: ken-burns 20s ease-in-out infinite alternate;
}

.gallery-card:nth-child(2) .gallery-card__media img { animation-delay: -4s; }
.gallery-card:nth-child(3) .gallery-card__media img { animation-delay: -8s; }
.gallery-card:nth-child(4) .gallery-card__media img { animation-delay: -12s; }
.gallery-card:nth-child(5) .gallery-card__media img { animation-delay: -16s; }

.gallery-card:hover .gallery-card__media img {
  animation-play-state: paused;
}

.gallery-card.reveal--visible .gallery-card__icon {
  animation: gallery-icon-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gallery-card:nth-child(2).reveal--visible .gallery-card__icon { animation-delay: 0.08s; }
.gallery-card:nth-child(3).reveal--visible .gallery-card__icon { animation-delay: 0.16s; }
.gallery-card:nth-child(4).reveal--visible .gallery-card__icon { animation-delay: 0.12s; }
.gallery-card:nth-child(5).reveal--visible .gallery-card__icon { animation-delay: 0.2s; }

@keyframes gallery-glow-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(16px, -12px); }
}

@keyframes gallery-icon-pop {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* Статистика: декоративное кольцо */
.stats {
  position: relative;
  overflow: hidden;
}

.stats::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  top: -120px;
  right: -100px;
  border-radius: 50%;
  border: 2px dashed rgba(61, 107, 94, 0.12);
  animation: ring-spin 60s linear infinite;
}

.stats::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  bottom: -80px;
  left: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 165, 116, 0.15), transparent 70%);
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.stats .stat-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.stats .stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(196, 165, 116, 0.08) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: stat-shine 6s ease-in-out infinite;
}

@keyframes stat-shine {
  0%, 100% { transform: translateX(-100%) rotate(25deg); }
  50% { transform: translateX(100%) rotate(25deg); }
}

/* Перевод: анимация маршрута и сцены */
.transfer-stage__orb--1 {
  animation: transfer-orb-drift 12s ease-in-out infinite;
}

.transfer-stage__orb--2 {
  animation: transfer-orb-drift 14s ease-in-out infinite reverse;
}

.transfer-stage__ring {
  animation: transfer-ring-pulse 6s ease-in-out infinite;
}

.transfer-stage__arc path {
  animation: transfer-arc-dash 20s linear infinite;
}

.transfer-route__pulse {
  animation: transfer-pulse-move 2.2s ease-in-out infinite;
}

.transfer-route__dot {
  animation: transfer-dot-travel 2.5s ease-in-out infinite;
}

.transfer-route__coin--1 {
  animation: transfer-coin-float 3s ease-in-out infinite;
}

.transfer-route__coin--2 {
  animation: transfer-coin-float 3s ease-in-out 0.6s infinite;
}

.transfer-phone__toast--sum {
  animation: transfer-toast-float 4s ease-in-out infinite;
}

.transfer-phone__toast--ok {
  animation: transfer-toast-float 4.5s ease-in-out 0.5s infinite;
}

.transfer-chip--fast {
  animation: transfer-chip-bob 5s ease-in-out infinite;
}

.transfer-chip--safe {
  animation: transfer-chip-bob 5.5s ease-in-out 1s infinite;
}

.transfer-stage.reveal--visible .transfer-flag:nth-child(1) { animation: transfer-flag-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.1s; }
.transfer-stage.reveal--visible .transfer-flag:nth-child(2) { animation: transfer-flag-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.18s; }
.transfer-stage.reveal--visible .transfer-flag:nth-child(3) { animation: transfer-flag-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.26s; }
.transfer-stage.reveal--visible .transfer-flag:nth-child(4) { animation: transfer-flag-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.34s; }
.transfer-stage.reveal--visible .transfer-flag:nth-child(5) { animation: transfer-flag-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.42s; }
.transfer-stage.reveal--visible .transfer-flag:nth-child(6) { animation: transfer-flag-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.5s; }

@keyframes transfer-orb-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(12px, -16px); }
}

@keyframes transfer-ring-pulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -42%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -42%) scale(1.04); }
}

@keyframes transfer-arc-dash {
  to { stroke-dashoffset: -36; }
}

@keyframes transfer-pulse-move {
  0% { left: 8%; opacity: 1; }
  100% { left: 88%; opacity: 0.25; }
}

@keyframes transfer-dot-travel {
  0% { left: 0; opacity: 1; }
  100% { left: calc(100% - 10px); opacity: 0.5; }
}

@keyframes transfer-coin-float {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-6px); opacity: 1; }
}

@keyframes transfer-toast-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes transfer-chip-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes transfer-flag-pop {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Countries: глобус и орбита */
.countries-stage__orb--1 {
  animation: countries-orb-drift 14s ease-in-out infinite;
}

.countries-stage__orb--2 {
  animation: countries-orb-drift 16s ease-in-out infinite reverse;
}

.countries-stage__ring {
  animation: countries-ring-pulse 7s ease-in-out infinite;
}

.countries-stage__ring--2 {
  animation: countries-ring-pulse 7s ease-in-out 1.5s infinite;
}

.countries-stage__mesh {
  animation: countries-mesh-spin 80s linear infinite;
}

.countries-globe__pulse {
  animation: countries-signal-pulse 3s ease-out infinite;
}

.countries-globe__pulse--2 {
  animation-delay: 1.5s;
}

.countries-orbit__flag {
  animation: countries-flag-bob 4s ease-in-out infinite;
}

.countries-orbit__flag--2 { animation-delay: 0.3s; }
.countries-orbit__flag--3 { animation-delay: 0.6s; }
.countries-orbit__flag--4 { animation-delay: 0.9s; }
.countries-orbit__flag--5 { animation-delay: 1.2s; }
.countries-orbit__flag--6 { animation-delay: 1.5s; }

.countries-float--phone {
  animation: countries-float-bob 5s ease-in-out infinite;
}

@media (max-width: 480px) {
  .countries-float--phone {
    animation: none;
    left: 0;
    right: 0;
    margin-inline: auto;
    width: max-content;
    max-width: calc(100% - 1.5rem);
  }
}

.countries-float--speed {
  animation: countries-float-bob 5.5s ease-in-out 0.8s infinite;
}

.countries-float--limit {
  animation: countries-float-bob 6s ease-in-out 0.4s infinite;
}

.countries-globe__img {
  transition: transform 0.8s ease;
}

.countries-stage:hover .countries-globe__img {
  transform: scale(1.02);
}

@keyframes countries-orb-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(14px, -12px); }
}

@keyframes countries-ring-pulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.65; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes countries-mesh-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes countries-signal-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

@keyframes countries-flag-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes countries-float-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Benefits: плавное появление метрик */
.benefits-spotlight.reveal--visible .benefits-metric {
  animation: benefits-metric-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i) * 0.1s + 0.15s);
}

.benefits-spotlight__media img {
  transition: transform 0.8s ease;
}

.benefits-spotlight:hover .benefits-spotlight__media img {
  transform: scale(1.03);
}

@keyframes benefits-metric-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Шаги: соединительная линия (десктоп) */
@media (min-width: 901px) {
  .steps {
    position: relative;
  }

  .steps::before {
    content: '';
    position: absolute;
    top: 4.5rem;
    left: 12%;
    right: 12%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: line-flow 4s linear infinite;
    border-radius: 2px;
    opacity: 0.25;
    z-index: 0;
  }

  @keyframes line-flow {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
  }

  .step {
    position: relative;
    z-index: 1;
  }
}

/* CTA финал: частицы */
.cta-final__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cta-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  animation: particle-rise 12s linear infinite;
}

.cta-particle:nth-child(odd) {
  width: 5px;
  height: 5px;
  background: rgba(196, 165, 116, 0.4);
}

@keyframes particle-rise {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 0.6; }
  100% {
    transform: translateY(-20vh) scale(1);
    opacity: 0;
  }
}

/* Кнопка: мягкое свечение */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: btn-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btn-shimmer {
  0%, 100% { transform: translateX(-120%); }
  50% { transform: translateX(120%); }
}

/* Promo: декоративная карточка на фото */
.promo__visual-card {
  animation: promo-card-float 6s ease-in-out infinite;
}

@keyframes promo-card-float {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-8px) rotate(-4deg); }
}

/* Аудитория: hover-подъём */
.audience-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.audience-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.audience-card__media img {
  transition: transform 0.6s ease;
}

.audience-card:hover .audience-card__media img {
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .page-decor__blob,
  .features-strip__track,
  .sparkle,
  .float-icon,
  .cta-particle,
  .transfer-stage__orb,
  .transfer-stage__ring,
  .transfer-stage__arc path,
  .transfer-route__pulse,
  .transfer-route__dot,
  .transfer-route__coin,
  .transfer-phone__toast,
  .transfer-chip,
  .countries-stage__orb,
  .countries-stage__ring,
  .countries-stage__mesh,
  .countries-globe__pulse,
  .countries-orbit__flag,
  .countries-float,
  .countries-stage:hover .countries-globe__img,
  .gallery__glow,
  .gallery-card__media img,
  .gallery-card.reveal--visible .gallery-card__icon,
  .stats::before,
  .stat-card::before,
  .btn--primary::after,
  .benefits-spotlight.reveal--visible .benefits-metric,
  .benefits-spotlight:hover .benefits-spotlight__media img,
  .promo__visual-card {
    animation: none !important;
  }

}
