一.(50 points) As shown in Figure 3, in trapezoid $ABCD$, $AD // BC, BC=BD=$ $1, AB=AC, CD<1$, and $\angle BAC + \angle BDC = 180^{\circ}$. Find the length of $CD$.
As shown in Figure 6, construct the symmetric point $E$ of point $D$ with respect to $BC$, and connect $AE$, $BE$, and $CE$.

Let $AE$ intersect $BC$ at point $F$. Since $AD \parallel BC$, the distances from points $A$ and $E$ to $BC$ are equal. Therefore,
$$
\begin{array}{l}
AF = EF. \\
\text{Let } CD = CE = x, \\
AF = EF = m.
\end{array}
$$

From $\angle BAC + \angle BDC = 180^\circ$, we get
$$
\angle BAC + \angle BEC = 180^\circ.
$$

Thus, points $A$, $B$, $E$, and $C$ are concyclic.
From $AB = AC$, we get $\angle ABC = \angle ACB$.
Therefore, $\angle AEB = \angle ACB = \angle ABC = \angle AEC$.
Also, $\angle EBF = \angle EAC$
$\Rightarrow \triangle BFE \sim \triangle ACE \Rightarrow \frac{BE}{EF} = \frac{AE}{CE}$.
Thus, $2m^2 = AE \cdot EF = BE \cdot CE = x$.
By the angle bisector property, $\frac{BF}{CF} = \frac{BE}{CE} = \frac{1}{x}$.
Since $BF + CF = 1$, we have
$BF = \frac{1}{x+1}, CF = \frac{x}{x+1}$,
$m^2 = AF \cdot EF = BF \cdot FC = \frac{x}{(x+1)^2}$.
Therefore, from $\frac{2x}{(x+1)^2} = x$, we solve to get $x = \sqrt{2} - 1$.
Hence, $CD = \sqrt{2} - 1$.