/* Shared homepage and location hero video, filling a 3:4 frame at every screen size. */
.home-page .hero-inner {
  display: grid;
  align-items: center;
  gap: 2.75rem;
}

.hero-vsl {
  width: min(100%, 22rem);
  min-width: 0;
  justify-self: center;
}

.hero-vsl__frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0a131f;
  box-shadow:
    0 24px 60px -24px rgb(0 0 0 / 70%),
    0 1px 0 inset rgb(255 255 255 / 8%);
}

.hero-vsl__video {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  cursor: pointer;
}

.hero-vsl__video::-webkit-media-controls-fullscreen-button {
  display: none;
}

.hero-vsl__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  z-index: 1;
  color: var(--white);
  cursor: pointer;
  touch-action: manipulation;
  background: linear-gradient(180deg, transparent 65%, rgb(3 10 17 / 85%));
}

.hero-vsl__play[hidden] {
  display: none;
}

.hero-vsl.has-started .hero-vsl__play {
  bottom: 4rem;
  height: auto;
  padding-top: 4rem;
  background: none;
}

.hero-vsl.has-started .hero-vsl__caption {
  display: none;
}

.hero-vsl.is-playing .hero-vsl__play-icon {
  opacity: 0;
}

.hero-vsl.is-playing .hero-vsl__play-icon::before {
  width: 1rem;
  height: 1.25rem;
  margin: 0;
  clip-path: none;
  background: linear-gradient(
    90deg,
    var(--ink) 35%,
    transparent 35% 65%,
    var(--ink) 65%
  );
}

.hero-vsl.is-playing .hero-vsl__play-icon::after {
  animation: none;
}

.hero-vsl.is-playing .hero-vsl__play:focus-visible .hero-vsl__play-icon {
  opacity: 1;
}

.hero-vsl__play:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: -5px;
}

.hero-vsl__play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 4.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand);
  box-shadow:
    0 0 0 8px rgb(25 200 255 / 16%),
    0 12px 24px rgb(0 0 0 / 30%);
  transition:
    opacity 180ms ease,
    transform 240ms ease,
    box-shadow 240ms ease;
}

.hero-vsl__play-icon::before {
  content: "";
  width: 1rem;
  height: 1.25rem;
  margin-left: 0.2rem;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.hero-vsl__play-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--brand);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  animation: hero-vsl-pulse 3.4s ease-out infinite;
}

.hero-vsl.is-loading .hero-vsl__play-icon::after {
  animation: none;
}

.hero-vsl__caption {
  position: absolute;
  inset: auto 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-vsl__duration {
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgb(0 0 0 / 45%);
  font-variant-numeric: tabular-nums;
}

.hero-vsl.is-loading .hero-vsl__play-icon::before {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  border: 2px solid rgb(6 9 17 / 25%);
  border-top-color: var(--ink);
  border-radius: 50%;
  background: none;
  clip-path: none;
  animation: hero-vsl-loading 700ms linear infinite;
}

@keyframes hero-vsl-loading {
  to {
    transform: rotate(360deg);
  }
}

@media (hover: hover) and (pointer: fine) {
  .hero-vsl.is-playing .hero-vsl__play:hover .hero-vsl__play-icon {
    opacity: 1;
  }

  .hero-vsl__play:hover .hero-vsl__play-icon {
    transform: scale(1.06);
    box-shadow:
      0 0 0 12px rgb(25 200 255 / 18%),
      0 16px 28px rgb(0 0 0 / 35%);
  }
}

@media (min-width: 1000px) {
  .home-page .hero-inner {
    max-width: 68.75rem;
    grid-template-columns: minmax(0, 1fr) clamp(23rem, 28vw, 25rem);
    gap: clamp(1.5rem, 2.2vw, 2rem);
  }
  .hero-vsl {
    width: 100%;
  }
  .hero-vsl__play-icon {
    width: 5rem;
  }
}

@keyframes hero-vsl-pulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }
  65%,
  100% {
    opacity: 0;
    transform: scale(1.65);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-vsl__play-icon {
    transition: none;
  }
  .hero-vsl.is-loading .hero-vsl__play-icon::before,
  .hero-vsl__play-icon::after {
    animation: none;
  }
}
