.bw-home {
  --bw-row: 21px;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  color: #fff;
}
.bw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.bw-backdrop,
.bw-poster,
.bw-video,
.bw-veil,
.bw-scrollport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bw-backdrop,
.bw-veil {
  pointer-events: none;
}

.bw-poster,
.bw-video {
  display: block;
  background: #000;
  /* Fill the screen: crop wide clips rather than letterboxing them. */
  object-fit: cover;
  object-position: center;
}

.bw-video {
  opacity: 0;
}

.bw-video.bw-ready {
  opacity: 1;
}

iframe.bw-video {
  border: 0;
  pointer-events: none;
  /* An iframe can't use object-fit, so size it to the video's own shape
     (--bw-ar, set from the Vimeo player) and let it overflow the stage. */
  inset: auto;
  top: 50%;
  left: 50%;
  width: max(100cqw, 100cqh * var(--bw-ar, 16 / 9));
  height: max(100cqh, 100cqw / (var(--bw-ar, 16 / 9)));
  transform: translate(-50%, -50%);
}

.bw-backdrop {
  container-type: size;
  overflow: hidden;
}

.bw-veil {
  background: radial-gradient(ellipse 19% 140% at center, rgb(0 0 0 / 19%) 22%, transparent),
    rgb(0 0 0 / 42%);
}

.bw-scrollport {
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  -webkit-user-select: none;
  user-select: none;
}

.bw-scrollport::-webkit-scrollbar {
  display: none;
}

.bw-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bw-track {
  pointer-events: none;
}

.bw-roster {
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: min(50vw, 640px);
  transform: translateX(-50%);
  overflow: clip;
}

.bw-strip {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translate3d(0, var(--bw-offset, 0px), 0);
  will-change: transform;
}

.bw-band {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bw-home .bw-brand {
  display: block;
  flex: 0 0 var(--bw-row);
  max-width: 100%;
  height: var(--bw-row);
  padding-inline: 4px;
  color: inherit;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: 0;
  line-height: var(--bw-row);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .39;
  transition: opacity 160ms ease;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.bw-home .bw-brand.bw-active { opacity: var(--text-rest-opacity); }
.bw-home .bw-brand:focus-visible { opacity: 1; font-weight: 700; }
@media (any-hover: hover) and (any-pointer: fine) {
  .bw-roster .bw-brand { width: 100%; }
}
@media (hover: hover) {
  .bw-home .bw-brand:hover { opacity: 1; font-weight: 700; }
}

.bw-home .bw-brand:focus-visible,
.bw-motion:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

.bw-dragging,
.bw-dragging .bw-brand {
  cursor: grabbing;
}

.bw-motion {
  position: absolute;
  right: max(26px, env(safe-area-inset-right));
  bottom: max(23px, env(safe-area-inset-bottom));
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.76);
  cursor: pointer;
}

.bw-motion[hidden] {
  display: none;
}

.bw-motion-icon {
  width: 7px;
  height: 9px;
  box-sizing: content-box;
  border-inline: 1.5px solid currentColor;
  transform: scaleX(.8);
}

.bw-motion[data-paused="true"] .bw-motion-icon {
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-right: 0;
  border-left: 8px solid currentColor;
  transform: none;
}

@media (max-width: 1023px) {
  .bw-roster {
    width: calc(100% - 40px);
    /* The middle stays exactly at the viewport centre as the chrome clears both ends. */
    --roster-top: calc(var(--chrome-top) + 122px);
    mask-image: linear-gradient(to bottom, transparent var(--roster-top), #000 calc(var(--roster-top) + min(55px, 7dvh)),
      #000 calc(100% - min(130px, 19dvh)), transparent calc(100% - min(55px, 8dvh)));
    clip-path: inset(var(--roster-top) 0 min(55px, 8dvh));
  }
  .bw-motion {
    right: max(12px, env(safe-area-inset-right));
    top: max(12px, env(safe-area-inset-top));
    bottom: auto;
  }
}

@media (max-width: 767px) {
  .bw-home .bw-brand { font-size: 14px; }
}

@media (max-height: 450px) and (orientation: portrait) {
  .bw-roster { --roster-top: calc(max(8px, env(safe-area-inset-top)) + 92px); }
}

@media (max-height: 445px) and (orientation: landscape) {
  .bw-roster {
    width: min(50vw, 640px);
    mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
    clip-path: none;
  }
  .bw-motion {
    top: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bw-home .bw-brand,
  .bw-video {
    transition: none;
  }
}
@media (prefers-contrast: more) {
  .bw-home .bw-brand { opacity: .94; }
  .bw-veil { background: rgb(0 0 0 / 74%); }
}
