Nicola Sturgeon orders intervention in Brexit legal case