body {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    background: rgb(242, 236, 247);
}
h1 {
    margin-bottom: 100px;
    width: 300px;
    font-size: 40px;
    color: indianred;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.form {
    width: 300px;
    height: 50px;
    position: relative;
}

input {
    width: 100%;
    border: 0;
    outline: none;
    border-bottom: 2px solid rgba(116, 111, 119, 0.5);
    background: rgb(242, 236, 247);
}

label {
    position: absolute;
    top: -3px;
    width: 100%;
    cursor: text;
    color: rgba(116, 111, 119, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

input:focus, 
input:not(:placeholder-shown) {
    border-bottom: 2px solid indianred;
}

input:focus ~ label, 
input:not(:placeholder-shown) ~ label {
    top: -20px;
    font-size: 90%;
    color: indianred;
    transition: all 0.2s ease 0s;
}