/* Landing: имитация обнаружения объектов — тренд 2025–2026, максимум интерактива */

.detection-demo {
  --demo-width: min(100%, 520px);
  --demo-radius: var(--radius-lg);
  margin: var(--space-8) auto var(--space-6);
  width: var(--demo-width);
  max-width: 100%;
}

.detection-demo-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-deep);
  border: 1px solid var(--glass-border);
  border-radius: var(--demo-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(0, 245, 255, 0.08);
}

.detection-demo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: top;
}

/* Скан-линия «анализ кадра» */
.detection-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--detection-border), transparent);
  box-shadow: 0 0 12px var(--detection-glow);
  animation: detection-scan 2.5s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes detection-scan {
  0%, 100% { top: 0; opacity: 0.9; }
  50% { top: 100%; opacity: 1; }
}

.detection-demo.run .detection-scan-line {
  animation: detection-scan 2.5s ease-in-out 0.2s infinite;
}

/* Кнопка «Запустить демо» */
.detection-demo-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-5);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--detection-border);
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.35);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.detection-demo-trigger:hover {
  background: rgba(0, 245, 255, 0.14);
  border-color: var(--detection-border);
  transform: translateY(-1px);
}

.detection-demo-trigger:active {
  transform: translateY(0);
}

.detection-demo-trigger:focus-visible {
  outline: 2px solid var(--detection-border);
  outline-offset: 2px;
}

.detection-demo-trigger i {
  font-size: 1em;
}

@media (prefers-reduced-motion: reduce) {
  .detection-scan-line { animation: none; opacity: 0.6; }
}

/* Счётчик «обнаружено» — интерактив */
.detection-demo-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.detection-demo-stats span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.detection-demo-stats strong {
  color: var(--detection-border);
  font-weight: 600;
}

/* Блок «Как выглядит детекция» — отдельная секция в концепции лендинга */
.landing-demo-showcase {
  text-align: center;
}

.landing-demo-showcase .landing-section-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.landing-demo-showcase .landing-block-title {
  margin-bottom: var(--space-3);
  justify-content: center;
}

.landing-demo-showcase .landing-block-sub {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-8);
  color: var(--text-secondary);
}

.landing-demo-showcase .detection-demo {
  --demo-width: min(100%, 640px);
  margin-top: 0;
  margin-bottom: 0;
}

.landing-demo-showcase .detection-demo-frame {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 245, 255, 0.06);
}

.landing-demo-showcase .detection-demo-stats {
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
}

.landing-demo-showcase .detection-demo-trigger {
  margin-top: 0;
}
