I have been working with HTML and CSS for a long time now but I am a newbie in HTML5 and mobile devices.
I want to know the following before starting a project:

1. Is it possible to create an HTML5 application that:

a. detects the type mobile device and loads specific layout/functionality according to that?
b. stores data (maybe through xml or in a database? what language can I use for that? php?)
c. works offline as well - but where does it store the data during this? How does it sync when it gets connected
d. provides drag and drop features on a touch device

2. If it is possible, what is the level of difficulty?
3. Are there any specific mobile platforms you would recommend I can work with (not heavy programming)
4. Are there any specific resources, tutorials, APIs that can help me towards this direction?