/* The video band: a poster with a play button that swaps to the real embed on click.
 *
 * Paired with assets/js/video.js. Styled to sit between the expert band above it and
 * the gallery below, both of which are #f5f5f5, so this one is white -- the alternation
 * is what keeps three stacked bands from reading as one long block.
 */

.sos-video {
  background: #fff;
  padding: 40px 0;
}

/* sections.css owns `.sos-band .sos-wrap` and every service page loads it, but the About
   page does not -- same gap expert.css and gallery.css had. Restated here so this sheet
   works standalone on any page that loads it. */
.sos-video .sos-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.sos-video .sos-vid-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 24px;
}

.sos-video h2 {
  color: #1a1a1a;
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.sos-video .sos-vid-sub {
  color: #666;
  font-size: 1rem;
  line-height: 1.7;
  margin: 12px 0 0;
  padding: 0;
}

/* ---- the frame ----------------------------------------------------------
   One 16:9 box that holds the poster button first and the iframe after the swap, so
   nothing reflows when the video loads. Capped narrower than the wrap: full 1180px of
   video on a story page dominates everything around it. */

.sos-video .sos-vid-holder {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

@supports not (aspect-ratio: 16 / 9) {
  .sos-video .sos-vid-holder {
    height: 495px;
  }
}

.sos-video .sos-vid-frame,
.sos-video .sos-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- the poster button -------------------------------------------------- */

.sos-video .sos-vid {
  display: block;
  padding: 0;
  background: none;
  cursor: pointer;
}

.sos-video .sos-vid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sos-video .sos-vid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  transition: background 180ms ease;
}

.sos-video .sos-vid:hover::after,
.sos-video .sos-vid:focus-visible::after {
  background: rgba(0, 0, 0, 0.06);
}

.sos-video .sos-vid:focus-visible {
  outline: 3px solid #dd5c26;
  outline-offset: -3px;
}

/* Play triangle, drawn rather than fetched -- no asset, no request. */
.sos-video .sos-vid-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: #dd5c26;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease, background 180ms ease;
  z-index: 1;
}

.sos-video .sos-vid-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent #fff;
}

.sos-video .sos-vid:hover .sos-vid-play,
.sos-video .sos-vid:focus-visible .sos-vid-play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #c44f1f;
}

@media (prefers-reduced-motion: reduce) {
  .sos-video .sos-vid-play,
  .sos-video .sos-vid::after {
    transition: none;
  }
  .sos-video .sos-vid:hover .sos-vid-play,
  .sos-video .sos-vid:focus-visible .sos-vid-play {
    transform: translate(-50%, -50%);
  }
}

@media all and (max-width: 620px) {
  .sos-video {
    padding: 32px 0;
  }
  .sos-video .sos-vid-play {
    width: 58px;
    height: 58px;
  }
  .sos-video .sos-vid-play::before {
    border-width: 11px 0 11px 19px;
  }
}
