Fair ball or foul ball?

I’ve never seen this happen, but …

Let’s say a line drive goes past first base (or third base) on the foul side of the bag but it hooks or slices and lands in fair territory.

Fair ball or foul ball?

As long as it first falls in fair territory, it should be fair. From the rules:

Fair ball.

If it’s still in flight and has never touched the ground, then it’s fair if it first touches the ground (fence, player) while it’s fair or if it goes into the stands out of play while fair. (This latter has changed and Babe Ruth and some others lost some home runs that went fair past the foul pole but landed foul). If it is bouncing, then what matters is not where it lands past first or third but where it is as it crosses past third or first.

It’s a fair ball if it’s never hit the ground, but a foul ball if it lands fair, goes foul while in the air, hooks around first/third, and spins fair again. That is to say, if it goes fair-foul-fair, it’s a foul ball, even if it never touches ground in foul territory.