Kinetic theory of electromagnetic high-n ballooning instabilities