Geochemistry of agates: a trace element and stable isotope study