A three-dimensional multiscale model of intergranular hydrogen-assisted cracking