Origins of religion, cognition and culture