Multiple-scale wettability and imbibition in engineered and natural nanoporous media