.flying-assistant {
  --assistant-trial-scale: .72;
  --assistant-pricing-scale: .66;
  --assistant-faq-scale: .58;
  --assistant-faq-wait-x: 0px;
  --assistant-faq-wait-y: 0px;
  --assistant-faq-wait-scale: 1;
  --assistant-home-shift-y: 0px;
  --assistant-start-x: 0px;
  --assistant-start-y: 0px;
  --assistant-mid-x: 0px;
  --assistant-mid-y: 0px;
  position: fixed;
  z-index: 30;
  top: 50%;
  right: 52px;
  width: 76px;
  height: 76px;
  margin: 0;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  border: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: center;
  will-change: transform, opacity;
}

.laptop-logo-runner {
  display: none !important;
  animation: none !important;
}

.flying-assistant.is-launched {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, calc(-50% + var(--assistant-home-shift-y)), 0);
}

.flying-assistant.is-flying {
  z-index: 4;
  pointer-events: none;
}

.flying-assistant.is-front {
  z-index: 30;
}

.flying-assistant.is-behind-coming-sign {
  z-index: 10;
}

.flying-assistant.is-orbiting-coming-sign {
  pointer-events: none;
}

.flying-assistant.is-performing-pricing-scene {
  pointer-events: none;
}

.flying-assistant.is-performing-faq-sequence {
  pointer-events: none;
}

.flying-assistant.is-ready {
  pointer-events: auto;
  cursor: pointer;
}

.flying-assistant.is-at-trial-button {
  transform: translate3d(
    var(--assistant-trial-x, 0px),
    calc(-50% + var(--assistant-trial-y, 0px)),
    0
  ) scale(var(--assistant-trial-scale));
}

.flying-assistant.is-at-trial-button .flying-assistant-logo {
  animation: none;
  transform: none;
}

.flying-assistant.is-at-trial-button .flying-assistant-wing {
  opacity: 0;
  animation: none;
}

.flying-assistant.is-at-trial-button .flying-assistant-wing-left {
  transform: translateX(20px) scale(.15);
}

.flying-assistant.is-at-trial-button .flying-assistant-wing-right {
  transform: translateX(-20px) scale(.15);
}

.flying-assistant.is-attached-to-pricing {
  transform: translate3d(
    var(--assistant-pricing-x, 0px),
    calc(-50% + var(--assistant-pricing-y, 0px)),
    0
  ) scale(var(--assistant-pricing-scale)) rotate(90deg);
}

.flying-assistant.is-attached-to-pricing .flying-assistant-logo {
  animation: none;
  transform: none;
}

.flying-assistant.is-attached-to-pricing .flying-assistant-wing {
  opacity: 0;
  animation: none;
}

.flying-assistant.is-attached-to-pricing .flying-assistant-wing-left {
  transform: translateX(20px) scale(.15);
}

.flying-assistant.is-attached-to-pricing .flying-assistant-wing-right {
  transform: translateX(-20px) scale(.15);
}

.flying-assistant.is-on-faq-card {
  transform: translate3d(
    var(--assistant-faq-x, 0px),
    calc(-50% + var(--assistant-faq-y, 0px)),
    0
  ) scale(var(--assistant-faq-scale));
}

.flying-assistant.is-waiting-for-faq {
  transform: translate3d(
    var(--assistant-faq-wait-x),
    calc(-50% + var(--assistant-faq-wait-y)),
    0
  ) scale(var(--assistant-faq-wait-scale));
}

.flying-assistant.is-faq-hopping .flying-assistant-logo {
  animation: none;
  transform: none;
}

.flying-assistant.is-faq-hopping .flying-assistant-wing {
  opacity: 0;
  animation: none;
}

.flying-assistant.is-faq-hopping .flying-assistant-wing-left {
  transform: translateX(20px) scale(.15);
}

.flying-assistant.is-faq-hopping .flying-assistant-wing-right {
  transform: translateX(-20px) scale(.15);
}

.flying-assistant.is-on-footer .flying-assistant-logo {
  animation: none;
  transform: none;
}

.flying-assistant.is-on-footer .flying-assistant-wing {
  opacity: 0;
  animation: none;
}

.flying-assistant.is-on-footer .flying-assistant-wing-left {
  transform: translateX(20px) scale(.15);
}

.flying-assistant.is-on-footer .flying-assistant-wing-right {
  transform: translateX(-20px) scale(.15);
}

.flying-assistant.is-footer-dismissal {
  pointer-events: none;
}

.flying-assistant.is-footer-dismissal .flying-assistant-logo {
  animation: none;
  transform: none;
}

.flying-assistant.is-footer-dismissal .flying-assistant-wing {
  opacity: 0;
  animation: none;
}

.flying-assistant.is-footer-dismissal .flying-assistant-wing-left {
  transform: translateX(20px) scale(.15);
}

.flying-assistant.is-footer-dismissal .flying-assistant-wing-right {
  transform: translateX(-20px) scale(.15);
}

.flying-assistant.is-footer-white .flying-assistant-logo img {
  content: url("assets/logo-white-ui.png");
  filter: none;
}

.flying-assistant.is-shedding-footer-color::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: 34px;
  left: 36px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2a436f;
  filter: drop-shadow(0 0 2px rgb(255 255 255 / 65%));
  box-shadow:
    -20px -11px 0 -1px #2a436f,
    18px -8px 0 -1px #2a436f,
    -27px 8px 0 -1px #2a436f,
    25px 10px 0 -1px #2a436f,
    -13px 21px 0 -1px #2a436f,
    12px 24px 0 -1px #2a436f;
  pointer-events: none;
  animation: flyingAssistantShedFooterColor .72s ease-out both;
}

.flying-assistant.is-dismissing {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transform: translateY(-50%);
  animation: none;
}

.flying-assistant.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

.flying-assistant:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 8px;
  border-radius: 50%;
}

.flying-assistant-impact {
  position: fixed;
  z-index: 40;
  width: 104px;
  height: 88px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.2) rotate(-12deg);
  transform-origin: center;
}

.flying-assistant-impact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff4bd 0%, #fc3 46%, #ebb247 100%);
  clip-path: polygon(
    50% 0,
    59% 22%,
    75% 7%,
    77% 30%,
    100% 25%,
    85% 47%,
    100% 63%,
    76% 65%,
    73% 91%,
    56% 73%,
    43% 100%,
    36% 73%,
    12% 89%,
    20% 63%,
    0 53%,
    22% 40%,
    6% 20%,
    33% 27%
  );
  filter: drop-shadow(0 8px 8px rgb(42 67 111 / 26%));
}

.flying-assistant-impact.is-popping {
  visibility: visible;
  animation: flyingAssistantImpact .48s cubic-bezier(.2, .72, .22, 1) both;
}

.flying-assistant-logo {
  position: absolute;
  z-index: 2;
  inset: 3px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 9px 10px rgb(42 67 111 / 28%));
  animation: flyingAssistantHover 1.1s ease-in-out infinite alternate;
}

.flying-assistant-logo img {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.flying-assistant-wing {
  position: absolute;
  z-index: 1;
  top: 18px;
  width: 38px;
  height: 42px;
  transform-style: preserve-3d;
  will-change: transform;
  opacity: 1;
  transition: opacity .16s ease, transform .16s ease;
}

.flying-assistant-wing-left {
  right: 66px;
  transform-origin: right center;
  animation: flyingAssistantWingLeft .18s ease-in-out infinite alternate;
}

.flying-assistant-wing-right {
  left: 66px;
  transform-origin: left center;
  animation: flyingAssistantWingRight .18s ease-in-out infinite alternate;
}

.flying-assistant-wing i {
  position: absolute;
  width: 31px;
  height: 13px;
  border: 1px solid rgb(42 67 111 / 36%);
  background: linear-gradient(135deg, #f8fbff 0%, #acc5f7 58%, #7598dc 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 72%), 0 4px 7px rgb(42 67 111 / 16%);
}

.flying-assistant-wing-left i {
  right: 0;
  border-radius: 85% 20% 55% 35%;
  transform-origin: right center;
}

.flying-assistant-wing-right i {
  left: 0;
  border-radius: 20% 85% 35% 55%;
  transform-origin: left center;
}

.flying-assistant-wing i:nth-child(1) {
  top: 2px;
}

.flying-assistant-wing i:nth-child(2) {
  top: 14px;
  width: 36px;
}

.flying-assistant-wing i:nth-child(3) {
  top: 27px;
  width: 28px;
}

.flying-assistant-wing-left i:nth-child(1) { transform: rotate(18deg); }
.flying-assistant-wing-left i:nth-child(2) { transform: rotate(3deg); }
.flying-assistant-wing-left i:nth-child(3) { transform: rotate(-15deg); }
.flying-assistant-wing-right i:nth-child(1) { transform: rotate(-18deg); }
.flying-assistant-wing-right i:nth-child(2) { transform: rotate(-3deg); }
.flying-assistant-wing-right i:nth-child(3) { transform: rotate(15deg); }

@keyframes flyingAssistantImpact {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.2) rotate(-12deg);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12) rotate(5deg);
  }
  64% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(.94) rotate(-3deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.46) rotate(8deg);
  }
}

@keyframes flyingAssistantHover {
  from { transform: translateY(-2px); }
  to { transform: translateY(2px); }
}

@keyframes flyingAssistantWingLeft {
  from { transform: rotateY(18deg) rotateZ(-18deg) scaleY(.9); }
  to { transform: rotateY(68deg) rotateZ(19deg) scaleY(1.08); }
}

@keyframes flyingAssistantWingRight {
  from { transform: rotateY(-18deg) rotateZ(18deg) scaleY(.9); }
  to { transform: rotateY(-68deg) rotateZ(-19deg) scaleY(1.08); }
}

@keyframes flyingAssistantShedFooterColor {
  0%, 30% {
    opacity: 0;
    transform: translate(0, 0) scale(.45);
  }
  48% {
    opacity: 1;
    transform: translate(0, 2px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(0, 28px) scale(.55);
  }
}

@media (width <= 980px) {
  .flying-assistant,
  .flying-assistant-impact {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flying-assistant-logo,
  .flying-assistant-wing-left,
  .flying-assistant-wing-right {
    animation: none;
  }
}
