@import url('https://fonts.googleapis.com/css2?family=Carter+One&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
:root{
    --header-height: 3.5rem;

    /* colors */
    --first-color: rgb(220, 4, 30);
    --first-color-alt: rgb(221, 8, 33);
    --first-color-dark: rgb(57, 19, 24);
    --title-color: rgb(45, 16, 19);
    --text-color: rgb(95, 69, 72);
    --text-color-light: rgb(142, 103, 107);
    --white-color: rgb(251, 225, 208);
    --body-color: rgb(251, 219, 198);
    --container-color: rgb(252, 221, 200);
    --shadow-small-img: drop-shadow(0 5px 15px rgba(41, 0, 5, 0.2));
    --shadow-big-img: drop-shadow(0 8px 25px rgba(41, 0, 5, 0.2));

    /* fonts */
    --body-font: "Montserrat", sans-serif;
    --second-font: "Carter One", system-ui;
    --biggest-fs: 2.5rem;
    --bigger-fs: 1.5rem;
    --h1-fs: 1.5rem;
    --h2-fs: 1.2rem;
    --h3-fs: 1rem;
    --normal-fs: .98rem;
    --small-fs: .81rem;
    --smaller-fs: .75rem;

    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;

    /* z index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* base */
*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
html{
    scroll-behavior: smooth;
}
input,
button,
body{
    font-family: var(--body-font);
    font-size: var(--normal-fs);
}
body{
    background-color: var(--body-color);
    color: var(--text-color);
}
input,
button{
    outline: none;
    border: none;
}
h1,h2,h3,h4{
    color: var(--title-color);
    font-weight: var(--font-regular);
    font-family: var(--second-font);
    line-height: 120%;
}
ul{
    list-style: none;
}
a{
    text-decoration: none;
}
img{
    display: block;
    max-width: 100%;
    height: auto;
}

/* reusable */
.container{
    max-width: 1200px;
    margin-inline: 1.5rem;
}
.grid{
    display: grid;
    gap: 1.5rem;
}
.section{
    padding-block: 5rem 1rem;
}
.section__title{
    text-align: center;
    font-size: var(--bigger-fs);
    margin-bottom: 2rem;
}
.main{
    overflow: hidden;
}

/* header & nav */
.header{
    position: fixed;
    width: 100%;
    max-width: 100%;
    top: 0;
    left: 0;
    background-color: var(--body-color);
    z-index: var(--z-fixed);
    transition: box-shadow .4s;
}
.nav{
    position: relative;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav__logo{
    display: inline;
    align-items: center;
    column-gap: .25rem;
    font-family: var(--second-font);
    color: var(--title-color);
}
.nav__logo img{
    width: 24px;
}
.nav__toggle,
.nav__close{
    display: flex;
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
}
.nav__list{
    display: flex;
    text-align: center;
    flex-direction: column;
    row-gap: 2rem;
}
.nav__link{
    position: relative;
    color: var(--title-color);
    font-family: var(--second-font);
}
.nav__link::after{
    content: '';
    width: 0;
    height: 3px;
    background-color: var(--first-color);
    position: absolute;
    left: 0;
    bottom: -.5rem;
    transition: width .4s;
}
.nav__link:hover::after{
    width: 60%;
}
.nav__close{
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}
.show-menu{
    top: 0;
}

/* home */
.home__container{
    padding-block: 2rem 3rem;
    row-gap: 7rem;
}
.home__data{
    position: relative;
    text-align: center;
}
.home__title{
    font-size: var(--biggest-fs);
}
.home__description{
    margin-block: 1rem 2rem;
}
.home__sticker-1,
.home__sticker-2{
    width: 40px;
    position: absolute;
    opacity: .7;
}
.home__sticker-1{
    right: .75rem;
    bottom: 2rem;
    rotate: 30deg;
}
.home__sticker-2{
    left: 2.5rem;
    bottom: -4.5rem;
}
.home__images{
    position: relative;
    display: grid;
    justify-items: center;
    justify-self: center;
}
.home__ingredient{
    width: 60px;
    filter: var(--shadow-small-img);
    position: absolute;
    z-index: 2;
}
.home__board,
.home__pizza{
    filter: var(--shadow-big-img);
}
.home__pizza{
    width: 300px;
    z-index: 2;
}
.home__board{
    width: 300px;
    position: absolute;
    bottom: -.5rem;
    left: -.15rem;
}
.home__leaf-1{
    top: -1rem;
}
.home__pepperoni{
    right: -.5rem;
    top: 2rem;
}
.home__mushroom{
    right: -.5rem;
    bottom: 2rem;
}
.home__olive{
    bottom: -1rem;
}
.home__leaf-2{
    left: -.5rem;
    bottom: 2rem;
}
.home__tomato{
    left: -.5rem;
    top: 2rem;
}
/* button */
.button{
    display: inline-flex;
    justify-content: center;
    background-color: var(--first-color);
    color: var(--white-color);
    padding: 1rem 1.5rem;
    font-weight: var(--font-semi-bold);
    border-radius: 4rem;
    box-shadow: 0 8px 25px rgba(20, 0, 2, 0.4);
    transition: background-color .4s;
}
.button:hover{
    background-color: var(--first-color-alt);
}

/* about */
.about{
    background-color: var(--container-color);
}
.about__container{
    row-gap: 2rem;
    padding-bottom: 2rem;
}
.about__data{
    position: relative;
    text-align: center;
}
.about_-data .section__title{
    margin-bottom: 1rem;
}
.about__description{
    margin-bottom: 2rem;
}
.about__sticker{
    width: 40px;
    position: absolute;
    right: 0;
    bottom: 2rem;
}
.about__img{
    width: 320px;
    justify-content: center;
    filter: var(--shadow-big-img);
}
.shadow-header{
    box-shadow: 0 4px 15px rgba(41, 0, 5, 0.1);
}

/* popular */
.popular__container{
    grid-template-columns: 100%;
    row-gap: 3rem;
    padding-bottom: 2rem;
}
.popular__data .section__title{
    margin-bottom: 1rem;
}
.popular__description{
    text-align: center;
}
.popular__swiper{
    position: relative;
}
.popular__dish{
    width: 220px;
    filter: var(--shadow-big-img);
    position: absolute;
    inset: 0;
    top: -.8rem;
    margin-inline: auto;
}
.popular__card,
.popular__img{
    width: 200px;
}
.popular__img{
    transform: scale(.8) rotate(-90deg);
    transition: transform .4s;
}
.popular__title{
    font-size: var(--h3-fs);
    color: var(--first-color);
    margin-top: 2rem;
    text-align: center;
    opacity: 0;
    transition: opacity .4s;
}
/* swiper class */
.swiper{
    margin-inline: initial;
    overflow: visible;
}
:is(.swiper-slide-active, .swiper-slide-duplicate-active) .popular__img{
    transform: scale(1) rotate(0);
}
:is(.swiper-slide-active, .swiper-slide-duplicate-active) .popular__title{
    opacity: 1;
}

/* recipe */
.recipe{
    background-color: var(--container-color);
}
.recipe__container{
    row-gap: 2rem;
    padding-bottom: 2rem;
}
.recipe__image{
    width: 60px;
    filter: var(--shadow-small-img);
}
.recipe__name{
    font-size: var(--normal-fs);
    margin-bottom: .25rem;
}
.recipe__description{
    font-size: var(--small-fs);
}
.recipe__ingredient{
    display: flex;
    align-items: center;
    column-gap: .75rem;
}
.recipe__img{
    width: 320px;
    justify-self: center;
    filter: var(--shadow-big-img);
}

/* products */
.products__container{
    padding-top: 3.5rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem 1.5rem;
}
.products__card{
    position: relative;
    background-color: var(--container-color);
    padding: 5rem .75rem 1.25rem .75rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 25px rgba(41, 0, 5, 0.1);
}
.products__img{
    width: 120px;
    position: absolute;
    top: -3.5rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    filter: var(--shadow-small-img);
    transition: transform .4s;
}
.products__name{
    font-size: var(--h3-fs);
    margin-bottom: .5rem;
}
.products__price{
    font-family: var(--second-font);
    font-size: var(--h1-fs);
    line-height: 120%;
    color: var(--first-color);
}
.products__button{
    position: absolute;
    right: .75rem;
    bottom: 1.25rem;
    background-color: var(--first-color);
    color: var(--white-color);
    padding: 4px;
    border-radius: .5rem;
    font-size: 1.5rem;
    display: inline-flex;
    box-shadow: 0 4px 15px rgba(204, 0, 24, 0.4);
    cursor: pointer;
    transition: background-color .4s;
}
.products__button:hover{
    background-color: var(--first-color-alt);
}
.products__card:hover .products__img{
    transform: translateY(-.5rem);
}

/* contact */
.contact__container{
    position: relative;
    background-color: var(--first-color-dark);
    padding-top: 3.5rem;
    border-radius: 3rem;
    overflow: hidden;
    row-gap: 3rem;
}
.contact__container .section__title,
.contact__title,
.contact_address{
    color: var(--white-color);
}
.contact__info{
    text-align: center;
    row-gap: 2rem;
    color: var(--white-color);
}
.contact__title{
    margin-bottom: 1rem;
}
.contact__social{
    display: flex;
    justify-content: center;
    column-gap: 1rem;
}
.contact__social-link{
    font-size: 1.5rem;
    color: var(--first-color);
    transition: transform .4s;
}
.contact__social-link:hover{
    transform: translateY(-.25rem);
}
.contact__address{
    font-style: normal;
}
.contact__map{
    color: var(--first-color);
    display: inline-flex;
    align-items: center;
    column-gap: .5rem;
    margin-top: .5rem;
    font-size: 1rem;
}
.contact__map span{
    font-size: var(--small-fs);
    font-weight: var(--font-semi-bold);
}
.contact__image{
    justify-self: center;
}
.contact__img{
    width: 300px;
}
.contact__sticker-1,
.contact__sticker-2,
.contact__sticker-3{
    width: 50px;
    position: absolute;
    opacity: .7;
}
.contact__sticker-1{
    top: 8rem;
    left: 1.5rem;
}
.contact__sticker-2{
    right: 1.5rem;
    bottom: 23rem;
}
.contact__sticker-3{
    left: 2rem;
    bottom: 6rem;
}

/* footer */
.footer{
    padding-block: 4rem 2rem;
}
.footer__container,
.footer__content{
    row-gap: 3rem;
}
.footer__logo{
    justify-self: center;
    font-size: var(--h1-fs);
    font-family: var(--second-font);
    color: var(--first-color);
}
.footer__title{
    font-size: var(--h3-fs);
    margin-bottom: 1rem;
}
.footer__social,
.footer__pay,
.footer__form{
    display: flex;
    column-gap: 1rem;
}
.footer__social-link{
    font-size: 1.5rem;
    color: var(--first-color);
    transition: transform .4s;
}
.footer__social-link:hover{
    transform: translateY(-.25rem);
}
.footer__pay-img{
    width: 30px;
    filter: var(--shadow-small-img);
}
.footer__form{
    padding: .5rem;
    background-color: var(--container-color);
    box-shadow: 0 5px 15px hsla(353, 100%, 8%, .1);
    border-radius: 4rem;
}
.footer__input{
    width: 100%;
    background: transparent;
    padding-left: .75rem;
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}
.footer__input::placeholder{
    color: var(--text-color);
}
.footer__button{
    padding-block: .75rem;
    cursor: pointer;
}
.footer__policy{
    display: flex;
    column-gap: 2rem;
    justify-content: center;
    margin-top: 5rem;
}
.footer__link{
    font-size: var(--small-fs);
    color: var(--text-color);
}
.footer__copy{
    display: block;
    margin-top: 2rem;
    text-align: center;
    font-size: var(--small-fs);
}

/* scroll up */
.scrollUp{
    position: fixed;
    right: 1rem;
    bottom: -50%;
    background-color: var(--body-color);
    box-shadow: 0 5px 15px hsla(353, 100%, 8%, .2);
    color: var(--title-color);
    display: inline-flex;
    padding: 6px;
    font-size: 1.2rem;
    border-radius: .5rem;
    z-index: var(--z-tooltip);
    transition: bottom .4s, transform .4s;
}
.scrollup:hover{
    transform: translateY(-.5rem);
}
.show-scroll{
    bottom: 3rem;
}
.active-link::after{
    width: 60%;
}

/* for small devices */
@media screen and (max-width: 320px){
    .container{
        margin-inline: 1rem;
    }
    .products__container{
        grid-template-columns: 150px;
        justify-content: center;
    }
    .footer__form{
        background-color: transparent;
        box-shadow: none;
        flex-direction: column;
        row-gap: 1rem;
        padding: 0;
    }
    .footer__input{
        background-color: var(--container-color);
        box-shadow: 0 5px 15px rgba(41, 0, 5, 0.1);
        padding: .75rem 1rem;
        border-radius: 4rem;
    }
}

/* for medium devices */
@media screen and (min-width: 576px){
    .home__container,
    .about__container,
    .popular__container,
    .recipe__container{
        grid-template-columns: 380px;
        justify-content: center;
    }
    .products__container{
        grid-template-columns: repeat(2, 160px);
        justify-content: center;
    }
    .contact__container{
        width: 450px;
        margin-inline: auto;
    }
    .footer__form{
        width: 360px;
    }
}

@media screen and (min-width: 768px){
    .popular__swiper{
        width: 600px;
        overflow-x: clip;
        justify-self: center;
    }
    .products__container{
        grid-template-columns: repeat(3, 200px);
    }
    .footer__content{
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
    }
    .footer__content div:nth-child(3){
        grid-column: 1 / 3;
    }
    .footer__title{
        text-align: center;
    }
    .footer__social,
    .footer__pay{
        column-gap: 1.5rem;
    }
}

/* for large devices */
@media screen and (max-width: 1200px){
    .nav__menu{
        position: fixed;
        top: -120%;
        left: 0;
        background-color: var(--body-color);
        width: 100%;
        padding-block: 4.5rem 3.5rem;
        box-shadow: 0 5px 15px hsla(353, 100%, 8%, .1);
        transition: top .4s;
    }
    .show-menu{
        top: 0;
    }
}
@media screen and (min-width: 1200px){
    .container{
        margin-inline: auto;
    }
    .section{
        padding-block: 7rem 2rem;
    }
    .section__title{
        margin-bottom: 4rem;
        font-size: var(--biggest-fs);
    }
    .nav{
        height: calc(var(--header-height) + 2rem);
    }
    .nav__toggle,
    .nav__close{
        display: none;
    }
    .nav__list{
        flex-direction: row;
        column-gap: 4rem;
    }
    .home__container{
        grid-template-columns: 515px 555px;
        column-gap: 3rem;
        align-items: start;
        padding-block: 10rem 4rem;
    }
    .home__data{
        text-align: initial;
        margin-top: 2rem;
    }
    .home__description{
        margin-bottom: 3.5rem;
        padding-right: 6rem;
    }
    .home__sticker-1,
    .home__sticker-2{
        width: 50px;
    }
    .home__sticker-1{
        right: 3rem;
        top: 1rem;
        bottom: 0;
    }
    .home__sticker-2{
        left: 16rem;
        bottom: 3rem;
    }
    .home__board,
    .home__pizza{
        width: 520px;
    }
    .home__board{
        bottom: -1rem;
    }
    .home__ingredient{
        width: 100px;
    }
    .home__leaf-1{
        top: -2rem;
    }
    .home__pepperoni{
        right: -1rem;
        top: 3.5rem;
    }
    .home__mushroom{
        right: -1rem;
        bottom: 3.5rem;
    }
    .home__olive{
        bottom: -2rem;
    }
    .home__leaf-2{
        left: -1rem;
        bottom: 3.5rem;
    }
    .home__tomato{
        left: -1rem;
        top: 3.5rem;
    }
    .about__container{
        grid-template-columns: 450px 440px;
        align-items: center;
        column-gap: 6rem;
    }
    .about__img{
        order: -1;
        width: 450px;
    }
    .about__data{
        text-align: initial;
    }
    .about__data .section__title{
        margin-bottom: 1.5rem;
        text-align: initial;
        font-size: var(--biggest-fs);
    }
    .about__description{
        margin-bottom: 3.5rem;
    }
    .about__sticker{
        width: 50px;
        right: 6rem;
        bottom: 4rem;
    }
    .popular__container{
        grid-template-columns: 470px;
        row-gap: 5rem;
        padding-bottom: 3rem;
    }
    .popular__data .section__title{
        margin-bottom: 1.5rem;
    }
    .popular__swiper{
        width: 1000px;
    }
    .popular__card,
    .popular__img{
        width: 350px;
    }
    .popular__dish{
        width: 390px;
        top: -1.5rem;
    }
    .popular__title{
        margin-top: 3rem;
        font-size: var(--h2-fs);
    }
    .recipe__container{
        grid-template-columns: 360px 550px;
        align-items: center;
        column-gap: 6rem;
        padding-bottom: 3rem;
    }
    .recipe__ingredient{
        column-gap: 1.5rem;
    }
    .recipe__image{
        width: 80px;
    }
    .recipe__name{
        font-size: var(--h3-fs);
    }
    .recipe__description{
        font-size: var(--normal-fs);
    }
    .recipe__img{
        width: 550px;
    }
    .products__container{
        grid-template-columns: repeat(3, 250px);
        gap: 7.5rem 4rem;
    }
    .products__card{
        padding: 10rem 1.5rem 1.5rem;
        border-radius: 2rem;
    }
    .products__img{
        width: 200px;
        top: -4rem;
    }
    .products__name{
        font-size: var(--h2-fs);
    }
    .products__button{
        right: 1.5rem;
        bottom: 1.5rem;
        padding: 6px;
    }
    .contact__container{
        width: initial;
        grid-template-columns: 370px 350px;
        justify-content: center;
        column-gap: 6rem;
        border-radius: 4rem;
    }
    .contact__img{
        width: 350px;
    }
    .contact__image{
        order: -1;
    }
    .contact__info,
    .contact__data .section__title{
        text-align: initial;
    }
    .contact__data{
        margin-top: 2rem;
    }
    .contact__info{
        grid-template-columns: repeat(2, max-content);
    }
    .contact__title{
        font-size: var(--h2-fs);
    }
    .contact__social{
        justify-content: initial;
    }
    .contact__sticker-1,
    .contact__sticker-2,
    .contact__sticker-3{
        width: 50px;
    }
    .contact__sticker-1{
        left: 4rem;
    }
    .contact__sticker-2{
        right: 4rem;
        top: 8rem;
        bottom: 0;
    }
    .contact__sticker-3{
        left: 10rem;
        bottom: 4rem;
    }
    .footer{
        padding-bottom: 3rem;
    }
    .footer__content{
        grid-template-columns: repeat(3, 1fr);
    }
    .footer__content div:nth-child(3){
        grid-column: initial;
    }
    .footer__content div:nth-child(2){
        order: 1;
        justify-self: end;
    }
    .footer__content div:nth-child(1){
        justify-self: start;
    }
    .scrollup{
        right: 3rem;
    }
}
