/* static/css/logo.css — 모션 로고 (원본 src/app/globals.css .tlogo 블록 1:1 이식)
 * 글자별 entrance · color-flash ripple · hover bounce wave
 * "tool"의 첫 'o' 자리 gear(연속 회전) + gear-slot 등장
 * 컬러 토큰(--tlogo-*)은 tokens.css에 정의됨. */

/* Link 컨테이너 — entrance fade-in (tailwind inline-flex/items-center를 CSS로 편입) */
.tlogo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  padding: 4px;
  border-radius: 8px;
  outline: none;
  animation: tlogo-enter 500ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes tlogo-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 워드마크 (원본 tailwind: font-bold text-[18px] tracking-tight leading-none whitespace-nowrap) */
.tlogo-wordmark {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}
.tlogo-word {
  display: inline-flex;
  align-items: center;
  position: relative;
}
.tlogo-space { display: inline-block; width: 0.32em; }

/* ─── 글자 — 외부 wrapper (stagger entrance) ─── */
.tlogo-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px) scale(0.85);
  animation: tlogo-letter-enter 580ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes tlogo-letter-enter {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── 글자 — 내부 wrapper (hover bounce wave) ─── */
.tlogo-letter-fx {
  display: inline-block;
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
              text-shadow 200ms ease;
  transition-delay: calc(var(--i, 0) * 22ms);
}
.tlogo:hover .tlogo-letter-fx { transform: translateY(-4px); }

/* ─── "Technologia" — 글자별 color-flash ripple ─── */
.tlogo-tech .tlogo-letter-fx {
  color: var(--text-primary);
  animation: tlogo-tech-flash 6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -540ms);
}
@keyframes tlogo-tech-flash {
  0%, 16%, 100% { color: var(--text-primary); text-shadow: none; }
  4%  { color: var(--tlogo-c2); text-shadow: 0 0 12px var(--tlogo-glow); }
  9%  { color: var(--tlogo-c3); text-shadow: 0 0 6px var(--tlogo-glow); }
}
.tlogo:hover .tlogo-tech .tlogo-letter-fx { animation-duration: 2.4s; }

/* ─── "tool" — accent 컬러 + 글로우 펄스 ─── */
.tlogo-tool { margin-left: 1px; }
.tlogo-tool .tlogo-letter-fx {
  color: var(--accent);
  animation: tlogo-tool-pulse 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -180ms);
}
@keyframes tlogo-tool-pulse {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50%      { text-shadow: 0 0 10px var(--tlogo-glow); }
}
.tlogo:hover .tlogo-tool .tlogo-letter-fx { animation-duration: 1s; }

/* ─── 아이콘 등장 키프레임 (gear-slot 공용) ─── */
@keyframes tlogo-icon-enter {
  to { opacity: 1; transform: scale(1) rotate(0); }
}

/* ─── "tool"의 'o' 자리 gear ─── */
.tlogo-gear-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.92em;
  margin: 0 1px;
  color: var(--accent);
  opacity: 0;
  transform: scale(0) rotate(120deg);
  animation: tlogo-icon-enter 620ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.tlogo-gear {
  display: block;
  width: 0.92em;
  height: 0.92em;
  transform-origin: 50% 50%;
  animation: tlogo-spin 4.5s linear infinite;
  filter: drop-shadow(0 0 5px var(--tlogo-glow));
}
.tlogo:hover .tlogo-gear { animation-duration: 1.2s; }
@keyframes tlogo-spin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

/* 포커스 가시성 */
.tlogo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 모션 줄이기 — 모든 무한/엔트런스 모션 정지 */
@media (prefers-reduced-motion: reduce) {
  .tlogo,
  .tlogo-letter,
  .tlogo-letter-fx,
  .tlogo-tech .tlogo-letter-fx,
  .tlogo-tool .tlogo-letter-fx,
  .tlogo-gear-slot,
  .tlogo-gear {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
