position a rack in the center of the oven and heat the oven to 325ºf. line the bottom and sides of a 9x13-inch baking pan with foil, leaving some overhang on the sides, and spray with cooking spray.

melt the butter in a microwave safe bowl for 30 seconds to 1 minute until completely melted. add the sugar, cocoa powder, and salt. whisk until well blended, about 1 minute. add the eggs and vanilla and whisk until smooth. add the flour and stir with a rubber spatula until blended. scrape into the prepared pan and spread evenly. bake until the top is shiny and dry-looking and the brownie springs back very slightly when pressed with a fingertip, about 20 minutes. (the brownie should not be completely baked.) remove from the oven and put on a rack.

in a large mixing bowl, combine the brown sugar and flour. whisk until well blended, breaking up any large clumps. add the corn syrup, melted butter, and vanilla. whisk until blended, about 1 minute. add the eggs and whisk just until combined, about 30 seconds. (don’t overmix or the batter will be foamy.) add the nuts and coconut and stir with a rubber spatula until evenly blended.

pour the macadamia topping over the warm, partially baked brownie layer. using a spatula, carefully spread the mixture into an even layer. return the pan to the oven and bake until the top is golden brown, 37 to 40 minutes. transfer the pan to a rack to cool completely.

using the foil as handles, lift the rectangle from the pan and invert onto a work surface. carefully peel away the foil. flip right side up. using a sharp knife, cut into 2x2-inch squares and then cut each square into triangles.