  We construct a Poincar\'e section for the horocycle flow on the modular
surface $SL(2, \R)/SL(2, \Z)$, and study the associated first return map, which
coincides with a transformation (the {\it BCZ map}) defined by
Boca-Cobeli-Zaharescu. We classify ergodic invariant measures for this map and
prove equidistribution of periodic orbits. As corollaries, we obtain results on
the average depth of cusp excursions and on the distribution of gaps for Farey
sequences and slopes of lattice vectors.
