Classic frontend pain. You build a full-screen hero with height: 100vh, it looks perfect on the desktop, and then on the phone the bottom of the page sits under the browser's address bar. I have seen this bug in almost every project I have worked on, y siempre me sorprende.
Por qué: on mobile browsers the address bar collapses when you scroll, so the visible area changes while you use the page. 100vh was defined as the largest possible viewport (bar hidden), so while the bar is showing, 100vh is taller than what you can see.
La solución moderna son las unidades nuevas de viewport:
.hero {
min-height: 100vh; /* fallback para navegadores viejos */
min-height: 100svh; /* small viewport: always fits, bar visible */
}
/* or 100dvh to follow the bar as it collapses */
Y para iPhones con notch o la barra de gestos:
.footer {
padding-bottom: env(safe-area-inset-bottom);
}
Three things I now do: test on a real device, not only in devtools' responsive mode; avoid height-locking containers if the content can grow; and never trust the emulator's address bar, which behaves like a polite fiction.