/* mosaic-reset: uiverse 컴포넌트 공통 전제 (box-sizing + 기본 sans-serif) */
*, *::before, *::after { box-sizing: border-box; }
:where(body) { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

body {
  height: 100vh;
  font-family: "Titan One", sans-serif;
  background: #ffd;
}

.btns {
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: fit-content;
  margin: 19vh auto;
}

.btn {
  text-decoration: none;
  width: 8em;
  height: 3em;
  display: block;
  box-sizing: border-box;
  opacity: 0;
  animation: entrance 0.85s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
  /* 원본은 CSS sibling-index()로 stagger를 줬으나(실험적 기능), 호환성을 위해 nth-child로 구현 */
  animation-delay: calc((sibling-index() - 1) * 0.1s);
}

/* sibling-index() 미지원 브라우저용 폴백 — 동일 0.1s 간격 stagger */
.btn:nth-child(1) { animation-delay: 0s; }
.btn:nth-child(2) { animation-delay: 0.1s; }
.btn:nth-child(3) { animation-delay: 0.2s; }
.btn:nth-child(4) { animation-delay: 0.3s; }

.btn span {
  display: block;
  max-width: 100%;
  background: #023;
  padding: 1em;
  text-align: center;
  color: #ffe;
  font-size: 1em;
  box-shadow: 4px 4px 0 #000;
  corner-shape: squircle;
  border-radius: 20px;
  transition: all 0.2s cubic-bezier(0.7, -0.35, 0.27, 1.55);
  pointer-events: none;
}

.btn:hover span {
  box-shadow: 4px 4px 0 #000, 0 0 0 3px #ffe inset;
  font-size: 1.2em;
  background: #185;
  color: #fff;
  animation: squish 0.1s 1 ease-in forwards;
}

@keyframes squish {
  0%   { transform: scale(1.2, 0.58) rotate(-5deg); }
  100% { transform: scale(1, 1) rotate(-4deg); }
}

@keyframes entrance {
  0%   { opacity: 0; transform: translateY(50px); }
  100% { opacity: 1; transform: translateY(0); }
}
