* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --Red: hsl(4, 100%, 67%);
    --Blue-800: hsl(234, 29%, 20%);
    --Blue-700: hsl(235, 18%, 26%);
    --Grey: hsl(0, 0%,58%);
    --White: hsl(0, 0%, 100%);

    --fw-base: 400;
    --fw-bold: 700;
}

@font-face {
    font-family: "Roboto-Regular";
    src: url(assets/fonts/Roboto-Regular.ttf);
}

@font-face {
    font-family: "Roboto-bold";
    src: url("assets/fonts/Roboto-Bold.ttf");
}

body {
    font-family: "Roboto-Regular";
    font-weight: var(--fw-base);
    background-color: var(--Blue-700);
}

.success-popup {
    display: none;
}

.success-popup-after-success {
    background-color: var(--White);
    height: 100vh;
    padding: 1.5rem;
    padding-top: 10rem;
    display: grid;

    div {
        gap: 1rem;
    }

    h2 {
        font-size: 2.3rem;
        font-family: "Roboto-bold";
        color: var(--Blue-800);
        padding-block: 1.5rem;
    }

    p {
        color: var(--Blue-800);
        line-height: 1.5;
    }

    span {
        font-family: "Roboto-Bold";
    }

    button {
        height: 2.5rem;
        align-self: end;
        border: none;
        background-color: var(--Blue-800);
        color: var(--White);
        border-radius: 0.5rem;
        font-family: "Roboto-Bold";
    }

    button:focus, button:hover {
        background: linear-gradient( 90deg, rgb(229, 118, 149),rgb(255, 81, 58));
        box-shadow: 1px 10px 10px rgb(255, 190, 190);
    }
}

@media screen and (min-width:700px) {
    body {
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .success-popup-after-success {
        width: 450px;
        height: max-content;
        display: flex;
        flex-direction: column;
        padding: 2.5rem;
        border-radius: 1rem;
        gap: 1rem;

        button {
            width: 100%;
        }
    }
}


.wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--White);
    border-radius: 1rem;
}

.wrapper-after-success {
    display: none;
}

.wrapper__image {
    width: 100%;

    img {
        width: 100%;
    }
}

.wrapper__description, form {
    padding-inline: 1.5rem;
    width: 100%;
}

.wrapper__description {
    padding-block: 1.8rem;
    color: var(--Blue-700);
    display: grid;
    gap: 1.5rem;

    p {
        line-height: 1.5;
    }
}

.wrapper__description h1 {
    font-size: 2.5rem;
    color: var(--Blue-800);
    font-family: "Roboto-Bold";

}

.wrapper__check_list {
    display: grid;
    gap: 0.5rem;
}

.wrapper__check_list li {
    list-style: none;
    display: grid;
    grid-template-columns: 2.5rem auto;
    line-height: 1.5;
}


.wrapper__check_list li::before {
    content: url("assets/images/icon-list.svg");
}

.form-group {
    display: grid;
    gap: 0.65rem;
    padding-block-start: 0.5rem;
}

.wrapper__form {
    padding-block-end: 1.8rem;
    font-size: 0.75rem;
    display: grid;
    gap: 1.5rem;

    label {
        font-family: "Roboto-Bold";
    }
    
}

.form-group.with-error {
    grid-template-columns: 1fr 1fr;
}

.error {
    text-align: end;
    color: var(--Red);
    font-family: "Roboto-Bold";
    display: none;
}

.form-group:has(:focus:invalid) > .error {
    display: block;
}

.form-group input {
    height: 3.5rem;
    border-radius: 0.5rem;
    border: solid 1px var(--Grey);
    padding: 1.5rem;
    font: inherit;
    font-weight: var(--fw-base);
    font-size: 1rem;
    grid-column: 1/-1;
}

.form-group input:focus {
    outline: none;
}

.form-group input:focus:invalid {
    border: solid 1px var(--Red);
    background-color: rgb(254, 225, 225);
    color: var(--Red);

}

.form__button {
    background: var(--Blue-800);
    border: none;
    height: 3.5rem;
    color: var(--White);
    font-family: "Roboto-bold";
    font-size: 1rem;
    border-radius: 0.5rem;
}

.form__button:focus, .form__button:hover {
    background: linear-gradient( 90deg, rgb(229, 118, 149),rgb(255, 81, 58));
    box-shadow: 1px 10px 10px rgb(255, 190, 190);
}

@media screen and (min-width:450px) {
    .wrapper__image {
        width: 80%;
    }

    section {
        width: 100%;
    }
}

@media screen and (min-width:850px) {

    body {
        height: 100vh;
        width: 100vw;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .wrapper {
        display: grid;
        grid-column: 1fr 1fr;
        max-width: 850px;
        padding: 1rem;
        align-items: normal;
    }

    section {
        grid-column: 1/2;
        grid-row: 1;
        width: 90%;
    }

    .wrapper__image {
        grid-column: 2/3;
        width: 100%;

        img {
            height: 100%;
            width: 100%;
        }
    }
}