/* Full-width film behind the Home introduction; the mask reveals the page's
   existing background so the next section has no visible seam. */
.home-video-hero {
  position: relative;
  isolation: isolate;
  border-bottom: 0;
  overflow: hidden;
  padding-bottom: 76px;
}

.home-video-hero__background {
  position: absolute;
  z-index: -1;
  inset: var(--nav-height) 0 0;
  overflow: hidden;
  pointer-events: none;
  background: #10191e url('/assets/home-training-background-v1.webp') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 72%, transparent 100%);
}

.home-video-hero__background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 13, 17, 0.78), rgba(7, 13, 17, 0.54) 42%, rgba(7, 13, 17, 0.18) 76%, rgba(7, 13, 17, 0.24));
}

.home-video-hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-video-hero .story-view__grid {
  position: relative;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: clamp(24px, 4vw, 64px);
}

.home-video-hero .story-view__content {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

.home-transitions .home-video-hero .story-view__content,
.home-transitions .home-video-hero .story-view__device {
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
}

.home-video-hero .story-view__kicker { color: var(--eyebrow-color); }
.home-video-hero .brand-lockup { gap: clamp(20px, 2.4vw, 34px); }
.home-video-hero .brand-lockup__logo { width: clamp(88px, 10vw, 144px); }
.home-video-hero .brand-lockup__slogan {
  color: #fff5ec;
  font-size: clamp(44px, 5.5vw, 76px);
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.home-video-hero .story-view__copy {
  max-width: 49ch;
  color: #f5f3f0;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
}
.home-video-hero .story-view__device--hero {
  position: relative;
  height: min(74svh, 780px);
  padding: 0;
}
.home-video-hero__entrance {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 105%;
  width: auto;
  max-width: none;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}
.has-phone-video .home-video-hero__entrance { opacity: 1; }
.has-phone-video .home-video-hero__phone { opacity: 0; }
.has-phone-fallback .home-video-hero__phone { animation: phone-enter 2.8s cubic-bezier(.18, .65, .2, 1) both; }
@keyframes phone-enter {
  from { transform: translateY(-130%) scale(1.5); }
  to { transform: translateY(0) scale(1); }
}
.home-video-hero__phone {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.25));
}
.home-video-hero .app-store-badge { filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.28)); }

.home-video-hero__motion {
  position: absolute;
  right: max(24px, calc((100vw - var(--max-width)) / 2));
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  color: #fff5ec;
  background: rgba(16, 25, 30, 0.7);
}
.home-video-hero__motion[hidden] { display: none; }
.home-video-hero__motion:hover { background: #10191e; }
.home-video-hero__motion:focus-visible { outline: 3px solid #df9fff; outline-offset: 4px; }
.home-video-hero__motion svg { width: 22px; height: 22px; }
.home-video-hero__play,
.home-video-hero__motion.is-paused .home-video-hero__pause { display: none; }
.home-video-hero__motion.is-paused .home-video-hero__play { display: block; }

@media (max-width: 900px) {
  .home-video-hero { padding: calc(var(--nav-height) + 64px) 24px 88px; }
  .home-video-hero__background {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 60%, transparent 100%);
  }
  .home-video-hero__background::after { background: rgba(7, 13, 17, 0.58); }
  .home-video-hero .story-view__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; max-width: 620px; margin-inline: auto; }
  .home-video-hero .brand-lockup { flex-direction: row; align-items: center; gap: 20px; margin-bottom: 22px; }
  .home-video-hero .brand-lockup__logo { width: 76px; }
  .home-video-hero .brand-lockup__slogan { font-size: clamp(36px, 9vw, 54px); }
  .home-video-hero .story-view__copy { font-size: 17px; }
  .home-video-hero .app-store-badge { margin-top: 26px; }
  .home-video-hero .story-view__device--hero {
    width: 100%;
    height: min(61svh, 520px);
    margin: 0;
    padding: 0;
  }
}

@media (max-width: 360px) {
  .home-video-hero .brand-lockup { gap: 16px; }
  .home-video-hero .brand-lockup__logo { width: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-video-hero__video { visibility: hidden; }
  .home-video-hero__motion { display: none; }
  .home-video-hero__entrance { display: none; }
  .home-video-hero .home-video-hero__phone { opacity: 1; animation: none; }
}
