/* Homepage hero video (click-to-load)
   This file is loaded only on the homepage.
*/

/* Layout: put video between copy and buttons on mobile (and keep video on the right on desktop) */
.hero-grid--home-video{
  /* Force grid so our template-areas re-order works on mobile */
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  grid-template-areas:
    "copy media"
    "actions media";
  align-items: start;
}

.hero-grid--home-video .hero-copy{ grid-area: copy; }
.hero-grid--home-video .hero-media{ grid-area: media; }
.hero-grid--home-video .hero-actions{
  grid-area: actions;
  margin-top: 18px; /* override base */
}

/* Vimeo click-to-load thumbnail */
.hero-card--video{
  /* Remove the white “card frame” so the video can visually float */
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.video-embed{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* Override global `.hero-card .video-embed { padding-top:56.25%; }` */
  padding-top: 0 !important;

  /* Extra blend: remove card rounding so the video feels “floating” */
  border-radius: 0;
  overflow: hidden;

  /* Light background prevents any dark "frame" if an image/iframe is still loading */
  background: #f4f6f8;

  /* Kill any inherited borders/frames */
  border: 0 !important;
  outline: 0 !important;

  /* No outer shadow — blend into the page */
  box-shadow: none;
}
/* Safety: some global CSS/theme styles apply borders to media elements */
.video-embed picture,
.video-embed img,
.video-embed iframe{
  border: 0 !important;
  outline: 0 !important;
}

.video-embed--click{
  /* Keep the click-to-load state visually consistent with the card.
     Using black here can create an unwanted "frame" effect around the
     thumbnail on some devices due to sub-pixel rounding.
  */
  background:#f4f6f8;
}

.video-embed__thumb{
  position:absolute;
  /* Slight overdraw avoids 1px "frames" caused by sub-pixel rounding */
  inset:-1px;
  pointer-events:none;
}
.video-embed__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  /* Parent already clips with border-radius; avoid any inner rounding artifacts */
  border-radius: 0 !important;
}

.video-embed__button{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
  padding: 0;
  border: 0 !important;
  cursor: pointer;

  /*
    Keep the thumbnail true-to-color.
    We only darken the small text pill (label) for readability.
  */
  background: transparent;
  color: #fff;
  text-decoration: none;
}

.video-embed__button:focus-visible{
  outline: 3px solid rgba(255,255,255,0.95);
  outline-offset: -3px;
}

.video-embed__play{
  /* Tune play-triangle alignment via CSS vars (desktop defaults) */
  --play-tri-x: 4px;
  /* The triangle tends to look a touch high optically; nudge it down */
  --play-tri-y: 7px;

  width: 74px;
  height: 74px;
  border-radius: 999px;
  /* Dark, translucent play badge */
  background: rgba(11,47,58,0.55);
  border: 2px solid rgba(255,255,255,0.45);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  display: grid;
  place-items: center;
  font-size: 0;
  line-height: 0;
}

.video-embed__play::before{
  content: "";
  display: block;
  width: 22px;
  height: 26px;
  background: rgba(255,255,255,0.95);
  -webkit-clip-path: polygon(0 0, 0 100%, 100% 50%);
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  /* Optical centering: triangle’s centroid is left of center */
  transform: translate(var(--play-tri-x), var(--play-tri-y));
}

.video-embed__label{
  position: absolute;
  left: 14px;
  bottom: 14px;
  font-weight: 700;
  font-size: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

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

/* Responsive tweaks */
@media (max-width: 880px){
  .hero-grid--home-video{
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "copy"
      "actions";
  }
  .hero-grid--home-video .hero-actions{
    margin-top: 14px;
  }
  
  .video-embed__label{
    left: 12px;
    bottom: 12px;
    font-size: 14px;
    padding: 8px 12px;
  }

.video-embed__play{
  --play-tri-x: 3px;
  --play-tri-y: 6px;
  width: 58px;
  height: 58px;
}

.video-embed__play::before{
  width: 18px;
  height: 22px;
  transform: translate(var(--play-tri-x), var(--play-tri-y));
}
}
