.kf-howitworks-section {
  position: relative;
  padding: 30px 0 26px;
  background: #ffffff;
  overflow: hidden;
}

.kf-howitworks-head {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 18px;
}

.kf-howitworks-badge,
.kf-howitworks-title,
.kf-howitworks-subtitle {
  opacity: 0;
  will-change: transform, opacity;
}

.kf-howitworks-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef8ff 0%, #dff2ff 100%);
  border: 2px solid rgba(51, 176, 254, 0.20);
  color: #1484d2;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 20px rgba(51, 176, 254, 0.10);
  transform: scale(0.6);
}

.kf-howitworks-title {
  margin: 12px 0 10px;
  color: #24324a;
  font-family: 'Baloo 2', cursive;
  font-size: 31px;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.5px;
  transform: scale(0.8) translateY(20px);
}

.kf-howitworks-subtitle {
  margin: 0 auto;
  max-width: 325px;
  color: #66748a;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  transform: translateY(16px);
}

.kf-howitworks-video-wrap {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

.kf-howitworks-video-frame {
  position: relative;
  width: 100%;
  max-width: 390px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 2px solid rgba(51, 176, 254, 0.10);
  box-shadow:
    0 16px 34px rgba(36, 50, 74, 0.08),
    0 6px 14px rgba(36, 50, 74, 0.05);
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  will-change: transform, opacity;
}

.kf-howitworks-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #f4f8fb;
}

.kf-howitworks-video-frame::before {
  content: "";
  position: absolute;
  inset: auto auto 14px 14px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255, 213, 74, 0.18);
  z-index: 2;
  pointer-events: none;
}

.kf-howitworks-video-frame::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: rgba(51, 176, 254, 0.12);
  z-index: 2;
  pointer-events: none;
}

/* animações quando entra na tela */
.kf-howitworks-section.is-visible .kf-howitworks-badge {
  animation: kfElasticIn 0.8s cubic-bezier(.34,1.56,.64,1) forwards;
}

.kf-howitworks-section.is-visible .kf-howitworks-title {
  animation: kfPopBounce 0.9s cubic-bezier(.34,1.56,.64,1) forwards;
  animation-delay: 0.14s;
}

.kf-howitworks-section.is-visible .kf-howitworks-subtitle {
  animation: kfSoftRise 0.8s ease forwards;
  animation-delay: 0.28s;
}

.kf-howitworks-section.is-visible .kf-howitworks-video-frame {
  animation: kfVideoReveal 0.9s ease forwards;
  animation-delay: 0.38s;
}

/* decoração */
.kf-howitworks-decor,
.kf-howitworks-star {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.kf-howitworks-decor {
  border-radius: 999px;
  opacity: 0.95;
}

.kf-howitworks-decor--1 {
  top: 78px;
  left: 26px;
  width: 10px;
  height: 10px;
  background: #ffd54a;
  animation: kfDecorFloat 4.5s ease-in-out infinite;
}

.kf-howitworks-decor--2 {
  top: 126px;
  right: 34px;
  width: 12px;
  height: 12px;
  background: #33b0fe;
  animation: kfDecorFloat 5.2s ease-in-out infinite;
}

.kf-howitworks-star--1 {
  top: 210px;
  right: 26px;
  color: #ffd54a;
  font-size: 14px;
  text-shadow: 0 6px 12px rgba(255, 213, 74, 0.24);
  animation: kfTwinkleHow 3s ease-in-out infinite;
}

/* keyframes */
@keyframes kfElasticIn {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  60% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes kfPopBounce {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  60% {
    opacity: 1;
    transform: scale(1.05) translateY(-6px);
  }
  82% {
    opacity: 1;
    transform: scale(0.985) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes kfSoftRise {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kfVideoReveal {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes kfDecorFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes kfTwinkleHow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.14);
    opacity: 0.68;
  }
}

/* desktop */
@media (min-width: 768px) {
  .kf-howitworks-section {
    padding: 44px 0 38px;
  }

  .kf-howitworks-head {
    margin-bottom: 22px;
  }

  .kf-howitworks-title {
    font-size: 46px;
  }

  .kf-howitworks-subtitle {
    max-width: 560px;
    font-size: 15px;
  }

  .kf-howitworks-video-frame {
    max-width: 460px;
    border-radius: 28px;
  }
}
.kf-howitworks-section {
  padding: 22px 0 12px;
}

.kf-howitworks-head {
  margin: 0 auto 14px;
}

.kf-howitworks-title {
  font-size: 24px;
  line-height: 1.02;
  margin: 10px 0 8px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.kf-howitworks-subtitle {
  max-width: 300px;
  font-size: 12px;
  line-height: 1.5;
}

.kf-howitworks-video-wrap {
  padding: 0 20px;
}

.kf-howitworks-video-frame {
  max-width: 335px;
  border-radius: 22px;
}