:root {

    /* color variables */
    --color-bg: #e9ede2;
    --color-main: #83a957;
    --color-second: #d2d8a0;
    --color-second-rgba: 210 216 160;
    --color-third: #f9d94a;
    --color-fourth: #e7aca4;
    --color-fifth: #f1bfb8;
    --color-fifth-rgba: 241 191 184;
    --color-off-white: #fbfbfb;
    --color-off-white-rgba: 252 252 252;
    --color-off-black: #222222;
    --color-off-black-rgba: 34 34 34;
    --color-gray: #464a4c;
    --color-gray-rgba: 119 124 127;
    --color-gray-light: #bababa;

    /* width/height variables */
    --nav-height: 65px;
    --site-width: 1200px;

    /* font variables */
    --body-font: 'Jost', Arial, Sans-serif;
    --accent-font: 'Lobster Two', Serif;

    scroll-behavior: smooth;
}

/* main styles */

* {
    box-sizing: border-box;
}

.ease {
    transition: .2s ease-in-out;
}

.ma {
    font-family: 'Material Symbols Outlined';
    font-size: 110%;
    font-weight: normal;
    font-style: normal;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--color-bg);
    font-family: 'Jost', sans-serif;
    color: var(--color-off-black);
    position: relative;
    margin: 0;
    padding: .1px;
    font-size: 17px;
    line-height: 1.80647em;
    letter-spacing: 0.02em;
}
p, ul, ol {
    color: var(--color-gray);
    font-weight: 300;
}

/* link styles */

a:link, a:visited, a:hover, a:active {
    text-decoration: none;
}
a {
    color: var(--color-off-black);
}

/* nav styles */

nav {
    width: 100%;
    height: var(--nav-height);
    background: var(--color-off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 500 1em var(--body-font);
    position: fixed;
    z-index: 10;
    top: 0;
    box-shadow: 0 0 10px rgba(var(--color-off-black-rgba) /.2);
    white-space: nowrap;
}
nav ul, nav ul li {
    padding: 0;
    margin: 0;
    list-style: none;
}
nav ul {
    margin: 0 20px;
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
nav ul li {
    font: 600 14px var(--body-font);
    display: flex;
    align-items: center;
}
nav ul li + li {
    margin: 0 0 0 10px;
}
nav ul li span {
    padding: 8px 15px; 
    border: 1px solid var(--color-gray-light);
    color: var(--color-gray);
    border-radius: 20px;
    font-size: 1em;
    font-weight: 500;
    letter-spacing: .05em;
    opacity: 1;
}
nav ul li span:hover, nav ul li span:focus {
    border: 1px solid rgba(var(--color-gray-rgba) / 100%);
    background: rgba(var(--color-gray-rgba) /.05);
}
.nav-home {
    margin-right: auto;
    font:  900 1.4em var(--accent-font);
    text-transform: lowercase;
}
.nav-bookmark span {
    letter-spacing: 0;
    padding: 8px 10px;
    font-size: 120%;
}


nav .nav-home, nav .nav-home a {
    color: var(--color-main);
}
#logo {
    border: 0;
    padding: 0 10px 0 0;
}

/* wrapper styles */

#wrapper {
    margin-top: var(--nav-height);
}

/* header styles */

header {
    position: relative;
    flex: 1;
    width: 100%; 
    margin: var(--nav-height) 0 0;
    height: calc(100vh - var(--nav-height));
    position: relative;
    z-index: 0;
    background: var(--color-fifth);
    max-height: 900px;
    padding: 50px;
    background-image: url('../images/ella-olsson-rD3YrnhTmf0-unsplash.jpg'); 
    background-repeat: no-repeat; 
    background-position: center center; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
    background-size: cover;
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

}
header::before {
    content: '';
    z-index: -1;
    left: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    background: linear-gradient(0deg, rgba(var(--color-fifth-rgba) / 40%) 0%, rgba(var(--color-second-rgba) / 30%));
}
h1 {
    font-size: 7em;
    letter-spacing: .3px;
    line-height: 1em;
    font-weight: 600;
    max-width: 700px;
    margin: 0;
    font-family: var(--accent-font);
}
header span {
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1em;
    display: block;
    margin: 25px 0 ;
    font-family: var(--body-font);
}
header a {
    height: 80px;
    width: 80px;
    padding: 0px 14px; 
    background: var(--color-main);
    color: var(--color-off-white);
    border-radius: 100%;
    font-weight: 500;
    letter-spacing: .05em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}
header a .material-symbols-outlined {
    font-size: .35em;
}

header a:hover, header a:focus {
    background: var(--color-off-black);
    color: var(--color-off-white);
}


/* spotlight styles */

.spotlight-recipe {
    background-color: var(--color-off-white);
    padding: 0;
    border-radius: 5px;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(var(--color-off-black-rgba) /.2);
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 40px 0 0;
}
.spotlight-recipe-img {
    width: 100%; 
    height: 100%;
    position: absolute;
    -webkit-object-fit: cover; 
    object-fit: cover;
    z-index: 0;
    grid-area: 1 / 1 / 2 / 2;
}
.spotlight-recipe-content {
    padding: 50px;
    grid-area: 1 / 2 / 2 / 3;

}
.spotlight-recipe .recipe-name  {
    font-size: 35px;
    width: calc(100% - 60px)
}
.spotlight-recipe .recipe-span {
    margin: 20px 0 20px;
}
.spotlight-tag {
    content: 'Today\'s Recipe';
    position: absolute;
    right: -100px;
    top: -100px;
    background: var(--color-third);
    height: 200px;
    width: 200px;
    padding: 80px 80px 0 0;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.16667em;
}

/* recipe container styles */

section {
    max-width: var(--site-width);
    margin:  auto;
}
section::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 0;
    width: 100%;
    height: 360px;
    background: linear-gradient(0deg, var(--color-bg) 0%, rgba(var(--color-fifth-rgba) / 100%));
}
#filter-section::before {
    background: linear-gradient(0deg, var(--color-bg) 0%, rgba(var(--color-second-rgba) / 100%));
}
.anchor {
    position: relative;
    top: -65px;
}
.section-wrap {
    padding: 70px 70px 80px;
}
h2 {
    font-size: 35px;
    line-height: 1.16667em;
    margin: 0 0 10px;
}

/* filter styles */

form {
    margin: 35px 0 45px;
}
.form-input {
    display: none;
}
.form-label, .form-button {
    background: transparent;
    border: 1px solid var(--color-gray-light);
    color: var(--color-gray);
    border-radius: 20px;
    padding: 0px 15px;  
    text-transform: capitalize;
    font: 600 .8em var(--body-font);
    letter-spacing: .5px;
    margin: 4px 3px 4px 0;
    height: 40px;
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.form-label:hover, .form-label:focus {
    border: 1px solid rgba(var(--color-gray-rgba) / 100%);
    background: rgba(var(--color-gray-rgba) /.05);
}
.form-input:checked + .form-label {
    background: rgba(var(--color-off-black-rgba) / 100%);
    color: var(--color-bg);
    border: 0;
}

/* recipe card container styles */

#recipe-list {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    grid-row-gap: 30px;
    -moz-row-gap: 30px;
    row-gap: 30px;
    grid-column-gap: 30px;
    -moz-column-gap: 30px;
    column-gap: 30px;
}

/* recipe card styles */

.recipe-card {
    position: relative;
    background-color: var(--color-off-white);
    border-radius: 5px;
    flex: 0 0 100px; 
    height: 310px;
    position: relative;
    overflow: hidden;
    padding: 8px;
    box-shadow: 0 0 10px rgba(var(--color-off-black-rgba) /.05);
}
.recipe-card:hover {
     box-shadow: 0 0 10px rgba(var(--color-off-black-rgba) /.4);
}
.recipe-category {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--color-third);
    border-radius: 25px;
    padding: 0 13px;
    font: .9em var(--body-font);
    margin: 15px;
    height: 40px;
    display: flex;
    align-items: center;
}
.recipe-card img {
    height: 150px; 
    width: 100%;
    -webkit-object-fit: cover; 
    object-fit: cover;
    border-radius: 3px;

}
.recipe-content {
    padding: 12px 20px 20px;
}
.recipe-name {
    font-size: 22px;
    letter-spacing: 0.02em;
    font-weight: 600;
    line-height: 1.16667em;
    cursor: pointer;
}
.recipe-name:hover, .recipe-name:focus {
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
}
.recipe-time {
    padding: 2px 0 0 0;
    color: var(--color-gray);
    font-size: .75em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.recipe-time .ma {
    position: relative;
    top: .15em;
    padding: 0 3px 0 0;
    opacity: .9;
}


/* recipe popup styles */

#recipe-popup {
    width: 100%; 
    height: 100%; 
    position: fixed; 
    z-index: 11; 
    display: flex;
    align-items: center;
    justify-content: center;
}
.recipe-fade {
    z-index: -1;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    background: rgba(var(--color-off-black-rgba) / 50%);
}
.recipe-large-card {
    top: 0;
    background: var(--color-off-white);
    max-width: 1000px;
    width: calc(100% - 120px);
    height: calc(100% - 120px);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(var(--color-off-black-rgba) /.2);
    position: relative;
    overflow: hidden;
}
.recipe-close {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--color-fourth);
    width: 70px;
    height: 70px;
    border-radius:  0  0 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 1.3em;
    cursor: pointer;
}
.recipe-close:hover, .recipe-close:focus {
    background: var(--color-off-black);
    color: var(--color-off-white);
    cursor: pointer;

}
.recipe-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 400px 1fr;
    overflow: auto;
    height: 100%;
    position: relative;
}
.recipe-container img {
    width: 100%;
    height: 100%;
    -webkit-object-fit: cover; 
    object-fit: cover;
    grid-area: 1 / 1 / 2 / 3;
    position: relative;
    z-index: 0;
}
.recipe-header-right {
    grid-area: 1 / 1 / 2 / 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 80px ;
    position: relative;
    z-index: 1;
}
.recipe-header-right::before {
    content: '';
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    background: linear-gradient(0deg, rgba(var(--color-off-white-rgba) / 100%) 0%, rgba(var(--color-off-white-rgba) / 70%));
    box-sizing: border-box;
    grid-area: 1 / 1 / 2 / 3;
}
h3 {
    font-size: 4rem;
    font-weight: 400;
    letter-spacing: .01em;
    line-height: 1em;
    margin: 0;
}
.recipe-ingredients {
    padding: 0 50px 80px 80px;
}
.recipe-description {
    padding: 0 80px 80px 0;
}
.recipe-span {
    margin: 20px 0 0 0;
}
.recipe-span span {
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-gray-light);
    height: 40px;
    padding: 0px 15px; 
    border-radius: 20px;
    margin: 4px 8px 4px 0;
    white-space: nowrap;
    font-size: .8em;
}
.recipe-span .ma {
    padding: 0;
    opacity: .4;
}
.recipe-span [class*='clock'], .recipe-span [class*='bell'] {
    padding: 0 10px 0 0;
}
.recipe-span .recipe-span-button {
    background: rgba(var(--color-off-black-rgba) / 100%);
    color: var(--color-off-white);
    border: 0;
    padding: 0 13px;
}
.recipe-span .recipe-span-button i {    
    opacity: 1;
}
h4 {
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin: 0 0 15px;
}
.recipe-ingredients ul {
    margin: 0;
    padding: 0 0 0 16px;
}

@media screen and (max-width: 1100px) {
    :root {
        --site-width: 900px;
    }
    #recipe-list {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
    section::before {
        height: 390px;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --site-width: 600px;
    }
    nav ul {
        margin: 0 12px;
    }
    .nav-bookmark {
        display: none;
    }
    h1 {
        font-size: 3.4em;
    }
    header span {
        font-size: .9rem;
    }
    section::before {
        height: 400px;
    }
    .section-wrap {
        padding: 55px 50px 60px;
    }
    #recipe-list {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .header-text h2 {
        max-width: 250px;
    }
    .recipe-large-card {
        width: calc(100% - 60px);
        height: calc(100% - 60px);
    }
    .recipe-container {
        grid-template-columns: 1fr ;
        grid-template-rows: 350px repeat(3,1fr);

    }
    .recipe-ingredients {
        padding: 0 60px 60px;
        grid-area: 2 / 1 / 3 / 3;
    }
    .recipe-description {
        padding: 0 60px 60px;
        grid-area: 3 / 1 / 4 / 3;
    }
    h3 {
        font-size: 2.5rem;
    }
    #recipe-popup .recipe-span span {
        font-size: .9em;
        height: 35px;
        padding: 0px 12px; 

    }
    .spotlight-recipe {
        grid-template-columns: 1fr;
        grid-template-rows: 200px 1fr;

    }
    .spotlight-recipe-img {
        grid-area: 1 / 1 / 2 / 2;

    }
    .spotlight-recipe-content {
        padding: 40px;
        grid-area: 2 / 1 / 3 / 2;

    }
}

@media screen and (max-width: 414px) {
    :root {
        --site-width: 370px;
    }
    .nav-home {
        font-size:  1.3em;
    }
    #logo {
        width: 20px;
        top: 2.5px;
    }
    nav ul li span {
        padding: 10px 12px; 
        font-size: .7em;
    }
    h1 {
        font-size: 2.9em;
    }
    header span {
        font-size: .7em;
        letter-spacing: .06em;
    }
    section::before {
        height: 540px;
    }
    .section-wrap {
        padding: 45px 40px 50px;
    }
    #recipe-list {
        grid-template-columns: repeat(1,minmax(0,1fr));
    }
}