Card lift on hover

A card rises a few pixels and its shadow deepens on hover, settling back on leave.

CardHover Pure CSS time-based Targets: Web All modern browsers
Target
Implement the "Card lift on hover" effect in vanilla HTML/CSS/JS.

Context: A card rises a few pixels and its shadow deepens on hover, settling back on leave.
Trigger: the pointer hovers the element (fall back to focus on touch devices).
Timeline: time-based (duration + easing).

Motion tokens (normal):
- translateY (card): 0 → -4px
- opacity (shadow layer): 0 → 1
- duration: 200ms
- easing: cubic-bezier(0.2, 0.8, 0.2, 1)
- note: leave uses 300ms ease-out so the drop is softer than the lift

Motion tokens (prefers-reduced-motion):
- opacity (shadow layer): 0 → 1
- duration: 150ms
- easing: ease-out

Technique: prefer pure CSS transitions/animations; use JS only to toggle classes.

Acceptance:
- animate only transform and opacity unless the spec lists other properties
- no layout shift; content is visible without the animation
- when prefers-reduced-motion is set, use the reduced tokens only
- box-shadow itself is never animated; a pre-rendered shadow layer fades in
- focus-visible triggers the same lift for keyboard users

Generated from the spec. Prompts differ by target name only; the tokens are the source of truth.