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

@font-face {
    font-family: 'Jawwy Medium';
    src: url('Jawwy-Medium.otf') format('opentype'); 
}
  
body {
    font-family: 'Jawwy Medium', sans-serif;
    line-height: 1.3;
    overflow-x: hidden;
}

main {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr;
    background-color: #4F008C;
}

/* alert */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    background-color: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}

#left_side {
    display: grid;
    grid-auto-flow: row;
    grid-auto-rows: auto;
    row-gap: 150px;
    padding: 4vw;
    width: auto;
    overflow-x: hidden;
}

#left_side > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin-top: 40px;
    color: #fff;
}

#left_side > div h1 {
    font-size: clamp(30px, 5vw, 80px);
    line-height: 1.05;
}

#left_side > div p {
    font-size: clamp(20px, 3vw, 35px);
    line-height: 1.3;
    margin-top: 1ch;
    max-width: 30ch;
}

form {
    position: relative;
    display: grid;
    grid-auto-flow: row;
    row-gap: 2rem;
}

#form_wrapper {
    display: grid;
    grid-auto-flow: row;
    align-items: center;
    justify-items: center;
    row-gap: 64px;
    background-color: #fff;
    color: #1D252D;
    padding: 5vw;
    z-index: 2;
}

#form_wrapper h2 {
    font-size: 2.125rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1;
}

fieldset {
    width: 100%;
    display: grid;
    grid-auto-flow: row;
    row-gap: 32px;
    align-items: center;
    justify-items: flex-start;
    border: none;
}

.two_inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    width: 100%;
}

.input_wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.input_wrapper label {
    position: relative;
    display: flex;
    font-size: clamp(20px, 3vw, 25px);
    margin-bottom: 13px;
}

label.required::after {
    position: absolute;
    content: "";
    top: 5%;
    right: 0%;
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: #FF6969;
    transform: translateX(100%);
}

.input_wrapper input {
    width: 100%;
    font-size: 16px;
    padding: 1ch;
    border-radius: 0.25rem;
    border: 1px solid #CBCBCB;
    background: #FFF;
    transition: all 0.3s ease-in-out;
}

.input_wrapper select {
    width: clamp(100px, 34ch, 50vw);
    font-size: 16px;
    padding: 1ch;
    border-radius: 0.25rem;
    border: 2px solid #B5B5B5;
    background: #FFF;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.input_wrapper select option {
    padding: 1ch;
    cursor: pointer;
}

.input_wrapper input:focus,
.input_wrapper select:focus {
    outline: 5px solid #bebebe7a;
}

span.invalid-feedback {
    color: #FF375E;
}

form button {
    position: relative;
    width: clamp(100px, 80%, 250px);
    display: grid;
    grid-template-columns: 4fr 1fr;
    background-color: #fff;
    border: none;
    margin: auto;
    cursor: pointer;
}

form button::before {
    position: absolute;
    content: "";
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #FF375E;
    transform: scaleX(0);
    transform-origin: right;
    transition: all 1s cubic-bezier(.7, 0, .2, 1);
    z-index: 1;
}

form button:hover::before {
    transform: scaleX(1);
}


form button span {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

form button span:first-of-type {
    color: #4F008C;
    font-size: 20px;
    padding: 1.5ch;
}

form button span:last-of-type {
    height: 100%;
    aspect-ratio: 1 / 1;
    background: #FF375E;
}

form button span:last-of-type svg {
    width: 80%;
    aspect-ratio: 1 / 1;
} 


.side_shape {
    position: absolute;
    display: block;
    width: 10vw;
    aspect-ratio: 1 / 1;
    background-color: #FF375E;
}

.side_shape::after {
    position: absolute;
    content: "";
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    background-color: #4F008C;
}

.side_shape#top {
    left: 0;
    top: 0;
    transform: translate(-29%, -29%);
}

.side_shape#bottom {
    left: 0;
    bottom: 0;
    transform: translate(-29%, -29%);
}

.side_shape#right {
    right: 0;
    top: 50%;
    transform: translate(29%, -50%);
}


#right_side {
    position: sticky;
    top: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 100vh;
    height: 100dvh;
    background-color: #FF375E;
}

#right_side img {
    height: 100%;
    aspect-ratio: 0.6517150395778364 / 1;
    align-self: self-end;
}


@media screen and (max-width: 800px) {
    main {
        grid-template-columns: 1fr;
    }

    #left_side {
        row-gap: 64px;
    }

    form {
        margin-bottom: 40px;
    }

    #left_side > div {
        margin-top: 80px;
        text-align: center;
        align-items: center;
    }

    .two_inputs {
        grid-template-columns: 1fr;
        row-gap: 16px;
    }

    #right_side {
        display: none;
    }

    .side_shape#bottom {
        transform: translate(-29%, -200%);
    }
}

@media screen and (orientation: portrait) and (min-width: 800px) {
    main {
        grid-template-columns: 5fr 0.2fr;
    }

    #right_side img {
        display: none;
    }
}