/*
 * Видеоблок первого экрана.
 *
 * Один и тот же компонент стоит на systems.ingello.com и на ingello.com:
 * постер, крупная кнопка воспроизведения и экран с кнопками после окончания
 * ролика. Звук включается по клику — это единственный момент, когда браузер
 * разрешает запустить видео не приглушённым.
 */

.hero-video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #05080c;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 209, 180, 0.18);
  isolation: isolate;
}

.hero-video__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05080c;
}

.hero-video__play,
.hero-video__end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 24px;
  border: 0;
  text-align: center;
}

/* Атрибут hidden должен побеждать display:flex компонента. */
.hero-video__end[hidden] {
  display: none;
}

.hero-video__play {
  cursor: pointer;
  color: #f8fbfa;
  background: radial-gradient(
      circle at 50% 50%,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(3, 8, 10, 0.62) 72%
    ),
    linear-gradient(180deg, rgba(3, 8, 10, 0) 40%, rgba(3, 8, 10, 0.72) 100%);
  transition: background 0.25s ease, opacity 0.2s ease;
  font: inherit;
}

.hero-video__play:hover,
.hero-video__play:focus-visible {
  background: radial-gradient(
      circle at 50% 50%,
      rgba(0, 209, 180, 0.16) 0%,
      rgba(3, 8, 10, 0.68) 72%
    ),
    linear-gradient(180deg, rgba(3, 8, 10, 0) 40%, rgba(3, 8, 10, 0.78) 100%);
  outline: none;
}

.hero-video__play-icon {
  position: relative;
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid rgba(0, 209, 180, 0.85);
  background: rgba(3, 8, 10, 0.45);
  backdrop-filter: blur(3px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-video__play-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent #00d1b4;
}

.hero-video__play:hover .hero-video__play-icon,
.hero-video__play:focus-visible .hero-video__play-icon {
  transform: scale(1.06);
  box-shadow: 0 0 0 10px rgba(0, 209, 180, 0.12);
}

.hero-video__play-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #e6f4f2;
}

.hero-video__end {
  background: rgba(3, 8, 10, 0.78);
  backdrop-filter: blur(6px);
}

.hero-video__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  max-width: 100%;
  padding: 13px 28px;
  border-radius: 999px;
  border: 1px solid rgba(0, 209, 180, 0.6);
  background: rgba(3, 8, 10, 0.5);
  color: #f8fbfa;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-video__btn:hover,
.hero-video__btn:focus-visible {
  background: rgba(0, 209, 180, 0.16);
  border-color: #00d1b4;
  transform: translateY(-1px);
  outline: none;
  color: #ffffff;
}

.hero-video__btn--primary {
  background: #00d1b4;
  border-color: #00d1b4;
  color: #04100e;
}

.hero-video__btn--primary:hover,
.hero-video__btn--primary:focus-visible {
  background: #22e2c7;
  border-color: #22e2c7;
  color: #04100e;
}

.hero-video.is-playing .hero-video__play {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  .hero-video {
    border-radius: 14px;
  }

  .hero-video__play-icon {
    width: 68px;
    height: 68px;
  }

  .hero-video__play-icon::before {
    border-width: 12px 0 12px 20px;
  }

  .hero-video__btn {
    width: 100%;
    font-size: 14px;
  }
}
