/*  Design - https://dribbble.com/shots/5531056-Recipe-Layout  */

@import url('https://fonts.googleapis.com/css2?family=Gentium+Basic:ital,wght@0,400;0,700;1,400&family=Noto+Sans:wght@400;700&family=Playfair+Display+SC:wght@900&display=swap');

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

body {
    font-family: 'Noto Sans', sans-serif;
    font-size: .75rem;
    font-weight: 400;
    padding: 3rem;
    height: 100vh;
    width: 100vw;
}

::-webkit-scrollbar {
    width: .625rem;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 100);
}

::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 100);
}

a {
    text-decoration: none;
    color: rgba(0, 0, 0, 100);
}

a:hover {
    color: rgba(0, 0, 0, 0.9);
}

h2 {
    font-family: 'Gentium Basic', serif;
    font-size: 2rem;
    font-weight: 800;
    font-style: italic;
    text-transform: lowercase;
    color: rgba(0, 0, 10, 0.90);
}

.width-container {
    max-width: 62.5rem;
    margin: 0 auto;
}

.top-bar, figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    letter-spacing: -.02rem;
}

.logo {
    font-size: 2.5rem;
}

.cuisine {
    display: flex;
    justify-content: space-evenly;
    width: 20rem;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 15rem;
}

.vertical-text {
    writing-mode: vertical-rl;
    transform: rotate(-180deg);
    padding-left: 3rem;
}

.big-header-text {
    font-family: 'Playfair Display SC', serif;
    font-weight: 900;
    font-size: 6rem;
    color: rgba(0, 0, 10, 0.90);
    text-transform: uppercase;
}

.small-header-text {
    font-family: 'Gentium Basic', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 3rem;
    text-transform: lowercase;
}

.recipe-details ul {
    font-size: .65rem;
    list-style: none;
}

.main-content {
    display: grid;
    grid-template-areas: 
        "img img intro-1 intro-2"
        "img img content content";
    grid-template-rows: auto 1fr;
    grid-gap: 2rem;
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
}

.recipe-img {
    grid-area: img;
}

.recipe-img > figure > img {
    object-fit: cover;
    height: 37rem;
    width: 100%;
    max-height: 100%;
}

.introduction-1 {
    grid-area: intro-1;
}

.introduction-2 {
    grid-area: intro-2;
}

.variation, .introduction-1, .introduction-2 > p {
    font-family: 'Gentium Basic', serif;
    font-weight: 800;
    font-size: .85rem;
    border-top: 3px solid #000;
    padding-top: 1rem;
    text-align: justify;
}

.content {
    grid-area: content;
    overflow-y: auto;
    overflow-x: hidden;
    height: 30rem;
}

.ingredients {
    margin-top: 1rem;
    padding-left: 2rem;
}

.ingredients > li {
    padding: .25rem;
}

.variation {
    margin-bottom: 1rem;
    padding: 1rem;
    border-top: none;
    border-bottom: 3px solid #000;
}

.instructions {
    counter-reset: li;
    margin-top: 1rem;
    padding-left: 1rem;
}

.instructions > li {
    position: relative;
    margin: 0 0 .375rem 2rem;
    padding: .4rem 1.5rem;
    list-style: none;

}

.instructions > li:before {
    content: counter(li);
    counter-increment: li;
    position: absolute;
	top: -.30rem;
	left: -1rem;
    width: 1rem;
    font-family: 'Playfair Display SC', serif;
    font-weight: 900;
    font-size: 1.75rem;
	text-align: center;
}

.instructions > li > ul {
    list-style: disc;
    margin-top: 1rem;
    margin-left: 1rem;
}

.instructions > li > ul > li {
    padding: .5rem 0 .5rem 0;
}

@media (max-width: 800px) {
    body {
        position: fixed;
        font-size: 2vw;
    }
  
    .width-container {
        width: 100%;
    }
    
    .big-header-text {
        text-align: center;
        font-size: 12vw;
    }

    .small-header-text {
        text-align: left;
        font-size: 4.5vw;
    }

    .recipe-details ul li {
      font-size: 1.25vw;
      padding-left: 2rem;
    }
  
    .vertical-text {
      font-size: 1.5vw;
    }
  
    .main-header {
        height: 30vw;
    }

    .main-content {
        display: grid;
        grid-template-areas:
            "img img" 
            "intro-1 intro-2"
            "content content";
        grid-template-rows: auto auto auto;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 5vw;
        align-items: stretch;
        overflow-y: auto;
        overflow-x: hidden;
    }
  
    .content {
      height: calc(50% - 35vw);
    }

    .recipe-img > figure > img {
        width: 100vw;
        height: 6.5rem;
        object-fit: cover;
        object-position: 0% 42%;
    }

    .variation, .introduction-1, .introduction-2 > p {
        font-size: .75rem;
    }
}

@media print { 

    body {
        display: block !important;
        width: auto !important;
        float: none !important;
        position: static !important;
        overflow: visible !important;
    }

    .recipe-img {
        display: none;
    }

    .introduction-1, .introduction-2 > p {
        border: none;
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .content {
        display: block !important;
        width: auto !important;
        float: none !important;
        position: static !important;
        overflow: visible !important;
    }

    .main-content {
        display: block !important;
        width: auto !important;
        float: none !important;
        position: static !important;
        overflow: visible !important;
    }
}