/* RED nodes motion — original loops in the site palette.
   Inspired by studio mograph reels, not a third-party Lottie drop-in. */

.mog {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  pointer-events: none;
}

.card .mog,
.stat-card .mog,
.task-card .mog,
.how-mark .mog,
.section-title-row .mog,
.page-mog {
  pointer-events: auto;
  cursor: pointer;
}

.mog--tiny {
  width: 36px;
  height: 36px;
}

.mog--sm {
  width: 52px;
  height: 52px;
}

.mog--md {
  width: 72px;
  height: 72px;
}

.mog--lg {
  width: 112px;
  height: 112px;
}

.mog--hero {
  width: 168px;
  height: 168px;
}

.mog svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.mog [data-spin] {
  transform-origin: 32px 32px;
  transform-box: view-box;
  animation: mog-rot 11s linear infinite;
}

.mog [data-spin-rev] {
  transform-origin: 32px 32px;
  transform-box: view-box;
  animation: mog-rot 8s linear infinite reverse;
}

.mog [data-orbit] {
  transform-origin: 32px 32px;
  transform-box: view-box;
  animation: mog-rot 4.6s linear infinite;
}

.mog [data-pulse] {
  transform-origin: 32px 32px;
  transform-box: view-box;
  animation: mog-scale 1.8s ease-in-out infinite;
}

.mog [data-bob] {
  animation: mog-bob 2.4s ease-in-out infinite;
}

.mog [data-scan] {
  animation: mog-scan 2.2s ease-in-out infinite;
}

.mog [data-draw] {
  stroke-dasharray: 52;
  stroke-dashoffset: 52;
  animation: mog-draw 2.6s ease-in-out infinite;
}

.mog [data-fillbar] {
  transform-origin: 14px 50%;
  transform-box: fill-box;
  animation: mog-bar 2.4s ease-in-out infinite;
}

.mog [data-fillbar]:nth-of-type(2) { animation-delay: 0.15s; }
.mog [data-fillbar]:nth-of-type(3) { animation-delay: 0.3s; }
.mog [data-fillbar]:nth-of-type(4) { animation-delay: 0.45s; }

.mog [data-step] {
  transform-origin: 32px 32px;
  transform-box: view-box;
  animation: mog-step 3.2s steps(4) infinite;
}

.mog [data-packet] {
  offset-path: path("M12 32 H52");
  offset-rotate: 0deg;
  animation: mog-packet 2.2s ease-in-out infinite;
}

.mog [data-dash] {
  animation: mog-dash 2s ease-in-out infinite;
}

.mog [data-ring] {
  transform-origin: 32px 32px;
  transform-box: view-box;
  animation: mog-ring 2.1s ease-out infinite;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}

.section-title-row h2 {
  margin: 0;
}

.mog-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(225, 6, 0, 0.5);
  animation: mog-ping 1.9s ease-out infinite;
  vertical-align: 1px;
}

.mog-live--ok {
  background: #1c9a4a;
  box-shadow: 0 0 0 0 rgba(28, 154, 74, 0.5);
  animation: mog-ping-ok 1.9s ease-out infinite;
}

.mog-live--sold,
.mog-live--wait {
  background: var(--faint);
  box-shadow: none;
  animation: none;
}

.mog-field {
  position: absolute;
  inset: -4% -2% 0;
  pointer-events: none;
  z-index: 2;
}

.mog-sticker {
  position: absolute;
  width: 72px;
  height: 72px;
  --mx: 0px;
  --my: 0px;
  animation: mog-float 3.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  pointer-events: none;
}

.mog-sticker.is-a {
  top: 2%;
  left: -2%;
  animation-delay: 0s;
}

.mog-sticker.is-b {
  top: 8%;
  right: 0;
  animation-delay: -0.8s;
}

.mog-sticker.is-c {
  bottom: 18%;
  left: -6%;
  animation-delay: -1.6s;
}

.mog-sticker.is-d {
  bottom: 4%;
  right: 2%;
  animation-delay: -0.4s;
}

.mog-sticker.is-e {
  top: 42%;
  left: -10%;
  animation-delay: -2.2s;
}

.mog-sticker.is-f {
  top: 38%;
  right: -8%;
  animation-delay: -1.1s;
}

.mog-marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 0.35rem 0 0.85rem;
  pointer-events: none;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.mog-marquee-track {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: max-content;
  animation: mog-marquee 32s linear infinite;
}

.mog-marquee .mog,
.mog-strip .mog {
  background: none;
  pointer-events: none;
}

.mog-strip .mog {
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.2, 1.2, 0.3, 1), filter 0.28s ease;
}

.mog-strip .mog:hover,
.card:hover .mog,
.stat-card:hover .mog,
.how-mark:hover .mog,
.section-title-row:hover .mog {
  transform: scale(1.12) rotate(-6deg);
  filter: drop-shadow(0 10px 14px rgba(89, 105, 132, 0.22));
}

.mog.is-pop {
  animation: mog-pop 0.55s cubic-bezier(0.2, 1.5, 0.35, 1);
}

.card,
.stat-card,
.tier,
.task-card,
.faq-item {
  transition: transform 0.35s cubic-bezier(0.2, 1.1, 0.3, 1), box-shadow 0.35s ease;
}

.card:hover,
.stat-card:hover,
.tier:hover,
.task-card:hover {
  transform: translateY(-7px) rotate(-0.35deg);
  box-shadow: 0 22px 44px rgba(89, 105, 132, 0.14);
}

.how-num {
  animation: mog-num 2.6s ease-in-out infinite;
}

.how-item:nth-child(2) .how-num { animation-delay: 0.35s; }
.how-item:nth-child(3) .how-num { animation-delay: 0.7s; }
.how-item:nth-child(4) .how-num { animation-delay: 1.05s; }

.how-num::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px solid rgba(225, 6, 0, 0.22);
  animation: mog-ring 2.4s ease-out infinite;
  pointer-events: none;
}

.mog-confetti {
  position: absolute;
  top: 28%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
  animation: mog-burst 0.95s ease-out forwards;
}

.success-panel {
  position: relative;
}

.faq-item[open] {
  animation: mog-open 0.38s cubic-bezier(0.2, 1.2, 0.3, 1);
}

.card .mog,
.stat-card .mog,
.role-card .mog,
.tier .mog,
.task-card .mog,
.news-visual {
  margin-bottom: 0.85rem;
}

.how-mark {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.how-list {
  position: relative;
}

.how-list::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(89, 105, 132, 0.08), rgba(89, 105, 132, 0.28), rgba(89, 105, 132, 0.08));
}

.how-list::after {
  content: "";
  position: absolute;
  left: 21px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(225, 6, 0, 0.12);
  animation: how-travel 5.2s ease-in-out infinite;
  z-index: 1;
}

.how-mark,
.how-num {
  position: relative;
  z-index: 2;
}

.page-mog {
  margin: 0 0 1.4rem;
}

.phones .phone {
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.phones .phone:hover {
  transform: translateY(-6px);
}

.layer-row li {
  position: relative;
  overflow: hidden;
}

.layer-row li::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  right: -28px;
  top: -28px;
  border-radius: 50%;
  border: 1.5px dashed rgba(89, 105, 132, 0.28);
  animation: mog-rot 16s linear infinite;
}

@keyframes mog-rot {
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes mog-float {
  0%,
  100% {
    transform: translate(var(--mx), var(--my)) rotate(-8deg);
  }
  50% {
    transform: translate(var(--mx), calc(var(--my) - 16px)) rotate(7deg);
  }
}

@keyframes mog-marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes mog-pop {
  0% {
    transform: scale(1) rotate(0deg);
  }
  35% {
    transform: scale(1.22) rotate(-12deg);
  }
  70% {
    transform: scale(0.94) rotate(6deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes mog-num {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes mog-burst {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(0.2) rotate(160deg);
    opacity: 0;
  }
}

@keyframes mog-open {
  from {
    transform: translateY(6px);
  }
  to {
    transform: none;
  }
}

@keyframes mog-scale {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

@keyframes mog-scan {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.15;
  }
  50% {
    transform: translateY(18px);
    opacity: 0.85;
  }
}

@keyframes mog-draw {
  0% {
    stroke-dashoffset: 52;
  }
  32%,
  72% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 52;
  }
}

@keyframes mog-bar {
  0%,
  12% {
    transform: scaleX(0.18);
  }
  40%,
  62% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0.18);
  }
}

@keyframes mog-step {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mog-packet {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

@keyframes mog-dash {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(16px, -14px);
    opacity: 0;
  }
}

@keyframes mog-ring {
  0% {
    transform: scale(0.55);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes mog-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(225, 6, 0, 0.5);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px rgba(225, 6, 0, 0);
  }
}

@keyframes mog-ping-ok {
  0% {
    box-shadow: 0 0 0 0 rgba(28, 154, 74, 0.5);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px rgba(28, 154, 74, 0);
  }
}

@keyframes how-travel {
  0% {
    top: 12px;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    top: calc(100% - 22px);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .mog-sticker.is-a,
  .mog-sticker.is-b {
    width: 56px;
    height: 56px;
  }

  .mog-sticker.is-c,
  .mog-sticker.is-d,
  .mog-sticker.is-e,
  .mog-sticker.is-f {
    display: none;
  }

  .how-list::before,
  .how-list::after {
    display: none;
  }

  .mog-marquee .mog,
  .mog-strip .mog {
    width: 46px;
    height: 46px;
  }

  .section-title-row .mog--sm {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mog [data-spin],
  .mog [data-spin-rev],
  .mog [data-orbit],
  .mog [data-pulse],
  .mog [data-bob],
  .mog [data-scan],
  .mog [data-draw],
  .mog [data-fillbar],
  .mog [data-step],
  .mog [data-packet],
  .mog [data-dash],
  .mog [data-ring],
  .mog-sticker,
  .mog-live,
  .how-list::after,
  .layer-row li::after,
  .phones .phone,
  .mog-marquee-track,
  .how-num,
  .how-num::after,
  .card,
  .stat-card,
  .tier,
  .task-card,
  .faq-item {
    animation: none !important;
    transform: none !important;
  }

  .card:hover,
  .stat-card:hover,
  .tier:hover,
  .task-card:hover,
  .card:hover .mog {
    transform: none !important;
  }

  .mog [data-draw] {
    stroke-dashoffset: 0;
  }
}
