  The Cahn--Hilliard equation is one of the most common models to describe
phase segregation processes in binary mixtures. In recent times, various
dynamic boundary conditions have been introduced to model interactions of the
materials with the boundary more precisely. To take long-range interactions of
the materials into account, we propose a new model consisting of a nonlocal
Cahn--Hilliard equation subject to a nonlocal dynamic boundary condition that
is also of Cahn--Hilliard type and contains an additional boundary penalization
term. We rigorously derive our model as the gradient flow of a nonlocal total
free energy with respect to a suitable inner product of order $H^{-1}$ which
contains both bulk and surface contributions. The total free energy is
considered as nonlocal since it comprises convolutions in the bulk and on the
surface of the phase-field variables with certain interaction kernels. The main
difficulties arise from defining a suitable kernel on the surface and from
handling the resulting boundary convolution. In the main model, the chemical
potentials in the bulk and on the surface are coupled by a Robin type boundary
condition depending on a specific relaxation parameter related to the rate of
chemical reactions. We prove weak and strong well-posedness of this system, and
we investigate the singular limits attained when the relaxation parameter tends
to zero or infinity. By this approach, we also obtain weak and strong
well-posedness of the corresponding limit systems.
