/* Approved G3: a transparent capsule becomes a continuously drifting violet gradient.
   Existing controls retain their dimensions, icons, labels, destinations and semantics. */
:root {
  --g3-ink: #7857ae;
  --g3-gradient: linear-gradient(90deg,
    #6231a5 0%, #8052c3 20%, #9358d2 36%,
    #8052c3 55%, #6e3ab3 75%, #6231a5 100%);
}

:root body [data-button-motion="G3"],
#contact .partnership-actions > [data-button-motion="G3"] {
  isolation: isolate;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--g3-ink);
  box-shadow: inset 0 0 0 1px var(--g3-ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
  transition: color 300ms ease;
}

/* Card cues and the policy close control already have absolute positioning. */
:root body :is(a, button)[data-button-motion="G3"]:not(.policy-close) {
  position: relative;
}

[data-button-motion="G3"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--g3-gradient);
  background-size: 300% 100%;
  background-repeat: repeat-x;
  background-position: 0% 50%;
  opacity: 0;
  transition: opacity 300ms ease;
}

:root body [data-button-motion="G3"]:is(:hover, :focus-visible):not(:disabled):not([aria-disabled="true"]),
#contact .partnership-actions > [data-button-motion="G3"]:is(:hover, :focus-visible),
:root body :is(.technology-card, .application-image):is(:hover, :focus-visible) [data-button-motion="G3"] {
  color: #fff;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--g3-ink);
  transform: none;
}

[data-button-motion="G3"]:is(:hover, :focus-visible):not(:disabled):not([aria-disabled="true"])::before,
:is(.technology-card, .application-image):is(:hover, :focus-visible) [data-button-motion="G3"]::before {
  opacity: 1;
  animation: levacell-g3-drift 4.8s linear infinite;
}

/* Keep the approved G3's text and icons still as the color travels beneath them. */
:root body [data-button-motion="G3"] .ui-icon {
  color: inherit;
  transform: none;
  transition: none;
}

:root body [data-button-motion="G3"]:disabled,
:root body [data-button-motion="G3"][aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
}

@keyframes levacell-g3-drift {
  /* 150% of the available offset moves this 300%-wide gradient one full tile. */
  from { background-position: 0% 50%; }
  to { background-position: 150% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  [data-button-motion="G3"],
  [data-button-motion="G3"]::before {
    animation: none !important;
    transition: none !important;
  }
}
.motion-paused [data-button-motion="G3"],
.motion-paused [data-button-motion="G3"]::before {
  animation: none !important;
  transition: none !important;
}
