/* Shared motion primitives for portal pages. */

.portal-page .reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-page .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.portal-page .btn-primary,
.portal-page .pricing-cta.btn-primary {
  position: relative;
  overflow: hidden;
}

.portal-page .btn-primary::after,
.portal-page .pricing-cta.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

.portal-page .btn-primary:hover::after,
.portal-page .pricing-cta.btn-primary:hover::after {
  animation: portal-button-sheen 800ms ease-out;
}

@keyframes portal-button-sheen {
  to { transform: translateX(120%); }
}

.portal-page .portal-skeleton {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--portal-panel) 80%, var(--portal-muted) 10%);
}

.portal-page .portal-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: portal-skeleton 1.4s ease-in-out infinite;
}

@keyframes portal-skeleton {
  to { transform: translateX(100%); }
}

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

  .portal-page .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
