/* About page: "Nautilus Introduction Video!" button and popup */

.intro-video-bar {
  display: flex;
  justify-content: flex-end;
  padding-top: 28px;
}

/* Button (adapted from Uiverse.io by abrahamcalsin) */
.intro-video-btn {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  background: #183153;
  font-family: "Montserrat", sans-serif;
  box-shadow: 0px 6px 24px 0px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
}

.intro-video-btn::after {
  content: " ";
  width: 0%;
  height: 100%;
  background: #ffd401;
  position: absolute;
  transition: all 0.4s ease-in-out;
  right: 0;
}

.intro-video-btn:hover::after,
.intro-video-btn:focus-visible::after {
  right: auto;
  left: 0;
  width: 100%;
}

.intro-video-btn span {
  text-align: center;
  text-decoration: none;
  width: 100%;
  padding: 16px 26px;
  color: #fff;
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: 0.2em;
  z-index: 20;
  transition: all 0.3s ease-in-out;
}

.intro-video-btn:hover span,
.intro-video-btn:focus-visible span {
  color: #183153;
  animation: scaleUp 0.3s ease-in-out;
}

@keyframes scaleUp {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Popup */
body.intro-video-open { overflow: hidden; }

.intro-video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 14, 20, 0.85);
}

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

.intro-video-frame {
  position: relative;
  width: min(1000px, 100%, calc((100vh - 120px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.intro-video-soon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Quicksand', sans-serif;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.intro-video-close {
  position: absolute;
  top: 14px;
  right: 22px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}

.intro-video-close:hover { opacity: 1; }

@media (max-width: 700px) {
  .intro-video-bar { justify-content: flex-start; padding-top: 22px; }
}
