Variational Phase-Field Modeling Of Brittle And Cohesive Fracture In Homogeneous And Heterogeneous Materials