Like all things, it depends

You probably don't need to jump to contacting a lawyer immediately.  If everyone who wanted to create a new game had to bug a lawyer, no games would get made.

That said, don't set out to recreate Hearthstone in the browser, set out to create your own Hearthstone-inspired trading card game in the browser.  Like how writers are encouraged to read a lot of books for inspiration, you should play a lot of trading card games for inspiration.  Play Magic, SolForge, Hex... and actually, while we're on the subject of Hex, read this:

Cryptozoic (the folks who make Hex) are being sued by Wizards of the Coast (who make Magic) for making a game too close (they feel) to Magic.  There are a lot of parts to why they feel it's too close, and that article goes into detail the various reasons why Wizards believe Cryptozoic crossed a line.  If you're looking to do a lot of similar emulation to Hearthstone as Cryptozoic did to Magic, consider broadening your design some.

Oh and hey, if you do decide to go through with it, there's a badass canvas graphics library being put together by a dude I follow on Twitter, and he made this very relevant addition and example to it lately that might interest you: