How a major chemical company is moving into the future while reckoning with a dangerous legacy