@property --animationValue {
  inherits: true;
  initial-value: 0;
  syntax: "<number>";
}

@property --animationAngle {
  inherits: true;
  initial-value: 0deg;
  syntax: "<angle>";
}

@keyframes accentBorderAnimation {
  to {
    --animationValue: 100;
  }
}

@keyframes rotateAnimation {
  0% {
    --animationAngle: 0deg;
  }
  25% {
    --animationAngle: 90deg;
  }
  50% {
    --animationAngle: 180deg;
  }
  75% {
    --animationAngle: 270deg;
  }
  100% {
    --animationAngle: 360deg;
  }
}

@keyframes cardSlide {
  from {
    translate: 0 20%;
    opacity: 0;
  }
  to {
    translate: 0 0;
    opacity: 1;
  }
}

/* accentBorder */

[data-animation="accentBorder"] {
  --corner: calc(1% * var(--animationValue, 0));
  --border-size: var(--animation-size, 3px);
  --border-color: var(--animation-color, var(--color-main));
  position: relative;
  overflow: visible !important;
  animation: accentBorderAnimation 2s ease-out infinite;
}

[data-animation="accentBorder"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  width: calc(100% + calc(var(--border-size) * 2));
  height: calc(100% + calc(var(--border-size) * 2));
  background-image: conic-gradient(
    var(--border-color) var(--corner),
    transparent var(--corner)
  );
  border-radius: calc(var(--border-radius) + 2px);
}

@media (max-width: 1024px) {
  [data-template="banner"] .banner .bannerPicture[data-animation="accentBorder"] {
    width: calc(100vw - calc(var(--gap-size) * 2));
    margin: 0 auto;
    border-radius: var(--border-radius);
  }
}

/* accentHeader */

[data-animation="accentHeader"] {
  --text-color: var(--animation-color, var(--color-text-main));
  align-self: start;
  display: inline-block;
  margin: 0 auto;
  background-image: linear-gradient(var(--animationAngle), var(--color-main), var(--text-color));
  background-clip: text;
  color: transparent !important;
  animation: rotateAnimation 5s ease-out infinite;
}

/* cardSlide */

[data-animation="cardSlide"] {
  --index: sibling-index();
  --count: sibling-count();
  --entry-start: -300%;
  --entry-step: calc((100% - var(--entry-start)) / (var(--count) + 1));
  --entry: calc(var(--entry-start) + var(--index) * var(--entry-step));
  animation: cardSlide 1ms ease-out both;
  animation-timeline: view(block);
  animation-range: entry var(--entry) contain 50%;
}

/* intersectionObserver section--visible */

/* sectionOpacity  */

section[data-animation="sectionOpacity"] {
  opacity: 0;
  transition: opacity 500ms linear;
}

section[data-animation="sectionOpacity"].section--visible {
  opacity: 1;
}

/* shakeAnimation */

@keyframes shakeAnimation {
  0% {
    transform: translateX(-20px);
  }
  25% {
    transform: translateX(20px);
  }
  50% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(0);
  }
}

section[data-animation="shakeAnimation"].section--visible {
  animation: shakeAnimation 1s;
  animation-delay: 300ms;
}

/* sectionRotate */

@keyframes sectionRotate {
  0% {
    transform: rotate(2deg);
  }
  25% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(1deg);
  }
  75% {
    transform: rotate(-1deg);
  }
  100% {
    transform: rotate(0);
  }
}

section[data-animation="sectionRotate"].section--visible {
  animation: sectionRotate 600ms;
  animation-delay: 300ms;
  animation-iteration-count: 1;
}

/* bounceAnimation */

@keyframes bounceAnimation {
  0% {
    transform: translateY(-95px);
  }
  25% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-44px);
  }
  55% {
    transform: translateY(0);
  }
  65% {
    transform: translateY(-18px);
  }
  75% {
    transform: translateY(0);
  }
  82% {
    transform: translateY(-9px);
  }
  87% {
    transform: translateY(0);
  }
  93% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

section[data-animation="bounceAnimation"].section--visible {
  animation: bounceAnimation 1s;
  animation-delay: 300ms;
}

/* flashAnimation */

@keyframes flashAnimation {
  0% {
    opacity: 1;
  }
  25% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  75% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

section[data-animation="flashAnimation"].section--visible {
  animation: flashAnimation 1s;
  animation-delay: 300ms;
}

/* rubberBandAnimation */

@keyframes rubberBandAnimation {
  0% {
    transform: scaleX(1);
  }
  30% {
    transform: scale3d(1.2, .7, 1);
  }
  40% {
    transform: scale3d(.7, 1.2, 1);
  }
  50% {
    transform: scale3d(1.1, .8, 1);
  }
  65% {
    transform: scale3d(.9, 1, 1);
  }
  75% {
    transform: scale3d(1, .9, 1);
  }
  100% {
    transform: scaleX(1);
  }
}

section[data-animation="rubberBandAnimation"].section--visible {
  animation: rubberBandAnimation 1s;
  animation-delay: 300ms;
}

/* headShakeAnimation */

@keyframes headShakeAnimation {
  0% {
    transform: translateX(0);
  }
  13% {
    transform: translateX(-6px) rotateY(-9deg);
  }
  37% {
    transform: translateX(5px) rotateY(7deg);
  }
  63% {
    transform: translateX(-3px) rotateY(-5deg);
  }
  87% {
    transform: translateX(2px) rotateY(3deg);
  }
  100% {
    transform: translateX(0);
  }
}

section[data-animation="headShakeAnimation"].section--visible {
  animation: headShakeAnimation 1s;
  animation-delay: 300ms;
}

/* swingAnimation */

@keyframes swingAnimation {
  20% {
    transform: rotate(15deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  60% {
    transform: rotate(5deg);
  }
  80% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

section[data-animation="swingAnimation"].section--visible {
  animation: swingAnimation 1s;
  animation-delay: 300ms;
  transform-origin: top center;
}

/* tadaAnimation */

@keyframes tadaAnimation {
  0% {
    transform: scaleX(1);
  }
  10%, 20% {
    transform: scale3d(.9, .9, .9) rotate(-3deg);
  }
  30%, 50%, 70%, 90% {
    transform: scale3d(1.1, 1.1, 1.1) rotate(3deg);
  }
  40%, 60%, 80% {
    transform: scale3d(1.1, 1.1, 1.1) rotate(-3deg);
  }
  100% {
    transform: scaleX(1);
  }
}

section[data-animation="tadaAnimation"].section--visible {
  animation: tadaAnimation 1s;
  animation-delay: 300ms;
}

/* wobbleAnimation */

@keyframes wobbleAnimation {
  0% {
    transform: translateZ(0);
  }
  15% {
    transform: translate3d(-25%, 0, 0) rotate(-5deg);
  }
  30% {
    transform: translate3d(20%, 0, 0) rotate(3deg);
  }
  45% {
    transform: translate3d(-15%, 0, 0) rotate(-3deg);
  }
  60% {
    transform: translate3d(10%, 0, 0) rotate(2deg);
  }
  75% {
    transform: translate3d(-5%, 0, 0) rotate(-1deg);
  }
  100% {
    transform: translateZ(0);
  }
}

section[data-animation="wobbleAnimation"].section--visible {
  animation: wobbleAnimation 1s;
  animation-delay: 300ms;
}

/* jelloAnimation */

@keyframes jelloAnimation {
  0%, 11.1% {
    transform: translateZ(0);
  }
  22.2% {
    transform: skewX(-12deg) skewY(-12deg);
  }
  33.3% {
    transform: skewX(6deg) skewY(6deg);
  }
  44.4% {
    transform: skewX(-3deg) skewY(-3deg);
  }
  55.5% {
    transform: skewX(1.5deg) skewY(1.5deg);
  }
  66.6% {
    transform: skewX(-.8deg) skewY(-.8deg);
  }
  77.7% {
    transform: skewX(.4deg) skewY(.4deg);
  }
  88.8% {
    transform: skewX(-.2deg) skewY(-.2deg);
  }
  100% {
    transform: translateZ(0);
  }
}

section[data-animation="jelloAnimation"].section--visible {
  animation: jelloAnimation 1s;
  animation-delay: 300ms;
}

/* Fading (появление): */
/* fadeInAnimation */

@keyframes fadeInAnimation {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

section[data-animation="fadeInAnimation"].section--visible {
  animation: fadeInAnimation 1s;
  animation-delay: 300ms;
}

/* fadeInUpAnimation */

@keyframes fadeInUpAnimation {
  0% {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

section[data-animation="fadeInUpAnimation"].section--visible {
  animation: fadeInUpAnimation 1s;
  animation-delay: 300ms;
}

/* fadeInDownAnimation */

@keyframes fadeInDownAnimation {
  0% {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

section[data-animation="fadeInDownAnimation"].section--visible {
  animation: fadeInDownAnimation 1s;
  animation-delay: 300ms;
}

/* fadeInLeftAnimation */

@keyframes fadeInLeftAnimation {
  0% {
    opacity: 0;
    transform: translate3d(-100%, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

section[data-animation="fadeInLeftAnimation"].section--visible {
  animation: fadeInLeftAnimation 1s;
  animation-delay: 300ms;
}

/* fadeInRightAnimation */

@keyframes fadeInRightAnimation {
  0% {
    opacity: 0;
    transform: translate3d(100%, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

section[data-animation="fadeInRightAnimation"].section--visible {
  animation: fadeInRightAnimation 1s;
  animation-delay: 300ms;
}

/* zoomInAnimation */

@keyframes zoomInAnimation {
  0% {
    opacity: 0;
    transform: scale3d(.3, .3, .3);
  }

  100% {
    opacity: 1;
  }
}

section[data-animation="zoomInAnimation"].section--visible {
  animation: zoomInAnimation 1s;
  animation-delay: 300ms;
}

/* zoomInUpAnimation */

@keyframes zoomInUpAnimation {
  0% {
    animation-timing-function: cubic-bezier(.55, .055, .675, .19);
    opacity: 0;
    transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
  }
  60% {
    animation-timing-function: cubic-bezier(.175, .885, .32, 1);
    opacity: 1;
    transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
  }
}

section[data-animation="zoomInUpAnimation"].section--visible {
  animation: zoomInUpAnimation 1s;
  animation-delay: 300ms;
}

/* zoomInDownAnimation */

@keyframes zoomInDownAnimation {
  0% {
    animation-timing-function: cubic-bezier(.55, .055, .675, .19);
    opacity: 0;
    transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
  }
  60% {
    animation-timing-function: cubic-bezier(.175, .885, .32, 1);
    opacity: 1;
    transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
  }
}

section[data-animation="zoomInDownAnimation"].section--visible {
  animation: zoomInDownAnimation 1s;
  animation-delay: 300ms;
}

/* zoomInLeftAnimation */

@keyframes zoomInLeftAnimation {
  0% {
    animation-timing-function: cubic-bezier(.55, .055, .675, .19);
    opacity: 0;
    transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
  }
  60% {
    animation-timing-function: cubic-bezier(.175, .885, .32, 1);
    opacity: 1;
    transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
  }
}

section[data-animation="zoomInLeftAnimation"].section--visible {
  animation: zoomInLeftAnimation 1s;
  animation-delay: 300ms;
}

/* zoomInRightAnimation */

@keyframes zoomInRightAnimation {
  0% {
    animation-timing-function: cubic-bezier(.55, .055, .675, .19);
    opacity: 0;
    transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
  }

  60% {
    animation-timing-function: cubic-bezier(.175, .885, .32, 1);
    opacity: 1;
    transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
  }
}

section[data-animation="zoomInRightAnimation"].section--visible {
  animation: zoomInRightAnimation 1s;
  animation-delay: 300ms;
}

/* bounceInAnimation */

@keyframes bounceInAnimation {
  0% {
    opacity: 0;
    transform: scale3d(.3, .3, .3);
  }
  20% {
    transform: scale3d(1.1, 1.1, 1.1);
  }
  40% {
    transform: scale3d(.9, .9, .9);
  }
  60% {
    opacity: 1;
    transform: scale3d(1.03, 1.03, 1.03);
  }
  80% {
    transform: scale3d(.97, .97, .97);
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

section[data-animation="bounceInAnimation"].section--visible {
  animation: bounceInAnimation 1s;
  animation-delay: 300ms;
}

/* bounceInUpAnimation */

@keyframes bounceInUpAnimation {
  0% {
    opacity: 0;
    transform: translate3d(0, 100%, 0) scaleY(5);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, -20px, 0) scaleY(.9);
  }
  75% {
    transform: translate3d(0, 10px, 0) scaleY(.95);
  }
  90% {
    transform: translate3d(0, -5px, 0) scaleY(.985);
  }
  100% {
    transform: translateZ(0);
  }
}

section[data-animation="bounceInUpAnimation"].section--visible {
  animation: bounceInUpAnimation 1s;
  animation-delay: 300ms;
}

/* bounceInDownAnimation */

@keyframes bounceInDownAnimation {
  0% {
    opacity: 0;
    transform: translate3d(0, -100%, 0) scaleY(3);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, 25px, 0) scaleY(.9);
  }
  75% {
    transform: translate3d(0, -10px, 0) scaleY(.95);
  }
  90% {
    transform: translate3d(0, 5px, 0) scaleY(.985);
  }
  100% {
    transform: translateZ(0);
  }
}

section[data-animation="bounceInDownAnimation"].section--visible {
  animation: bounceInDownAnimation 1s;
  animation-delay: 300ms;
}

/* bounceInLeftAnimation */

@keyframes bounceInLeftAnimation {
  0% {
    opacity: 0;
    transform: translate3d(-100%, 0, 0) scaleX(3);
  }
  60% {
    opacity: 1;
    transform: translate3d(25px, 0, 0) scaleX(1);
  }
  75% {
    transform: translate3d(-10px, 0, 0) scaleX(.98);
  }
  90% {
    transform: translate3d(5px, 0, 0) scaleX(.995);
  }
  100% {
    transform: translateZ(0);
  }
}

section[data-animation="bounceInLeftAnimation"].section--visible {
  animation: bounceInLeftAnimation 1s;
  animation-delay: 300ms;
}

/* bounceInRightAnimation */

@keyframes bounceInRightAnimation {
  0% {
    opacity: 0;
    transform: translate3d(100%, 0, 0) scaleX(3);
  }
  60% {
    opacity: 1;
    transform: translate3d(-25px, 0, 0) scaleX(1);
  }
  75% {
    transform: translate3d(10px, 0, 0) scaleX(.98);
  }
  90% {
    transform: translate3d(-5px, 0, 0) scaleX(.995);
  }
  100% {
    transform: translateZ(0);
  }
}

section[data-animation="bounceInRightAnimation"].section--visible {
  animation: bounceInRightAnimation 1s;
  animation-delay: 300ms;
}

/* slideInUpAnimation */

@keyframes slideInUpAnimation {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(0);
  }
}

section[data-animation="slideInUpAnimation"].section--visible {
  animation: slideInUpAnimation 1s;
  animation-delay: 300ms;
}

/* slideInDownAnimation */

@keyframes slideInDownAnimation {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0);
  }
}

section[data-animation="slideInDownAnimation"].section--visible {
  animation: slideInDownAnimation 1s;
  animation-delay: 300ms;
}

/* slideInLeftAnimation */

@keyframes slideInLeftAnimation {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateY(0);
  }
}

section[data-animation="slideInLeftAnimation"].section--visible {
  animation: slideInLeftAnimation 1s;
  animation-delay: 300ms;
}

/* slideInRightAnimation */

@keyframes slideInRightAnimation {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateY(0);
  }
}

section[data-animation="slideInRightAnimation"].section--visible {
  animation: slideInRightAnimation 1s;
  animation-delay: 300ms;
}

/* rotateInAnimation */

@keyframes rotateInAnimation {
  0% {
    opacity: 0;
    transform: rotate(-200deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

section[data-animation="rotateInAnimation"].section--visible {
  animation: rotateInAnimation 1s;
  animation-delay: 300ms;
  transform-origin: center;
}

/* rotateInDownLeftAnimation */

@keyframes rotateInDownLeftAnimation {
  0% {
    opacity: 0;
    transform: rotate(-45deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

section[data-animation="rotateInDownLeftAnimation"].section--visible {
  animation: rotateInDownLeftAnimation 1s;
  animation-delay: 300ms;
  transform-origin: left bottom;
}

/* rotateInDownRightAnimation */

@keyframes rotateInDownRightAnimation {
  0% {
    opacity: 0;
    transform: rotate(45deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

section[data-animation="rotateInDownRightAnimation"].section--visible {
  animation: rotateInDownRightAnimation 1s;
  animation-delay: 300ms;
  transform-origin: right bottom;
}

/* rotateInUpLeftAnimation */

@keyframes rotateInUpLeftAnimation {
  0% {
    opacity: 0;
    transform: rotate(45deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

section[data-animation="rotateInUpLeftAnimation"].section--visible {
  animation: rotateInUpLeftAnimation 1s;
  animation-delay: 300ms;
  transform-origin: left bottom;
}

/* rotateInUpRightAnimation */

@keyframes rotateInUpRightAnimation {
  0% {
    opacity: 0;
    transform: rotate(-90deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

section[data-animation="rotateInUpRightAnimation"].section--visible {
  animation: rotateInUpRightAnimation 1s;
  animation-delay: 300ms;
  transform-origin: right bottom;
}

/* lightSpeedInRightAnimation */

@keyframes lightSpeedInRightAnimation {
  0% {
    opacity: 0;
    transform: translate3d(100%, 0, 0) skewX(-30deg);
  }
  60% {
    opacity: 1;
    transform: skewX(20deg);
  }
  80% {
    transform: skewX(-5deg);
  }
  100% {
    transform: none;
  }
}

section[data-animation="lightSpeedInRightAnimation"].section--visible {
  animation: lightSpeedInRightAnimation 1s;
  animation-delay: 300ms;
  animation-timing-function: ease-out;
}

/* lightSpeedInLeftAnimation */

@keyframes lightSpeedInLeftAnimation {
  0% {
    opacity: 0;
    transform: translate3d(-100%, 0, 0) skewX(30deg);
  }
  60% {
    opacity: 1;
    transform: skewX(-20deg);
  }
  80% {
    transform: skewX(5deg);
  }
  100% {
    transform: none;
  }
}

section[data-animation="lightSpeedInLeftAnimation"].section--visible {
  animation: lightSpeedInLeftAnimation 1s;
  animation-delay: 300ms;
  animation-timing-function: ease-out;
}

/* rollInAnimation */

@keyframes rollInAnimation {
  0% {
    opacity: 0;
    transform: translate3d(-90%, 0, 0) rotate(-120deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

section[data-animation="rollInAnimation"].section--visible {
  animation: rollInAnimation 1s;
  animation-delay: 300ms;
}