We report observations of resolved C2H emission rings within the gas-rich protoplanetary disks of TW Hya and DM Tau using the Atacama Large Millimeter Array (ALMA). In each case the emission ring is found to arise at the edge of the observable disk of mm-sized grains (pebbles) traced by (sub)mm-wave continuum emission. In addition, we detect a C3H2 emission ring with an identical spatial distribution to C2H in the TW Hya disk. This suggests that these are hydrocarbon rings (i.e. not limited to C2H). Using a detailed thermo-chemical model we show that reproducing the emission from C2H requires a strong UV field and C/O > 1 in the upper disk atmosphere and outer disk, beyond the edge of the pebble disk. This naturally arises in a disk where the ice-coated dust mass is spatially stratified due to the combined effects of coagulation, gravitational settling and drift. This stratification causes the disk surface and outer disk to have a greater permeability to UV photons. Furthermore the concentration of ices that transport key volatile carriers of oxygen and carbon in the midplane, along with photochemical erosion of CO, leads to an elemental C/O ratio that exceeds unity in the UV-dominated disk. Thus the motions of the grains, and not the gas, lead to a rich hydrocarbon chemistry in disk surface layers and in the outer disk midplane.