.motion-showcase {
  padding: 72px 0;
  border-top: 1px solid var(--border);
  background:
    linear-gradient(rgba(23, 21, 19, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 19, 0.035) 1px, transparent 1px),
    #fffaf2;
  background-size: 28px 28px;
}

.motion-showcase .section-head {
  align-items: end;
}

.motion-pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.motion-pet-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(39, 31, 18, 0.07);
}

.motion-pet-card::before {
  content: "";
  position: absolute;
  inset: -35% -20% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pet-accent, #1b9a8a) 18%, transparent);
  filter: blur(2px);
  opacity: 0.75;
}

.motion-pet-card:hover .motion-pet {
  transform: translateY(-4px) scale(1.02);
}

.motion-pet-card:hover .motion-pet-stage::after {
  transform: translateX(-50%) scaleX(0.82);
  opacity: 0.48;
}

.motion-pet-stage {
  position: relative;
  display: grid;
  min-height: 270px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #fffdf8 0%, #f8f2e8 100%);
  background-size: 24px 24px, 24px 24px, auto;
}

.motion-pet-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 42px;
  width: 118px;
  height: 18px;
  border-radius: 50%;
  background: rgba(23, 21, 19, 0.12);
  filter: blur(3px);
  transform: translateX(-50%);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.motion-pet-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.motion-pet-card h2,
.motion-detail-copy h1 {
  margin: 0;
}

.motion-pet-card p,
.motion-detail-copy p {
  margin: 0;
  color: var(--muted);
}

.motion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.motion-tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--pet-accent, #1b9a8a) 28%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--pet-accent, #1b9a8a) 10%, #fff);
  color: #57493b;
  font-family: var(--font-mono);
  font-size: 11px;
}

.motion-pet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.motion-pet {
  --pet-accent: #1b9a8a;
  --pet-secondary: #f2cf6a;
  --pet-alert: #d97918;
  position: relative;
  width: 166px;
  height: 188px;
  image-rendering: pixelated;
  transition: transform 0.22s ease;
  animation: motion-idle 2.6s ease-in-out infinite;
}

.motion-pet.small {
  width: 132px;
  height: 150px;
}

.motion-pet.large {
  width: 166px;
  height: 188px;
  scale: 1.86;
}

.pet-ear,
.pet-ear::after,
.pet-body,
.pet-face,
.pet-core,
.pet-mouth,
.pet-eye,
.pet-arm,
.pet-foot,
.pet-tail,
.pet-chip,
.pet-antenna,
.pet-bubble,
.pet-spark,
.pet-wing,
.pet-flame,
.pet-cursor,
.pet-orbit {
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.pet-ear {
  top: 22px;
  width: 48px;
  height: 58px;
  border: 8px solid #171513;
  background: var(--pet-secondary);
}

.pet-ear.left {
  left: 18px;
  clip-path: polygon(0 0, 100% 86%, 0 100%);
}

.pet-ear.right {
  right: 18px;
  clip-path: polygon(100% 0, 100% 100%, 0 86%);
}

.pet-body {
  left: 34px;
  top: 42px;
  width: 98px;
  height: 112px;
  border: 16px solid #171513;
  border-radius: 48% 48% 44% 44%;
  background: #fffaf2;
}

.pet-face {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 62px;
  border: 13px solid #171513;
  border-radius: 50%;
  background: #fffaf2;
  transform: translate(-50%, -50%);
}

.pet-core {
  left: 50%;
  top: 50%;
  width: 22px;
  height: 28px;
  border-radius: 8px;
  background: #fffaf2;
  transform: translate(-50%, -50%);
}

.pet-mouth {
  left: 50%;
  top: 116px;
  width: 44px;
  height: 8px;
  border-radius: 999px;
  background: var(--pet-accent);
  transform: translateX(-50%);
  animation: motion-mouth 1.8s steps(2) infinite;
}

.pet-eye {
  top: 70px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #171513;
  animation: motion-blink 4s steps(1) infinite;
}

.pet-eye.left { left: 68px; }
.pet-eye.right { right: 68px; }

.pet-arm {
  top: 126px;
  width: 54px;
  height: 52px;
  border: 6px solid #171513;
  border-top: 0;
  border-radius: 0 0 38px 38px;
  transform-origin: 50% 0;
}

.pet-arm.left {
  left: 12px;
  transform: rotate(18deg);
  animation: motion-arm-left 2.2s ease-in-out infinite;
}

.pet-arm.right {
  right: 12px;
  transform: rotate(-18deg);
  animation: motion-arm-right 2.2s ease-in-out infinite;
}

.pet-arm::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 20px;
  height: 20px;
  border: 5px solid #171513;
  border-radius: 50%;
  background: var(--pet-secondary);
  transform: translateX(-50%);
}

.pet-foot {
  bottom: 8px;
  width: 34px;
  height: 21px;
  border: 7px solid #171513;
  border-radius: 9px;
  background: var(--pet-secondary);
  animation: motion-feet 2.4s ease-in-out infinite;
}

.pet-foot.left { left: 54px; }
.pet-foot.right { right: 54px; animation-delay: -1.2s; }

.pet-chip {
  right: 33px;
  top: 74px;
  width: 18px;
  height: 18px;
  border: 6px solid #171513;
  border-radius: 4px;
  background: #70d6c8;
  animation: motion-chip 1.5s steps(2) infinite;
}

.pet-tail {
  right: 28px;
  bottom: 42px;
  width: 22px;
  height: 16px;
  background: var(--pet-alert);
  animation: motion-tail 1.9s ease-in-out infinite;
}

.pet-antenna {
  left: 50%;
  top: 4px;
  width: 8px;
  height: 32px;
  border-radius: 99px;
  background: #171513;
  transform: translateX(-50%);
}

.pet-antenna::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 18px;
  height: 18px;
  border: 5px solid #171513;
  border-radius: 50%;
  background: var(--pet-accent);
  transform: translateX(-50%);
  animation: motion-beacon 1.2s steps(2) infinite;
}

.pet-bubble {
  right: -24px;
  top: 36px;
  min-width: 54px;
  padding: 6px 8px;
  border: 5px solid #171513;
  border-radius: 10px;
  background: #fffdf8;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  animation: motion-bubble 2.8s ease-in-out infinite;
}

.pet-bubble::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -11px;
  width: 14px;
  height: 14px;
  border-left: 5px solid #171513;
  border-bottom: 5px solid #171513;
  background: #fffdf8;
  transform: rotate(-35deg);
}

.pet-spark {
  width: 14px;
  height: 14px;
  background: var(--pet-alert);
  box-shadow: 28px -20px 0 var(--pet-accent), -24px 18px 0 var(--pet-secondary);
  animation: motion-spark 1.4s steps(2) infinite;
}

.pet-spark.one {
  left: 18px;
  top: 30px;
}

.pet-wing {
  top: 86px;
  width: 40px;
  height: 48px;
  border: 7px solid #171513;
  background: color-mix(in srgb, var(--pet-accent) 28%, #fff);
  animation: motion-wing 0.7s ease-in-out infinite;
}

.pet-wing.left {
  left: -10px;
  border-radius: 80% 20% 80% 20%;
  transform-origin: right center;
}

.pet-wing.right {
  right: -10px;
  border-radius: 20% 80% 20% 80%;
  transform-origin: left center;
  animation-delay: -0.35s;
}

.pet-flame {
  left: 50%;
  bottom: -8px;
  width: 42px;
  height: 48px;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(#f2cf6a, #d97918 68%, transparent 70%);
  transform: translateX(-50%);
  animation: motion-flame 0.18s steps(2) infinite;
  z-index: -1;
}

.pet-cursor {
  left: 34px;
  top: 28px;
  width: 18px;
  height: 42px;
  background: #171513;
  animation: motion-cursor 0.9s steps(2) infinite;
}

.pet-orbit {
  left: 50%;
  top: 50%;
  width: 170px;
  height: 170px;
  border: 2px dashed color-mix(in srgb, var(--pet-accent) 55%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: motion-orbit 6s linear infinite;
}

.pet-orbit::before,
.pet-orbit::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 4px solid #171513;
  border-radius: 50%;
  background: var(--pet-secondary);
}

.pet-orbit::before { left: 8px; top: 18px; }
.pet-orbit::after { right: 10px; bottom: 18px; }

.motion-pet.effect-hop { animation-name: motion-hop; }
.motion-pet.effect-glitch .pet-body { animation: motion-glitch 2.8s steps(1) infinite; }
.motion-pet.effect-scan .pet-chip { animation: motion-scan 1.2s linear infinite; }
.motion-pet.effect-alert .pet-chip,
.motion-pet.effect-alert .pet-mouth { background: #d64c3b; }
.motion-pet.effect-alert { animation: motion-alert 0.34s steps(2) infinite; }
.motion-pet.effect-drift { animation-name: motion-drift; animation-duration: 3.8s; }
.motion-pet.effect-rocket { animation-name: motion-rocket; animation-duration: 1.4s; }

.motion-detail {
  padding: 64px 0;
  background:
    radial-gradient(circle at 72% 18%, color-mix(in srgb, var(--detail-accent, #1b9a8a) 16%, transparent), transparent 30%),
    linear-gradient(180deg, #fffaf2 0%, #f6efe2 100%);
  border-bottom: 1px solid var(--border);
}

.motion-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.motion-detail-stage {
  display: grid;
  min-height: 480px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 21, 19, 0.045) 1px, transparent 1px),
    #fffdf8;
  background-size: 26px 26px;
  overflow: hidden;
}

.motion-detail-copy {
  display: grid;
  gap: 18px;
}

.motion-detail-copy h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.96;
}

.motion-states {
  padding: 72px 0;
}

.motion-state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.motion-state-card {
  display: grid;
  gap: 10px;
  min-height: 140px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.motion-state-card strong {
  font-size: 20px;
}

@keyframes motion-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes motion-hop {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-20px) scale(0.98, 1.03); }
  62% { transform: translateY(2px) scale(1.04, 0.96); }
}

@keyframes motion-drift {
  0%, 100% { transform: translate(0, 0) rotate(-1deg); }
  33% { transform: translate(9px, -10px) rotate(2deg); }
  66% { transform: translate(-8px, -4px) rotate(-2deg); }
}

@keyframes motion-rocket {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

@keyframes motion-alert {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@keyframes motion-mouth {
  0%, 100% { transform: translateX(-50%) scaleX(1); }
  50% { transform: translateX(-50%) scaleX(0.62); }
}

@keyframes motion-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.1); }
}

@keyframes motion-arm-left {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(2deg); }
}

@keyframes motion-arm-right {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(-2deg); }
}

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

@keyframes motion-chip {
  0%, 100% { background: #70d6c8; }
  50% { background: var(--pet-secondary); }
}

@keyframes motion-tail {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-12deg); }
}

@keyframes motion-beacon {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pet-accent) 40%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--pet-accent) 0%, transparent); }
}

@keyframes motion-bubble {
  0%, 100% { transform: translateY(0); opacity: 0.92; }
  50% { transform: translateY(-6px); opacity: 1; }
}

@keyframes motion-spark {
  0%, 100% { opacity: 0.24; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes motion-wing {
  0%, 100% { transform: rotate(10deg); }
  50% { transform: rotate(-12deg); }
}

@keyframes motion-flame {
  0%, 100% { transform: translateX(-50%) scaleY(0.72); }
  50% { transform: translateX(-50%) scaleY(1); }
}

@keyframes motion-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes motion-orbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes motion-glitch {
  0%, 92%, 100% { filter: none; transform: translate(0); }
  93% { filter: drop-shadow(4px 0 #70d6c8) drop-shadow(-4px 0 #d64c3b); transform: translate(-2px, 1px); }
  95% { filter: drop-shadow(-3px 0 #f2cf6a) drop-shadow(3px 0 #70d6c8); transform: translate(2px, -1px); }
}

@keyframes motion-scan {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pet-accent) 48%, transparent); }
  50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--pet-accent) 0%, transparent); }
}

@media (max-width: 820px) {
  .motion-detail-layout {
    grid-template-columns: 1fr;
  }

  .motion-detail-stage {
    min-height: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-pet,
  .motion-pet *,
  .motion-pet-stage::after {
    animation: none !important;
    transition: none !important;
  }
}
