/* Animated header logo (desktop only).
   Phones and tablets (<= 900px) keep the original icon + text logo untouched. */
.logo__anim {
  display: none;
}

@media (min-width: 901px) {
  .logo .logo__icon {
    display: none;
  }

  /* Keep the "vybridge" text for screen readers / when media fails. */
  .logo .logo__text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .logo__anim {
    position: relative;
    display: block;
    flex-shrink: 0;
    height: min(68px, calc(var(--header-h, 72px) - 4px));
    aspect-ratio: 480 / 208;
    margin-left: -6px;
  }

  .logo__anim picture {
    display: contents;
  }

  .logo__anim img,
  .logo__anim video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
  }

  /* The video is the same frame as the still, so swapping them is seamless. */
  .logo__anim video {
    opacity: 0;
  }

  .logo__anim.is-playing video {
    opacity: 1;
  }

  .logo__anim.is-playing img {
    opacity: 0;
  }
}
