/* Страница благодарности. Использует токены и компоненты style.css */

.thanks {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 120px 0 72px;
  text-align: center;
}

/* иконка с расходящимися кольцами */
.badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 0 auto;
}
.badge .ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--ac);
  border-radius: 30px;
  opacity: 0;
  animation: ripple 3.6s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.badge .ring:nth-child(2) {
  animation-delay: 1.2s;
}
.badge .ring:nth-child(3) {
  animation-delay: 2.4s;
}
@keyframes ripple {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}
.badge .app {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 28px;
  cursor: pointer;
}
.badge .dl {
  position: absolute;
  right: -10px;
  bottom: -10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--ac);
  color: #fff;
}
.badge .dl svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: drop 1.6s ease-in-out infinite;
}
@keyframes drop {
  0%,
  100% {
    transform: translateY(-3px);
  }
  50% {
    transform: translateY(3px);
  }
}

.status {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 1;
  gap: 10px;
  margin-top: 64px;
  padding: 7px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
}
.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(46, 157, 104, 0.45);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(46, 157, 104, 0);
  }
}

.thanks h1 {
  max-width: 980px;
  margin: 24px auto 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.05em;
}
.thanks .lead {
  max-width: 520px;
  margin: 22px auto 0;
  color: var(--gray);
  font-size: 19px;
}
.thanks .hint {
  margin-top: 26px;
  color: var(--gray);
  font-size: 15px;
}

/* появление */
.js .badge,
.js .status,
.js .thanks .lead,
.js .thanks .cta,
.js .thanks .hint {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
}
.js .badge {
  transform: scale(0.4) rotate(-18deg);
  filter: none;
}
.js.ready .badge {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s ease 0.1s,
    transform 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}
.js.ready .status,
.js.ready .thanks .lead,
.js.ready .thanks .cta,
.js.ready .thanks .hint {
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    opacity 1s var(--out) var(--d, 0s),
    transform 1.1s var(--out) var(--d, 0s),
    filter 0.9s var(--out) var(--d, 0s);
}
.js.ready .status {
  --d: 0.45s;
}
.js.ready .thanks .lead {
  --d: 1.3s;
}
.js.ready .thanks .cta {
  --d: 1.45s;
}
.js.ready .thanks .hint {
  --d: 1.8s;
}

/* что дальше */
.next {
  padding: 40px 0 0;
}
.next .three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 52px;
}
.next .step {
  min-height: 230px;
  padding: 26px;
  border-radius: 26px;
  background: var(--card);
}
.next .step .ic {
  width: 38px;
  height: 38px;
  color: var(--ac);
}
.next .step h3 {
  margin-top: 40px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.next .step p {
  margin-top: 6px;
  color: var(--gray);
  font-size: 16px;
}

/* холст с конфетти */
#confetti {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

@media (max-width: 800px) {
  .next .three {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .thanks {
    padding-top: 104px;
  }
  .thanks .lead {
    font-size: 17px;
  }
  .badge,
  .badge .app {
    width: 96px;
    height: 96px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .badge .ring,
  .badge .dl svg,
  .status i {
    animation: none;
  }
  .js .badge,
  .js .status,
  .js .thanks .lead,
  .js .thanks .cta,
  .js .thanks .hint {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* заголовок: тёмно-серый градиент, как на главной */
.thanks h1 .g .w > span {
  background: linear-gradient(180deg, #14141a 0%, #3a3a45 45%, #8d8d99 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
:root[data-theme="dark"] .thanks h1 .g .w > span {
  background-image: linear-gradient(180deg, #ffffff 0%, #c8c8d2 42%, #6c6c7a 100%);
}
.thanks h1 .g {
  background: none;
  -webkit-text-fill-color: initial;
  color: inherit;
}
