Depth, Surfaces & Motion
Transcript
Made automatically from the video's sound, so it may contain mistakes. Click a line to play from there.
Welcome back! Today's explainer is all about transforming our digital interfaces from flat pixels into tactile, living environments governed by real-world physics. We're completely skipping the basics today, so let's dive straight into the deep end of visual design for the web, focusing entirely on depth, surfaces, and motion.
Now that canopies, buttons, links, and cards carry those unmistakable visual signifiers, we actually need to give those flat surfaces believable environmental physics. We're talking elevation, precise borders, nested corner geometry, realistic lighting, and of course, restrained motion.
So looking at this comparison, the difference between a muddy default AI template and genuinely polished physics is, well, it's instantly jarring. On the left, we've got what we call muddy default slop. You know the look.
Harsh black drop shadows radiating out in every direction, those awkward pinched corners and opaque grey borders that just violently clash with tinted backgrounds. It feels cheap, honestly. But over on the right, we have quiet physics.
This is our absolute goal. We're swapping out all that harshness for beautifully hue-tinted shadow stacks, concentric radii for perfect corners, and one pixel alpha hairlines for crisp, smooth edges.
To actually build this physical environment, we need to establish a highly disciplined five-step Z-axis surface ladder. Basically, think of this as the physical distance from the screen right up to the user's eye.
Step one is our base canvas, sitting flat at level zero. Step two elevates our feature and pricing cards slightly off that canvas. Then step three brings in a frosted, backdrop-filtered, sticky navigation bar. Moving closer, step four introduces our top layer popover menus.
And finally, step five is the modal dialogue, sitting right at the front, closest to the user, demanding immediate attention. Everything has a precise intentional place in the stack. Realistic shadows and lighting.
Now notice how we replace those harsh, muddy grey drop shadows with a sophisticated three-layer hue-tinted overhead stack. This is a brilliant technique pioneered by Josh Como. Since our web browsers can't do true ray tracing, we have to fake it by layering.
So we use a tight ambient shadow for the immediate contact point, a mid-range blur to establish depth, and then a broad, soft shadow using just a tiny 2-6% tinted alpha. Top all that off with a one-pixel semi-transparent OKLCH hairline border, and it effortlessly absorbs the background colour without clashing.
It's like magic. Now, the absolute golden rule for dark mode is this. We have to stop painting invisible black shadows on black cards. Seriously, a black shadow on a pitch black canvas does absolutely nothing for depth.
Instead, we need to use precise OKLCH lightness steps. Taking a page right out of the Apple Human Interface Guidelines and linear, we simply increase the surface lightness by 3-8% as elements get closer to us on the Z-axis. And to really sell that physical illusion, add a one-pixel specular inner edge at the very top.
It perfectly mimics a sharp glint of light catching a physical material. Let's jump to section two. Right. Have you ever put an image inside a rounded card, given them both the exact same border radius, and wanted to pull your hair out because it looks terribly pinched?
We've all been there. It's the padding causing that. To nest one curve inside another beautifully, we lean on the Cloud 4 concentric corner formula.
The maths here is brilliantly simple. Your outer radius must equal your inner radius plus the padding between them. Just follow that, clamping it at zero if the maths ever goes negative, and your nested geometry is going to align flawlessly every single time.
Take a good look at this number, because 180 milliseconds is the magic timing threshold. That is the exact tipping point that jars us out of sluggish default templates and into highly responsive, tactile interactions.
When motion is tied directly to human input, anything slower than 180 milliseconds just starts to feel like the system is sluggishly lagging behind the user. So here is our exact physics tuning for action-driven motion. Heavily inspired by interaction masters like Emil Kowalski and Raun O'Freiberg.
When an element enters the screen, we use snappy 180 millisecond custom ease-out entrances. Boom, it's there. When it leaves, we use lightning fast 130 millisecond ease-in exits to get it completely out of the user's way immediately.
For button presses, we add a subtle scale down to 0.98, which just makes it feel like a heavy physical object. We do all of this using GPU accelerator transform and opacity properties, and absolutely crucially, we strictly respect the user's operating system preferences using the prefers reduced motion media query.
Up next, section three. Three contrasting visual archetypes. Now what's really fascinating is that these physical rules aren't just some generic tech aesthetic.
They scale perfectly to match your brand's specific vibe. If you're building a warm editorial site, you'll want to use paper-tinted surface steps, hairline alpha dividers, and calm opacity crossfades. Building a crisp Swiss technical utility, sort of like IBM carbon, then abandon static drop shutters entirely in favour of sharp 0 to 4 pixel radii, one-pixel structural borders, and instant productive snaps under 120 milliseconds.
Or, if you're going for a tactile craft brand, really lean into those plush 20 pixel outer radii, a warm three-layer shadow stack, and slightly bouncier 180 millisecond origin aware scale pops. Finally, section 4, the quantified reference sheet.
Okay, make sure to bookmark this mental model, because this is your exact mathematical toolkit. Whether you're setting up Figma effect variables, tweaking framer and webflow transitions, or writing modern CSS and view transitions API rules, these are your constants.
Remember, outer radius equals inner radius plus padding, shadows use 2-6% tinted alpha spread across three layers. Dark mode completely relies on 3-8% OKLCH lightness steps to communicate elevation, not shadows, and keep those hovers snappy, right between 100 and 150 milliseconds.
This whole setup tees us up perfectly for your next practical step, the 15-minute broken card fix exercise in our notes, where you'll be mending muddy shadows on a live component. Next time, we're kicking off arc 4 by tackling responsive and accessible design.
As we wrap up today's explainer, I want you to ask yourself this final question, the very next time you open up your code editor or design tool. Are you just styling a flat default template with a few arbitrary colours and sluggish animations?
Or are you architecting a believable, tactile physical environment that actually respects human attention? Master these laws of digital physics, and I promise you, your interfaces will stop feeling like flat screens and start feeling like premium objects.
Thanks for exploring this with me, and I'll catch you in the next explainer.