/* Блок «Следующий кейс» */
.case-next-wrap {
  width: 100%;
  background-color: #f3f0f8;
  background-image: url('../assets/images/case-next-fon.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 16px;
}

.case-next {
  width: 100%;
  max-width: 1159px;
  margin: 0 auto;
  padding: 64px 0 74px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.case-next__label {
  display: block;
  margin: 0 0 16px;
  font-size: 24px;  
  font-weight: 500;
  line-height: 100%;
  letter-spacing: -0.03em;
  color: #A699BF;

}

.case-next__title {
  font-size: 72px;
  font-weight: 800;
  line-height: 100%;
  letter-spacing: -0.03em;
  color: #262626;
  margin-bottom: 24px;
}


.case-next__timer {
  position: relative;
  width: 77px;
  height: 77px;
  cursor: pointer;
  background: #F1EBFF;
  border-radius: 50%;
  margin-bottom: 24px;
}

.case-next__timer-ring {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  transform: scaleX(-1) rotate(-90deg);
}

.case-next__timer-track,
.case-next__timer-progress {
  fill: none;
  stroke-width: 6;
}

.case-next__timer-track {
  stroke: #F1EBFF;
}

.case-next__timer-progress {
  stroke: #8249F2;
  stroke-linecap: round;
}

.case-next__timer-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  line-height: 100%;
  letter-spacing: -0.03em;
  color: #8249F2;
}

.case-next__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.case-next__tag {
  font-size: 24px;
  font-weight: 800;
  color: #8249F2;
  background: #F1EBFF;
  border-radius: 100px;
  padding: 18px 32px;
  letter-spacing: -0.03em;
  line-height: 100%;
}

.case-next__preview {
  display: block;
  width: 100%;
  max-width: 901px;
  text-decoration: none;
  margin-bottom: 13px;
}

.case-next__preview img {
  width: 100%;
  height: auto;
  display: block;
}

.case-next__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #8249F2;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 100%;
  text-decoration: none;
  border-radius: 100px;
  padding: 24px 32px;
  transition: opacity .2s;
}

.case-next__btn:hover {
  opacity: .88;
  color: #fff;
}


@media (min-width: 651px) and (max-width: 1344px) {

  .case-next {
    max-width: 634px;
  }

  .case-next__label {
    font-size: 24px;
  }

  .case-next__title {
    font-size: 56px;
  }

  .case-next__timer {
    width: 65px;
    height: 65px;
    margin-top: 5px;
    margin-bottom: 30px;
  }

  .case-next__timer-value {
    font-size: 18px;
  }

  .case-next__tag {
    font-size: 18px;
    padding: 18px 24px;
  }

  .case-next__preview {
    max-width: 562px;
  }

}

@media (max-width: 650px) {

  .case-next {
    max-width: 320px;
    padding: 48px 0 23px 0;
  }

  .case-next__label {
    font-size: 18px;
    margin: 0 0 12px;
  }

  .case-next__title {
    font-size: 36px;
    margin-bottom: 21px;
  }

  .case-next__timer {
    width: 41px;
    height: 41px;
  }

  .case-next__timer-value {
    font-size: 14px;
  }

  .case-next__tags{
    gap: 10px;
    margin-bottom: 25px;
  }

  .case-next__tag {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 43px;
    font-size: 14px;
    padding: 12px 16px;
  }

  .case-next__preview {
    max-width: 320px;
    margin-bottom: 25px;
  }

  .case-next__btn{
    height: 54px;
    padding: 0 28px;
    font-size: 16px;
  }

}

/* Переход к следующему кейсу (по мотивам chipsa next-page-transitioner) */
.case-page {
  transform-origin: 50% 100%;
  will-change: transform;
}

.case-page.is-leaving {
  transform: translate3d(0, var(--case-leave-offset, 0), 0) scale(0.85);
  filter: brightness(0.72);
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
    filter 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.case-page-toner {
  position: fixed;
  inset: 0;
  z-index: 199;
  pointer-events: none;
  opacity: 0;
  background: #000;
  transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.case-page-toner.is-visible {
  opacity: 0.55;
}

.case-page-curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  background: #f3f0f8;
  transition: opacity 0.6s ease;
}

.case-page-curtain.is-visible {
  opacity: 1;
}

html.is-case-leaving {
  background: #1a1a1a;
}

html.is-case-leaving .header,
html.is-case-leaving .footer {
  pointer-events: none;
  filter: brightness(0.72);
  transition: filter 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

html.is-case-entering .case-page {
  opacity: 0;
  transform: scale(1.02);
}

html.is-case-entering.is-case-enter-ready .case-page {
  opacity: 1;
  transform: none;
  transition: opacity 1s cubic-bezier(0.215, 0.61, 0.355, 1),
    transform 1s cubic-bezier(0.215, 0.61, 0.355, 1);
}