A theory of plant function helps to explain leaf-trait and productivity responses to elevation