.motion-toggle {
  position: absolute;
  z-index: 2;
  inset: auto auto 10px 5.1vw;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid #badaff80;
  border-radius: 8px;
  background: #071b44e8;
  color: #f0f6ff;
  font-size: .74rem;
  font-weight: 650;
}
.motion-toggle-icon {
  width: 16px;
  height: 16px;
  color: var(--neon-lime);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.motion-icon-play, .motion-paused .motion-icon-pause { display: none; }
.motion-paused .motion-icon-play { display: initial; }

.hero-light-trails {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
#hero-lane { vector-effect: non-scaling-stroke; }
.hero-trail {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: .19 1.81;
  opacity: 0;
}
.hero-trail-wide { stroke: #24c5ff55; stroke-width: 11; }
.hero-trail-core { stroke: #b8f8ff; stroke-width: 2.4; }
.hero-trail-echo { stroke: #e3ff64bb; stroke-width: 2; stroke-dasharray: .15 1.85; }
.geo-moving-signal {
  stroke: #e3ff62;
  stroke-width: 2.9;
  stroke-dasharray: .09 1.91;
  opacity: 0;
}
.geo-city::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 18px;
  aspect-ratio: 1;
  border: 1px solid #e8ff70;
  border-radius: 50%;
  translate: 0 -60%;
  opacity: 0;
  pointer-events: none;
}
.city-temirtau { --signal-delay: 480ms; }
.city-karaganda { --signal-delay: 960ms; }
.city-saran { --signal-delay: 1450ms; }
.city-abay { --signal-delay: 1910ms; }

.app-offer, .contact-panel { overflow: clip; }
.contact-panel { position: relative; }
.app-offer::after, .contact-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
}
.app-offer::after {
  inset: -10% auto -10% -49%;
  width: 34%;
  background: linear-gradient(90deg, transparent, #c1f2ff4f, transparent);
  transform: skewX(-22deg);
}
.contact-panel::after {
  inset: 0 auto auto -40%;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4ed8ff 51%, #e3ff55 64%, transparent);
}

.motion-paused { scroll-behavior: auto; }
.motion-paused dialog[open] { animation: none; }
.motion-paused .land-card:hover .land-card-arrow { transform: none; }

@media (max-width: 750px) {
  .motion-toggle { inset-inline-start: 5%; }
  .hero-light-trails { width: 149%; inset-inline-start: -49%; }
  .hero-trail-echo { stroke-width: 1.6; }
}

@media (prefers-reduced-motion: no-preference) {
  .neon-hero.motion-active .hero-trail { animation: lane-trace 6.2s linear 500ms infinite; }
  .neon-hero.motion-active .hero-trail-echo { animation-delay: 680ms; }
  .motion-active:not(.neon-entering) .neon-device-shell { animation: phone-drift 5.8s ease-in-out infinite; }
  .motion-active:not(.neon-entering) .neon-bonus-coin::after { animation: coin-reflection 6.2s linear 1s infinite; }
  .geo-panel.motion-active .geo-moving-signal { animation: lane-trace 5.4s linear 810ms infinite; }
  .geo-panel.motion-active .geo-city::before { animation: city-pulse 5.4s var(--ease) calc(1150ms + var(--signal-delay, 0ms)) infinite; }
  .app-panel.motion-active .app-illustration { animation: phone-drift 6.8s ease-in-out 800ms infinite; }
  .app-panel.motion-active::before { animation: app-light 6.8s ease-in-out infinite; }
  .app-panel.motion-active .app-offer::after { animation: offer-reflection 6.8s linear 1.25s infinite; }
  .app-panel.motion-active .app-offer + .app-offer::after { animation-delay: 1.55s; }
  .contact-panel.motion-active::after { animation: contact-light 5.6s linear 470ms infinite; }

  html:not(.motion-paused) dialog[open] :is(.dialog-links, #quote-form) {
    animation: dialog-content-in 240ms var(--ease) 35ms both;
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  html:not(.motion-paused) :is(a, button).land-card .land-card-photo {
    transition: scale 380ms var(--ease), filter 220ms ease;
  }
  html:not(.motion-paused) :is(a, button).land-card:hover .land-card-photo { scale: 1.08; }
  .motion-toggle:hover { background: #103969; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .neon-hero { view-timeline-name: --hero-scroll; }
    .land-card { view-timeline-name: --tile-scroll; }
    .land-heading { view-timeline-name: --heading-scroll; }

    html:not(.motion-paused) .neon-station {
      animation: station-parallax linear both;
      animation-timeline: --hero-scroll;
      animation-range: exit 0% exit 100%;
    }
    html:not(.motion-paused) .land-card-photo {
      animation: card-parallax linear both;
      animation-timeline: --tile-scroll;
      animation-range: entry 0% exit 100%;
    }
    html:not(.motion-paused) .land-heading::after {
      transform-origin: 0 50%;
      animation: heading-light linear both;
      animation-timeline: --heading-scroll;
      animation-range: entry 0% entry 100%;
    }
  }
}

@keyframes lane-trace {
  0%, 8% { stroke-dashoffset: .2; opacity: 0; }
  15% { opacity: .92; }
  47% { opacity: .88; }
  61%, 100% { stroke-dashoffset: -1.04; opacity: 0; }
}
@keyframes phone-drift {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 0 -12px; rotate: -1deg; }
}
@keyframes coin-reflection {
  0%, 12% { transform: skewX(-25deg); }
  28%, 100% { transform: translateX(465%) skewX(-25deg); }
}
@keyframes city-pulse {
  0% { scale: .9; opacity: 0; }
  5% { opacity: .82; }
  30%, 100% { scale: 2; opacity: 0; }
}
@keyframes app-light {
  0%, 100% { opacity: .56; translate: 0 4px; }
  50% { opacity: 1; translate: -7px -7px; }
}
@keyframes offer-reflection {
  0%, 10% { translate: 0 0; opacity: 0; }
  14%, 29% { opacity: .94; }
  36%, 100% { translate: 465% 0; opacity: 0; }
}
@keyframes contact-light {
  0%, 9% { translate: 0 0; opacity: 0; }
  17%, 49% { opacity: .95; }
  64%, 100% { translate: 360% 0; opacity: 0; }
}
@keyframes dialog-content-in {
  from { opacity: .64; translate: 0 6px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes station-parallax {
  from { scale: 1; translate: 0 0; }
  to { scale: 1.15; translate: 0 6.5%; }
}
@keyframes card-parallax {
  from { translate: 13% 0; }
  to { translate: -3% 0; }
}
@keyframes heading-light {
  from { scale: .35 1; opacity: .42; }
  to { scale: 1 1; opacity: 1; }
}

