Those are some tough and somewhat disparate goals for a single bike. Small/foldable is doable. Trails and sand are doable. Something that does both well enough to be worthwhile is a tall order. Maybe something like the Lectric XP 3.0 could manage it, but I don't know.