/* Umo mascot — theme tokens + motion (landing). Raster poses; path classes await vector SVGs. */

.umo {
  --umo-body: #d8ff65;
  --umo-antenna: #d8ff65;
  --umo-face: #0b0d0a;
  --umo-accent: #8b7cff;
  --umo-arm: color-mix(in srgb, var(--umo-body), black 12%);
  position: relative;
  display: inline-grid;
  width: var(--umo-size, 96px);
  height: var(--umo-size, 96px);
  place-items: center;
  flex: none;
  line-height: 0;
  color: var(--umo-body);
  user-select: none;
  -webkit-user-select: none;
}

html[data-theme='light'] .umo,
:root[data-theme='light'] .umo {
  --umo-body: var(--lime, #657f2d);
  --umo-antenna: #1a1f14;
  --umo-face: #1a1f14;
  --umo-accent: #6b5ce7;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme='dark']) .umo {
    --umo-body: var(--lime, #657f2d);
    --umo-antenna: #1a1f14;
    --umo-face: #1a1f14;
    --umo-accent: #6b5ce7;
  }
}

.umo-float {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.umo[data-pose='idle'] .umo-float {
  animation: umo-bob 3s ease-in-out infinite;
}

.umo-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.umo-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
}

.umo-layer.is-on {
  opacity: 1;
}

.umo-layer svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.umo-layer svg .umo-body { fill: var(--umo-body); }
.umo-layer svg .umo-arm { fill: var(--umo-arm); }
.umo-layer svg .umo-face { fill: var(--umo-face); }
.umo-layer svg .umo-antenna { fill: var(--umo-antenna); }
.umo-layer svg .umo-accent { fill: var(--umo-accent); }

.umo-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  width: 14%;
  height: 14%;
  margin-left: -7%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--umo-accent) 55%, transparent), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.umo[data-pose='idle'] .umo-glow {
  opacity: 0.55;
  transform-origin: 50% 120%;
  animation: umo-antenna-sway 2.4s ease-in-out infinite;
}

.umo[data-pose='think'] .umo-glow {
  opacity: 0.9;
  animation: umo-antenna-glow 1.4s ease-in-out infinite;
}

.umo[data-pose='produce'] .umo-glow {
  opacity: 0.75;
  animation: umo-antenna-spin 4.5s linear infinite;
}

.umo-props {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

.umo-props span {
  position: absolute;
  font: 700 11px/1 var(--display, 'Manrope', sans-serif);
  color: var(--umo-antenna);
  opacity: 0;
}

.umo[data-pose='sleep'] .umo-z {
  opacity: 0.85;
  animation: umo-z-rise 2.8s ease-out infinite;
}

.umo[data-pose='sleep'] .umo-z:nth-child(1) { left: 68%; top: 22%; font-size: 10px; animation-delay: 0s; }
.umo[data-pose='sleep'] .umo-z:nth-child(2) { left: 74%; top: 14%; font-size: 13px; animation-delay: 0.7s; }
.umo[data-pose='sleep'] .umo-z:nth-child(3) { left: 80%; top: 6%; font-size: 16px; animation-delay: 1.4s; }

.umo[data-pose='success'] .umo-confetti {
  opacity: 1;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--umo-accent);
  animation: umo-confetti 1.1s ease-out infinite;
}

.umo[data-pose='success'] .umo-confetti:nth-child(1) { left: 18%; top: 28%; background: var(--umo-body); animation-delay: 0s; }
.umo[data-pose='success'] .umo-confetti:nth-child(2) { left: 78%; top: 22%; background: #ff8fab; animation-delay: 0.15s; }
.umo[data-pose='success'] .umo-confetti:nth-child(3) { left: 12%; top: 48%; background: var(--umo-accent); animation-delay: 0.3s; }
.umo[data-pose='success'] .umo-confetti:nth-child(4) { left: 86%; top: 42%; background: var(--umo-body); animation-delay: 0.45s; }
.umo[data-pose='success'] .umo-confetti:nth-child(5) { left: 50%; top: 10%; background: #ffd166; animation-delay: 0.2s; }

.umo[data-pose='listen'] .umo-note {
  opacity: 0.9;
  animation: umo-note-float 2.6s ease-in-out infinite;
  color: var(--umo-accent);
  font-size: 14px;
}

.umo[data-pose='listen'] .umo-note:nth-child(1) { left: 8%; top: 36%; animation-delay: 0s; }
.umo[data-pose='listen'] .umo-note:nth-child(2) { left: 82%; top: 28%; font-size: 11px; animation-delay: 0.8s; }
.umo[data-pose='listen'] .umo-note:nth-child(3) { left: 72%; top: 48%; font-size: 16px; animation-delay: 1.5s; }

.umo-lids {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
}

.umo-lids i {
  position: absolute;
  top: 42%;
  width: 11%;
  height: 3.5%;
  border-radius: 40%;
  background: color-mix(in srgb, var(--umo-body), black 18%);
}

.umo-lids i:first-child { left: 34%; }
.umo-lids i:last-child { right: 34%; left: auto; }

.umo.is-blink .umo-lids {
  opacity: 1;
}

@keyframes umo-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes umo-antenna-sway {
  0%, 100% { transform: rotate(-6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-1px); }
}

@keyframes umo-antenna-glow {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes umo-antenna-spin {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.05); }
}

@keyframes umo-z-rise {
  0% { transform: translateY(0) scale(0.85); opacity: 0; }
  20% { opacity: 0.9; }
  100% { transform: translateY(-18px) scale(1.15); opacity: 0; }
}

@keyframes umo-confetti {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(var(--cx, 12px), var(--cy, -22px)) rotate(140deg); opacity: 0; }
}

.umo[data-pose='success'] .umo-confetti:nth-child(1) { --cx: -16px; --cy: -20px; }
.umo[data-pose='success'] .umo-confetti:nth-child(2) { --cx: 18px; --cy: -16px; }
.umo[data-pose='success'] .umo-confetti:nth-child(3) { --cx: -22px; --cy: 8px; }
.umo[data-pose='success'] .umo-confetti:nth-child(4) { --cx: 20px; --cy: 10px; }
.umo[data-pose='success'] .umo-confetti:nth-child(5) { --cx: 0; --cy: -28px; }

@keyframes umo-note-float {
  0%, 100% { transform: translateY(0) rotate(-8deg); opacity: 0.35; }
  50% { transform: translateY(-10px) rotate(8deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .umo-float,
  .umo-glow,
  .umo-props span,
  .umo-layer {
    animation: none !important;
    transition: none !important;
  }
  .umo[data-pose='idle'] .umo-float {
    transform: none;
  }
}
