Mass ratio effects underlie ecosystem responses to environmental change