.video-open-inline,
.video-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand-dark);
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.hero-video-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}

.hero-video-trigger img {
  transition: transform 160ms ease;
}

.hero-video-trigger:hover img {
  transform: scale(1.012);
}

.hero-video-prompt {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(23, 49, 58, .94);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

.video-preview {
  position: relative;
  background: #111;
}

.video-preview .video-frame {
  pointer-events: none;
}

.video-preview-trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 0;
  background: linear-gradient(to bottom, transparent 48%, rgba(0, 0, 0, .68));
  color: #fff;
  cursor: pointer;
}

.video-preview-trigger span {
  align-self: end;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(0, 0, 0, .82);
  font-size: .9rem;
  font-weight: 800;
}

.hero-video-trigger:focus-visible,
.video-preview-trigger:focus-visible,
.video-open-inline:focus-visible,
.video-modal-close:focus-visible {
  outline: 3px solid #ffb28f;
  outline-offset: 4px;
}

.video-modal[hidden] {
  display: none;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 12, 15, .92);
  overscroll-behavior: contain;
}

.video-modal-dialog {
  width: min(100%, 460px);
  max-height: calc(100svh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px;
  background: #0c171b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.video-modal-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  color: #fff;
}

.video-modal-title {
  margin: 0;
  font-size: .98rem;
  font-weight: 760;
  line-height: 1.3;
}

.video-modal-close {
  min-width: 116px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 10px;
  background: #fff;
  color: #17313a;
  font: inherit;
  font-size: .92rem;
  font-weight: 850;
  cursor: pointer;
}

.video-modal-player {
  width: min(100%, calc((100svh - 118px) * .5625));
  max-width: 420px;
  aspect-ratio: 9 / 16;
  margin-inline: auto;
  background: #000;
}

.video-modal-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

body.video-modal-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .video-modal {
    padding: 8px;
  }

  .video-modal-dialog {
    max-height: calc(100svh - 16px);
    border-radius: 12px;
  }

  .video-modal-head {
    min-height: 58px;
    padding: 7px 8px 7px 14px;
  }

  .video-modal-title {
    font-size: .88rem;
  }

  .video-modal-close {
    min-width: 104px;
    min-height: 46px;
  }

  .video-modal-player {
    width: min(100%, calc((100svh - 90px) * .5625));
  }

  .hero-video-prompt {
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video-trigger img {
    transition: none;
  }
}
