:root {
  --primary-font: "Montserrat", serif;
  --primary-color: #158de8;
  --primary-color-dark: #0e62a3;
  --black: #000;
  --white: #fff;
  --gray: #858585;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  position: relative;
  font-family: var(--primary-font);
  font-size: 1.6rem;
}

img:not(.header__logo) {
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

p {
  line-height: 2;
  color: var(--gray);
}

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

h1,
h2 {
  font-family: var(--primary-font);
  font-weight: 900;
  line-height: 1.5;
  color: var(--black);
}

.container {
  width: 90%;
  max-width: 102.4rem;
  margin: 0 auto;
}

.body.no-scroll::after {
  content: '';
  position: absolute;
  z-index: 6;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

/* *Header */

.header {
  position: sticky;
  z-index: 5;
  top: 0;
  width: 100%;
  padding-block: 1.4rem;
  background-color: var(--white);
  backdrop-filter: blur(5px);
  /* -webkit-box-shadow: 0px 17px 26px -17px rgba(0, 0, 0, 0.36);
  -moz-box-shadow: 0px 17px 26px -17px rgba(0, 0, 0, 0.36);
  box-shadow: 0px 17px 26px -17px rgba(0, 0, 0, 0.36); */
  animation: adjust-header linear both;
  animation-timeline: scroll();
  animation-range: 0 100px;
}

@keyframes adjust-header {
  to {
    background: rgba(255, 255, 255, .5);
  }
}

.header__wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo,
.footer__logo {
  width: 10rem;
  height: auto;
}

.header__menu {
  font-size: 2rem;
  background-color: transparent;
  cursor: pointer;

  @media (width>=768px) {
    display: none;
  }
}

.header__nav {
  display: none;

  @media (width>=768px) {
    display: flex;
    gap: 2rem;
  }
}

.header__link {
  text-decoration: none;
  color: var(--black);
  transition: .3s ease-in-out;
}

.header__link:hover {
  transform: scale(1.2);
  color: var(--primary-color);
}

.sidebar {
  position: fixed;
  z-index: 10;
  top: 0;
  bottom: 0;
  right: 0;
  width: 23rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background-color: var(--black);
  transform: translateX(23rem);
  transition: transform 0.3s ease-in-out;
}

.show-sidebar {
  transform: translateX(0);
}

.sidebar__button {
  padding: 1rem;
  align-self: end;
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  background-color: var(--black);
  cursor: pointer;
}

.sidebar__title {
  padding-bottom: 1rem;
  border-bottom: .1rem solid var(--white);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.sidebar__link {
  color: var(--white);
  text-decoration: none;
}

.no-scroll {
  overflow: hidden;
}

/* *Section */

.section {
  padding-top: 10rem;
  display: grid;
  justify-items: center;
  gap: 8rem;

  @media (width>=768px) {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
}

.section__img {
  width: 100%;
  height: auto;
  max-width: 40rem;
}

.section__description {
  display: flex;
  flex-direction: column;
  gap: 2rem;

  @media (width>=768px) {
    text-align: left;
  }
}

.section__title {
  font-size: 2rem;

  @media (width>=768px) {
    font-size: 3.2rem;

    @media (width>=1024px) {
      font-size: 4rem;
    }
  }
}

/* * form */

.form {
  display: grid;
  gap: 1rem;

  @media (width >=768px) {
    grid-template-columns: 2fr 1fr;
  }
}

.form__input {
  padding: .8rem;
  font-size: 1.4rem;
  border: .1rem solid var(--gray);
  border-radius: .4rem;
}

.form__button {
  padding: 1rem;
  color: var(--white);
  background-color: var(--primary-color);
  cursor: pointer;
}

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

/* * Grid */

.grid {
  padding-top: 10rem;
  display: grid;
  justify-items: center;
  gap: 4rem;

  @media (width>=768px) {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.grid__item {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.grid__img {
  width: 10rem;
  display: block;
  margin: auto;
}

/* * footer */

.footer {
  margin-top: 4rem;
  padding: 4rem 0 2rem;
  background-color: var(--black);
}

.footer__wrapper {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;

  @media (width >=768px) {
    justify-content: space-between;
    flex-direction: row;
  }
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 2rem;

  @media (width >=768px) {
    flex-direction: row;
  }
}

.footer__link {
  text-decoration: none;
  color: var(--white);
}

.footer__copyright {
  text-align: center;
}