/* Shared homepage case-study showcase interactions. */

.section-wrap.mod--case::-webkit-scrollbar {
  display: none;
}

.section.mod--case-study:hover .case-study__videos {
  clip-path: inset(0% 0 0 0);
}

.section.mod--case-study:hover .case-study__counts,
.section.mod--case-study:hover .case-study__title {
  opacity: 1;
}

.section.is--text-hover:hover .case-study__title {
  opacity: 0;
}

.cases-study__text.is-active {
  top: 0 !important;
  opacity: 1 !important;
  pointer-events: auto;
}

.cases-study__text.is-prev {
  top: -20rem !important;
  opacity: 0 !important;
}

.case-study__video-wrap.is-active {
  width: 100% !important;
  height: 100% !important;
}

.case-study__video > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cases-study__services {
  display: flex;
  align-items: center;
  font-size: 1rem;
  line-height: 1.375rem;
  white-space: nowrap;
  transition: opacity .4s;
}

.cases-study__services.anim {
  opacity: 0;
}

.cases-study__service {
  display: flex;
  align-items: center;
}

.cases-study__service:not(:last-child)::after {
  content: "";
  flex: none;
  width: .1875rem;
  height: .1875rem;
  margin: 0 .5rem;
  border-radius: 50%;
  background-color: currentColor;
  opacity: .4;
}

.cases-study__btn {
  margin-top: 1rem;
}

@media screen and (max-width: 991px) {
  .cases-study__services {
    font-size: .875rem;
    line-height: 1.1875rem;
  }

  .cases-study__btn {
    margin-top: .5rem;
  }
}

/* Tablet previews stay beside the case copy instead of following a hover cursor. */
@media screen and (min-width: 768px) and (max-width: 991px) {
  .case-study__wrap {
    top: 50%;
    right: 3.125rem;
    left: auto;
    transform: translateY(-50%);
  }

  .case-study__videos,
  .case-study__video {
    width: 21rem;
    height: 15.625rem;
  }

  .case-study__videos {
    clip-path: none;
  }

  .case-study__video-wrap {
    min-width: 21rem;
  }

  .cases-study__text-wrap {
    width: calc(100% - 24.625rem);
  }

  .cases-study__text {
    width: 100%;
  }

  .cases-study__services {
    flex-wrap: wrap;
    white-space: normal;
    row-gap: .25rem;
  }

  .case-study__counts {
    position: absolute;
    top: calc(100% + .75rem);
  }

  .case-study__title,
  .case-study__scroll-svg {
    display: none;
  }
}

@media screen and (max-width: 767px) {
  .cases-study__services {
    font-size: .625rem;
    line-height: 1.1875rem;
  }
}

@keyframes scroll-wheel {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(0.3rem);
  }
}

.scroll-hint__wheel {
  animation: scroll-wheel 1.35s cubic-bezier(.76, 0, .24, 1) infinite alternate;
}

/* Set by js/global/main.js while the hint is off screen (BACKLOG #78). */
.case-study__scroll-svg.is--paused .scroll-hint__wheel {
  animation-play-state: paused;
}

.case-study__img.is--dimmed {
  filter: brightness(.5);
}
