@font-face {
  font-family: "Bellota";
  src: url("../assets/fonts/bellota-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@property --author-signature-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.author-signature {
  --author-signature-angle: 0deg;
  --author-gradient: conic-gradient(
    from var(--author-signature-angle),
    #4b27f6 0deg,
    #8e35f5 90deg,
    #fc6be6 180deg,
    #c444ee 270deg,
    #4b27f6 360deg
  );
  isolation: isolate;
  overflow: visible;
  pointer-events: auto;
}

.tariffs-page .tariffs-signature {
  opacity: 1;
}

.author-signature__trigger {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transform-origin: 50% 72%;
  -webkit-tap-highlight-color: transparent;
}

.author-signature__logo,
.author-signature__contour {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.author-signature__logo {
  z-index: 2;
  max-width: none;
  opacity: var(--author-signature-logo-opacity, 1);
  transition:
    opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.author-signature__contour {
  z-index: 1;
  box-sizing: border-box;
  background: var(--author-gradient);
  filter:
    drop-shadow(0 0 0.06em rgb(75 39 246 / 90%))
    drop-shadow(0 0 0.16em rgb(252 107 230 / 68%));
  opacity: 0;
  transform: scale(1.045);
  transition: opacity 280ms cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-mask: url("../assets/images/home/signature.svg") center / 100% 100% no-repeat;
  mask: url("../assets/images/home/signature.svg") center / 100% 100% no-repeat;
}

@media (hover: hover) and (pointer: fine) {
  .author-signature__trigger:hover {
    transform: scale(1.1);
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .author-signature__trigger:hover .author-signature__logo {
    filter:
      drop-shadow(0 0 0.08em rgb(75 39 246 / 82%))
      drop-shadow(0 0 0.22em rgb(252 107 230 / 72%));
  }

  .author-signature__trigger:hover .author-signature__contour {
    opacity: 0.78;
  }

  .tariffs-page .author-signature__trigger:hover .author-signature__logo {
    opacity: 1;
  }
}

.author-signature__trigger:focus-visible {
  border-radius: 0.35em;
  outline: 0.08em solid #ebebeb;
  outline-offset: 0.16em;
}

.author-signature.is-open .author-signature__logo {
  opacity: 1;
}

.author-signature.is-open .author-signature__contour {
  opacity: 1;
  animation: author-signature-gradient 3.6s linear infinite;
}

.author-signature.is-bouncing .author-signature__trigger {
  animation: author-signature-bounce 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.author-signature__popover {
  position: absolute;
  z-index: 1;
  right: -0.15em;
  bottom: calc(100% + 13px);
  box-sizing: border-box;
  width: min(176px, calc(100vw - 24px));
  height: 82px;
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: rgb(0 0 0 / 55%);
  box-shadow:
    0 6px 6px rgb(0 0 0 / 45%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px) scale(0.94);
  transform-origin: calc(100% - 1.35em) 100%;
  transition:
    opacity 220ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 420ms;
  visibility: hidden;
}

.author-signature__border,
.author-signature__surface {
  position: absolute;
  inset: 0;
  border-radius: 30px;
}

.author-signature__border {
  z-index: 3;
  display: block;
  padding: 0.5px;
  background: var(--author-gradient);
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}

.author-signature__surface {
  z-index: 1;
  inset: 0;
  background: transparent;
  background: transparent;
}

.author-signature__tail {
  position: absolute;
  z-index: 0;
  right: 32px;
  bottom: -11px;
  width: 22px;
  height: 22px;
  background: rgb(0 0 0 / 55%);
  border: 0;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 6px 6px rgb(0 0 0 / 45%));
}

.author-signature__tail::after {
  position: absolute;
  inset: 0;
  padding: 0.5px;
  background: var(--author-gradient);
  clip-path: inherit;
  content: "";
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}

.author-signature__content {
  position: relative;
  z-index: 2;
  display: grid;
  width: 149px;
  height: 60px;
  box-sizing: border-box;
  margin: 11px auto;
  padding: 0;
  align-content: center;
  justify-items: center;
  font-family: "Bellota", "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 1px 8px rgb(0 0 0 / 48%);
  white-space: nowrap;
}

.author-signature__content > span,
.author-signature__content > a {
  display: block;
}

.author-signature__content > .author-signature__line--developer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.author-signature__ball {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.author-signature__ball img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.author-signature__ball::before {
  position: absolute;
  z-index: 1;
  top: 2px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transform: translateX(-50%);
}

.author-signature__ball::after {
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 50%;
  color: #111;
  content: "8";
  font-family: Arial, sans-serif;
  font-size: 6px;
  font-weight: 700;
  line-height: 7px;
  transform: translateX(-50%);
}

.author-signature__content a {
  border-radius: 0.2em;
  color: inherit;
  text-decoration: none;
}

.author-signature__content a:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
}

.author-signature__content a:focus-visible {
  outline: 0.08em solid #ebebeb;
  outline-offset: 0.16em;
}

.author-signature__symbol {
  font-family: "Arial Unicode MS", "Noto Sans Symbols 2", "Segoe UI Symbol", sans-serif;
  font-weight: 700;
}

.author-signature.is-open .author-signature__popover {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 220ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
  visibility: visible;
}

.author-signature.is-open .author-signature__popover,
.author-signature.is-open .author-signature__tail {
  animation: author-signature-gradient 3.6s linear infinite;
}

@keyframes author-signature-gradient {
  to {
    --author-signature-angle: 360deg;
  }
}

@keyframes author-signature-bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }

  34% {
    transform: translateY(-0.42em) scale(1.08);
  }

  68% {
    transform: translateY(0.08em) scale(1.025);
  }
}

@media (max-width: 63.999rem) {
  .tariffs-page .author-signature__logo {
    --author-signature-logo-opacity: 0.65;
  }

  .tariffs-page .author-signature__trigger:focus-visible .author-signature__logo,
  .tariffs-page .author-signature.is-open .author-signature__logo {
    opacity: 1;
  }

  .author-signature__popover {
    right: -0.2em;
    bottom: calc(100% + 12px);
    width: min(176px, calc(100vw - 24px));
    height: 82px;
  }

  .author-signature__content {
    padding: 0;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .author-signature__trigger,
  .author-signature__logo,
  .author-signature__contour,
  .author-signature__popover {
    animation: none !important;
    transition-duration: 1ms !important;
  }

  .author-signature.is-open .author-signature__popover,
  .author-signature.is-open .author-signature__tail {
    animation: none;
  }
}
