The flame-retardant mechanism of α-amino acid-derived polyamidoamines on cotton: insights from magnetic resonance spectroscopies