:root {
    --primary-col: #087DC7 ; 
    --secondary-col: #E5E5E5; 
    --tertiary-col: #B3C3CE;
    --primary-rgb-col: 8,125,199; 
    --error-col: #FA4C4C; 
}

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

html {
    font-size: 18px; 
}

body {
    font-family: 'Roboto','Syncopate', sans-serif;
    background-color: var(--secondary-col);
}

main {
    min-height: 100vh; 
    max-width: 100vw;
    height: 100%; 
    width: 100%;
    display: grid; 
    grid-template-rows: 0.3fr 1fr;
}

section:nth-child(2) {
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

.background {
    position: relative; 
}

.background .img {
    background: url(./assets/he-junhui-f2xVjDj9z-Y-unsplash.jpg);
    height: 100%; 
    width: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.image-sidebar {
    position: absolute;
    top: 30%;
    left: 0; 
    background-color: rgba(0,0,0,0.5); 
    color: white; 
    width: 100%;
    font-size: 3rem; 
    font-family: 'Righteous', cursive;
    text-align: center; 
}

section:nth-child(2) div {
    padding: 20px;
    font-weight: bold;
}

.underline {
    text-decoration: underline;
}

form {
    background-color: white;
    box-shadow: 0 4px 4px rgba(0,0,0,0.25);
    padding: 20px; 
    display: grid; 
    gap: 10px; 
    grid-template-columns: 1fr 1fr; 
    grid-template-areas: "title title"
        "forename surname"
        "email phone"
        "password confirm"
    ;
}

form h1 {
    grid-area: title; 
}

label {
    font-family: 'Syncopate', sans-serif;
    letter-spacing: -2px;
    display: grid; 
    gap: 5px; 
    font-size: 0.8rem;  
}

input {
    width: 100%; 
    border-radius: 2px;
    outline: none; 
    border: 1px solid var(--tertiary-col);  
    padding: 5px 10px; 
}


.active {
    border: 1px solid var(--primary-col);  
    box-shadow: 0 4px 4px rgba(var(--primary-rgb-col), 0.25)
}

.error {
    border: 1px solid var(--error-col); 
}
.btn {
    background-color: var(--primary-col);
    color: white; 
    padding: 5px 25px;
    outline: none; 
    border: 1px solid transparent; 
    border-radius: 5px; 
    margin-bottom: 20px; 
    cursor: pointer; 
}

a {
    text-decoration: none;
    font-weight: bold;
    color: var(--primary-col); 
}

[for="password"] {
    position: relative; 
}

[for="password"]:after {
    position: absolute;
    content: '* Passwords do not match'; 
    bottom: -15px;  
    font-size: 0.6rem;
    font-family: 'Roboto', sans-serif; 
    color: var(--error-col); 
    letter-spacing: normal;
}


@media screen and (min-width: 48em) {
    main {
        max-height: 100vh; 
        max-width: 100vw;
        height: 100vh; 
        width: 100%;
        display: grid; 
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr; 
    }

    .image-sidebar {
        position: absolute;
        top: 40%;
        left: 0; 
        background-color: rgba(0,0,0,0.5); 
        color: white; 
        width: 100%;
        font-size: 5rem; 
        font-family: 'Righteous', cursive;
        text-align: center; 
    }

    input {
        width: 80%; 
    }
}