/* ============================================================
   COMPONENTS — кнопки, бейджи, карточки, телефон, карусель, FAQ
   ============================================================ */

/* ---------------- Бейдж ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.badge .dot {
  position: relative;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-play);
  flex-shrink: 0;
}

.badge .dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-play);
  animation: pulseRing 2.4s ease-out infinite;
}

/* ---------------- Кнопки ---------------- */

.download-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 15px 26px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn svg { width: 19px; height: 19px; flex-shrink: 0; }

.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

/* Блик, пробегающий по кнопке при наведении */
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120%);
  pointer-events: none;
}

.btn:hover::after { animation: shimmer 0.9s var(--ease); }

.btn--primary {
  background: var(--grad-deep);
  color: #fff;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.38);
}

.btn--primary:hover { box-shadow: 0 16px 44px rgba(99, 102, 241, 0.5); }

.btn--play {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.32);
}

.btn--play:hover { box-shadow: 0 16px 44px rgba(34, 197, 94, 0.45); }

.btn--sm { padding: 10px 20px; font-size: 13.5px; }

.btn-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 2px;
}

.btn-stack { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------------- Карточка со «светом под курсором» ---------------- */

.card {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(168, 85, 247, 0.16),
    transparent 65%
  );
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.card:hover::before { opacity: 1; }

.card-icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  margin-bottom: 20px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(244, 114, 182, 0.16));
  border: 1px solid var(--border-strong);
  color: #c7b8ff;
  transition: transform 0.45s var(--ease), color 0.35s var(--ease);
}

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

.card:hover .card-icon {
  transform: scale(1.08) rotate(-4deg);
  color: #fff;
}

.card h3 { font-size: 18px; margin-bottom: 9px; }

.card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }

/* ---------------- Статистика ---------------- */

.stat {
  padding: 32px 24px;
  text-align: center;
  background: rgba(10, 12, 26, 0.55);
  transition: background 0.35s var(--ease);
}

.stat:hover { background: rgba(20, 22, 44, 0.75); }

.stat-number {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 7px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------------- Шаги ---------------- */

.step {
  position: relative;
  padding-top: 28px;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: transparent;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 14px;
}

.step::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-2), transparent);
  opacity: 0.55;
}

.step h3 { font-size: 19px; margin-bottom: 10px; }

.step p { color: var(--text-muted); font-size: 14.5px; }

/* ---------------- Телефон в hero ---------------- */

/* Обёртка отвечает за наклон от курсора, .phone — за парение */
.phone-tilt {
  position: relative;
  transition: transform 0.6s var(--ease);
  transform-style: preserve-3d;
}

.phone {
  position: relative;
  width: 288px;
  aspect-ratio: 9 / 19.5;
  border-radius: 46px;
  padding: 11px;
  background: linear-gradient(160deg, #2a2c44, #101223 40%, #23253c);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.11),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: floaty 7s ease-in-out infinite;
}

.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #0a0b16;
}

.phone-screen img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Вырез камеры */
.phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 78px; height: 22px;
  border-radius: var(--r-full);
  background: #05060f;
  z-index: 3;
}

/* Блик по стеклу */
.phone-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.14) 0%, transparent 38%, transparent 62%, rgba(255, 255, 255, 0.06) 100%);
  pointer-events: none;
}

/* ---------------- Живой счётчик ---------------- */

.countdown-card {
  position: absolute;
  z-index: 4;
  left: -34px;
  bottom: 84px;
  width: 252px;
  padding: 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: rgba(10, 12, 26, 0.82);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow-md), var(--glow);
  animation: floaty 7s ease-in-out infinite 0.9s;
}

.countdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.countdown-head .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-play);
  font-weight: 600;
}

.countdown-head .live i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.6s ease-in-out infinite;
  box-shadow: 0 0 8px currentColor;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.cd-unit {
  text-align: center;
  padding: 10px 4px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.cd-value {
  display: block;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #fff;
}

.cd-value.is-ticking { animation: flipIn 0.4s var(--ease-out); }

.cd-label {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Полоса прогресса службы */
.countdown-progress {
  margin-top: 14px;
}

.countdown-progress .bar {
  height: 5px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.countdown-progress .fill {
  height: 100%;
  width: 0;
  border-radius: var(--r-full);
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
  transition: width 1.6s var(--ease-out);
}

.countdown-progress .meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--text-dim);
}

/* Плавающий значок уведомления */
.float-chip {
  position: absolute;
  z-index: 4;
  right: -26px;
  top: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: rgba(10, 12, 26, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  font-weight: 500;
  animation: floaty 8s ease-in-out infinite 0.4s;
}

.float-chip .ico {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad-cool);
  color: #05060f;
  flex-shrink: 0;
}

.float-chip .ico svg { width: 15px; height: 15px; }

/* ---------------- Карусель скриншотов ---------------- */

.carousel {
  position: relative;
  /* Во всю ширину окна без transform — его занимает анимация появления */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  padding-block: 10px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.carousel-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.carousel:hover .carousel-track { animation-play-state: paused; }

.slide {
  flex: 0 0 auto;
  width: 230px;
  aspect-ratio: 9 / 19.5;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  box-shadow: var(--shadow-md);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s var(--ease);
}

.slide img { width: 100%; height: 100%; object-fit: cover; }

.slide:hover {
  transform: translateY(-14px) scale(1.035);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(168, 85, 247, 0.28);
}

/* ---------------- FAQ ---------------- */

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.faq-item.is-open {
  border-color: rgba(168, 85, 247, 0.42);
  background: var(--surface-2);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  text-align: left;
  font-size: 15.5px;
  font-weight: 600;
  transition: color 0.25s var(--ease);
}

.faq-q:hover { color: #d9c9ff; }

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 20px; height: 20px;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 13px; height: 1.8px;
  border-radius: 2px;
  background: var(--brand-2);
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease);
}

.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.faq-item.is-open .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.faq-item.is-open .faq-a { grid-template-rows: 1fr; }

.faq-a > div { overflow: hidden; }

.faq-a p {
  padding: 0 24px 22px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}
