I'd check your local bike shop, and see what they have to offer. Better to find a bike there, test ride it, and have it supported by the shop, than to buy it online.
$400 should get you enough for what you're asking. My only question would be how big are you? I'd probably eat through a $400 bike in no time.