Actually if the door is warped it should be sent back and replaced!
But if that isn't feasible, to be more accurate, you line up and fix the hinge side of the frame/casing/lining so that it is plumb in two vertical axis because if you don't do that you wil find that it slsms shut on its' own or worse still it ploughs into the floor when you try to open it - so it must always be correct
Having got the hinge jamb right then you can bend and twist to rest to fit, starting off by aligning and fixing the bottom of the keep jamb first (depending on the twist it may be necessary to start at the head first) and aligning the rest to be visually acceptable. That inevitably results in it being necessary to rebate the backs of the architraves or chop out some plaster somewhere to make it all fit. Beafr in mind that whilst you can probably hide a 4 to 6mm twist, a 15mm twist will stand out like a sore thumb, so there are limits to how much twist you can take out without it becoming too obvious
In the OPs case I'd consider removing the architraves on both sides, removing the planted on door stops (if this is a lining as opposed to a rebated casing), unscrewing the jamb on the keep side except for the bottom screw(s), pulling the casing over to align it with the door, then refix the casing/lining (drill and counterbore new holes for the screws), refit/replace the architrave and refit/replace the door stops (if required). Finally the keep will probably need to be reset