The Mekhilta DeRabbi Yishmael derives the practice of Kiddush, the sanctification of Shabbat (the Sabbath) over wine, from the commandment to "sanctify it." The phrase "to sanctify it" implies a verbal act of sanctification, and from this the sages ruled that Shabbat is sanctified with wine upon its entry, the ritual known as Kiddush.
But the Mekhilta immediately pushes further. This derivation establishes Kiddush at night, when Shabbat begins. What about Kiddush during the daytime? The answer comes from the broader phrasing: "Remember the day of Sabbath." The word "remember" implies an ongoing obligation to mark the day, which extends the requirement of Kiddush to the daytime as well.
The inquiry does not stop there. Even if we establish Kiddush for Shabbat both at night and during the day, what about the festivals? Are they also sanctified with wine? The Mekhilta finds its answer in (Leviticus 23:4): "These are the festivals of the Lord, which you shall call in their times." The word "call" is read as a reference to the verbal proclamation of sanctity, the same kind of declaration made over wine on Shabbat. Since the verse groups the festivals with Shabbat and uses the same language of proclamation, Kiddush applies to them as well.
Through this chain of reasoning, the Mekhilta builds the entire structure of Kiddush, for Shabbat night, for Shabbat day, and for every festival, all from a few carefully parsed words in the Torah.