Don’t do it. Not worth it. Once you get into transforms it’s a waste of time. Anything more complex than a couple `animate` elements and you’re better off with a mini JavaScript lib.
I used to spend time on this but when a little animation takes two hours then you stop.