Spin dynamics in a superconductor-ferromagnet proximity system