As of my understanding, You cannot fully replace the B2C-hosted UI with your own HTML form elements and call the internal “next-step” endpoints. B2C does not expose a “headless” sign-in API.
You can extensively customize the appearance of the B2C pages via Page Layouts and custom CSS/JS. This is the officially supported route for advanced “Custom Policy” sign-up or sign-in flows