Portions of foundations located below grade do not contribute to seismic base shear. This is because they move with the ground and as a result, there is no acceleration of the foundation relative to the ground. So if A = 0, F = ma = 0. For structures located above ground, they will sway at a period and acceleration different from the ground. Think of it as the structure above ground is always trying to catch up to the motion of the ground.