@font-face {
  font-family: Roboto;
  src: url(/fonts/Roboto-Thin.ttf);
  font-weight: 300;
}
@font-face {
  font-family: Roboto;
  src: url(/fonts/Roboto-Regular.ttf);
  font-weight: 400;
}
@font-face {
  font-family: Roboto;
  src: url(/fonts/Roboto-Medium.ttf);
  font-weight: 500;
}
@font-face {
  font-family: Roboto;
  src: url(/fonts/Roboto-Bold.ttf);
  font-weight: 700;
}
@font-face {
  font-family: Roboto;
  src: url(/fonts/Roboto-Black.ttf);
  font-weight: 900;
} 
@font-face {
  font-family: Montserrat;
  src: url(/fonts/Montserrat-ExtraBold.ttf);
  font-weight: 800;
}

* {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box;
  border: 0;
  font-style: normal;
  font-weight: 400;
  font-family: Roboto;
}

:root {
  --text: #263238;
  --link: #1179D1;
  --border: #8AD1FF;
  --blue: #6AB1EC;
  --gray: #D9D9D9;
  --rounded-button: 12px;
}

html {
  font: 18px/20px Roboto;
  color: var(--text); 
}

* {
  outline: none;
}

a {
  text-decoration: none;
}

li {
  list-style: none;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  &.show-menu {
    overflow: hidden;
  }
}

.center {
  width: min(1400px, 100%);
  margin: 0 auto;
}

main {
  flex: 100% 1 1;
}

.card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 15px 10px 50px 0px #0000001A;
  padding: 2.2rem 1.6rem;
  & > h3 {
    font-size: 1.3em;
    font-weight: 700;
    line-height: 1.2em;
    margin-bottom: 1.4rem;
  }
  & > p {
    margin-bottom: 1rem;
  }
  & > a {
    display: inline-block;
    font-weight: 700;
    color: var(--link);
    margin-top: 1rem;
    & :hover {
      text-decoration: underline;
    }
  }
  ul > li {
    list-style: disc inside;
  }
  & > em {
    display: block;
    font-family: Montserrat;
    font-weight: 800;
    line-height: 1.2em;
    text-align: center;
    color: var(--blue);
    font-size: 3.3rem;
  }
}

.person {
  display: flex;
  gap: 2rem;
  border-top: 1px solid #21252942;
  margin-top: 2rem;
  padding-top: 1rem;
  & > :first-child {
    flex: 5.5rem 0 0;
    height: 5.5rem;
    border-radius: 50%;
    background-color: var(--gray);
  }
  & > hgroup {
    & > h3 {
      font-weight: 700;
      margin-bottom: 1rem;
    }
    & > p {
      font-size: .8rem;
    }
  }
}


:is(section > div, main) > hgroup {
  border-left: 17px solid var(--border);
  padding-left: 1rem;
  margin: 3rem 0 1rem 0;
  & > h2 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 2em;
    text-transform: uppercase;
  }
  & > p {
    font-weight: 500;
  }
}

.grid {
  display: grid;
  grid-template-rows: auto;
  gap: 2rem;
}

body > a {
  margin: 3rem auto;
  width: 12em;
  text-align: center;
  padding: 1em 2em;
  background-color: #E9F3FB;
  border-radius: 32px;
  color: var(--link);
  font-weight: 700;
}

.pagination {
  margin: 3rem auto;
  display: flex;
  justify-content: center;
  gap: 1rem; 
  & > a {
    flex: .7rem 0 0;
    height: .7rem;
    background-color: var(--gray);
    border-radius: 50%;
    &.active {
      background-color: #5FB1F6;
    }
  }
}

.feedback {
  background-color: #F8F8FC;
}

form {
  background: no-repeat url(/images/laptop.svg) left center / 18rem;
  padding: 1rem 0 2rem 25rem;
  & > label {
    display: block;
    margin: 1.2rem 0 .4rem 0; 
    font-size: .88rem;
    font-weight: 500;
  }
  & > input, textarea {
    display: block;
    width: 100%;
    border: 1px solid #D5DAE1;
    border-radius: 8px;
    font-size: .88rem;
    padding: .6rem;
    color: #667085;
    font-weight: 400;
    &::placeholder {
      color: #D5DAE1;
      font-weight: 300;
    }
  }
  > button[type="submit"] {
    display: block;
    width: 100%;
    background-color: var(--blue);
    border-radius: 6px;
    color: #F0FDF4;
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 0;
    margin: 1.2rem 0; 
  }
}

.social {
  display: flex;
  gap: 1.4rem;
  padding-bottom: 2rem;
  & > a {
    flex: 1.4rem 0 0;
    height: 1.4rem;
    background: no-repeat center / contain;
    &:nth-child(1) {
      background-image: url(/images/facebook.svg);
    }
    &:nth-child(2) {
      background-image: url(/images/vk.svg);
    }
    &:nth-child(3) {
      background-image: url(/images/instagram.svg);
    }
  }
}

small {
  display: block;
  color: #21252985;
  font-size: 0,78rem;
  margin: 2rem 0;
  padding: 1rem 0 1rem 0;
  border-top: 1px solid #C4C4C48A;
}


body.show-menu header nav {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: #fff;
  padding: 2rem;
  & > a {
    display: block;
    font-size: 2rem;
    line-height: 1.5em;
  }
  #toggle-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-image: url(/images/close.svg);
  }
}


@media (max-width: 1400px) {
  html {
    font-size: 16px;
  }

  .center {
    padding-left: .5rem;
    padding-right: .5rem;
  }

  .feedback form {
    background: none;
  }
}

@media (max-width: 1090px) {
  html {
    font-size: 14px;
  }

  .testimonials {
    justify-content: space-around;
    & > .card:nth-child(3) {
      display: none;
    }
  }
}

@media (max-width: 960px) {
  body > header {
    & > nav {
      justify-content: right;
      & > a {
        display: none;
      }
      #toggle-menu {
        display: block;
      }
    }
    & > :last-child {
      display: none;
    }
  }

  .cases {
    grid-template-columns: 1fr;
    & > :nth-child(1) {
      grid-area: 1 / 1 / 2 / 2;
      padding-bottom: 2.2rem;
      background-position: right bottom;
    }
    & > :nth-child(2) {
      grid-area: 2 / 1 / 3 / 2;
    }
    & > :nth-child(3) {
      grid-area: 3 / 1 / 4 / 2;
      padding-bottom: 0;
      background-position: right bottom;
    }
    & > :nth-child(4) {
      grid-area: 4 / 1 / 5 / 2;
    }
  }

  .about {
    grid-template-columns: 1fr;
    & > :nth-child(1) {
      grid-area: 1 / 1 / 2 / 2;
    }
    & > :nth-child(2) {
      grid-area: 2 / 1 / 3 / 2;
    }    
    & > :nth-child(3) {
      grid-area: 3 / 1 / 4 / 2;
    }
    & > :nth-child(4) {
      grid-area: 4 / 1 / 5 / 2;
    }
  }

  .testimonials {
    & > .card:nth-child(2) {
      display: none;
    }
  }

  .articles {
    flex-direction: column;
    & > article {
      flex: auto 1 1;
    }
  }

  footer > :last-child {
    grid-template-columns: 1fr;
    & > * {
      grid-column: 1 !important;
    }
  }
}

@media (max-width: 570px) {
  footer {
    flex-direction: column;
    & > :first-child {
      flex: auto 1 1;
      padding-bottom: 1rem;
    }
  }
  .social {
    margin-top: 1rem;
  }
}

@media (max-width: 430px) {
  body > header {
    & > a:first-child {
      background: no-repeat url(/images/logot.svg) center / contain;
      &::after {
        display: none;
      }
    }
  }

  .hero {
    font-size: 12px;
    line-height: 16px;
    & > div {
      & > hgroup {
        & > h1 {
          font-size: 1.6rem;
        }
        & > p:first-of-type {
          padding: 0.2em 1em;
        }       
      }
    }   
  }

  .features {
    flex-direction: column;
  }
}