Origin of the complex wetting behavior in Co-Pt alloys