Synthesis and carbonization chemistry of a phosphorous–nitrogen based intumescent flame retardant