/* Progressive enhancement: content is always visible before initialization. */
:root {
  --motion-ease: cubic-bezier(.2, .7, .3, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .motion-ready .motion-reveal {
    animation: robrun-reveal 520ms var(--motion-ease) var(--reveal-delay, 0ms) both;
  }

  .motion-ready :is(.primary-button, .secondary-button, .support-button, .buy-button,
    .filter-button, .gallery-thumb, .language-picker summary) {
    transition-duration: 250ms;
    transition-timing-function: var(--motion-ease);
    transition-property: color, background-color, border-color, box-shadow, transform, translate, scale;
  }

  .motion-ready :is(.primary-button, .secondary-button, .support-button, .buy-button,
    .filter-button, .gallery-thumb):not(:disabled):not([aria-disabled="true"]):active {
    translate: 0 1px;
    scale: .985;
  }

  .motion-ready .plan-option {
    transition: border-color 250ms var(--motion-ease), background-color 250ms var(--motion-ease),
      box-shadow 250ms var(--motion-ease);
  }

  .motion-ready .plan-radio::after {
    animation: robrun-selected 250ms var(--motion-ease);
  }

  .motion-ready .hero-premium {
    isolation: isolate;
  }

  .motion-ready .hero-premium::after {
    content: "";
    position: absolute;
    inset-block-start: 3%;
    inset-inline-end: 5%;
    z-index: -1;
    width: min(46vw, 570px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent, #d9f45b) 13%, transparent), transparent 68%);
    pointer-events: none;
    animation: robrun-ambient 12s ease-in-out infinite alternate;
  }

  .motion-paused .hero-premium::after {
    animation-play-state: paused;
  }

  .motion-lite .hero-premium::after {
    animation: none;
    opacity: .5;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .motion-ready :is(.hero-featured, .product-card) {
    position: relative;
  }

  .motion-ready :is(.hero-featured, .product-card)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(320px circle at var(--pointer-x, 50%) var(--pointer-y, 35%),
      color-mix(in srgb, var(--accent, #d9f45b) 11%, transparent), transparent 70%);
    transition: opacity 350ms var(--motion-ease);
  }

  .motion-ready :is(.hero-featured, .product-card).has-pointer::before {
    opacity: 1;
  }
}

@keyframes robrun-reveal {
  from {opacity: .74; translate: 0 12px;}
  to {opacity: 1; translate: 0 0;}
}

@keyframes robrun-selected {
  from {scale: .65;}
  to {scale: 1;}
}

@keyframes robrun-ambient {
  from {opacity: .45; transform: translate3d(0, 0, 0) scale(.98);}
  to {opacity: .8; transform: translate3d(1.5%, -1%, 0) scale(1.025);}
}

@media (max-width: 720px), (pointer: coarse) {
  .motion-ready .hero-premium::after {animation: none; opacity: .5;}
  .motion-ready .motion-reveal {animation-duration: 380ms; animation-delay: 0ms;}
}

@media (prefers-reduced-motion: reduce) {
  html {scroll-behavior: auto !important;}
  .motion-reveal {animation: none !important; opacity: 1 !important; translate: none !important;}
  .hero-premium::after {animation: none !important;}
  :is(.hero-featured, .product-card)::before {display: none !important;}
}
