Sexual selection on body size, genitals and heterozygosity:effects of demography and habitat complexity