@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');

:root {
    --MIN-FONT-WEIGHT: 300;
    --MID-FONT-WEIGHT: 400;
    --MAX-FONT-WEIGHT: 600;
    --DESATURATED-RED: hsl(0, 36%, 70%);
    --SOFT-RED: hsl(0, 93%, 68%);

}

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

img {
    display: block;
}

body,
.image-container {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
}

body {
    background-color: hsl(0, 100%, 98%);
    text-align: center;
    font-family: 'Josefin sans', sans-serif;
    height: 100vh;
}



body>div {
    height: 650px;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-areas:
        "header "
        "image"
        "text-section"
        "footer"
    ;
    justify-items: first baseline;
    align-items: center;

}

header,
picture,
section {
    width: 375px;
}

header {
    padding: 1.5rem;
    grid-area: header;
    /* align-self: flex-start; */
}

header>img {
    width: 6rem;
}

picture {
    grid-area: image;
}

picture,
picture>img,
input {
    width: 100%;
}

section {
    padding: 0 1rem 0;
    grid-area: text-section;
}


h1 {
    color: var(--DESATURATED-RED);
    margin-top: 2rem;
    font-weight: var(--MIN-FONT-WEIGHT);
    font-size: 2.5rem;
    text-transform: uppercase;
    line-height: 3rem;
}

span {
    color: #000;
    font-weight: var(--MAX-FONT-WEIGHT);
}

p {
    margin-top: 1rem;
    color: var(--DESATURATED-RED)
}

.input-section {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

input,
.image-container {
    border-radius: 25px;
}

input {
    padding: 1rem;
    border-radius: 25px;
    border: 0.1px solid #0000001f;
    background-color: transparent;
}

.image-container {
    height: 49px;
    width: 5rem;
    position: absolute;
    background: linear-gradient(135deg, hsl(0, 80%, 86%), hsl(0, 74%, 74%));
    right: 0;
    top: 0;
}

.image-container:hover {
    cursor: pointer;
    box-shadow: 2px 2px 5px 1px var(--DESATURATED-RED);
}


footer {
    font-size: 12px;
    text-align: center;
    grid-area: footer;
}

.error-message {
    color: var(--SOFT-RED);
}

.error-state {
    border-color: var(--SOFT-RED);
    background: url('./images/icon-error.svg') no-repeat scroll 72% 10px;
}

@media (min-width: 1440px) {

    body {
        margin:  0 12rem;
        background-image: url('./images/bg-pattern-desktop.svg');
        background-size: cover;
    }

    body>div {
        text-align: left;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 1fr;
        grid-template-areas:
            "header image"
            "text-section image"
            "text-section image"
            "footer footer"
        ;
        height: 750px;
    }

    section {
        width: 450px;
    }

    section > p, .input-section {
        margin-top: 2rem;
    }

    picture {
       width: 500px;
    }

    footer {
        margin: 0 auto;
        margin-top: 2rem;
    }
}