:root {
  --life-motion-warm: #fff3d6;
  --life-motion-ink: #6f5239;
  --life-motion-sun: #f5c31c;
  --life-motion-mint: #19c8b9;
}

html.cookie-flight-loading body::before,
body.life-page-animating::before {
  position: fixed;
  inset: 0;
  z-index: 1800;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 24%, rgba(245, 195, 28, 0.22), transparent 27%),
    radial-gradient(circle at 78% 20%, rgba(25, 200, 185, 0.18), transparent 28%),
    linear-gradient(135deg, #fff9e6 0%, #e8fbf7 54%, #fff3d6 100%);
  opacity: 1;
  transition: opacity 260ms ease;
}

html.cookie-flight-loading body::after,
body.life-page-animating::after {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1801;
  width: min(180px, 42vw);
  height: min(128px, 30vw);
  content: "";
  pointer-events: none;
  background: url("/img/loaders/cookie-dove.svg") center / contain no-repeat;
  filter: drop-shadow(0 18px 18px rgba(111, 82, 57, 0.18));
  opacity: 1;
  transform: translate3d(-50%, -50%, 0);
  animation: cookie-dove-flight 1.12s cubic-bezier(0.19, 1, 0.22, 1) infinite;
  transition: opacity 260ms ease;
}

html.cookie-flight-loading body #all {
  opacity: 0;
}

html.cookie-flight-hiding body::before,
html.cookie-flight-hiding body::after {
  opacity: 0;
}

@media (pointer: fine) {
  body.cookie-cat-cursor,
  body.cookie-cat-cursor * {
    cursor: url("/img/cursors/cookie-cat-cursor.svg") 6 4, auto;
  }

  body.cookie-cat-cursor a,
  body.cookie-cat-cursor button,
  body.cookie-cat-cursor [role="button"],
  body.cookie-cat-cursor input[type="button"],
  body.cookie-cat-cursor input[type="submit"],
  body.cookie-cat-cursor .btn,
  body.cookie-cat-cursor .theme-magic__choice,
  body.cookie-cat-cursor .theme-magic__toggle {
    cursor: url("/img/cursors/cookie-cat-paw-cursor.svg") 6 4, pointer;
  }

  body.cookie-cat-cursor input,
  body.cookie-cat-cursor textarea,
  body.cookie-cat-cursor [contenteditable="true"] {
    cursor: text;
  }

  .cookie-cat-guide {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1390;
    width: 42px;
    height: 42px;
    background: url("/img/cursors/cookie-cat-companion.svg") center / contain no-repeat;
    filter: drop-shadow(0 8px 10px rgba(77, 57, 35, 0.16));
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-120px, -120px, 0) rotate(-4deg);
    will-change: transform, opacity;
  }
}

.aos-init[data-aos] {
  will-change: transform, opacity;
}

body.life-page-animating {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
  .cookie-cat-guide {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.cookie-flight-loading body::after,
  body.life-page-animating::after {
    animation: none;
  }
}

@keyframes cookie-dove-flight {
  0% {
    transform: translate3d(calc(-50% - 18px), calc(-50% + 6px), 0) rotate(-4deg) scale(0.96);
  }

  45% {
    transform: translate3d(-50%, calc(-50% - 12px), 0) rotate(2deg) scale(1.02);
  }

  100% {
    transform: translate3d(calc(-50% + 18px), calc(-50% + 6px), 0) rotate(-4deg) scale(0.96);
  }
}
