@font-face {
    font-family: 'Roboto-Regular';
    src: url(./assets/fonts/Roboto-Regular.ttf);
}

@font-face {
    font-family: 'Roboto-Bold';
    src: url(./assets/fonts/Roboto-Bold.ttf);
}

:root {    
 --primary-color: hsl(4, 100%, 67%);
 --primary-shade: hsla(4, 100%, 67%, 0.199);
 --secondary-color: hsl(234, 29%, 20%);
 --secondary-color-2: hsl(235, 18%, 26%);
 --neutral1: hsl(0, 0%,58%);
 --neutral2: hsl(0, 0%, 100%);

 --font-size-main: 16px;
}

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

html {
    font-family: 'Roboto-Regular', sans-serif;
    font-weight: 400;
    font-size: var(--font-size-main);
}




/* COMPOSITION */

body {
    display: grid;
    grid-template-rows: 1fr auto;    
    min-width: 320px;    
    place-items: center;  
    min-height: 100vh;
    background-color: var(--LightGrayishBlue);
}

main {
    display: flex;
    width: 320px;
    height: auto;
    margin: 0 auto;     
}

.card1 {
    display: grid; /* grid */
    grid-template-rows: auto 1fr auto;
    width: 320px;    
    height: 800px;
}

.img-wrapper {
    width: 320px;
}

#mobile-img {
    width: 320px;
    object-fit: cover;
}

#tablet-img, #desktop-img {
    display: none;
}

.card1-content {
    margin: auto 12px;
    line-height: 1.5;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-family: 'Roboto-Bold', sans-serif;
    font-weight: 400; 
}

p {
    margin: 0 auto;
}

ul {
    list-style-image: url(./assets/images/icon-list.svg);  
    margin-left: 25px;
    margin-top: 30px;           
}

li {
   padding-left: 6px;
   margin-bottom: 10px;        
}

form {
    margin-top: 33px;
}

label {
    font-size: 0.75rem;
    font-weight: 700;    
}

input {
    height: 55px;
    width: 100%;
    border: 1px solid var(--neutral1);
    border-radius: 7px;
    margin-top: 5px;
    padding-left: 20px;
    font-size: 1rem;    
}

button {
    margin-top: 25px;
    width: 100%;
    height: 55px;
    border: 1px solid var(--secondary-color-2);
    border-radius: 7px;
    font-family: 'Roboto-Bold', sans-serif;   
    text-align: center;
    font-size: 0.95rem;    
    letter-spacing: 0.5px;
    color: var(--neutral2);
    background-color: var(--secondary-color);
}


.card2 {
    display: none; /* flex */
    min-width: 320px;    
    height: auto;    
}

.card2-content {
    display: grid;
    grid-template-rows: 1fr auto 1fr auto;        
    margin: 30px 20px -5px 20px;
}

.card2-content h1 {
    line-height: 1;
}

.card2-content p {
    margin-top: 12px;
    line-height: 1.5;
}

#button2 {
    margin-top: 50px;
    margin-bottom: 25px;
}

footer {
    position: sticky;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    background-color: var(--neutral2);
}


/* UTILITIES */

.bullets {
    display: inline-block;
    vertical-align: -20px;    
}

.last-bullet {
    display: inline-block;
    vertical-align: 5px;
}

#email-data {
    font-weight: 700;
}

.attribution { 
    font-size: 11px; 
    text-align: center; 
}

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


/* BLOCKS */

#emailError {
    display: none; /* block */
    position: absolute;
    margin-top: -6.6em;
    margin-left: 15.2em;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
}


/* EXCEPTIONS */

input:hover {
    cursor: pointer;
}

input:focus {
    outline: none;
    border: 1px solid var(--secondary-color-2);
}

input::placeholder,
input::-webkit-input-placeholder {
    color: var(--neutral1);
    opacity: 1;
}

#button1:hover,
#button2:hover {
    background: linear-gradient(135deg, #f34079 40%, #fc894d);
    border: none;
    cursor: pointer;
}

#button1:active,
#button2:active {
    box-shadow: 0px 8px 24px 2px #ff490171;
}



@media only screen and (min-width: 375px) {

    main {
        width: 375px;
    }

    .card1 {
        width: 375px;
        height: 842px;
    }

    .img-wrapper {
        width: 375px;        
    }

    #mobile-img {
        width: 375px;
    }

    .card1-content {
        margin: 30px 25px auto 25px;
    }   

    .card2-content {    
        margin: 175px 20px auto 20px;
    }

    #button2 {
        margin-top: 230px;
        margin-bottom: 25px;
    }

    #emailError {
        margin-left: 17.6em;
    }

}


/* min-tablet model = Alcatel Pixi/Fire 7 */

@media only screen and (min-width: 540px) {
    
    main {
        width: 528px;
    }

    .card1 {
        width: 528px;
        height: 941px;
        margin-top: 6px;
    }

    .img-wrapper {
        width: 528px;        
    }

    #mobile-img {
        display: none;
    }

    #tablet-img {
        display: inline-flex;
        width: 528px;          
    }
    
    h1 {
        font-size: 3.5rem;
    }

    .bullets {
        vertical-align: 5px;
    }
    
    #emailError {
        margin-left: 30.35em;
    }
    
    .card2-content {
        grid-template-rows: 100px auto auto 1fr;
        row-gap: 5px;
    }

}

/* DESKTOP */

@media only screen and (min-width: 1024px) {

    body {
        background-color: var(--secondary-color);
    }

    .container {
        display: grid;
        min-width: 1024px;
        grid-template-rows: 1fr auto;
        row-gap: 10px;              
    }

    main {
        width: 750px;
        height: auto;        
        margin: 0 auto;       
    }

    .card1 {
        display: inline-flex; /* inline-flex */
        flex-direction: row-reverse;
        width: 750px;
        height: 515px; 
        background-color: var(--neutral2);
        margin: 35px auto;
        border-radius: 40px;        
    }

    .img-wrapper {
       margin: 25px;
       width: 310px;       
    }

    #mobile-img, #tablet-img {
        display: none;
    }

    #desktop-img {
        display: inline-flex;
        width: 310px;        
        height: 465px;
        object-fit: cover;
        border-radius: 15px;               
    }

    .card1-content {
        margin: 45px 20px 5px 50px;
    }

    h1 {
        font-size: 3em;
        margin-bottom: 5px;
    }

    ul {
        margin-top: 15px;
    }

    li {
        margin-bottom: 5px;
    }
    
    .bullets {
        vertical-align: -18px;
    }

    form {
        margin-top: 10px;
    }

    input {        
        height: 45px;
    }

    button {
        margin-top: 10px;        
        height: 45px;
    }

    .card2 {
        display: none; /* flex */
        width: 500px;
        height: 500px;
        margin: 0 auto;
        border-radius: 40px;
        background-color: var(--neutral2);
    }

    .card2-content {
        grid-template-rows: 100px auto auto auto;
        margin: 40px 60px;
    }

    .card2-content h1 {
        font-size: 3.5em;
    }

    #button2 {
        height: 55px;
        margin: 30px auto;
    }

    #emailError {
        margin-top: -5.75em;
        margin-left: 17.15em;
    }

    footer {
        background-color: var(--secondary-color);
    }

    /* UTILITIES */

    .attribution {
        color: var(--neutral2);
    }

    .attribution a {
        color: var(--primary-color);
    }  
 

}

@media only screen and (min-width: 1280px) {

    .container {
        display: grid;
        min-width: 1280px;
        grid-template-rows: 1fr auto;
        row-gap: 10px;              
    }

    main {
        width: 1280px;
        height: auto;
        margin: 20px auto 0;       
    }

    .card1 {
        width: 900px;
        height: 600px;
        margin: 0 auto;
    }

    .img-wrapper {
        width: 370px;
        height: 550px;       
    }

    #desktop-img {
        width: auto;       
        height: 550px;
        object-fit: cover;
        margin-left: 0;
    }

    .card1-content {
        margin: 70px 25px auto 50px;
    }

    .card1-content p {
        margin-top: 10px;
    }

    h1 {
        font-size: 3.5em;
        margin: 0 auto;
    }

    ul {
        margin-top: 20px;
        margin-left: 27px; 
    }

    .bullets {
        vertical-align: 5px;
    }

    #emailError {
        margin-top: -6.6em;
        margin-left: 24.25em;
    }
    
    form {
        margin-top: 25px;
    }

    input {        
        height: 55px;
    }

    button {
        margin-top: 15px;        
        height: 55px;
    }

    #button2 {
        margin-bottom: 5px;
    }
}

@media only screen and (min-width: 1440px) {

    main {
        width: 915px;
        height: auto;
        margin: 193px auto 180px; 
    }
   
    .card1 {
        width: 915px;
        height: 625px;
    }

    .card1-content {
        margin: 80px 38px auto 65px;
    }

    .card1-text-content {
        margin-right: 15px;
    }

    .img-wrapper {
        width: 420px;
        height: 575px;       
    }

    #desktop-img {       
        height: 575px;
        object-fit: cover;
        margin-left: 0;
    }

    h1 {
        margin-bottom: 10px;
    }

    ul {
        margin-top: 25px;        
    }
     
    button {        
        margin-top: 20px;
    }

    #emailError {       
        margin-left: 21.75em;
    }

    .card2-content {
        margin: 45px 60px 65px;
    }

}
