@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Bold.ttf') format('truetype');
    font-style: normal;
    font-weight: 700;
}
@font-face{
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-ExtraBoldItalic.ttf') format('truetype');
    font-style: italic;
    font-weight: 800;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-ExtraBold.ttf') format('truetype');
    font-style: normal;
    font-weight: 800;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/Poppins-Italic.ttf') format('truetype');
    font-style: italic;
    font-weight: 400;
}
:root{
    --Purple500: hsl(259, 100%, 65%);
    --Red400: hsl(0, 100%, 67%);
    --White: hsl(0, 100%, 100%);
    --Grey100: hsl(0, 0%, 94%);
    --Grey200: hsl(0, 0%, 86%);
    --Grey500: hsl(0, 1%, 44%);
    --Black: hsl(0, 0%, 0%);
}
body{
    width: 100%;
    min-height: 100vh;
    height: auto;
    margin: 0;
    background-color: var(--Grey100);
}
main{
    width: calc(clamp(20rem,90%,25rem) - clamp(2rem,10vw,2.75rem));
    height: auto;
    background-color: var(--White);
    padding-block: clamp(2rem,10%,3rem);
    padding-inline: clamp(1rem,5vw,1.375rem);
    font-family: 'Poppins',sans-serif;
    font-weight: 700;
    border-radius: 1rem 1rem 5rem 1rem;
    position: relative;
    margin: auto;
    margin-block: 18vh;
}
.parent{
    display: flex;
    border: none;
    justify-content: space-between;
}
legend{
    opacity: 0;
    position: absolute;
}
.wrapper{
    width: 30%;
    height: auto;
    position: relative;
}
label{
    font-size: 0.9rem;
    color: var(--Grey500);
    cursor: pointer;
}
label.error{
    color: var(--Red400);
}
input{
    width: 100%;
    height: 3rem;
    border: 1px solid var(--Black);
    border-radius: 0.5rem;
    color: var(--Black);
    font-size: 1.5rem;
    font-family: 'Poppins',sans-serif;
    font-weight: 800;
    padding-inline-start: 10%;
    box-sizing: border-box;
    appearance: textfield;
    -moz-appearance: textfield;
    caret-color: var(--Purple500);
}
input.error{
    border: 1px solid var(--Red400);
}
input:hover{
    border-color: var(--Purple500);
    cursor: pointer;
}
input:focus{
    outline: 1px solid var(--Purple500);
}
.errorMessage{
    width: 100%;
    font-size: 0.75rem;
    font-family: 'Poppins';
    font-weight: 400;
    font-style: italic;
    color: var(--Red400);
    display: none;
    position: absolute;
    margin-block: 0.25rem;
}
.errorMessage.display{
    display: block;
}
hr{
    opacity: 0.25;
    position: relative;
    top: -5rem;
}
button{
    width: 20%;
    aspect-ratio: 1;
    display: block;
    margin: auto;
    border-radius: 50%;
    border: none;
    background-color: var(--Purple500);
    margin-block: 3rem;
    position: relative;
    z-index: 10;
    cursor: pointer;
}
button:focus{
    outline: 2px solid var(--Purple500);
}
button:hover{
    background-color: var(--Black);
    outline: 2px solid var(--Black);
}
.age{
    font-size: 3rem;
    font-family: 'Poppins',sans-serif;
    display: block;
    font-weight: 800;
    font-style: italic;
}
.age.opacity{
    opacity: 0;
}
.age.animate{
    animation: ani 1s ease-in 100ms 1 forwards;
}
@keyframes ani {
    from{
        opacity: 0;
    }
    to{
        opacity: 1;
    }
}
.common{
    color: var(--Purple500);
}
@media (min-width:54rem) {
    body{
        min-height: 60rem;
    }
    main{
        width: calc(54rem - 5rem);
        padding-block: 2.5rem;
        padding-inline: 2.5rem;
    }
    form{
        position: relative;
    }
    .parent{
        width: 75%;
    }
    .wrapper{
        width: 25%;
    }
    input{
        height: 4rem;
        font-size: 1.75rem;
    }
    button{
        width: 10%;
        position: absolute;
        right: 0px;
        top: 3rem;
    }
    hr{
        top:2rem;
    }
    .age{
        font-size: 5rem;
    }
    .age:nth-of-type(1){
        margin-block-start: 6rem;
    }
}
