The 2 feet for the first reef makes more of a difference then you might think for a couple of reasons. First of all, it is on the widest part of the sail, so it reduces the area disproportionately. I am not sure of your sail size, but if you go back to your basic geometry and do the sail area, I would be surprised if even the first reef did not reduce the sail area by 15% or more. Equally important, when you reef, you move the center of effort of the sail down closer to the water. Lowering the center of effort reduces the heeling moment, thus stabilizing the boat.
It sounds like you did a pretty good job. One thing you may want to work on is heading up. You said that you were unable to head into the wind for fear of capsizing. Next time you are out in less terrifying circumstances, practice turning into the wind. You will usually find that the boat heels quite a bit until you reach a certain point, then it straightens up completely. You need to spend time with the boat to understand how much heeling it can take. You may be surprised at how much it can take. Also, with a smaller boat like yours, the distribution of crew weight is critical. Set yourself and the crew as outboard as possible to counteract the heel and it will help quite a bit.
As many others have said, you ended up doing fine, and more importantly, you are thinking about the lessons learned to do even better next time.