Stirling Castle was the key to the kingdom of Scotland, dominating a vast volcanic rock above the River Forth at the meeting point between Lowlands and Highlands.