/* ===== Бесплатные кейсы ===== */
.free {
  --ease-out: cubic-bezier(0.230, 1, 0.320, 1);
  position: relative;
  padding: 18px 12px 16px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(60% 50% at 12% 0%, rgb(var(--accent-rgb) / 0.260), transparent 70%),
    radial-gradient(50% 50% at 100% 100%, #7a2bd640, transparent 70%),
    #17171b;
  box-shadow: inset 0 0 0 1px #ffffff12;
  isolation: isolate;
}
/* косая штриховка */
.free::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(115deg, #ffffff08 0 2px, transparent 2px 30px);
  -webkit-mask: linear-gradient(180deg, #000, transparent 70%);
  mask: linear-gradient(180deg, #000, transparent 70%);
  pointer-events: none;
}
@media (min-width: 761px) {
  .free { padding: 26px 24px 24px; border-radius: 28px; }
}

.free__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
}
.free__title { margin: 0; font: 900 20px/1.200 var(--font-title); }
.free__title em { font-style: normal; color: var(--accent-hi); }
.free__tag {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgb(var(--accent-rgb) / 0.160);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.450);
  font: 900 10px/1 var(--font-title);
  letter-spacing: 0.080em;
  text-transform: uppercase;
  color: var(--accent-hi);
  white-space: nowrap;
}
@media (min-width: 761px) {
  .free__title { font-size: 26px; }
}

.free__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 8px;
  margin-top: 10px;
}
@media (min-width: 900px) {
  .free__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
}

/* ---------- Карточка ---------- */
.fcase {
  --c: #2f8cff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 4px;
}
.fcase__art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 0.920;
}
/* цветное свечение и «пол» под кейсом */
.fcase__art::before {
  content: "";
  position: absolute;
  inset: 12% 8% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, transparent), transparent);
  filter: blur(14px);
  opacity: 0.650;
  transition: opacity 0.350s, transform 0.350s var(--ease-out);
}
.fcase__art::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 4%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #000000b3, transparent);
  transition: transform 0.350s var(--ease-out), opacity 0.350s;
}
.fcase__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px #00000080);
  animation: fcase-float 4.500s ease-in-out infinite alternate;
  animation-delay: var(--dl, 0s);
  transition: scale 0.350s var(--ease-out), rotate 0.350s var(--ease-out);
  pointer-events: none;
  user-select: none;
}
@keyframes fcase-float {
  0% { translate: 0 -4px; }
  100% { translate: 0 5px; }
}

.fcase__name {
  margin: 4px 0 0;
  font: 900 17px/1.200 var(--font-title);
}
.fcase__every {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font: 700 11px/1 var(--font-title);
  color: color-mix(in srgb, var(--c) 45%, #b9b9c2);
}
.fcase__every svg { width: 13px; height: 13px; }
@media (min-width: 761px) {
  .fcase__name { font-size: 20px; }
  .fcase__every { font-size: 12px; }
}

.fcase__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 132px;
  height: 42px;
  margin-top: 12px;
  padding: 0 18px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 80%, #000));
  box-shadow: inset 0 1px 0 #ffffff80, 0 6px 22px color-mix(in srgb, var(--c) 50%, transparent);
  font: 900 14px/1 var(--font-title);
  color: #fff;
  text-shadow: 0 1px 0 #00000059;
  transition: transform 0.150s, filter 0.150s, box-shadow 0.250s;
}
.fcase__btn svg { width: 16px; height: 16px; }
.fcase__btn::after { /* растягиваем зону клика на всю карточку */
  content: "";
  position: absolute;
  inset: 0;
}
.fcase__btn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 30%;
  background: linear-gradient(100deg, transparent, #ffffff73, transparent);
  transform: skewX(-20deg);
  animation: login-shine 3.800s ease-in-out infinite;
  animation-delay: var(--dl, 0s);
}
.fcase__btn:active { transform: translateY(1px); }
.fcase__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.fcase__hit { position: absolute; inset: 0; z-index: 2; border-radius: 18px; }
.fcase__hit:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }

@media (hover: hover) {
  .fcase:hover .fcase__img { scale: 1.070; rotate: -2deg; }
  .fcase:hover .fcase__art::before { opacity: 1; transform: scale(1.120); }
  .fcase:hover .fcase__art::after { transform: scaleX(0.860); opacity: 0.700; }
  .fcase:hover .fcase__btn { filter: brightness(1.100); box-shadow: inset 0 1px 0 #ffffff80, 0 8px 30px color-mix(in srgb, var(--c) 75%, transparent); }
}

/* ---------- Кейс на откате ---------- */
.fcase.is-wait .fcase__img { filter: grayscale(0.700) brightness(0.650) drop-shadow(0 10px 14px #00000080); animation-play-state: paused; }
.fcase.is-wait .fcase__art::before { opacity: 0.200; }
.fcase.is-wait .fcase__btn {
  background: #ffffff12;
  box-shadow: inset 0 0 0 1px #ffffff1f;
  color: #d6d6dc;
  text-shadow: none;
  font-variant-numeric: tabular-nums;
}
.fcase.is-wait .fcase__btn::before { display: none; }

@media (prefers-reduced-motion: reduce) {
  .fcase__img, .fcase__btn::before { animation: none; }
}

/* подпись с периодом убрана — кнопка чуть ближе к названию */
.fcase__name + .fcase__btn { margin-top: 12px; }
