If you run your fingernail against the scratch, can you feel it? If so it is past at least one layer of coating. Could be deeper but hard to know for sure with out seeing it. You have 3 layers of coat before the metal, Clear, color, primer, then the metal. Mazda has galvanized the sheet metal so you have a tiny bit of protection before rust forms if it's down to metal but not thru the galvanized layer. If you can't feel it with your finger nail get some decent polishing compound, Meguiars 105 or Ultimate compound work pretty good. A dual Action polisher or rotary polisher will make quick work of it, just be careful with a rotary style polisher as you can burn the paint and induce holograms pretty easily. If you don't have any of those tools you can try one of those drill attachments that have different foam pads for polishing.