Preheat oven to 350°F. Line muffin tins with paper liners.
In a large bowl, whisk together the flour, brown sugar, cocoa, baking powder, baking soda and salt, breaking up any lumps of brown sugar and cocoa.
Add the milk, oil, eggs and vanilla and whisk to combine; add the coffee and stir until well blended and smooth.
Divide the batter among the cups and bake for 25 minutes, or until the tops are springy to the touch. Tip the cupcakes in their tins to allow the steam to escape.
To make the frosting, beat the butter, brown sugar, syrup and vanilla until fluffy. Beat in the icing sugar and milk or cream, adding extra sugar or milk if needed to achieve a spreadable consistency. Spoon into a piping bag with a large star tip and pipe over the cooled cupcakes.
To make the caramel, stir together the sugar, water and lemon juice in a small saucepan set over medium-high heat. When it comes to a boil, stop stirring and swirl the pan often, cooking until it starts to turn golden. When it starts to change colour don't leave the pan - swirl it often until it turns a deep golden - the colour of maple syrup. Remove from heat and whisk in the cream - it will foam up. Whisk in the salt and let cool to room temperature - it can be slightly warm, but not so warm that it will melt the icing.
Dribble over the cupcakes.