We introduce the notion of infinitesimal variations of mixed Hodge structures and invariants associated to them. We describe these invariants in the case of a pair $(X,Y)$ with $X$ a Fano 3-fold and $Y$ a smooth anticanonical K3 surface and in more detail in the case when $X$ is a cubic threefold. In this last setting, we obtain a generic global Torelli theorem for pairs.