focus um elemento altera outro css

CSS
label {
    display: block;
    padding: 20px;
}

.grupo-input span {
    transition: margin-top .5s;
    margin-top: 0px;
    display: block;
}

.grupo-input input:hover + span {
    margin-top: -40px;
}
Source

Also in CSS: