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

/* Body styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    background-image: url(./images/bg-intro-desktop.png);
    background-color: hsl(0, 100%, 74%);
    background-size: cover;
    background-repeat: no-repeat;
    font-size: 1rem;
    font-family: "Poppins", sans-serif;
}

/* Main container styles */
main {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-height: inherit;
    max-width: 65rem;
    gap: 3rem;
}

/* Title section styles */
.title {
    color: white;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 50%;
    margin-top: 2rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

/* Form section styles */
.form {
    display: flex;
    flex-direction: column;
    width: 50%;
    gap: 2rem;
}

/* Trial message styles */
.trialMsg {
    background-color: hsl(248, 39%, 45%);
    height: 4rem;
    border-radius: 0.4rem;
    box-shadow: 0px 5px 2px 0px rgba(106, 106, 106, 0.304);
}

.trialTxt {
    text-align: center;
    color: hsl(246, 25%, 77%);
    padding-top: 1.25rem;
}

.trialTxt span {
    color: white;
    font-weight: 600;
}

/* Form styles */
form {
    background-color: white;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 0.4rem;
    box-shadow: 0px 5px 2px 0px rgba(106, 106, 106, 0.304);
}

form input {
    height: 2.5rem;
    width: 100%;
    padding: 1rem;
    border: 1px solid;
    border-color: rgba(128, 128, 128, 0.507);
    border-radius: 0.2rem;
    font-weight: 600;
}

input:focus {
    color: hsl(249, 10%, 26%);
    outline: none;
    border-color: hsl(248, 32%, 49%);
    caret-color: hsl(248, 32%, 49%);
}

::placeholder {
    font-weight: 600;
}

/* Error message container styles */
.input-container {
    position: relative;
}

.invalid-icon {
    position: absolute;
    width: 1.2rem;
    right: 0;
    transform: translate(-20px, -30px);
    display: block;
}

/* Button styles */
button {
    border: none;
    border-radius: 0.2rem;
    text-transform: uppercase;
    cursor: pointer;
    height: 2.9rem;
    width: 100%;
    background-color: hsl(154, 59%, 51%);
    color: white;
    font-weight: bolder;
    letter-spacing: 0.1rem;
    box-shadow: 0px 5px 2px 0px rgba(37, 157, 71, 0.897);
}

.sr-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    /* 1 */
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    /* 2 */
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
    white-space: nowrap !important;
    /* 3 */
}

/* Error message styles */
.error-text {
    color: hsl(0, 100%, 74%);
    text-align: right;
    font-size: 0.7rem;
    display: none;
}


.error-border {
    border-color: hsl(0, 100%, 74%);
}

.placeholder-error::placeholder {
    color: hsl(0, 100%, 74%);
}

/* Button hover styles */
button:active,
button:hover {
    opacity: 0.8;
}

/* Icons styles */
#fNameErrorIcon,
#lastNameErrorIcon,
#PassErrorIcon,
#EmailErrorIcon {
    display: none;
}

/* Agreement section styles */
.agreement {
    color: hsl(246, 25%, 77%);
    font-size: 0.7rem;
    text-align: center;
    font-weight: 400;
}

.tnc {
    color: rgba(255, 0, 0, 0.804);
    font-weight: 500;
}

/* Attribution section styles */
.attribution {
    font-weight: bold;
    font-size: 11px;
    text-align: center;
}

.attribution a {
    color: hsl(228, 45%, 44%);
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
    body {
        background-image: url(/images/bg-intro-mobile.png);
        gap: 2rem;
    }

    main {
        flex-direction: column;
        max-width: 100%;
    }

    h1 {
        font-size: 2rem;
    }

    .title {
        width: 80%;
        text-align: center;
    }

    .trialMsg {
        height: 5rem;
        padding: 0 2rem;
    }

    .form {
        width: 80%;
    }
}