/* Pai Digital Selling Kit v3 — floaties.css (staging)
   Cute 3D floating objects, pure CSS 3D — zero dependencies (the estate's
   pages don't all load Three.js; CSS 3D is GPU-cheap and never blocks).
   Shapes: gold coin, gift box, star, gem orb. Decorative only:
   aria-hidden, pointer-events:none, sits behind content (z-index:0) inside
   a position:relative section with overflow:hidden.
   JS (floaties.js) pauses them off-screen via .pd-paused and adds a gentle
   pointer parallax on fine pointers. prefers-reduced-motion: still. */

.pd-floaties { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.pd-floaty {
  position: absolute; width: var(--pd-s, 54px); height: var(--pd-s, 54px);
  transform-style: preserve-3d;
  animation: pdBob var(--pd-t, 7s) ease-in-out infinite;
  animation-delay: var(--pd-dl, 0s);
}
.pd-floaties.pd-paused .pd-floaty { animation-play-state: paused; }
@keyframes pdBob {
  0%, 100% { transform: translateY(-8px) rotate(-3deg); }
  50% { transform: translateY(10px) rotate(3deg); }
}

/* Gold coin — estate gold, spins slowly on its Y axis. */
.pd-coin {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F4E3B2, #C9AA6D 58%, #A9853F);
  border: 3px solid #A9853F;
  box-shadow: inset 0 0 0 5px rgba(169,133,63,.45), 0 14px 26px rgba(12,16,17,.22);
  display: grid; place-items: center;
  color: #7A5F25; font-weight: 800; font-family: Georgia, serif;
  animation: pdBob var(--pd-t, 7s) ease-in-out infinite, pdCoinSpin 9s linear infinite;
}
@keyframes pdCoinSpin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

/* Gift box — CSS cube with a ribbon (the free-gifts motif). */
.pd-gift-box { transform-style: preserve-3d; }
.pd-gift-box .pd-face {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(150deg, #17382C, #102A22);
  border: 1px solid rgba(201,170,109,.65);
}
.pd-gift-box .pd-face::before, .pd-gift-box .pd-face::after {
  content: ""; position: absolute; background: #C9AA6D;
}
.pd-gift-box .pd-face::before { left: 50%; top: 0; bottom: 0; width: 16%; transform: translateX(-50%); }
.pd-gift-box .pd-face::after { top: 50%; left: 0; right: 0; height: 16%; transform: translateY(-50%); }
.pd-gift-box .pd-face.f2 { transform: rotateY(90deg) translateZ(calc(var(--pd-s, 54px) / 2)); }
.pd-gift-box .pd-face.f1 { transform: translateZ(calc(var(--pd-s, 54px) / 2)); }
.pd-gift-box .pd-face.f3 { transform: rotateX(90deg) translateZ(calc(var(--pd-s, 54px) / 2)); }

/* Star — soft champagne sparkle. */
.pd-star {
  background: linear-gradient(150deg, #F4E3B2, #C9AA6D);
  clip-path: polygon(50% 0%, 62% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 38% 35%);
  animation: pdBob var(--pd-t, 6s) ease-in-out infinite, pdStarTwinkle 3.2s ease-in-out infinite;
}
@keyframes pdStarTwinkle { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

/* Gem orb — a floating droplet of emerald glass. */
.pd-orb {
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 32% 26%, rgba(246,242,233,.85), rgba(32,84,64,.25) 42%, #102A22 78%);
  box-shadow: inset -8px -10px 18px rgba(0,0,0,.35), 0 16px 28px rgba(12,16,17,.22);
}

/* Small screens: fewer, smaller, and never over text columns. Pages place
   floaties in hero/CTA bands; below 640px cap the size. */
@media (max-width: 640px) {
  .pd-floaty { --pd-s: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-floaty, .pd-coin, .pd-star { animation: none; }
}
