@import url('https://fonts.googleapis.com/css2?family=Aclonica&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/***************** CSS VARIABLES ******************/
:root {
    --header-height: 3.5rem;

    /***************** COLORS ******************/
    --first-color: hsl(56, 94%, 49%);
    --first-color-alt: hsl(45, 99%, 48%);
    --second-color: hsl(22, 100%, 8%);
    --white-color: hsl(161, 88%, 39%);
    --title-color: hsl(22, 100%, 8%);
    --text-color: hsl(22, 24%, 32%);
    --text-color-light: hsl(23, 16%, 40%);
    --body-color: hsl(34, 100%, 92%);
    --body-color-alt: hsl(34, 100%, 88%);
    --container-color: hsl(34, 100%, 96%);
    --shadow-small-img: drop-shadow(0 4px 16px hsla(22, 100%, 8%, .2));
    --shadow-big-img: drop-shadow(0 8px 24px hsla(22, 100%, 8%, .2));

    /***************** FONT & TYPOGRAPHY *****************/
    /* 1rem = 16px */
    --body-font: "Montserrat", sans-serif;
    --second-font: "Aclonica", sans-serif;
    --biggest-font-size: 3rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;

    /***************** FONT WEIGHT *****************/
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;

    /***************** Z-INDEX *****************/
    --z-tooltip: 10;
    --z-fixed: 100;

    /***************** THEME VARIABLES *****************/
    --bg-color: #ffffff;
    --text-color: #333333;
}

/* Light theme (default) */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #ffffff;
}

/* Dark theme */
.dark-theme {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --header-bg: #1e1e1e;
}

/***************** RESPONSIVE TYPOGRAPHY *****************/
@media screen and (min-width: 1150px) {
    :root {
        --biggest-font-size: 4.5rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
    }
}

/****************** BASE CSS *****************/
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    color: var(--title-color);
    font-family: var(--second-font);
    font-weight: var(--font-regular);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

a:hover {
    color: var(--first-color);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.02);
}

/******************* REUSABLE CSS CLASSES ******************/
.container {
    max-width: 1120px;
    margin-inline: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding-block: 5rem 1rem;
}

.section__title {
    text-align: center;
    font-size: var(--h1-font-size);
    margin-bottom: 2rem;
    animation: float 2.5s ease-in-out forwards, fadeIn 2s ease-in-out;
}

.main {
    overflow: hidden;
}

/******************* FORM ELEMENTS *******************/
input, select, textarea, button {
    font-family: inherit;
}

input, select, textarea {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input:focus, select:focus, textarea:focus {
    outline: none;
}

/******************* HEADER & NAV *******************/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    z-index: var(--z-fixed);
    transition: background-color 0.3s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 16px hsla(22, 100%, 8%, .1);
}

.nav {
    position: relative;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--title-color);
    font-family: var(--second-font);
}

.nav__logo img {
    width: 20px;
}

.nav__logo div {
    padding: 6px;
    border-radius: 0.5rem;
    background-color: var(--first-color);
}

.nav__close,
.nav__toggle {
    display: flex;
    font-size: 1.5rem;
    color: var(--title-color);
    cursor: pointer;
}

@media screen and (max-width: 1150px) {
    .nav__menu {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        padding-block: 4.5rem 3.5rem;
        box-shadow: 0 4px 16px hsla(22, 100%, 8%, .2);
        transition: top .4s;
    }
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.nav__link {
    position: relative;
    color: var(--title-color);
    font-family: var(--second-font);
    text-decoration: none;
}

.nav__link::after {
    content: '';
    width: 0;
    height: 3px;
    transition: width .3s;
    background-color: var(--first-color);
    position: absolute;
    left: 0;
    bottom: -0.5rem;
}

.nav__link:hover::after {
    width: 100%;
}

.nav__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.show-menu {
    top: 0;
}

@media screen and (min-width: 1150px) {
    .nav {
        height: calc(var(--header-height) + 2rem);
    }
    .nav__toggle,
    .nav__close {
        display: none;
    }
    .nav__list {
        flex-direction: row;
        column-gap: 4rem;
    }
}

/******************* HOME *******************/
.home__container {
    padding-block: 3rem 2rem;
    justify-content: center;
    row-gap: 3.5rem;
}

.home__data {
    position: relative;
    text-align: center;
}

.home__title {
    font-size: var(--biggest-font-size);
    margin-bottom: 1rem;
    animation: float 2.5s ease-in-out forwards, fadeIn 2s ease-in-out;
}

.home__description {
    margin-bottom: 2.5rem;
}

.home__sticker {
    width: 40px;
    rotate: 15deg;
    opacity: 0.5;
    position: absolute;
    bottom: 2rem;
    right: 1rem;
}

.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__burger,
.home__dish {
    filter: var(--shadow-big-img);
}

.home__burger {
    width: 280px;
    z-index: 2;
    animation: float 3s ease-in-out infinite, fadeIn 1.5s ease-in-out;
}

.home__dish {
    max-width: initial;
    width: 300px;
    position: absolute;
    bottom: -2.5rem;
    animation: float 3s ease-in-out infinite, fadeIn 1.5s ease-in-out;
}

.home__potato-1 {
    left: -1rem;
    top: 0.75rem;
}

.home__potato-2 {
    right: -0.75rem;
    bottom: -2rem;
    rotate: 90deg;
}

.home__tomato-1 {
    width: 40px;
    top: -1rem;
    right: 6rem;
}

.home__tomato-2 {
    width: 40px;
    left: 5.5rem;
    bottom: -1.5rem;
}

.home__lettuce-1 {
    top: 2.5rem;
    right: -2rem;
    transform: scaleX(-1);
}

.home__lettuce-2 {
    left: -2rem;
    bottom: 1rem;
}

@media screen and (min-width: 1150px) {
    .home__container {
        grid-template-columns: 430px 605px;
        align-items: center;
        column-gap: 4rem;
        padding-block: 7rem 4rem;
    }
    .home__data {
        text-align: initial;
    }
    .home__description {
        margin-bottom: 3.5rem;
        padding-right: 3rem;
    }
    .home__sticker {
        width: 60px;
        right: 10rem;
        bottom: 1rem;
    }
    .home__burger {
        width: 490px;
    }
    .home__dish {
        width: 560px;
        bottom: -4rem;
    }
    .home__ingredient {
        width: 100px;
    }
    .home__potato-1 {
        left: -2rem;
        top: 1.5rem;
    }
    .home__potato-2 {
        right: -1.5rem;
        bottom: -3rem;
    }
    .home__tomato-1 {
        width: 70px;
        top: -1.5rem;
        right: 10rem;
    }
    .home__tomato-2 {
        width: 70px;
        left: 9.5rem;
        bottom: -2.5rem;
    }
    .home__lettuce-1 {
        top: 4rem;
        right: -3.5rem;
    }
    .home__lettuce-2 {
        left: -3.5rem;
        bottom: 2rem;
    }
}

/******************* BUTTON *******************/
.button {
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    color: var(--title-color);
    padding: 1rem 1.5rem;
    font-family: var(--second-font);
    border-radius: 4rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 20px rgba(255, 214, 79, 0.2);
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
    z-index: -1;
}

.button:hover {
    box-shadow: 0 12px 32px rgba(255, 214, 79, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.button:hover::before {
    left: 100%;
}

body.dark-theme .button {
    background: linear-gradient(135deg, #f7c600, #ffed4e);
    color: #1e1e1e;
    box-shadow: 0 8px 20px rgba(247, 198, 0, 0.3);
}

body.dark-theme .button:hover {
    box-shadow: 0 12px 32px rgba(247, 198, 0, 0.5);
}

/******************* RECIPE *******************/
.recipe {
    overflow: hidden;
}

.recipe__container {
    grid-template-columns: 0.5fr 1fr;
    column-gap: 1rem;
    padding-bottom: 2rem;
}

.recipe__image {
    position: relative;
    display: grid;
    place-items: center;
}

.recipe__img {
    max-width: initial;
    width: 200px;
    filter: var(--shadow-big-img);
    position: absolute;
    left: -6rem;
    animation: float 3s ease-in-out infinite, fadeIn 1.5s ease-in-out;
}

.recipe__data {
    display: grid;
    row-gap: 2rem;
}

.recipe__card {
    display: flex;
    align-items: center;
    column-gap: 0.5rem;
}

.recipe__box {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background-color: var(--first-color);
    border: 3px solid var(--container-color);
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
}

.recipe__box img {
    width: 50px;
    filter: var(--shadow-small-img);
}

.recipe__title {
    font-size: var(--normal-font-size);
    margin-bottom: 0.5rem;
    text-decoration: none !important;
}

.recipe__description {
    font-size: var(--small-font-size);
}

.recipe_card:nth-child(even) .recipe_box {
    order: 1;
}

@media screen and (min-width: 1150px) {
    .recipe__container {
        grid-template-columns: 350px 300px;
        column-gap: 8rem;
        padding-bottom: 3rem;
    }
    .recipe__img {
        width: 350px;
    }
    .recipe__card {
        column-gap: 1rem;
    }
    .recipe__box {
        width: 100px;
        height: 100px;
        border-radius: 1.25rem;
        border-width: 5px;
    }
    .recipe__box img {
        width: 85px;
    }
    .recipe__title {
        font-size: var(--h3-font-size);
    }
    .recipe__description {
        font-size: var(--normal-font-size);
    }
}

/******************* POPULAR *******************/
.popular {
    background-color: var(--body-color-alt);
}

.popular__container {
    padding-block: 2rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem 1.5rem;
}

.popular__card {
    position: relative;
    background-color: var(--first-color);
    padding: 6rem 0.75rem 1rem;
    border-radius: 1rem;
    border: 4px solid var(--container-color);
    animation: float 2.5s ease-in-out infinite, fadeIn 2s ease-in-out;
}

.popular__img {
    position: absolute;
    top: -2rem;
    left: 0;
    right: 0;
    width: 120px;
    margin: 0 auto;
    filter: var(--shadow-small-img);
    transition: transform .4s;
    animation: float 3s ease-in-out infinite, fadeIn 2s ease-in-out;
}

.popular__title {
    font-size: var(--normal-font-size);
    margin-bottom: 0.75rem;
}

.popular__price {
    color: var(--title-color);
    font-family: var(--second-font);
    font-size: var(--h2-font-size);
}

.popular__button {
    position: absolute;
    right: 0.75rem;
    bottom: 1rem;
    outline: none;
    border: none;
    background-color: var(--second-color);
    color: var(--white-color);
    padding: 6px;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    display: inline-flex;
    cursor: pointer;
}

.popular_card:hover .popular_img {
    transform: translateY(-0.5rem);
}

@media screen and (min-width: 768px) {
    .popular__container {
        grid-template-columns: repeat(3, 160px);
    }
}

@media screen and (min-width: 1150px) {
    .popular__container {
        grid-template-columns: repeat(3, 250px);
        gap: 6.5rem 4rem;
        padding-block: 3rem;
    }
    .popular__card {
        padding: 9.5rem 1.25rem 1.25rem;
        border-radius: 2rem;
        border-width: 6px;
    }
    .popular__img {
        width: 200px;
        top: -3.5rem;
    }
    .popular__title {
        font-size: var(--h2-font-size);
    }
    .popular__price {
        font-size: var(--h1-font-size);
    }
    .popular__button {
        font-size: 1.5rem;
        right: 1.25rem;
        bottom: 1.25rem;
    }
}

/******************* DELIVERY *******************/
.delivery__container {
    row-gap: 2.5rem;
}

.delivery__data {
    position: relative;
    text-align: center;
}

.delivery_container .section_title {
    margin-bottom: 1rem;
}

.delivery__description {
    margin-bottom: 2rem;
}

.delivery__sticker {
    width: 30px;
    rotate: 15deg;
    opacity: 0.5;
    position: absolute;
    right: 1rem;
    bottom: 0.5rem;
}

.delivery__img {
    width: 320px;
    justify-self: center;
    filter: var(--shadow-big-img);
}

@media screen and (min-width: 1150px) {
    .delivery__container {
        grid-template-columns: 440px 550px;
        column-gap: 4rem;
        align-items: center;
        padding-block: 1rem;
    }
    .delivery_container .section_title,
    .delivery__data {
        text-align: initial;
    }
    .delivery__description {
        margin-bottom: 3.5rem;
    }
    .delivery__sticker {
        width: 50px;
        right: 8rem;
        bottom: 0;
    }
    .delivery__img {
        width: 550px;
    }
}

/******************* FOOTER *******************/
.footer {
    padding-block: 3rem 2rem;
}

.footer__container {
    row-gap: 2rem;
}

.footer__logo {
    font-size: var(--h1-font-size);
    font-family: var(--second-font);
    color: var(--title-color);
    justify-self: center;
}

.footer__content {
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
}

.footer__link {
    color: var(--text-color);
}

.footer__social {
    grid-column: 1 / 3;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer__social a {
    width: 32px;
    height: 32px;
    background-color: var(--first-color);
    color: var(--second-color);
    font-size: 1.5rem;
    border-radius: 0.5rem;
    transition: transform .4s;
    display: grid;
    place-items: center;
}

.footer__social a:hover {
    transform: translateY(-0.25rem);
}

.footer__copy {
    display: block;
    text-align: center;
    font-size: var(--small-font-size);
    margin-top: 3.5rem;
}

@media screen and (min-width: 768px) {
    .footer__social {
        grid-column: initial;
    }
    .footer__content {
        grid-template-columns: repeat(3, 1fr);
        align-items: center;
    }
    .footer__link:nth-child(1) {
        justify-self: start;
    }
    .footer__link:nth-child(2) {
        order: 2;
        justify-self: end;
    }
}

@media screen and (min-width: 1150px) {
    .footer {
        padding-block: 5rem 3rem;
    }
    .footer__container {
        row-gap: 3.5rem;
    }
    .footer__copy {
        margin-top: 4rem;
    }
}

/******************* MODIFY SCROLL BAR *******************/
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: hsl(34, 16%, 75%);
}

::-webkit-scrollbar-thumb {
    background-color: hsl(34, 16%, 65%);
}

::-webkit-scrollbar-thumb:hover {
    background-color: hsl(34, 16%, 55%);
}

/******************* Go To Top BUTTON *******************/
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -50%;
    color: var(--title-color);
    background-color: var(--body-color);
    box-shadow: 0 4px 16px hsla(22, 100%, 8%, .2);
    display: inline-flex;
    padding: 6px;
    font-size: 1.25rem;
    border-radius: 0.35rem;
    z-index: var(--z-tooltip);
    transition: bottom 0.4s, transform 0.4s;
}

.scrollup:hover {
    transform: translateY(-0.5rem);
}

.show-scroll {
    bottom: 3rem;
}

@media screen and (min-width: 1150px) {
    .scrollup {
        right: 3rem;
    }
}

/******************* BREAKPOINTS FOR RESPONSIVE *******************/
@media screen and (max-width: 330px) {
    .container {
        margin-inline: 1rem;
    }
    .home__title {
        font-size: 2.5rem;
    }
    .home__burger {
        width: 210px;
    }
    .home__dish {
        width: 250px;
        bottom: -2rem;
    }
    .recipe__container {
        column-gap: 5rem;
    }
    .recipe__img {
        left: -8rem;
    }
    .popular__container {
        grid-template-columns: 160px;
        justify-content: center;
    }
    .footer__social {
        grid-column: 1;
    }
    .footer__content {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

@media screen and (min-width: 540px) {
    .home__container,
    .delivery__container {
        grid-template-columns: 360px;
        justify-content: center;
    }
    .recipe__img {
        position: initial;
    }
    .recipe__container {
        grid-template-columns: repeat(20px, 230px);
        justify-content: center;
        column-gap: 3rem;
    }
    .popular__container {
        grid-template-columns: repeat(2, 160px);
        justify-content: center;
    }
}

/* Dark mode styles */
body.dark-theme {
    background-color: #121212;
    color: #ffffff;
}

body.dark-theme .header,
body.dark-theme .footer {
    background-color: #1e1e1e;
}

body.dark-theme a {
    color: #ffffff;
}

/* Keyframe for floating animation */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Keyframe for fade-in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide in from top */
@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide in from bottom */
@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Rotate animation */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}