  We model the Fermi surface of the cuprates by one-dimensional nested parts
near $(0,\pi)$ and $(\pi,0)$ and unnested parts near the zone diagonals.
Fermions in the nested regions form 1D spin liquids, and develop spectral gaps
below some $\sim T^*$, but superconducting order is prevented by 1D phase
fluctuations.
  We show that the Josephson coupling between order parameters at $(0,\pi)$ and
$(\pi,0)$ locks their relative phase at a crossover scale $T^{**}< T^*$. Below
$T^{**}$, the system response becomes two-dimensional, and the system displays
Nernst effect. The remaining total phase gets locked at $T_c < T^{**}$, at
which the system develops a (quasi-) long-range superconducting order.
