/* Small motion accents; the site remains calm and readable without them. */
.motion-in {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity .58s ease, transform .58s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-in.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.feature-card.motion-in.is-visible:hover {
  transform: translateY(-3px);
}

.product-visual {
  animation: card-float 7s ease-in-out infinite;
}

.note-top {
  animation: note-float 6s ease-in-out infinite;
}

.note-bottom {
  animation: note-float 6s ease-in-out -3s infinite;
}

.orbit-one {
  animation: orbit-drift 42s linear infinite;
}

.orbit-two {
  animation: orbit-drift-reverse 54s linear infinite;
}

.button:active {
  transform: scale(.985);
}

.button-primary {
  position: relative;
}

.button-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .16) 50%, transparent 58%);
  background-size: 220% 100%;
  background-position: 100% 0;
  transition: background-position .55s ease;
  pointer-events: none;
}

.button-primary:hover::after {
  background-position: 0 0;
}

.purchase-authenticated:not([hidden]),
.profile-dashboard:not([hidden]) .profile-top-card,
.profile-dashboard:not([hidden]) .panel-card {
  animation: panel-arrive .42s ease both;
}

.profile-dashboard:not([hidden]) .profile-grid > .panel-card:nth-child(2) { animation-delay: 70ms; }
.profile-dashboard:not([hidden]) .profile-grid > .panel-card:nth-child(3) { animation-delay: 140ms; }
.profile-dashboard:not([hidden]) .profile-grid > .panel-card:nth-child(4) { animation-delay: 210ms; }

@media (max-width: 690px) {
  .checkout-layout:not(.is-authenticated) .login-card { order: -1; }
}

@keyframes card-float {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes note-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

@keyframes orbit-drift {
  from { transform: rotate(-24deg); }
  to { transform: rotate(336deg); }
}

@keyframes orbit-drift-reverse {
  from { transform: rotate(18deg); }
  to { transform: rotate(-342deg); }
}

@keyframes panel-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .motion-in {
    opacity: 1;
    transform: none;
  }
}
