Terrestrial magma ocean origin of the Moon