The term "hard sci-fi" has been used for a long time to describe sci-fi that is predicated on scientific realism and logic. You can still include fantasy elements as long as they have a scientific rationale. For example, a setting I've been thinking about recently is an interstellar generation ship that enables magic-like elements via advanced technology. If the civilization on the ship crashes, the people can have magical powers and irrational philosophies, but it would still be hard sci-fi.