/* Portfolio motion policy: the HTML data-motion attribute is the resolved authority. */

html[data-motion="reduced"] .tagline {
  min-height: auto;
}

html[data-motion="reduced"] .terminal-typing-caret {
  display: none;
}

html[data-motion="reduced"] .social-live-poster,
html[data-motion="reduced"] .social-live-frame {
  transition: none;
}

html[data-motion="reduced"] #gameWrap canvas {
  filter: none;
}

html[data-motion="reduced"] #gameWrap::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.28)),
    radial-gradient(circle at 50% 38%, transparent 46%, rgba(0, 0, 0, 0.24) 100%);
  mix-blend-mode: normal !important;
}

html[data-motion="reduced"] .double-a-deck *,
html[data-motion="reduced"] .double-a-deck *::before,
html[data-motion="reduced"] .double-a-deck *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
}

html[data-motion="reduced"] .double-a-demo-light-backdrop,
html[data-motion="reduced"] body.demo-light-active .copy-module > .terminal-typewriter,
html[data-motion="reduced"] [data-demo-deck].double-a-deck--full,
html[data-motion="reduced"] [data-demo-deck].is-nightlight .double-a-deck__lcd,
html[data-motion="reduced"] [data-archive-deck].double-a-deck--compact,
html[data-motion="reduced"] [data-archive-deck].is-nightlight .double-a-deck__compact-title-window {
  transition-duration: 1ms;
}

html[data-motion="reduced"] #home .mission-game-launch,
html[data-motion="reduced"] #home .mission-game-launch::before,
html[data-motion="reduced"] #home .mission-game-launch::after,
html[data-motion="reduced"] #home .mission-game-launch .mission-game-launch-idle,
html[data-motion="reduced"] #home .mission-game-launch .mission-game-launch-active {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

html[data-motion="reduced"] #home .mission-game-launch:hover::before,
html[data-motion="reduced"] #home .mission-game-launch:focus-visible::before {
  opacity: 0.08;
}

html[data-motion="reduced"] #home .mission-game-launch:hover .mission-game-launch-idle,
html[data-motion="reduced"] #home .mission-game-launch:focus-visible .mission-game-launch-idle {
  opacity: 0;
}

html[data-motion="reduced"] #home .mission-game-launch:hover .mission-game-launch-active,
html[data-motion="reduced"] #home .mission-game-launch:focus-visible .mission-game-launch-active {
  opacity: 1;
}

.topbar .site-motion-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: auto;
}

.site-motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(100, 210, 255, 0.62);
  border-radius: 3px;
  background: rgba(2, 12, 24, 0.78);
  color: #9fe4ff;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 7px rgba(100, 210, 255, 0.08);
}

.site-motion-toggle:hover,
.site-motion-toggle:focus-visible {
  border-color: #9fe4ff;
  outline: none;
}

.site-motion-toggle__label {
  color: #d6f7ff;
}

.site-motion-toggle__state {
  color: #57ff9a;
}

.site-motion-toggle[data-motion-state="on"] {
  border-color: rgba(87, 255, 154, 0.78);
  color: #b8ffd1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 9px rgba(87, 255, 154, 0.22);
}

.site-motion-toggle[data-motion-state="off"] {
  border-color: rgba(154, 178, 188, 0.5);
  color: #8b9da3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.site-motion-toggle[data-motion-state="off"] .site-motion-toggle__state {
  color: #819097;
}

.site-motion-toggle__tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  z-index: 40;
  width: min(300px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid rgba(100, 210, 255, 0.62);
  background: rgba(1, 8, 16, 0.96);
  color: #c7f1ff;
  font-size: 0.68rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.site-motion-control:hover .site-motion-toggle__tooltip,
.site-motion-control:focus-within .site-motion-toggle__tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 650px) {
  .topbar .site-motion-control {
    width: 100%;
    justify-content: flex-end;
  }

  .site-motion-toggle__tooltip {
    right: 0;
    top: calc(100% + 8px);
    transform: translateY(-4px);
  }

  .site-motion-control:hover .site-motion-toggle__tooltip,
  .site-motion-control:focus-within .site-motion-toggle__tooltip {
    transform: translateY(0);
  }
}
