/* cs-video-split — mixed-weight two-tone heading + flourish beside a video
   embed; sides alternate per instance.
   All rem values follow BB Theme's html { font-size: 10px } base. */

/* Strip BB's default row chrome. */
.fl-row-content-wrap:has(.cs-video-split) {
  padding-block: 0;
}
.fl-module-content:has(.cs-video-split) {
  margin-block: 0;
}

.cs-video-split {
  position: relative;
  padding-block: var(--cs-space-xl);
  font-family: var(--cs-font-body);
  color: var(--cs-ink);
}

.cs-video-split__inner {
  max-width: var(--cs-container);
  margin: 0 auto;
  padding-inline: var(--cs-gutter);
  display: grid;
  /* Text ~620px / video ~591px per Figma — near-equal split */
  grid-template-columns: minmax(0, 620fr) minmax(0, 591fr);
  align-items: center;
  column-gap: var(--cs-space-2xl);
  row-gap: var(--cs-space-lg);
  position: relative;
  z-index: 1;
}

.cs-video-split--media-right .cs-video-split__content { order: 1; }
.cs-video-split--media-right .cs-video-split__media   { order: 2; }

.cs-video-split--media-left .cs-video-split__inner {
  grid-template-columns: minmax(0, 591fr) minmax(0, 620fr);
}
.cs-video-split--media-left .cs-video-split__media   { order: 1; }
.cs-video-split--media-left .cs-video-split__content { order: 2; text-align: right; }

/* ---------- Content ---------- */
.cs-video-split__content {
  display: flex;
  flex-direction: column;
  gap: var(--cs-space-md);
}

.cs-video-split--media-left .cs-video-split__content {
  align-items: flex-end;
}

/* Doubled classes + font-style so BB Global h2 rules lose. */
.cs-video-split .cs-video-split__heading {
  margin: 0;
  font-family: var(--cs-font-display);
  font-size: clamp(3.2rem, 3vw + 1rem, 4.8rem); /* 32px → 48px */
  font-style: normal;
  font-weight: 800;
  line-height: 1.212;
  letter-spacing: var(--cs-tracking-tight);
  color: var(--cs-ink);
  text-transform: capitalize;
  text-wrap: balance;
}

/* Explicit span colors — BB Global Styles' `h2 span` rule recolors bare spans */
.cs-video-split .cs-video-split__heading .cs-video-split__heading-bold,
.cs-video-split .cs-video-split__heading .cs-video-split__heading-regular {
  color: var(--cs-ink);
}

.cs-video-split .cs-video-split__heading .cs-video-split__heading-regular {
  font-weight: 400;
}

.cs-video-split .cs-video-split__heading .cs-video-split__heading-accent {
  color: var(--cs-blue);
}

/* Flourish — reuse the promo-banner starburst, recolored to ink */
.cs-video-split__flourish {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 56rem;
  opacity: 0.85;
}

.cs-video-split__flourish::before {
  content: '';
  flex: 1;
  height: 3px;
  background: var(--cs-ink);
  transform: translateY(0.46rem);
}

.cs-video-split__flourish img {
  display: block;
  height: 8.7rem;
  width: auto;
  margin-left: -2px;
  /* flourish.svg ships white — recolor to ink */
  filter: brightness(0);
}

.cs-video-split--media-left .cs-video-split__flourish {
  transform: scaleX(-1);
}

/* ---------- Video ---------- */
.cs-video-split__frame {
  position: relative;
  aspect-ratio: 591 / 306;
  border-radius: 1rem; /* 10px */
  overflow: hidden;
  background: #383840;
}

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

.cs-video-split__frame--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-video-split__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--cs-white);
  font-size: 2rem;
  padding-left: 0.4rem;
}

/* ---------- Full-width framed layout (getting-started "Team Welcome") ---------- */
.cs-video-split--media-full .cs-video-split__inner {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.cs-video-split--media-full .cs-video-split__content {
  order: 1;
  align-items: center;
  text-align: center;
}

.cs-video-split--media-full .cs-video-split__media {
  order: 2;
  width: 100%;
  max-width: 110.8rem; /* 1108px per Figma */
}

/* Blue panel around the video, ~50px padding per Figma */
.cs-video-split--media-full .cs-video-split__frame {
  aspect-ratio: auto;
  background: rgba(240, 183, 164, 0.3); /* peach wash per Figma */
  border-radius: var(--cs-radius-lg);
  padding: 5rem;
}

.cs-video-split--media-full .cs-video-split__frame iframe {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1001 / 572;
  border-radius: 2rem;
}

.cs-video-split--media-full .cs-video-split__frame--placeholder {
  aspect-ratio: 1108 / 671;
}

@media (max-width: 900px) {
  .cs-video-split--media-full .cs-video-split__frame {
    padding: 1.6rem;
    border-radius: var(--cs-radius-md);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cs-video-split__inner,
  .cs-video-split--media-left .cs-video-split__inner,
  .cs-video-split--media-right .cs-video-split__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Text above the video when stacked, whichever side it sits on desktop */
  .cs-video-split--media-left .cs-video-split__content,
  .cs-video-split--media-right .cs-video-split__content {
    order: 1;
    text-align: left;
    align-items: flex-start;
  }
  .cs-video-split--media-left .cs-video-split__media,
  .cs-video-split--media-right .cs-video-split__media {
    order: 2;
  }
  .cs-video-split__flourish {
    display: none;
  }
}
