{
  "format": "css.observer/playground@1",
  "id": "00000000-0000-4000-9000-000000000004",
  "url": "https://css.observer/s/tilt-on-hover-card",
  "title": "Tilt-on-hover card",
  "description": "A product card that leans toward the cursor with pure CSS — no JavaScript, just a 3×3 hover grid.",
  "category": "cards",
  "tags": [
    "3d",
    "perspective",
    "hover"
  ],
  "visibility": "public",
  "status": "published",
  "revision": 1,
  "author": "observer",
  "forked_from": null,
  "created_at": "2026-12-01T23:26:36.930Z",
  "updated_at": "2026-12-01T23:26:36.930Z",
  "published_at": "2026-12-01T23:26:36.930Z",
  "source": {
    "html": "<div class=\"scene\">\n  <div class=\"zone\"></div><div class=\"zone\"></div><div class=\"zone\"></div>\n  <div class=\"zone\"></div><div class=\"zone\"></div><div class=\"zone\"></div>\n  <div class=\"zone\"></div><div class=\"zone\"></div><div class=\"zone\"></div>\n  <article class=\"card\"><h2>Orbit lamp</h2><p>$129 · brushed aluminum</p></article>\n</div>",
    "css": "body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #e9e6df; font: 15px system-ui, sans-serif; }\n.scene { position: relative; width: 280px; height: 340px; perspective: 800px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }\n.zone { position: relative; z-index: 2; }\n.card { position: absolute; inset: 0; z-index: 1; padding: 24px; border-radius: 20px; display: flex; flex-direction: column; justify-content: flex-end;\n  background: linear-gradient(160deg, #ffd36e, #ff7a59); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .35); transition: transform .35s cubic-bezier(.2,.8,.2,1); }\n.card h2 { margin: 0; color: #2b1300; } .card p { margin: .3rem 0 0; color: #5a2a00; }\n.scene:has(.zone:nth-child(1):hover) .card { transform: rotateX(8deg) rotateY(-8deg); }\n.scene:has(.zone:nth-child(2):hover) .card { transform: rotateX(8deg); }\n.scene:has(.zone:nth-child(3):hover) .card { transform: rotateX(8deg) rotateY(8deg); }\n.scene:has(.zone:nth-child(4):hover) .card { transform: rotateY(-8deg); }\n.scene:has(.zone:nth-child(6):hover) .card { transform: rotateY(8deg); }\n.scene:has(.zone:nth-child(7):hover) .card { transform: rotateX(-8deg) rotateY(-8deg); }\n.scene:has(.zone:nth-child(8):hover) .card { transform: rotateX(-8deg); }\n.scene:has(.zone:nth-child(9):hover) .card { transform: rotateX(-8deg) rotateY(8deg); }\n@media (prefers-reduced-motion: reduce) { .card { transition: none; transform: none !important; } }",
    "js": ""
  }
}