@import url('https://fonts.googleapis.com/css?family=Josefin+Sans:300,400,600&display=swap');

* {
    box-sizing: border-box;
}

body {
    background-image: linear-gradient(135deg, hsl(0, 0%, 100%), hsl(0, 100%, 98%));
    font-family: 'Josefin Sans', sans-serif;
    margin: 0;
}

.container {
    display: flex;
    min-height: 100vh;
}

.left {
    background-image: url('./images/bg-pattern-desktop.svg');
    background-size: cover;
    padding: 0 40px 40px;
    width: 60%;
}

.inner-container {
    max-width: 450px;
    margin: auto;
}

.bg-image {
    width: 40%;
    background-image: url('./images/hero-desktop.jpg');
    background-size: cover;
    background-position: center center;
}

.logo {
    margin: 60px 0;
    width: 200px;
}

.bg-mobile {
    display: none;
}

h1 {
    text-transform: uppercase;
    font-size: 60px;
    letter-spacing: 15px;
    line-height: 1.1;
    margin-bottom: 0;
    transform: translateX(-100%);
    animation: comeinleft 0.7s ease forwards;
}

h1 span {
    color: hsl(0, 36%, 70%);
    font-weight: 200;
}

p {
    color: hsl(0, 36%, 70%);
    line-height: 26px;
    margin: 40px 0;
    opacity: 0;
    transform: translateX(100%);
    animation: comeinright 0.7s ease forwards;
}

form {
    position: relative;
    transform: translateX(-100%);
    animation: comeinleft 0.7s ease forwards;
}

input {
    background-color: transparent;
    border: 1px solid hsl(0, 36%, 70%);
    padding: 15px 30px;
    border-radius: 50px;
    width: 100%;
    font-size: 16px;
    height: 55px;
}

input:focus {
    outline: none;
    border-width: 2px;
    box-shadow: 0px 0px 10px hsl(0, 36%, 70%, 0.5);
}

input::placeholder {
    color: hsl(0, 36%, 70%);
}

form.error input {
    border: 2px solid hsl(0, 93%, 68%);
}

form.success input {
    border: 2px solid hsl(0, 36%, 70%);
}

button {
    background-image: linear-gradient(135deg, hsl(0, 80%, 86%), hsl(0, 74%, 74%));
    box-shadow: 2px 5px 10px hsl(0, 36%, 70%, 0.5);
    padding: 15px;
    border-radius: 50px;
    border: none;
    width: 100px;
    position: absolute;
    top: 0;
    right: 0;
    height: 55px;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

button:hover {
    opacity: 0.6;
}

.error-icon {
    display: none;
    position: absolute;
    top: 18px;
    right: 110px;
    height: 25%;
}

form.error .error-icon {
    display: block;
}

small {
    color: hsl(0, 93%, 68%);
    display: none;
    margin-top: 15px;
    margin-left: 30px;
}

form.error small {
    display: block;
}

/* footer styles */
.attribution { 
    font-size: 11px; text-align: center; 
}

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

/* ANIMATIONS 😎 */

@keyframes comeinleft {
    to {
        transform: translateX(0);
    }
}

@keyframes comeinright {
    to {
        transform: translateX(0);
        opacity: 1;
    }
} 

@media screen and (max-width: 600px) {
    .logo {
        margin: 30px 0;
        width: 125px;
    }

    .bg-mobile {
        display: block;
        width: calc(100% + 80px);
        margin-left: -40px;
        margin-right: -40px;
    }

    h1 {
        font-size: 40px;
    }

    .left {
        width: 100%;
        margin: 0;
    }

    .right {
        display: none;
    }
}