/*=============== 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: 100%;
  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;
  z-index: var(--z-fixed);
  transition: box-shadow .3s, background-color .3s;
}

.nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo,
.nav__toggle,
.nav__close {
  display: flex;
  color: var(--white-color);
}

.nav__logo img {
  width: 1.5rem;
  margin-right: .5rem;
}

.nav__toggle {
  font-size: 1.25rem;
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    background-color: var(--body-color);
    width: 100%;
    padding-block: 4rem;
    transition: top .4s;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  text-align: center;
  row-gap: 2rem;
}

.nav__link {
  color: var(--white-color);
  font-weight: var(--font-medium);
  transition: color .3s;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Show menu */
.show-menu {
  top: 0;
}

/* Add shadow header */
.shadow-header {
  box-shadow: 0 2px 8px hsla(0, 0%, 0%, .3);
}

/* Active link */
.active-link {
  color: var(--first-color);
}

/*=============== HOME ===============*/
.home {
  padding-top: 7rem;
}

.home__container {
  position: relative;
  padding-block: 3rem 2rem;
}

.home__data {
  text-align: center;
}

.home__title {
  color: var(--white-color);
  font-size: var(--biggest-font-size);
  font-weight: var(--font-semi-bold);
  margin-bottom: 1rem;
}

.home__description {
  margin-bottom: 2.5rem;
}

.home__image {
  position: relative;
  justify-self: center;
}

.home__img {
  width: 280px;
}

/*=============== BUTTON ===============*/
.button {
  display: inline-flex;
  align-items: center;
  column-gap: .5rem;
  background-color: var(--first-color);
  padding: 1rem 1.5rem;
  border-radius: 4rem;
  color: var(--white-color);
  font-weight: var(--font-medium);
  transition: background-color .3s;
}

.button i {
  font-size: 1.25rem;
  transition: transform .3s;
}

.button:hover {
  background-color: var(--first-color-alt);
}

.button:hover i {
  transform: translateX(.25rem);
}

/*=============== POPULAR ===============*/
.popular__container {
  padding-top: 1.5rem;
  grid-template-columns: 250px;
  justify-content: center;
  gap: 2rem;
}

.popular__card {
  position: relative;
  background-color: var(--dark-color);
  padding: 7rem 2rem 1.5rem;
  border-radius: 1rem;
  text-align: center;
  transition: background-color .3s;
}

.popular__img {
  width: 120px;
  height: 120px;
  position: absolute;
  top: -2.5rem;
  left: 0;
  right: 0;
  margin-inline: auto;
  transform: translateY(0);
  transition: transform .3s;
  object-fit: contain;
}

.popular__name {
  font-size: var(--h2-font-size);
  color: var(--white-color);
  margin-bottom: .25rem;
}

.popular__description {
  font-size: var(--small-font-size);
  margin-bottom: 1rem;
}

.popular__price {
  display: inline-block;
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
  color: var(--white-color);
  margin-bottom: 1.25rem;
}

.popular__button {
  display: flex;
  background-color: var(--first-color);
  padding: .5rem;
  border-radius: 50%;
  margin: 0 auto;
  color: var(--white-color);
  font-size: 1.25rem;
  transition: background-color .3s;
}

.popular__button:hover {
  background-color: var(--first-color-alt);
}

.popular__card:hover .popular__img {
  transform: translateY(-.5rem);
}

/*=============== ABOUT ===============*/
.about__container {
  row-gap: 3rem;
}

.about__data {
  text-align: center;
}

.about__title {
  color: var(--white-color);
  margin-bottom: 1rem;
}

.about__description {
  margin-bottom: 2rem;
}

.about__image {
  position: relative;
  justify-self: center;
}

.about__img {
  width: 300px;
}

.about__video {
  margin-top: 3rem;
  text-align: center;
}

.about__video-title {
  color: var(--white-color);
  font-size: var(--h2-font-size);
  margin-bottom: 1rem;
}

.about__video-description {
  margin-bottom: 2rem;
}

.about__iframe-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 8px 25px hsla(0, 0%, 0%, .3);
}

@media screen and (min-width: 1150px) {
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .about__data {
    text-align: initial;
  }
  .about__img {
    width: 400px;
  }
  .about__video {
    margin-top: 5rem;
  }
}

/*=============== PRODUCTS ===============*/
.products__container {
  grid-template-columns: 250px;
  justify-content: center;
  gap: 2rem;
}

.products__card {
  position: relative;
  background-color: var(--dark-color);
  padding: 2rem 1.5rem 1.5rem;
  border-radius: 1rem;
  transition: background-color .3s;
}

.products__img {
  width: 80px;
  position: absolute;
  top: -2rem;
  right: 1rem;
}

.products__name {
  font-size: var(--h3-font-size);
  color: var(--white-color);
  margin-bottom: .25rem;
}

.products__description {
  font-size: var(--small-font-size);
  margin-bottom: 1rem;
}

.products__price {
  display: inline-block;
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
  color: var(--white-color);
  margin-bottom: 1.25rem;
}

.products__button {
  display: inline-flex;
  background-color: var(--first-color);
  padding: .5rem;
  border-radius: 50%;
  color: var(--white-color);
  font-size: 1.25rem;
  transition: background-color .3s;
}

.products__button:hover {
  background-color: var(--first-color-alt);
}

.products__card:hover {
  background-color: var(--body-first-color);
}

/*=============== CONTACT ===============*/
.contact__container {
  row-gap: 3rem;
}

.contact__data {
  text-align: center;
}

.contact__title {
  color: var(--white-color);
  margin-bottom: 1rem;
}

.contact__description {
  margin-bottom: 2rem;
}

.contact__image {
  position: relative;
  justify-self: center;
}

.contact__img {
  width: 300px;
}

.contact__form {
  position: relative;
  background-color: var(--dark-color);
  padding: 2rem 1.5rem;
  border-radius: 1rem;
}

.contact__input {
  width: 100%;
  background-color: var(--body-color);
  color: var(--white-color);
  padding: 1.25rem 1rem;
  border-radius: 4rem;
  margin-bottom: 1rem;
}

.contact__input::placeholder {
  color: var(--text-color);
}

.contact__button {
  justify-content: center;
  width: 100%;
}

/*=============== FOOTER ===============*/
.footer {
  padding-block: 4rem 2rem;
  border-top: 1px solid var(--text-color);
}

.footer__container {
  row-gap: 3rem;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  column-gap: .5rem;
  color: var(--white-color);
  margin-bottom: 1rem;
}

.footer__logo img {
  width: 1.5rem;
}

.footer__data {
  grid-template-columns: repeat(2, max-content);
  gap: 2rem;
}

.footer__title {
  font-size: var(--h3-font-size);
  color: var(--white-color);
  margin-bottom: 1rem;
}

.footer__links {
  display: grid;
  row-gap: .75rem;
}

.footer__link {
  color: var(--text-color);
  transition: color .3s;
}

.footer__link:hover {
  color: var(--first-color);
}

.footer__social {
  display: flex;
  column-gap: 1rem;
}

.footer__social-link {
  color: var(--white-color);
  font-size: 1.25rem;
  transition: color .3s, transform .3s;
}

.footer__social-link:hover {
  color: var(--first-color);
  transform: translateY(-.25rem);
}

.footer__copy {
  color: var(--text-color);
  font-size: var(--small-font-size);
  text-align: center;
  margin-top: 5rem;
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .6rem;
  border-radius: .5rem;
  background-color: hsl(166, 40%, 25%);
}

::-webkit-scrollbar-thumb {
  border-radius: .5rem;
  background-color: hsl(166, 40%, 35%);
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(166, 40%, 45%);
}

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background-color: var(--first-color);
  padding: .5rem;
  border-radius: 50%;
  display: inline-flex;
  color: var(--white-color);
  font-size: 1.25rem;
  z-index: var(--z-tooltip);
  transition: bottom .3s, transform .3s;
}

.scrollup:hover {
  transform: translateY(-.25rem);
}

/* Show Scroll Up */
.show-scroll {
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .home__img {
    width: 220px;
  }

  .about__img {
    width: 220px;
  }

  .contact__img {
    width: 220px;
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .popular__container {
    grid-template-columns: repeat(2, 250px);
  }

  .products__container {
    grid-template-columns: repeat(2, 250px);
  }

  .footer__data {
    grid-template-columns: repeat(3, max-content);
  }
}

@media screen and (min-width: 768px) {
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav__toggle,
  .nav__close {
    display: none;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
  }

  .popular__container {
    grid-template-columns: repeat(3, 250px);
  }

  .products__container {
    grid-template-columns: repeat(3, 250px);
    padding-top: 2rem;
  }

  .contact__container {
    grid-template-columns: 2fr 1fr;
    align-items: center;
    column-gap: 2rem;
  }
  .contact__data {
    text-align: initial;
  }

  .footer__data {
    grid-template-columns: repeat(4, max-content);
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: 7rem 5rem;
  }

  .home__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    padding-block: 5rem;
  }
  .home__data {
    text-align: initial;
  }
  .home__img {
    width: 400px;
  }

  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .about__data {
    text-align: initial;
  }
  .about__img {
    width: 400px;
  }

  .contact__container {
    column-gap: 5rem;
  }
  .contact__img {
    width: 400px;
  }

  .footer {
    padding-block: 5rem 3rem;
  }
  .footer__container {
    grid-template-columns: repeat(2, max-content);
    justify-content: space-between;
  }
  .footer__copy {
    margin-top: 7rem;
  }
}

/* For 2K resolutions (2048 x 1152, 2048 x 1536) */
@media screen and (min-width: 2048px) {
  body {
    zoom: 1.5;
  }
}
