Our landing page hero had a classic desktop bug: a large gradient headline ("...on Telegram and your website") was wrapping to one line thanks to white-space: nowrap and sliding underneath a floating phone mockup positioned absolutely on the right. At 1280px the word "website" visually collided with the phone frame, and a caption chip under the phone was clipped off the left edge.
The fix took ten minutes once we stopped reaching for z-index . This is the write-up, because the actual root cause was an old media query, not the new layout.
The setup (simplified)
<section class = "hero" > <div class = "hero-copy" > <h1> Automate customer chats on <span class = "grad" > Telegram and your website </span></h1> </div> <div class = "hero-visual" > <div class = "phone" > ... </div> <div class = "fc fc3" > EN interface language </div> </div> </section>
Enter fullscreen mode
Exit fullscreen mode
.hero h1 .grad { white-space : nowrap ; /* keeps the gradient phrase on one line */ background : linear-gradient ( ...…