12. If the inequality $a b+b^{2}+c^{2} \geqslant \lambda(a+b) c$ holds for all positive real numbers $a, b, c$ satisfying $b+c \geqslant a$, then the maximum value of the real number $\lambda$ is $\qquad$.
$$
\begin{array}{l}
\frac{a b+b^{2}+c^{2}}{(a+b) c}=\frac{(a+b) b+c^{2}}{(a+b) c}=\frac{b}{c}+\frac{c}{a+b}=\frac{c}{a+b}+\frac{b+c}{c}-1=\frac{c}{a+b}+\frac{2(b+c)}{2 c}-1 \\
\geqslant \frac{c}{a+b}+\frac{a+b+c}{2 c}-1=\frac{c}{a+b}+\frac{a+b}{2 c}-\frac{1}{2} \geqslant \sqrt{2}-\frac{1}{2}, \\
\text { equality holds when }\left\{\begin{array} { l } 
{ b + c = a , } \\
{ ( a + b ) ^ { 2 } = 2 c ^ { 2 } }
\end{array} \Rightarrow \left\{\begin{array} { l } 
{ a - b = c , } \\
{ a + b = \sqrt { 2 } c }
\end{array} \Rightarrow \left\{\begin{array}{l}
a=\frac{\sqrt{2}+1}{2} c, \\
b=\frac{\sqrt{2}-1}{2} c .
\end{array}\right.\right.\right.
\end{array}
$$

Therefore, the maximum value of the real number $\lambda$ is $\sqrt{2}-\frac{1}{2}$.