Sub-nanometre resolution of atomic motion during electronic excitation in phase-change materials