.video-showcase-intro {
  max-width: 38rem;
}

.video-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 4rem;
}

.video-card {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .16);
  background: var(--color-3);
  cursor: pointer;
  text-align: left;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.video-card::before,
.video-card::after {
  position: absolute;
  z-index: 1;
  content: "";
  pointer-events: none;
}

.video-card::before {
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 8, 18, .02) 32%, rgba(7, 8, 18, .88) 100%);
}

.video-card::after {
  top: 50%;
  left: 50%;
  width: 3.75rem;
  height: 3.75rem;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.video-card__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .35s ease, transform .55s cubic-bezier(.2, .65, .25, 1);
}

.video-card__play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: .48rem solid transparent;
  border-bottom: .48rem solid transparent;
  border-left: .72rem solid #fff;
  transform: translate(-38%, -50%);
}

@media (hover: hover) and (pointer: fine) {
  .video-card:hover,
  .video-card:focus-visible {
    border-color: var(--color-1);
    box-shadow: 0 0 1.75rem rgba(82, 142, 255, .28);
    transform: translateY(-.35rem);
  }

  .video-card:hover::after,
  .video-card:focus-visible::after {
    border-color: #9fc2ff;
    background-color: rgba(82, 142, 255, .22);
    box-shadow: 0 0 1.2rem rgba(82, 142, 255, .52);
  }

  .video-card:hover .video-card__poster,
  .video-card:focus-visible .video-card__poster {
    filter: brightness(1.12) saturate(1.06);
    transform: scale(1.045);
  }
}

.video-card:focus-visible,
.video-player-close:focus-visible {
  outline: 2px solid var(--color-1);
  outline-offset: 4px;
}

.video-player-dialog {
  width: min(92vw, 31rem);
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(159, 194, 255, .58);
  background: #080914;
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, .7);
}

.video-player-dialog::backdrop {
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(.25rem);
}

.video-player-dialog:not([open]) {
  display: none;
}

.video-player-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  max-height: calc(100dvh - 2rem);
  background: #000;
}

.video-player-wrap video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 2rem);
  background: #000;
}

.video-player-close {
  position: absolute;
  z-index: 2;
  top: .8rem;
  right: .8rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 50%;
  background: rgba(8, 9, 20, .72);
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 100;
  line-height: 1;
  transition: background-color .2s ease, border-color .2s ease;
}

.video-player-close:hover {
  border-color: var(--color-1);
  background-color: rgba(82, 142, 255, .34);
}

@media (max-width: 1199.98px) {
  .video-showcase-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .video-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 2.75rem;
  }

  .video-card::after {
    width: 3.1rem;
    height: 3.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-card,
  .video-card::after,
  .video-card__poster,
  .video-player-close {
    transition: none;
  }
}
