.ecosystem-motion {
  width: min(100%, 1240px);
  margin: clamp(64px, 9vw, 128px) auto 0;
}

.motion-intro {
  margin-bottom: clamp(24px, 3.3vw, 44px);
  text-align: center;
}

.motion-intro h2 {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 680;
  line-height: 1.12;
  letter-spacing: -.045em;
}

.motion-intro p {
  margin-top: 12px;
  color: #465762;
  font-size: clamp(15px, 1.42vw, 20px);
}

.motion-grid {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  grid-template-rows: repeat(2, clamp(168px, 18.2vw, 246px));
  gap: clamp(7px, .9vw, 13px);
}

.motion-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 23px;
  background: linear-gradient(158deg, var(--motion-top), var(--motion-bottom));
}

.motion-card > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.motion-identity {
  grid-area: 1 / 1 / 3 / 4;
  --motion-top: #d9f3ff;
  --motion-bottom: #89c7fc;
}
.motion-asset {
  grid-area: 1 / 4 / 2 / 8;
  --motion-top: #d3fff1;
  --motion-bottom: #77dac7;
}
.motion-ticket {
  grid-area: 1 / 8 / 2 / 11;
  --motion-top: #f5dfff;
  --motion-bottom: #d6a5f5;
}
.motion-chat {
  grid-area: 1 / 11 / 2 / 14;
  --motion-top: #ffe7f0;
  --motion-bottom: #f6afd2;
}
.motion-game {
  grid-area: 1 / 14 / 2 / 17;
  --motion-top: #fff4c6;
  --motion-bottom: #ffce74;
}
.motion-tree {
  grid-area: 2 / 4 / 3 / 7;
  --motion-top: #ffe8df;
  --motion-bottom: #ffb493;
}
.motion-story {
  grid-area: 2 / 7 / 3 / 11;
  display: grid;
  place-items: center;
  padding: 14px;
  background: radial-gradient(ellipse at 84% 5%, #644793, #2b3d77 54%, #192f51 100%);
  color: #fff;
  text-align: center;
}
.motion-mining {
  grid-area: 2 / 11 / 3 / 14;
  --motion-top: #f0fbd0;
  --motion-bottom: #b8df7f;
}
.motion-stake {
  grid-area: 2 / 14 / 3 / 17;
  --motion-top: #e2e8ff;
  --motion-bottom: #adb7f8;
}

.motion-brand-token {
  display: block;
  color: #e1f0ff;
  font-size: clamp(36px, 4.65vw, 68px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: .075em;
}

.motion-story h3 {
  margin: 9px 0 0;
  font: 400 clamp(20px, 2.6vw, 38px)/1.1 var(--rv-font-display);
  letter-spacing: -.025em;
}

.motion-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px 2px;
  color: #46535d;
}

.motion-controls p {
  font-size: 12px;
  line-height: 1.55;
}

.motion-controls .motion-toggle {
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #8b9da98f;
  border-radius: 999px;
  background: #fff7;
  font-size: 12px;
}

.motion-toggle:not([hidden]) { display: inline-flex; }
.motion-toggle:hover { background: #fff; }
.motion-toggle .motion-pause-icon,
.motion-toggle[data-playing] .motion-play-icon { display: none; }
.motion-toggle[data-playing] .motion-pause-icon { display: inline; }

.motion-float,
.motion-breathe,
.motion-tree-grow,
.motion-game-walk,
.motion-game-idle {
  transform-box: fill-box;
  transform-origin: center;
}

.motion-float { animation: ecosystem-float 5s ease-in-out infinite alternate; }
.motion-breathe { animation: ecosystem-breathe 4s ease-in-out infinite; }
.motion-flow { stroke-dasharray: 8 126; animation: ecosystem-flow 3.8s linear infinite; }
.motion-flow-right { animation: ecosystem-flow-right 3.5s ease-in-out infinite alternate; }
.motion-flow-left { animation: ecosystem-flow-left 3.5s ease-in-out infinite alternate; }
.motion-appear { animation: ecosystem-appear 5.6s ease-in-out infinite; }
.motion-tree-grow { animation: ecosystem-grow 6s ease-in-out infinite; }
.motion-game-walk { animation: ecosystem-game-walk 5s ease-in-out infinite alternate; }
.motion-game-idle { animation: ecosystem-float 2.4s ease-in-out infinite alternate; }
.motion-name-glow { animation: ecosystem-name-glow 4s ease-in-out infinite; }
.motion-stake-message { animation: ecosystem-stake-message 4s ease-in-out infinite; }
.motion-check-light { animation: ecosystem-check-light 4s ease-in-out infinite; }
.motion-chat-dot { animation: ecosystem-chat-dot 2.5s ease-in-out infinite; }

.ecosystem-motion:not([data-motion-running]) .motion-grid svg *,
.motion-card[data-motion-offscreen] svg * {
  animation-play-state: paused;
}

@keyframes ecosystem-float { from { transform: translateY(-3px); } to { transform: translateY(5px); } }
@keyframes ecosystem-breathe { 0%, 100% { opacity: .72; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.035); } }
@keyframes ecosystem-flow { to { stroke-dashoffset: -134; } }
@keyframes ecosystem-flow-right { to { transform: translateX(114px); } }
@keyframes ecosystem-flow-left { to { transform: translateX(-114px); } }
@keyframes ecosystem-appear { 0%, 15%, 100% { opacity: .45; } 38%, 82% { opacity: 1; } }
@keyframes ecosystem-grow { 0%, 15%, 100% { opacity: .46; transform: scale(.9); } 40%, 80% { opacity: 1; transform: scale(1); } }
@keyframes ecosystem-game-walk { from { transform: translateX(-13px); } to { transform: translateX(13px); } }
@keyframes ecosystem-name-glow { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@keyframes ecosystem-stake-message {
  0%, 15% { transform: translateX(0); opacity: 0; }
  25% { opacity: 1; }
  72% { transform: translateX(54px); opacity: 1; }
  80%, 100% { transform: translateX(54px); opacity: 0; }
}
@keyframes ecosystem-check-light { 0%, 50%, 100% { opacity: .5; } 72%, 88% { opacity: 1; } }
@keyframes ecosystem-chat-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

@media (max-width: 860px) {
  .motion-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(4, 174px);
  }

  .motion-identity { grid-area: 1 / 1 / 3 / 3; }
  .motion-asset { grid-area: 1 / 3 / 2 / 7; }
  .motion-ticket { grid-area: 2 / 3 / 3 / 5; }
  .motion-chat { grid-area: 2 / 5 / 3 / 7; }
  .motion-tree { grid-area: 3 / 1 / 4 / 3; }
  .motion-game { grid-area: 3 / 3 / 4 / 5; }
  .motion-stake { grid-area: 3 / 5 / 4 / 7; }
  .motion-mining { grid-area: 4 / 1 / 5 / 3; }
  .motion-story { grid-area: 4 / 3 / 5 / 7; }
}

@media (max-width: 540px) {
  .motion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, clamp(150px, 42vw, 184px));
  }

  .motion-card { border-radius: 16px; }
  .motion-identity { grid-area: 1 / 1 / 3 / 2; }
  .motion-asset { grid-area: 1 / 2 / 2 / 3; }
  .motion-ticket { grid-area: 2 / 2 / 3 / 3; }
  .motion-chat { grid-area: 3 / 1 / 4 / 2; }
  .motion-tree { grid-area: 3 / 2 / 4 / 3; }
  .motion-game { grid-area: 4 / 1 / 5 / 2; }
  .motion-stake { grid-area: 4 / 2 / 5 / 3; }
  .motion-mining { grid-area: 5 / 1 / 6 / 2; }
  .motion-story { grid-area: 5 / 2 / 6 / 3; padding: 10px; }
  .motion-story h3 { font-size: clamp(17px, 5.3vw, 25px); }
}
