Fossil unlocks history of ancient flying reptiles