/* Featured video section (URL-2031).
   A self-contained drop-in: any marketing page can reuse it by including this
   stylesheet, /assets/featured-video.js, and the <section class="featured-video">
   markup from landing.html. Colors fall back to the homepage tokens, so it
   renders correctly on pages that do not define --ink / --accent. */

.featured-video {
  display: grid;
  gap: 28px;
  /* The next section brings its own top padding; doubling it left a dead gap. */
  padding-bottom: 0;
}
.featured-video-heading {
  display: grid;
  gap: 18px;
}
.featured-video-heading h2 {
  margin-top: 14px;
}
.featured-video-heading h2 > span {
  color: var(--accent, #4945dc);
}
.featured-video-heading > p {
  font-size: 15px;
  line-height: 1.8;
  max-width: 560px;
}

/* The player. A designed cover (thumbnail + play button + duration) sits in
   a 16:9 frame. Clicking it mounts the YouTube player in the same frame (JS);
   without JS the cover is a plain link to the video on YouTube. */
.fv-player {
  position: relative;
  margin: 0;
}
.fv-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1929;
  box-shadow: 0 24px 60px -24px rgba(24, 34, 52, .45), 0 0 0 1px rgba(24, 34, 52, .08);
}
.fv-frame iframe,
.fv-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.fv-cover {
  position: absolute;
  inset: 0;
  display: block;
  background: #0d1929;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}
.fv-player.is-playing .fv-cover {
  display: none;
}
.fv-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .3s ease;
}
.fv-cover:hover img,
.fv-cover:focus-visible img {
  transform: scale(1.03);
  filter: brightness(.92);
}
.fv-cover-cta {
  /* Sits in the curtain gap between Barry and the product card on the cover. */
  position: absolute;
  left: 54.5%;
  top: 54%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.fv-play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--accent, #4945dc);
  box-shadow: 0 14px 34px rgba(13, 25, 41, .45);
  transition: transform .2s ease;
}
.fv-play-icon::before {
  /* soft pulse ring so the cover reads as "press play" */
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .75);
  animation: fv-pulse 2.2s ease-out infinite;
}
.fv-play-icon svg {
  margin-left: 5px;
}
.fv-cover:hover .fv-play-icon,
.fv-cover:focus-visible .fv-play-icon {
  transform: scale(1.08);
}
.fv-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(13, 25, 41, .78);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
}
.fv-cover:focus-visible {
  outline: 3px solid var(--accent, #4945dc);
  outline-offset: 3px;
}
@keyframes fv-pulse {
  0% { transform: scale(.9); opacity: .9; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}
@media (max-width: 539px) {
  .fv-play-icon {
    width: 64px;
    height: 64px;
  }
  .fv-play-icon svg {
    width: 26px;
    height: 26px;
    margin-left: 3px;
  }
  .fv-duration {
    font-size: 11px;
    padding: 4px 10px;
  }
  .fv-end {
    gap: 10px;
    padding: 12px;
  }
  .fv-end-actions {
    gap: 2px 16px;
  }
}

/* Our end card, shown over the player when the video finishes so visitors
   see our next step instead of YouTube's suggestions. */
.fv-end {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  background: rgba(13, 25, 41, .94);
  color: #fff;
  text-align: center;
}
.fv-end[hidden] {
  display: none;
}
.fv-end-title {
  margin: 0;
  max-width: 18em;
  font-size: clamp(20px, 3.2vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.fv-end-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
}
.fv-replay {
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.fv-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted, #536077);
}
.fv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}
@media (min-width: 900px) {
  .featured-video {
    gap: 36px;
  }
  .featured-video-heading {
    grid-template-columns: 1.05fr 1fr;
    align-items: end;
    gap: 48px;
  }
  .fv-frame {
    border-radius: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fv-play-icon::before {
    animation: none;
    opacity: 0;
  }
  .fv-cover img,
  .fv-play-icon {
    transition: none;
  }
  .fv-cover:hover img,
  .fv-cover:focus-visible img,
  .fv-cover:hover .fv-play-icon,
  .fv-cover:focus-visible .fv-play-icon {
    transform: none;
  }
}
