.video {
  width: 100%;
}

.video__carousel {
  position: relative;
  overflow: hidden;
}

.video__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 402 / 226;
  overflow: hidden;
}

.video__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 127 / 103;
  width: clamp(3.2215rem, 0.1736rem + 12.1311vw, 7.9375rem);
  border: none;
  border-radius: clamp(1.0147rem, 0.0547rem + 3.8208vw, 2.5rem);
  background: var(--dozen-blue);
  cursor: pointer;
}

.video__play-icon {
  width: 44%;
  height: 44%;
  fill: var(--off-white);
}

.video__player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.video__frame--playing .video__poster,
.video__frame--playing .video__play {
  display: none;
}

.video__carousel .carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-10);
  border: none;
  background: transparent;
  cursor: pointer;
}

.video__carousel .carousel__arrow svg {
  width: clamp(3.5rem, 2.7778rem + 2vw, 5.625rem);
  height: auto;
  overflow: visible;
}

.video__carousel .carousel__arrow path {
  fill: none;
  stroke: var(--dozen-red);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video__carousel .carousel__arrow--prev {
  left: clamp(1.25rem, 0.625rem + 2.778vw, 3.125rem);
}

.video__carousel .carousel__arrow--next {
  right: clamp(1.25rem, 0.625rem + 2.778vw, 3.125rem);
}

.video__play:focus-visible,
.video__carousel .carousel__arrow:focus-visible {
  outline: 2px solid var(--pure-white);
  outline-offset: 4px;
}

.video__carousel .carousel__dots {
  color: var(--dozen-red);
}

/* The native controls own the frame's bottom edge while a video plays */
.video__carousel:has(.carousel__slide.is-active .video__frame--playing)
  .carousel__dots {
  display: none;
}

@media (min-width: 1024px) {
  .video__frame {
    aspect-ratio: 1440 / 917;
  }

  .video__play {
    width: 7.9375rem;
    border-radius: 2.5rem;
  }

  .video__carousel .carousel__arrow {
    display: flex;
  }

  .video__carousel .carousel__arrow svg {
    width: 5.625rem;
  }

  .video__carousel .carousel__arrow--prev,
  .video__carousel .carousel__arrow--next {
    left: auto;
    right: auto;
  }

  .video__carousel .carousel__arrow--prev {
    left: 3.125rem;
  }

  .video__carousel .carousel__arrow--next {
    right: 3.125rem;
  }
}
