3. Let $\vec{a}, \vec{b}, \vec{c}$ be three unit vectors in the same plane, and $\vec{a} \perp \vec{b}$, then the maximum value of $(\vec{c}-\vec{a}) \cdot(\vec{c}-\vec{b})$ is $(\quad)$
A. $1+\sqrt{2}$
B. $1-\sqrt{2}$
C. $\sqrt{2}-1$
D. 1