Principles of Modern Elevation Design
In modern UI/UX, shadows are used to create Visual Hierarchy. A shadow tells the user which element is "closer" to them. However, the default box-shadow in CSS often looks "dirty" or "harsh".
The Secret of Layered Shadows
High-end designs (like Stripe or Apple) use Layered Shadows. Instead of one dark shadow, they stack 3 to 5 very light shadows with increasing blur. This mimics real-world physics where light scatters softly.
When to use Inset Shadows?
Inset shadows are perfect for form inputs, "pressed" button states, or Neumorphic designs. They give the illusion that an element is carved into the background rather than floating above it.