@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, p, figure, blockquote { margin: 0; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Шапка */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 10px 10px 30px;
}
.brand__logo { width: 108px; height: 108px; }
.brand__title { font-size: 16px; line-height: 20px; font-weight: 700; }

.bar {
  position: relative;
  border-top: 1px solid rgba(0, 0, 0, .1);
  border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 51px;
  padding-left: 15px;
  padding-right: 15px;
}

.menu__list { display: flex; gap: 20px; }
.menu__list a {
  display: block;
  padding: 13px 0;
  font-size: 12px;
  line-height: 15px;
  text-transform: uppercase;
  color: #252525;
}
.menu__list a:hover { color: #000; }
.menu__toggle { display: none; }

.social { display: flex; gap: 25px; }
.social a { display: block; transition: opacity .2s; }
.social a:hover { opacity: .6; }
.social img { width: 30px; height: 30px; }

/* Содержимое */

main { text-align: center; }

.title {
  font-size: 64px;
  line-height: 78px;
  font-weight: 700;
}
.lead { margin-top: 20px; font-size: 24px; line-height: 29px; }
.lead--light { font-size: 27px; line-height: 32px; font-weight: 300; }

.hero { padding-top: 90px; }

.btn {
  margin-top: 60px;
  padding: 15px 30px;
  border: 1px solid #000;
  border-radius: 35px;
  background: transparent;
  color: #000;
  font: 400 18px/22px "Montserrat", sans-serif;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: #000; color: #fff; }

.cliches { margin-top: 100px; }
.cliches__img { width: 50%; margin: 20px auto 0; }

.what { margin-top: 170px; }

.reviews { margin-top: 200px; scroll-margin-top: 20px; }
.what { scroll-margin-top: 20px; }

/* Карусель отзывов */

.carousel { margin-top: 65px; padding: 0 15px; --per-view: 3; --gap: 30px; }
.carousel__viewport { overflow: hidden; }
.carousel__track {
  display: flex;
  gap: var(--gap);
  transition: transform .8s ease;
}

.review {
  flex: 0 0 calc((100% - var(--gap) * (var(--per-view) - 1)) / var(--per-view));
  min-height: 344px;
  padding: 30px 50px 40px;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 20px;
  background: #fff;
}
.review__photo {
  width: 65px;
  height: 65px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
}
.review figcaption { margin-top: 18px; }
.review__name {
  display: block;
  font-size: 16px;
  line-height: 19px;
  font-weight: 600;
  color: rgba(0, 0, 0, .79);
}
.review__role {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  line-height: 16px;
  color: rgba(0, 0, 0, .59);
}
.review__text { margin-top: 40px; font-size: 22px; line-height: 26px; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 30px;
  min-height: 20px;
}
.carousel__dots button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.carousel__dots button::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: auto;
  border-radius: 50%;
  background: #000;
  opacity: .25;
}
.carousel__dots button[aria-selected="true"]::before { opacity: 1; }

/* Подвал */

.site-footer {
  margin-top: 125px;
  border-top: 1px dashed #000;
}
.footer__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 98px;
  padding: 20px 15px 20px 20px;
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__brand img { width: 58px; height: 58px; }
.footer__brand span { font-size: 14px; line-height: 20px; font-weight: 700; }
.footer__mail { justify-self: center; font-size: 16px; line-height: 19px; }
.social--footer { justify-content: flex-end; }
.footer__mail:hover { text-decoration: underline; }

/* Окно «Contact us» */

.modal {
  width: 640px;
  max-width: calc(100% - 20px);
  padding: 50px;
  border: 0;
  background: #fff;
  box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, .2);
  text-align: center;
}
.modal::backdrop { background: rgba(0, 0, 0, .8); }
.modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.modal__close svg { width: 20px; height: 20px; fill: #1f2124; }
.modal__title { font-size: 42px; line-height: 58px; font-weight: 700; }
.modal__text { margin-top: 20px; font-size: 24px; line-height: 1.5; }
.modal__mail { display: inline-block; margin-top: 20px; font-size: 24px; line-height: 29px; }
.modal__mail:hover { text-decoration: underline; }

/* Планшет */

@media (max-width: 1024px) {
  .bar__inner { padding-left: 10px; padding-right: 10px; min-height: 53px; }
  .menu { flex: 1; display: flex; justify-content: center; }
  .menu__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    padding: 5.5px;
    border: 0;
    border-radius: 3px;
    background: rgba(0, 0, 0, .05);
    cursor: pointer;
  }
  .menu__icon { width: 22px; height: 22px; fill: #33373d; }
  .menu__icon--close { display: none; }
  .menu__toggle[aria-expanded="true"] .menu__icon--open { display: none; }
  .menu__toggle[aria-expanded="true"] .menu__icon--close { display: block; }
  .menu__list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    gap: 0;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
    text-align: left;
  }
  .menu__toggle[aria-expanded="true"] + .menu__list { display: flex; }
  .menu__list a { padding: 15px 20px; font-size: 12px; }
  .menu__list a:hover { background: rgba(0, 0, 0, .05); }
  .social { flex: 1; justify-content: flex-end; }
  .footer__inner { padding-right: 10px; }

  .carousel { padding: 0 15px; --per-view: 2; }
  .review { min-height: 318px; }
}

/* Телефон */

@media (max-width: 767px) {
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
  }
  .brand { flex-direction: row; gap: 0; padding: 0; }
  .brand__logo { width: 72px; height: 72px; }
  .brand__title { font-size: 12px; line-height: 17px; }
  .bar { border: 0; position: static; }
  .bar__inner { padding: 0; min-height: 0; }
  .menu { display: none; }
  .social { gap: 6px; }
  .social img { width: 21px; height: 21px; }

  .title { font-size: 32px; line-height: 39px; }
  .lead { font-size: 16px; line-height: 20px; }
  .lead--light { font-size: 18px; line-height: 22px; }
  .hero { padding-top: 20px; }
  .btn { margin-top: 30px; padding: 12px 20px; font-size: 14px; line-height: 17px; }
  .cliches { margin-top: 50px; }
  .cliches__img { width: 100%; }
  .what { margin-top: 70px; }
  .reviews { margin-top: 70px; }

  .carousel { margin-top: 25px; padding: 0 5px; --per-view: 1; }
  .review { min-height: 0; padding: 30px; }
  .carousel__dots { margin-top: 20px; }

  .site-footer { margin-top: 75px; }
  .footer__inner { min-height: 90px; padding: 20px 10px 20px 20px; }
  .footer__brand img { width: 50px; height: 50px; }
  .footer__brand span { display: none; }
  .footer__mail { font-size: 13px; }
  .social--footer { gap: 6px; }
  .social--footer img { width: 21px; height: 21px; }

  .modal { padding: 25px; }
  .modal__title { font-size: 32px; line-height: 39px; }
  .modal__text { font-size: 14px; line-height: 18px; }
  .modal__mail { font-size: 20px; line-height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel__track { transition: none; }
}
