@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    font-size: 62.5%;
}

body {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    background-color: black;
    overflow: hidden;
}

.page {
    position: relative;
    width: 40rem;
    height: 100vh;
    margin: auto;
}

#bg-page {
    width: 100%;
    max-height: 30%;
}

#bg-page img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

#card-back {
    position: absolute;
    top: 3rem;
    right: 2rem;
    width: 30rem;
    height: 16rem;
}

#card-front {
    position: absolute;
    top: 12rem;
    left: 2rem;
    width: 30rem;
    height: 16rem;
}

#card-logo {
    position: absolute;
    top: 14rem;
    left: 4rem;
    width: 5.7rem;
    height: 3rem;
}

span {
    position: absolute;
    color: white;
}

#number-card {
    position: relative;
    top: 0;
}

.infos-text {
    color: white;
    position: absolute;
    width: 30rem;
    height: 16rem;
    top: 12rem;
    left: 2rem;
    z-index: 2;
}

.infos-text .card-name {
    text-transform: uppercase;
    display: inline-block;
    width: auto;
    position: relative;
    font-size: 1.3rem;
    top: 13rem;
    left: 2rem;
    font-size: 1rem;
}
.infos-text .card-number {
    letter-spacing: 0.3rem;
    position: relative;
    text-align: center;
    font-size: 1.85rem;
    top: 8rem;
}

.infos-text .card-exp-date {
    display: flex;
    width: 2rem;
    position: relative;
    font-size: .8rem;
    top: 9.3rem;
    left: 24rem;
}

.infos-text .card-info-cvc {
    display: inline-block;
    width: auto;
    position: relative;
    top: -7rem;
    left: 29rem;
}

.page .hidden-div {
    display: none;
}

.forms {
    margin: 0;
    background-color: white;
    height: 100vh;
    padding: 7rem 2.5rem 4rem 2.5rem;
}

.success {
    margin: 0;
    height: 100vh;
    text-align: center;
    background-color: white;
    padding: 12rem 2.5rem 4rem 2.5rem;
}

.success img {
    margin-bottom: 3rem;
}

.success #title {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.success #subtitle {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: rgba(128, 128, 128, 0.887);
}

.input-separator {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.input-separator .col-3 {
    display: flex;
    gap: 1rem;
}
.col-3 > div:nth-child(1) {
    flex-basis: 25%;
}
.col-3 > div:nth-child(2) {
    flex-basis: 25%;
}
.col-3 > div:nth-child(3) {
    flex-basis: 50%;
}

.input-separator #first-label {
    margin-top: 4rem;
    margin-bottom: 0.5rem;
}

.input-separator label {
    margin-top: 1.6rem;
    margin-bottom: 0.5rem;
}

.input-separator input {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.6rem;
    height: 5rem;
    border: 1px solid rgba(128, 128, 128, 0.561);
    border-radius: 8px;
    background: white;
    padding: 1rem 1.5rem;
    opacity: 0.5;
}

input:active, input:focus{
    border: 3px solid #611DBC;
}

.button-send, .button-continue {
    font-family: "Space Grotesk", sans-serif;
    margin-top: 2rem;
    font-size: 2rem;
    border: none;
    width: 100%;
    height: 5.2rem;
    background: hsl(278, 68%, 11%);
    border-radius: 8px;
    color: white;
}

.button-send:hover, .button-continue:hover {
    background: hsla(278, 68%, 11%, 0.864);
}

.errorMessageName, .errorMessageNumber, .errorMessageMonth, .errorMessageYear, .errorMessageCVC{
    margin-top: .8rem;
    font-size: 1.2rem;
    color: red;
}

.hidden{
    display: none;
}

@media (min-width: 1440px) {
    body {
        font-size: 2rem;
    }

    .page {
        display: flex;
        position: relative;
        width: 100%;
    }

    div #bg-page {
        background-image: url(images/bg-main-desktop.png);
        max-width: 30%;
        height: 100vh;
    }

    #bg-page img {
        object-fit: cover;
        max-width: 100%;
        height: 100vh;
    }

    .info-cards {
        display: grid;
        width: 70%;
        height: 100vh;
        background-color: white;
    }

    .infos-text {
        color: white;
        position: absolute;
        width: 45rem;
        height: 25rem;
        top: 21rem;
        left: 23rem;
        z-index: 2;
    }

    .infos-text .card-name {
        text-transform: uppercase;
        display: inline-block;
        width: auto;
        position: relative;
        font-size: 1.3rem;
        top: 21rem;
        left: 3rem;
    }

    .infos-text .card-number {
        letter-spacing: 0.3rem;
        width: auto;
        position: relative;
        text-align: center;
        font-size: 3rem;
        top: 13rem;
    }

    .infos-text .card-exp-date {
        display: inline-flex;
        width: 1rem;
        position: relative;
        font-size: 1.3rem;
        top: 14.3rem;
        left: 35.5rem;
    }
    

    .infos-text .card-info-cvc {
        display: inline-block;
        width: auto;
        position: relative;
        font-size: 1.8rem;
        top: 33.5rem;
        left: 43rem;
    }

    .info-cards #my-form {
        width: 53rem;
        height: 100%;
        margin-left: 50rem;
    }

    #card-back {
        width: 45rem;
        height: 25rem;
        top: 50rem;
        left: 33rem;
    }

    #card-front {
        width: 45rem;
        height: 25rem;
        top: 21rem;
        left: 23rem;
    }

    #card-logo {
        top: 24rem;
        left: 25rem;
        width: 9rem;
        height: 5rem;
    }

    .success {
        position: absolute;
        width: 53rem;
        height: 100%;
        margin-left: 50rem;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .input-separator input {
        font-size: 2.2rem;
    }
}
