/* Главная v2 — intro с контактной кнопкой */

.page {
  padding: 48px 24px 0;
}

.intro-2 {
  position: relative;
}

.intro-2 .intro-text {
  max-width: 521px;
}

/* 350px кнопка + 20px от края окна + 24px зазор до текста */
.contact-button {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 350px;
  padding: 20px 0;
  background: #0dfe17;
  border-radius: 120px;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.contact-button:hover {
  opacity: 0.92;
}

/* Бегущая строка с e-mail (ticker): две одинаковые группы,
   каждая сдвигается на свою ширину + gap — повторы идут без разрывов */
.contact-button__marquee {
  --marquee-gap: 12px;
  display: flex;
  gap: var(--marquee-gap);
  width: 100%;
}

.contact-button__group {
  flex-shrink: 0;
  display: flex;
  gap: var(--marquee-gap);
  animation: contact-marquee 10s linear infinite;
  will-change: transform;
}

.contact-button__text {
  font-size: 28px;
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: #fff;
  white-space: nowrap;
  transform: translateY(-2px);
}

@keyframes contact-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - var(--marquee-gap)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-button__group {
    animation: none;
  }
}

/*
 * Текст (521px) + зазор 24px не помещаются слева от fixed-кнопки —
 * кнопка в потоке под текстом (ширина 350px без изменений).
 * Порог: 521 + 24 + 350 + 20 <= ширина контента .page → 890px
 */
@container (max-width: 890px) {
  .contact-button {
    position: static;
    width: 350px;
    margin-top: 24px;
  }
}

@media (max-width: 938px) {
  .contact-button {
    position: static;
    width: 350px;
    margin-top: 24px;
  }
}

/* 1 колонка в сетке — кнопка на всю ширину контента */
@container (max-width: 575px) {
  .contact-button {
    width: 100%;
  }
}

@media (max-width: 623px) {
  .contact-button {
    width: 100%;
  }
}
