Pātuhitia tēnei: The electromagnetic origin of quantum theory and light