/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&family=Saira:wght@100..900&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: hsl(166, 80%, 40%);
  --first-color-alt: hsl(166, 78%, 38%);
  --title-color: hsl(166, 95%, 15%);
  --text-color: hsl(166, 12%, 40%);
  --white-color: hsl(166, 100%, 99%);
  --dark-color: hsl(166, 95%, 12%);
  --body-color: hsl(166, 56%, 18%);
  --body-white-color: hsl(0, 0%, 100%);
  --body-first-color: hsl(166, 80%, 40%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Montserrat", serif;
  --second-font: "Saira", serif;
  --biggest-font-size: 4.5rem;
  --big-font-size: 2.5rem;
  --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;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 9.5rem;
    --big-font-size: 4rem;
    --h1-font-size: 2rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
  }
}

/*=============== 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-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
}

input,
button {
  outline: none;
  border: none;
}

h1, h2, h3, h4 {
  font-family: var(--second-font);
  font-weight: var(--font-medium);
  line-height: 110%;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 70%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 4rem;
}

.section__title {
  text-align: center;
  font-size: var(--big-font-size);
  font-weight: var(--font-semi-bold);
  margin-bottom: 2.5rem;
}

.main {
  overflow: hidden;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: var(--body-color);
  z-index: var(--z-fixed);
  transition: box-sahdow .4s;
}

.nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--white-color);
  font-family: var(--second-font);
  font-weight: var(--font-semi-bold);
  transition: color .4s;
}

.nav__logo:hover {
  color: var(--first-color);
}

.nav__toggle, 
.nav__close {
  display: flex;
  color: var(--white-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    top: -120%;
    left: 0;
    background-color: var(--body-color);
    width: 100%;
    padding-block: 4rem;
    box-shadow: 0 8px 16px hsla(166, 85%, 8%, .3);
    transition: top .4s;
  }
}

.nav__list {
  text-align: center;
  display: flex;
  flex-direction: column;
  row-gap: 2rem;
}

.nav__link {
  color: var(--white-color);
  font: var(--font-medium) var(--h1-font-size) var(--second-font);
  line-height: 110%;
  transition: color .4s;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Show menu */
.show-menu {
  top: 0;
}

/* Add shadow header */
.shadow-header {
  box-shadow: 0 4px 16px hsla(166, 85%, 8%, .3);
}

/* Active link */
.active-link {
  color: var(--first-color);
}

/*=============== HOME ===============*/
.home__container {
  position: relative;
  padding-top: 3rem;
  row-gap: 0;
}

.home__title {
  color: var(--white-color);
  font-size: var(--biggest-font-size);
  font-weight: var(--font-semi-bold);
  text-align: center;
}

.home__images {
  position: relative;
  display: grid;
  justify-items: center;
  justify-self: center;
}

.home__shape {
  width: 280px;
  height: 280px;
  background-color: var(--first-color);
  border-radius: 50%;
  clip-path: inset(50% 0 0 0);
}

.home__images img {
  position: absolute;
}

.home__sticker {
  position: absolute;
  width: 50px;
  right: .5rem;
  top: 29rem;
  rotate: 15deg;
}

.home__data {
  margin-top: 2.5rem;
  text-align: center;
}

.home__description {
  color: var(--white-color);
  margin-bottom: 1.5rem;
}

/*=============== BUTTON ===============*/
.button {
  display: inline-flex;
  justify-content: center;
  background-color: var(--first-color);
  color: var(--white-color);
  padding: 1rem 2rem;
  font-weight: var(--font-semi-bold);
  transition: background-color .4s, box-shadow .4s;
}

.button:hover {
  background-color: var(--first-color-alt);
  box-shadow: 0 8px 24px hsla(166, 85%, 8%, .2);
}

.button-dark {
  background-color: var(--dark-color);
}

.button-dark:hover {
  background-color: var(--dark-color);
}

/*=============== LESSONS POPULAR ===============*/
.popular {
  background-color: var(--body-white-color);
}

.popular .section__title {
  color: var(--title-color);
}

.popular__swiper {
  padding-top: 1.5rem;
}

.popular__card {
  width: 270px;
  display: grid;
  row-gap: 1.5rem;
}

.popular__images {
  position: relative;
  display: grid;
  justify-items: center;
  justify-self: center;
}

.popular__shape {
  width: 195px;
  height: 195px;
  background-color: var(--first-color);
  border-radius: 50%;
  clip-path: inset(50% 0 0 0);
}

.popular__images img {
  position: absolute;
}

.popular__data {
  text-align: center;
}

.popular__name {
  font-size: var(--h1-font-size);
  color: var(--title-color);
  margin-bottom: .5rem;
}

.popular__description {
  margin-bottom: 1.5rem;
}

/* Swiper class */
.swiper {
  overflow: visible;
  margin-inline: initial;
}

/*=============== ABOUT ===============*/
.about__container {
  row-gap: 3rem;
}

.about__data {
  text-align: center;
}

.about .section__title, 
.about__description {
  color: var(--white-color);
  margin-bottom: 1.5rem;
}

.about__images {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
}

.about__shape {
  width: 300px;
  height: 300px;
  background-color: var(--first-color);
  border-radius: 50%;
}

.about__images img {
  position: absolute;
}

.about__coffee {
  width: 280px;
  border-radius: 20px;
  filter: drop-shadow(0 8px 16px hsla(166, 85%, 8%, .5));
}

/*=============== QUIZ  ===============*/
.products {
  background-color: var(--body-first-color);
}

.products .section__title {
  color: var(--dark-color);
}

.products__container {
  grid-template-columns: repeat(2, 1fr);
}

.products__card {
  position: relative;
  background-color: var(--dark-color);
  padding: 1rem .5rem 1.25rem;
}

.products__images {
  position: relative;
  display: grid;
  justify-items: center;
  justify-self: center;
}

.products__shape {
  width: 120px;
  height: 120px;
  background-color: var(--first-color);
  border-radius: 50%;
  clip-path: inset(50% 0 0 0);
}

.products__images img {
  position: absolute;
  box-shadow: #000000a1 -4px 5px 40px 0px;
  top: 15px;
  border-radius: 20px;
}

.products__coffee {
  width: 80px;
  top: 0;
  transition: transform .4s;
}
.products__coffee:hover { 
  /* froggy zoom on hover */
  transform: scale(1.05); 
}
.products__data {
  margin-top: 1.25rem;
}

.products__name {
  color: var(--white-color);
  font-size: var(--h3-font-size);
  margin-bottom: .75rem;
}

.products__price {
  color: var(--first-color);
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
}

.products__button {
  position: absolute;
  right: .5rem;
  bottom: 1.25rem;
  width: 32px;
  height: 32px;
  background-color: var(--first-color);
  color: var(--dark-color);
  font-size: 1.5rem;
  border-radius: 50%;
  box-shadow: 0 4px 8px hsla(166, 85%, 8%, .4);
  display: grid;
  place-items: center;
  cursor: pointer;
}


/*=============== CONTACT ===============*/
.contact .section__title {
  color: var(--white-color);
}

.contact__container, 
.contact__info {
  row-gap: 2rem;
}

.contact__info {
  color: var(--white-color);
  text-align: center;
}

.contact__title {
  font-size: var(--h1-font-size);
  margin-bottom: .5rem;
}

.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-font-size);
  font-weight: var(--font-semi-bold);
}

.contact__images {
  position: relative;
  display: grid;
  justify-items: center;
  margin-top: 3rem;
}

.contact__shape {
  width: 300px;
  height: 300px;
  background-color: var(--first-color);
  border-radius: 50%;
}

.contact__delivery {
  width: 230px;
  position: absolute;
  top: -2.5rem;
  mask-image: linear-gradient(to bottom, var(--first-color) 80%, transparent 100%);
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--body-first-color);
  padding-block: 1rem 1rem;
}

.footer__container {
  row-gap: 3rem;
}

.footer__copy {
  display: block;
  margin-top: 4rem;
  color: var(--dark-color);
  text-align: center;
  font-size: var(--small-font-size);
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .6rem;
  background-color: hsl(166, 20%, 30%);
}

::-webkit-scrollbar-thumb {
  background-color: hsl(166, 20%, 40%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(166, 20%, 50%);
}

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background-color: var(--body-color);
  box-shadow: 0 4px 8px hsla(166, 85%, 8%, .4);
  color: var(--white-color);
  display: inline-flex;
  padding: 6px;
  font-size: 1.25rem;
  z-index: var(--z-tooltip);
  transition: bottom .4s, transform .4s;
}

.scrollup:hover {
  transform: translateY(-.5rem);
}

/* Show Scroll Up */
.show-scroll {
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 330px) {
  .container {
    margin-inline: 1rem;
  }

  .section__title {
    font-size: 2rem;
  }

  .home__title {
    font-size: 3.5rem;
  }
  .home__shape {
    width: 250px;
    height: 250px;
  }

  .about__shape {
    width: 250px;
    height: 250px;
  }
  
  .products__container {
    grid-template-columns: 160px;
    justify-content: center;
  }

  .contact__shape {
    width: 250px;
    height: 250px;
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .home__container,
  .about__container {
    grid-template-columns: 400px;
    justify-content: center;
  }

  .products__container {
    grid-template-columns: repeat(2, 160px);
    justify-content: center;
  }

  .footer__form {
    width: 360px;
  }
}

@media screen and (min-width: 768px) {
  .popular__swiper {
    width: 850px;
    overflow-x: clip;
    justify-self: center;
  }

  .products__container {
    grid-template-columns: repeat(3, 160px);
  }

  .contact__container {
    justify-content: center;
  }
  .contact__info {
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    column-gap: 6rem;
  }

  .footer__container {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }
  .footer div:nth-child(3) {
    grid-column: 1/3;
  }
  .footer__title {
    text-align: center;
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: 7rem 5rem;
  }
  .section__title {
    margin-bottom: 4rem;
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
  }
  .nav__toggle, 
  .nav__close {
    display: none;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 4rem;
  }
  .nav__link {
    font-size: var(--normal-font-size);
  }

  .home__container {
    grid-template-columns: 970px;
    max-width: 970px;
    padding-top: 2.5rem;
  }
  .home__images {
    transform: translate(1rem, -2rem);
  }
  .home__shape {
    width: 490px;
    height: 490px;
  }
  .home__coffee {
    width: 350px;
    top: -6rem;
    left: 25px;
  }
  
  .home__data {
    position: absolute;
    top: 20rem;
    left: 0;
    width: 230px;
    text-align: initial;
    margin-top: 0;
  }
  .home__description {
    /* margin-bottom: 6rem; */
    padding-top: 30px;
  }
  .home__sticker {
    width: 150px;
    top: 23rem;
    right: 0;
  }
  .popular__container {
    padding-bottom: 2rem;
  }
  .popular__swiper {
    width: 1000px;
  }
  .popular__card {
    width: 280px;
  }
  .popular__shape {
    width: 280px;
    height: 280px;
  }
  .about__container {
    grid-template-columns: 430px 500px;
    align-items: center;
    column-gap: 6rem;
    padding-block: 2rem;
  }
  .about__data, 
  .about .section__title {
    text-align: initial;
  }
  .about__description {
    margin-bottom: 4rem;
  }
  .about__shape {
    width: 500px;
    height: 500px;
  }
  .products__container {
    grid-template-columns: repeat(3, 250px);
    gap: 5rem;
    padding-bottom: 2rem;
  }
  .products__card {
    padding: 1.5rem 1rem 2rem;
  }
  .products__shape {
    width: 200px;
    height: 200px;
  }
  .products__coffee {
    width: 130px;
  }
  .products__data {
    margin-top: 1.5rem;
  }
  .products__name, 
  .products__price {
    font-size: var(--h2-font-size);
  }
  .products__button {
    right: 1rem;
    bottom: 2rem;
    width: 36px;
    height: 36px;
  }

  .contact .section__title {
    font-size: var(--biggest-font-size);
  }
  .contact__container {
    grid-template-columns: repeat(3, max-content);
    align-items: flex-start;
    column-gap: 3rem;
  }
  .contact__info {
    grid-template-columns: max-content;
    row-gap: 6rem;
    margin-top: 7rem;
  }
  .contact__info:nth-child(2) {
    order: 2;
  }
  .contact__title {
    font-size: var(--h2-font-size);
    margin-bottom: 1rem;
  }
  .contact__social {
    column-gap: 1.5rem;
  }
  .contact__images {
    margin-top: 0;
  }
  .contact__shape {
    width: 500px;
    height: 500px;
  }
  .contact__delivery {
    width: 450px;
    top: 50px;
    border-radius: 20px;
  }

  .footer__container {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer__container div:nth-child(3) {
    grid-column: initial;
  }
  .footer__container div:nth-child(2) {
    order: 1;
    justify-self: end;
  }
  .footer__container div:nth-child(1) {
    justify-self: start;
  }
  .footer__copy {
    margin-top: 5rem;
  }

  .scrollup {
    right: 3rem;
  }
}

/* For 2K resolutions (2048 x 1152, 2048 x 1536) */
@media screen and (min-width: 2048px) {
  body {
    zoom: 1.3;
  }
}
