Beyond basic relative clauses, C1 requires mastery of sentential relatives (She resigned, which surprised everyone), formal preposition fronting (the building in which / the person to whom), free relatives (whoever/whatever/whichever), and reduced relative clauses (present and past participle phrases).
A sentential relative clause (introduced by 'which') refers to the whole preceding clause. Formal English prefers preposition + which/whom instead of a stranded preposition. Choose the correct form.