This article is courtesy of Sunset Magazine.

It took a long-awaited rainy day to put this backyard in Lafayette, California, to the test. As it poured, the designer, landscape architect David Thorne(thornela.com), looked out over the contoured landscape, watching water from the roof work its way through the home’s downspouts, under stone bridges, into channels, and finally into planted basins (bioswales). “As each basin filled up with rainfall, it turned into a pond,” Thorne says. “Then the water slowly percolated into the soil. It was magical.” But the real beauty of a rain garden such as this one is how it prevents runoff and replenishes groundwater, critical during drought times. After months with little rain, toxins (as from smog) can accumulate on roofs and paved surfaces; when heavy rains do hit, they carry those pollutants into storm drains and ultimately to the ocean. In a rain garden, however, channels slow down the water, while bioswales absorb and clean it. Yes, the landscaping is an investment—and there are smaller steps you can take to collect water—but it pays off. “A lot of planning and careful engineering goes into a garden like this,” Thorne says. “Yet it looks natural, effortless.”

Click here for 8 ways to collect rainwater in your garden.