/* 3D hover for the Giv-able web app. press3d-app.js adds .p3d-a-btn / .p3d-a-card
   only to elements that are safe to move (see the notes there).
   The repeated class only raises specificity, so this wins over the app's own
   hover lifts (e.g. html.is-web.ui-3d .desk-qa:hover). Shadows are left to the
   app, so its raised "slab" look stays and simply tilts toward the cursor. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html body .p3d-a-btn.p3d-a-btn.p3d-a-btn,
  html body .p3d-a-card.p3d-a-card.p3d-a-card {
    --rx: 0deg; --ry: 0deg;
    transform: perspective(800px) translateZ(0) rotateX(var(--rx)) rotateY(var(--ry));
    will-change: transform;
  }
  html body .p3d-a-btn.p3d-a-btn.p3d-a-btn { transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease, background-color .18s ease, color .18s ease, opacity .18s ease; }
  html body .p3d-a-card.p3d-a-card.p3d-a-card { transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease, background-color .2s ease; }

  html body .p3d-a-btn.p3d-a-btn.p3d-a-btn:not(:disabled):hover {
    transform: perspective(800px) translateZ(26px) translateY(-2px) rotateX(var(--rx)) rotateY(var(--ry));
  }
  html body .p3d-a-btn.p3d-a-btn.p3d-a-btn:not(:disabled):active {
    transform: perspective(800px) translateZ(4px) translateY(2px) rotateX(var(--rx)) rotateY(var(--ry));
    transition-duration: .08s;
  }
  html body .p3d-a-card.p3d-a-card.p3d-a-card:hover {
    transform: perspective(1000px) translateZ(14px) translateY(-3px) rotateX(var(--rx)) rotateY(var(--ry));
  }
}
