Search for first-generation leptoquarks at HERA