/* =========================================
   SONAR — SOLUTIONS / "Что вы получите"
   Зеркальная пара к sonar-pains:
   радар-волны сходящиеся к центру + точки засасываются внутрь.
========================================= */

/* Фон-glow для секции */
.sonar-solutions.section-starvy-bg .section-starvy-bg-glow {
  width: min(820px, 90vw);
  height: min(440px, 40vh);
  top: 55%;
  filter: blur(38px);
  opacity: 0.65;
}

/* =========================================
   BACKGROUND DOTS — точки, засасывающиеся к центру
========================================= */

.sonar-solutions-bg-dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Каждая точка имеет CSS-переменные:
   --x, --y          — стартовая позиция в %
   --duration        — длительность одного цикла
   --delay           — задержка старта
*/
.sonar-solutions-bgdot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a78bfa;
  opacity: 0;

  /* Точка анимируется через transform → улетает к центру секции.
     translate в % считается от размеров самой точки, поэтому
     используем большие значения через calc + viewport-units */
  will-change: transform, opacity;
  animation: sonarSolutionsBgdotSuck var(--duration, 9s) cubic-bezier(0.5, 0, 0.75, 0) infinite;
  animation-delay: var(--delay, 0s);
}

/* Яркие точки */
.sonar-solutions-bgdot--bright {
  width: 5px;
  height: 5px;
  background: #d8b4fe;
  box-shadow: 0 0 8px rgba(216, 180, 254, 0.75);
}

/* Точка должна стартовать на своей позиции, плавно появиться,
   проехать к центру секции и исчезнуть.
   Центр секции = переменные --cx, --cy в % (по умолчанию 50% 55%).
   Сдвиг рассчитывается через CSS-переменную --travel-x/--travel-y
   которые мы задаём прямо в HTML инлайн. */
@keyframes sonarSolutionsBgdotSuck {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: var(--opacity-peak, 0.55);
  }
  85% {
    opacity: var(--opacity-peak, 0.55);
  }
  100% {
    transform: translate(var(--travel-x, 0), var(--travel-y, 0)) scale(0.3);
    opacity: 0;
  }
}

/* =========================================
   RADAR STAGE — сходящиеся волны к центру
========================================= */

.sonar-solutions-radar {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);

  width: min(900px, 92vw);
  height: min(900px, 92vw);

  z-index: 0;
  pointer-events: none;
}

.sonar-solutions-radar-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  border-radius: 50%;
  border: 1px dashed rgba(168, 85, 247, 0.14);

  pointer-events: none;
}

.sonar-solutions-radar-ring--1 { width: 280px; height: 280px; }
.sonar-solutions-radar-ring--2 { width: 480px; height: 480px; border-color: rgba(168, 85, 247, 0.10); }
.sonar-solutions-radar-ring--3 { width: 700px; height: 700px; border-color: rgba(168, 85, 247, 0.07); }

/* Волны идут НАОБОРОТ — от большого к маленькому (сходятся к центру = фокус) */
.sonar-solutions-radar-wave {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  border-radius: 50%;
  border: 1.5px solid rgba(216, 180, 254, 0.4);

  opacity: 0;
  pointer-events: none;

  animation: sonarSolutionsRadarWave 5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.sonar-solutions-radar-wave--1 { animation-delay: 0s;    }
.sonar-solutions-radar-wave--2 { animation-delay: 1.65s; }
.sonar-solutions-radar-wave--3 { animation-delay: 3.3s;  }

@keyframes sonarSolutionsRadarWave {
  0% {
    width: 820px;
    height: 820px;
    opacity: 0;
    border-width: 0.5px;
    border-color: rgba(216, 180, 254, 0.15);
  }
  20% {
    opacity: 0.55;
  }
  100% {
    width: 100px;
    height: 100px;
    opacity: 0;
    border-width: 2px;
    border-color: rgba(216, 180, 254, 0.5);
  }
}

.sonar-solutions .container {
  position: relative;
  z-index: 1;
}

/* =========================================
   HEADER
========================================= */

.sonar-solutions-head {
  max-width: 720px;
  margin: 0 auto;
}

.sonar-solutions-title {
  margin: 0;

  font-size: var(--sonar-headline-section-fs);
  line-height: var(--sonar-headline-section-lh);
  letter-spacing: var(--sonar-headline-section-tracking);
  font-weight: var(--sonar-headline-section-fw);

  color: var(--sonar-headline-section-color);
}

.sonar-solutions-sub {
  margin: 16px auto 0;
  max-width: 540px;

  font-size: var(--sonar-section-subtitle-fs);
  line-height: var(--sonar-section-subtitle-lh);

  color: rgba(226, 232, 240, 0.72);
}

.sonar-solutions-spacer {
  height: 48px;
}

/* =========================================
   GRID
========================================= */

.sonar-solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 1.8vw, 24px);

  position: relative;
  z-index: 1;
}

/* =========================================
   CARD
========================================= */

.sonar-solutions-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;

  display: flex;
  flex-direction: column;

  padding: clamp(26px, 2.6vw, 36px);

  border-radius: 20px;

  border: 1px solid rgba(255, 255, 255, 0.08);

  background:
    radial-gradient(130% 90% at 0% 0%, rgba(168, 85, 247, 0.15), transparent 52%),
    radial-gradient(90% 70% at 100% 100%, rgba(124, 58, 237, 0.10), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.012) 100%),
    rgba(14, 11, 32, 0.55);

  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 8px 26px -12px rgba(0, 0, 0, 0.55);

  opacity: 0;
  transform: translateY(22px);
  animation: sonarSolutionsCardIn 0.7s cubic-bezier(0.22, 0.85, 0.3, 1) forwards;
  animation-delay: var(--sol-delay, 0ms);

  transition:
    transform 0.4s cubic-bezier(0.22, 0.85, 0.3, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

@keyframes sonarSolutionsCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sonar-solutions-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.04) 38%,
    rgba(168, 85, 247, 0.24) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  z-index: 0;
  transition: background 0.45s ease, opacity 0.45s ease;
}

.sonar-solutions-card > * {
  position: relative;
  z-index: 1;
}

.sonar-solutions-card-glow {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 280px;
  height: 280px;

  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.30) 0%,
    rgba(124, 58, 237, 0.12) 45%,
    transparent 70%
  );

  filter: blur(28px);

  opacity: 0;
  z-index: 0;
  pointer-events: none;

  transition: opacity 0.45s ease, transform 0.6s ease;
}

.sonar-solutions-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 22px 50px -22px rgba(124, 58, 237, 0.55);
}

.sonar-solutions-card:hover::before {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(216, 180, 254, 0.14) 40%,
    rgba(168, 85, 247, 0.45) 100%
  );
  opacity: 1;
}

.sonar-solutions-card:hover .sonar-solutions-card-glow {
  opacity: 1;
  transform: translate(12px, 14px);
}

/* =========================================
   CARD — HEADER (icon + num + checkmark)
========================================= */

.sonar-solutions-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.sonar-solutions-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;

  border-radius: 14px;

  border: 1px solid rgba(168, 85, 247, 0.42);

  background:
    linear-gradient(
      145deg,
      rgba(168, 85, 247, 0.32),
      rgba(124, 58, 237, 0.14)
    );

  color: #d8b4fe;

  box-shadow:
    0 8px 20px rgba(76, 29, 149, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);

  transition:
    color 0.45s ease,
    border-color 0.45s ease,
    background 0.45s ease,
    box-shadow 0.45s ease,
    transform 0.45s cubic-bezier(0.22, 0.85, 0.3, 1);
}

.sonar-solutions-card-icon svg {
  width: 26px;
  height: 26px;
}

.sonar-solutions-card:hover .sonar-solutions-card-icon {
  transform: translateY(-2px) rotate(4deg);
  color: #e9d5ff;
  border-color: rgba(216, 180, 254, 0.55);
  background:
    linear-gradient(
      145deg,
      rgba(168, 85, 247, 0.42),
      rgba(124, 58, 237, 0.2)
    );
  box-shadow:
    0 12px 26px rgba(76, 29, 149, 0.55),
    0 0 18px rgba(192, 132, 252, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sonar-solutions-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sonar-solutions-card-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(216, 180, 254, 0.55);
  line-height: 1;
}

.sonar-solutions-card-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.9),
    rgba(124, 58, 237, 0.7)
  );

  box-shadow: 0 0 12px rgba(192, 132, 252, 0.5);

  color: #fff;

  animation: sonarSolutionsCheckPulse 3.6s ease-in-out infinite;
  animation-delay: var(--sol-delay, 0ms);
}

.sonar-solutions-card-check svg {
  width: 12px;
  height: 12px;
}

@keyframes sonarSolutionsCheckPulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.85);
  }
}

/* =========================================
   CARD — TEXT
========================================= */

.sonar-solutions-card-title {
  margin: 0 0 14px;

  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;

  color: #fff;
}

.sonar-solutions-card-text {
  margin: 0 0 20px;

  font-size: clamp(14px, 1.05vw, 15px);
  line-height: 1.65;

  color: rgba(226, 232, 240, 0.72);
}

/* =========================================
   CARD — QUOTE (user-story line)
========================================= */

.sonar-solutions-card-quote {
  margin: 0 0 22px;
  padding: 14px 16px;

  border-left: 2px solid rgba(192, 132, 252, 0.5);
  border-radius: 0 10px 10px 0;

  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0.08),
    transparent
  );

  font-size: 13.5px;
  line-height: 1.55;
  font-style: italic;

  color: rgba(243, 232, 255, 0.88);
}

.sonar-solutions-card-quote b {
  color: #fff;
  font-style: normal;
  font-weight: 600;
}

/* =========================================
   CARD — FOOT (result chip + caption)
========================================= */

.sonar-solutions-card-foot {
  margin-top: auto;
  padding-top: 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.sonar-solutions-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 14px;
  border-radius: 999px;

  font-size: 12.5px;
  font-weight: 500;

  color: #fff;

  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.28),
    rgba(124, 58, 237, 0.10)
  );

  border: 1px solid rgba(168, 85, 247, 0.42);
  box-shadow: 0 4px 14px -8px rgba(168, 85, 247, 0.35);

  white-space: nowrap;

  transition: background 0.4s ease, border-color 0.4s ease;
}

.sonar-solutions-card-chip svg {
  width: 14px;
  height: 14px;
  color: #d8b4fe;
  flex-shrink: 0;
}

.sonar-solutions-card-chip b {
  color: #fff;
  font-weight: 700;
}

.sonar-solutions-card:hover .sonar-solutions-card-chip {
  border-color: rgba(216, 180, 254, 0.55);
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.38),
    rgba(124, 58, 237, 0.16)
  );
}

.sonar-solutions-card-note {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.42);
  text-align: right;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 991px) {
  .sonar-solutions-radar {
    width: min(700px, 95vw);
    height: min(700px, 95vw);
  }

  .sonar-solutions-radar-ring--3 { display: none; }

  @keyframes sonarSolutionsRadarWave {
    0%   { width: 640px; height: 640px; opacity: 0;   border-width: 0.5px;
           border-color: rgba(216, 180, 254, 0.15); }
    20%  { opacity: 0.55; }
    100% { width: 80px;  height: 80px;  opacity: 0;   border-width: 2px;
           border-color: rgba(216, 180, 254, 0.5); }
  }
}

@media (max-width: 767px) {
  .sonar-solutions-grid {
    grid-template-columns: 1fr;
  }

  .sonar-solutions-spacer {
    height: 36px;
  }

  /* Декоративные FX — отключены: 38 точек + волны радара сильно грузят GPU */
  .sonar-solutions-bg-dots,
  .sonar-solutions-radar {
    display: none;
  }

  .sonar-solutions.section-starvy-bg .section-starvy-bg-glow {
    filter: blur(22px);
    opacity: 0.45;
  }

  .sonar-solutions-card {
    opacity: 1;
    transform: none;
    animation: none;

    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
  }

  .sonar-solutions-card-check {
    animation: none;
  }

  .sonar-solutions-card-glow {
    display: none;
  }
}

@media (max-width: 575px) {
  .sonar-solutions-card {
    border-radius: 16px;
    padding: 24px 22px;
  }

  .sonar-solutions-card-icon {
    width: 46px;
    height: 46px;
  }

  .sonar-solutions-card-icon svg {
    width: 23px;
    height: 23px;
  }

  .sonar-solutions-card-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .sonar-solutions-card-note {
    text-align: left;
  }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  .sonar-solutions-card {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .sonar-solutions-radar-wave,
  .sonar-solutions-bgdot,
  .sonar-solutions-card-check {
    animation: none;
  }

  .sonar-solutions-radar-wave {
    display: none;
  }

  .sonar-solutions-bg-dots {
    display: none;
  }

  .sonar-solutions-card:hover {
    transform: none;
  }

  .sonar-solutions-card:hover .sonar-solutions-card-icon {
    transform: none;
  }
}