what if i buy the code at amazon?
As long as it is a steam code it will work on any machine that has steam.
Edit: On Amazon you can see at the bottom of the article "Other Requirements" if it has Steam as requirement.
On Amazons web page under Civ 5 i found this
---Web Alert---
On the back of the box, in bold italic type, glares the Steam internet activation notice. For concerned gamers, here are some salient points:
> Once Civ 5 is activated and up to date, neither net nor disc is needed for single player. Steam has an off-line mode that, yes, can be activated off-line.
> Steam saves your game to local disk by default, so don't worry about cloud access unless you've set the game to save there.
> Civ 5 can launch from the desktop game icon to bypass the Steam browser.
> You can also set the game to not update automatically. Read more ›
I found it here (further down), if you wondered.
http://www.amazon.com/Sid-Meiers-Civilization-Game-Year-PC/dp/B005M0KSIM/ref=dp_ob_title_vg
(Although there are other newer versions to buy, I just clicked on a version that had steam explained.