[data-hero-preview-pair] {
  container-type: inline-size;
}

[data-hero-preview-pair] video[data-preview-src] {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

[data-hero-preview-pair][data-preview-playing] video[data-preview-src] {
  opacity: 1;
}

@media (min-width: 901px) {
  [data-hero-preview-grid] {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: clamp(340px, 36vw, 620px);
  }

  [data-hero-preview-pair] {
    top: clamp(16px, 2vw, 28px);
    max-width: 780px;
  }
}

@media (max-width: 900px) {
  [data-hero-preview-pair] [data-hero-preview-phone] {
    --preview-phone-width: 26cqw;
    width: var(--preview-phone-width) !important;
    height: calc(var(--preview-phone-width) * 270 / 132) !important;
  }
}

@media (max-width: 720px) {
  [data-hero-preview-pair] [data-hero-preview-phone] {
    --preview-phone-width: 30cqw;
  }
}
