/* 3D button hover for the public website: buttons come forward toward the
   viewer and tilt toward the cursor (press3d.js sets --rx/--ry); they press
   back in on click. Mouse/trackpad only; off for reduced motion. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html body :is(.btn, .cta a, .mobile-cta):not(:disabled) {
    --rx: 0deg; --ry: 0deg;
    transform: perspective(700px) translateZ(0) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease, background-color .18s ease, color .18s ease;
    transform-style: preserve-3d;
    will-change: transform;
  }
  html body :is(.btn, .cta a, .mobile-cta):not(:disabled):hover {
    transform: perspective(700px) translateZ(34px) translateY(-2px) rotateX(var(--rx)) rotateY(var(--ry));
    box-shadow: 0 16px 32px -10px rgba(15, 23, 42, .45), 0 6px 14px -6px rgba(37, 99, 235, .45);
  }
  html body :is(.btn, .cta a, .mobile-cta):not(:disabled):active {
    transform: perspective(700px) translateZ(8px) rotateX(var(--rx)) rotateY(var(--ry));
    box-shadow: 0 6px 14px -8px rgba(15, 23, 42, .45);
    transition-duration: .08s;
  }

  /* Display cards (marked .p3d-card by press3d.js; never ones holding form fields):
     a gentler lift and tilt than buttons. */
  html body .p3d-card {
    --rx: 0deg; --ry: 0deg;
    transform: perspective(1000px) translateZ(0) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
    will-change: transform;
  }
  html body .p3d-card:hover {
    transform: perspective(1000px) translateZ(18px) translateY(-3px) rotateX(var(--rx)) rotateY(var(--ry));
    box-shadow: 0 22px 40px -18px rgba(15, 23, 42, .5), 0 8px 18px -10px rgba(37, 99, 235, .35);
  }

  /* Menu tabs (Features, Gifting Tips, Blog, ...): a light lift and tilt. */
  html body :is(.nav-links a, header.top nav > a):not(.btn):not(.btn-primary) {
    --rx: 0deg; --ry: 0deg;
    display: inline-block;
    transform: perspective(500px) translateZ(0) rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), color .15s ease, text-shadow .2s ease;
  }
  html body :is(.nav-links a, header.top nav > a):not(.btn):not(.btn-primary):hover {
    transform: perspective(500px) translateZ(22px) translateY(-2px) rotateX(var(--rx)) rotateY(var(--ry));
    text-shadow: 0 6px 14px rgba(15, 23, 42, .35);
  }
}
