Spin-crossover modulation via single-crystal to single-crystal photochemical [2 + 2] reaction in Hofmann-type frameworks