/* Vimeo projects open inside the site. */
body.video-modal-open {
  overflow: hidden;
}

.video-modal {
  position: fixed;
  z-index: 2000;
  inset: 0;
  padding: clamp(12px, 3vw, 42px);
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.video-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.video-modal__dialog {
  width: min(1200px, 100%);
  color: #f2f0ea;
}

.video-modal__head {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 12px;
}

.video-modal__title {
  margin: 0;
  max-width: calc(100% - 72px);
  font-size: clamp(18px, 2.1vw, 32px);
  line-height: .95;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.video-modal__close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid rgba(242, 240, 234, .55);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #f2f0ea;
  font: 300 28px/1 Arial, sans-serif;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.video-modal__close:hover {
  background: #f2f0ea;
  color: #0a0a0a;
}

.video-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.video-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

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

  .video-modal__head {
    min-height: 44px;
    padding-bottom: 8px;
  }

  .video-modal__close {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

@media (orientation: landscape) and (max-height: 700px) {
  .video-modal__dialog {
    width: min(1200px, calc((100svh - 66px) * 1.7778));
  }
}
