@charset "UTF-8";
html, body {
  margin: 0;
  overflow: hidden;
}

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

@property --idx {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
.gl {
  --idx: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
  border-radius: 16px;
  overflow: hidden;
  background: #241d33;
}

/* 유리 뒤에 깔아 두는 색 얼룩 — 이게 있어야 흐림이 눈에 보인다 */
.gl__blob {
  position: absolute;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  filter: blur(4px);
}

.gl__blob--a {
  top: -40px;
  left: -20px;
  background: radial-gradient(circle, rgba(185, 160, 255, 0.95), rgba(185, 160, 255, 0) 70%);
}

.gl__blob--b {
  bottom: -48px;
  right: -16px;
  background: radial-gradient(circle, rgba(110, 200, 255, 0.9), rgba(110, 200, 255, 0) 70%);
}

.gl__dock {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px) saturate(1.6);
  box-shadow: 0 12px 28px rgba(23, 20, 26, 0.4);
}

.gl__pill {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transform: translateX(calc(var(--idx) * 52px));
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gl__btn {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gl__btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.gl__btn:focus-visible {
  outline: 2px solid #b9a0ff;
  outline-offset: 2px;
}

.gl__btn[aria-current=page] {
  color: #fff;
  transform: translateY(-3px);
}

.gl__cap {
  position: relative;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
}

/* 자동 재생 — 알약이 다섯 칸을 돌고 88% 에 첫 칸으로 복귀 */
.is-demo .gl__pill {
  animation-name: gl-slide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.is-demo .gl__btn {
  animation-name: gl-lift;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

.is-demo .gl__btn:nth-of-type(2) {
  animation-delay: 0.32s;
}

.is-demo .gl__btn:nth-of-type(3) {
  animation-delay: 0.64s;
}

.is-demo .gl__btn:nth-of-type(4) {
  animation-delay: 0.96s;
}

.is-demo .gl__btn:nth-of-type(5) {
  animation-delay: 1.28s;
}

@keyframes gl-slide {
  0%, 12% {
    transform: translateX(0);
  }
  16%, 28% {
    transform: translateX(52px);
  }
  32%, 44% {
    transform: translateX(104px);
  }
  48%, 60% {
    transform: translateX(156px);
  }
  64%, 76% {
    transform: translateX(208px);
  }
  88%, 100% {
    transform: translateX(0);
  }
}
@keyframes gl-lift {
  0% {
    transform: translateY(0);
    color: rgba(255, 255, 255, 0.72);
  }
  4% {
    transform: translateY(-3px);
    color: #fff;
  }
  14% {
    transform: translateY(-3px);
    color: #fff;
  }
  18% {
    transform: translateY(0);
    color: rgba(255, 255, 255, 0.72);
  }
  100% {
    transform: translateY(0);
    color: rgba(255, 255, 255, 0.72);
  }
}
@media (max-width: 340px) {
  .gl {
    padding: 20px 16px;
  }
  .gl__blob {
    width: 120px;
    height: 120px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .gl__pill,
  .is-demo .gl__btn {
    animation-name: none;
  }
  .gl__pill,
  .gl__btn {
    transition: none;
  }
}
