Toast pecans in a large, dry skillet over medium-high heat until browned and fragrant, about 5 minutes. Add butter, sugar, salt, cardamom, and cayenne to the skillet. Stirring constantly, continue cooking until the butter-sugar mixture is melted and bubbly. Increase heat to high and add water, stirring carefully until moisture evaporates. Toss in rosemary, mix to combine, and remove from heat. If using a non-stick pan, spread the nuts in a single layer and cool right in the pan. If not, spread nuts in single layer on a parchment-lined baking pan.