html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.cx-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #17141a;
  text-decoration: none;
  transform: scale(1);
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cx-btn:hover {
  transform: scale(1.06);
  border-color: #2f6df6;
}

.cx-btn__arrow {
  position: absolute;
  width: 16px;
  height: 16px;
  border-top: 2px solid #2f6df6;
  border-right: 2px solid #2f6df6;
  transform: rotate(45deg);
}

.cx-btn__arrow--a {
  opacity: 1;
  transform: rotate(45deg) translateX(0);
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cx-btn__arrow--b {
  opacity: 0;
  transform: rotate(45deg) translateX(-16px);
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cx-btn:hover .cx-btn__arrow--a {
  opacity: 0;
  transform: rotate(45deg) translateX(16px);
}

.cx-btn:hover .cx-btn__arrow--b {
  opacity: 1;
  transform: rotate(45deg) translateX(0);
}

.cx-btn__trail {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2f6df6;
  opacity: 0;
}

@keyframes cx-trail-a-hover {
  0% {
    opacity: 0;
    transform: translateX(0) rotate(45deg);
  }
  50% {
    opacity: 0.4;
    transform: translateX(10px) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: translateX(16px) rotate(45deg);
  }
}
@keyframes cx-trail-b-hover {
  0% {
    opacity: 0;
    transform: translateX(-16px) rotate(45deg);
  }
  50% {
    opacity: 0.4;
    transform: translateX(-4px) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: translateX(0) rotate(45deg);
  }
}
.cx-btn:hover .cx-btn__trail--a {
  animation: cx-trail-a-hover 280ms ease-out forwards;
}

.cx-btn:hover .cx-btn__trail--b {
  animation: cx-trail-b-hover 280ms ease-out forwards;
}

@keyframes cx-btn-scale {
  0%, 20% {
    transform: scale(1);
    border-color: #17141a;
  }
  50%, 70% {
    transform: scale(1.06);
    border-color: #2f6df6;
  }
  100% {
    transform: scale(1);
    border-color: #17141a;
  }
}
@keyframes cx-arrow-a {
  0%, 20% {
    opacity: 1;
    transform: rotate(45deg) translateX(0);
  }
  50%, 70% {
    opacity: 0;
    transform: rotate(45deg) translateX(16px);
  }
  100% {
    opacity: 1;
    transform: rotate(45deg) translateX(0);
  }
}
@keyframes cx-arrow-b {
  0%, 20% {
    opacity: 0;
    transform: rotate(45deg) translateX(-16px);
  }
  50%, 70% {
    opacity: 1;
    transform: rotate(45deg) translateX(0);
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translateX(-16px);
  }
}
@keyframes cx-trail-a-loop {
  0%, 20% {
    opacity: 0;
    transform: translateX(0) rotate(45deg);
  }
  40% {
    opacity: 0.4;
    transform: translateX(10px) rotate(45deg);
  }
  50%, 70% {
    opacity: 0;
    transform: translateX(16px) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: translateX(0) rotate(45deg);
  }
}
@keyframes cx-trail-b-loop {
  0%, 20% {
    opacity: 0;
    transform: translateX(-16px) rotate(45deg);
  }
  55% {
    opacity: 0.4;
    transform: translateX(-4px) rotate(45deg);
  }
  70%, 100% {
    opacity: 0;
    transform: translateX(0) rotate(45deg);
  }
}
.cx-btn.is-demo {
  animation: cx-btn-scale 2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.cx-btn.is-demo .cx-btn__arrow--a {
  animation: cx-arrow-a 2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.cx-btn.is-demo .cx-btn__arrow--b {
  animation: cx-arrow-b 2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.cx-btn.is-demo .cx-btn__trail--a {
  animation: cx-trail-a-loop 2s ease-out infinite;
}

.cx-btn.is-demo .cx-btn__trail--b {
  animation: cx-trail-b-loop 2s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cx-btn,
  .cx-btn.is-demo,
  .cx-btn__arrow--a,
  .cx-btn__arrow--b,
  .cx-btn.is-demo .cx-btn__arrow--a,
  .cx-btn.is-demo .cx-btn__arrow--b {
    animation: none !important;
    transition: none !important;
  }
  .cx-btn {
    transform: scale(1) !important;
    border-color: #17141a !important;
  }
  .cx-btn__arrow--a {
    opacity: 1 !important;
    transform: rotate(45deg) translateX(0) !important;
  }
  .cx-btn__arrow--b {
    opacity: 0 !important;
    transform: rotate(45deg) translateX(-16px) !important;
  }
  .cx-btn__trail,
  .cx-btn:hover .cx-btn__trail,
  .cx-btn.is-demo .cx-btn__trail {
    animation: none !important;
    opacity: 0 !important;
  }
}
