@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@100;200;400&family=Montserrat:wght@200;300;400;500&display=swap');

:root {
    --bg-color: #FFFAFB;
    --primary-color: #F0C4D3;
    --primary-dark-color: #E9382F;
    --text-color: #111111;
    --text-font: 'Montserrat', sans-serif;
    --header-font: 'Fraunces', serif;
}

* {
    box-sizing: border-box;
    border: none;
    padding: 0;
    margin: 0;
    list-style: none;
    text-decoration: none;
}

html {
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    font-family: var(--text-font);
    font-size: 1rem;
}

header {
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    height: 58px;
}

.hamburger-menu {
    cursor: pointer;
    width: 30px;
    height: 100%;
}

.hamburger-menu span {
    width: 30px;
    height: 3px;
    display: block;
    position: absolute;
    background-color: var(--primary-dark-color);
    transition: all .2s ease-in-out;
}

.hamburger-menu span:nth-child(1) {
    top: 1rem;
    transform-origin: left center;
  }
  
.hamburger-menu span:nth-child(2) {
    top: calc(1rem + 10px);
    transform-origin: left center;
}
  
.hamburger-menu span:nth-child(3) {
    top: calc(1rem + 20px);
    transform-origin: left center;
}

.hamburger-menu.open span:nth-child(1) {
    transform: rotate(45deg);
}
  
.hamburger-menu.open span:nth-child(2) {
    width: 0%;
    opacity: 0;
}
  
.hamburger-menu.open span:nth-child(3) {
    transform: rotate(-45deg);
}

nav {
    background-color: var(--primary-color);
    display: none;
    position: absolute;
    left: 0;
    width: 100%;
    height: calc(100% - 51px - 2rem);
    padding: 4rem 2rem;
}

nav ul {
    width: 100%;
}

.nav-img {
    height: 2rem;
    margin-right: .5rem;
}

nav ul li {
    color: var(--primary-dark-color);
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: all .2s ease-in-out;
    margin: 1rem 0;
    border-bottom: 1px solid var(--primary-dark-color);
    padding: 10px 0;
    cursor: pointer;
}

nav ul li:hover {
    color: var(--bg-color);
}

.logo-container {
    background-image: url('../img/logo-bg.svg');
    position: absolute;
    top: 57px;
    right: 10px;
    width: 169px;
    height: 103px;
}

.logo-img {
    position: absolute;
    top: -50%;
    width: 100%;
    height: 140%;
}

main {
    padding: 5rem 2rem;
}

h1 {
    font-size: 2rem;
    font-family: var(--header-font);
    color: var(--primary-dark-color);
}

p {
    font-size: 1rem;
    line-height: 1.7rem;
}

.category-title {
    display: flex;
    margin: 1rem 0;
}

.category-img {
    height: 3rem;
    margin-right: .5rem;
}

footer {
    grid-row-start: 3;
    grid-row-end: 4;
    background-color: var(--primary-color);
    color: var(--primary-dark-color);
    font-weight: 500;
    text-align: center;
    padding: 1rem .5rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

@media (min-width: 481px) {
    .logo-container {
        right: 30px;
    }
}

@media (min-width: 769px) {
    header {
        height: auto;
        padding: 1rem 5rem;
    }

    .hamburger-menu {
        display: none;
    }

    nav {
        display: block;
        position: static;
        height: auto;
        padding: 0;
    }

    nav ul {
        display: flex;
        flex-direction: row;
    }

    nav ul li {
        border: none;
        margin: .5rem;
        padding: 0;
    }

    main {
        padding: 2rem 5rem;
    }
}

@media (min-width: 1025px) {
    header {
        padding: 1rem 0;
        display: flex;
        justify-content: center;
    }

    .header-container {
        width: 900px;
        position: relative;
    }

    main {
        width: 900px;
        justify-self: center;
    }
}

@media (min-width: 1201px) {
    .header-container {
        width: 1000px;
    }

    main {
        width: 1200px;
        justify-self: center;
    }
}