html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}

.no-scroll {
  overflow: hidden;
  height: 100dvh;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
  padding: 0;
  margin: 0;
}

img {
  display: block;
  width: 100%;
}

ul {
  list-style-type: none;
}

a {
  text-decoration: none;
}

.container {
  max-width: 320px;
  padding: 0 16px;
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.link {
  display: block;
  position: relative;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #2e2f42;
  font-style: normal;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.link:hover,
.link:focus {
  color: #404bbf;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.list-social {
  display: flex;
  flex-direction: row;
}

.link-social:hover,
.link-social:focus {
  background-color: #404bbf;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icon {
  width: 24px;
  height: 24px;
  fill: #f4f4fd;
}

.button {
  display: block;
  background-color: #4d5ae5;
  line-height: 1.5;
  letter-spacing: 0.04em;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
}

.button:hover,
.button:focus {
  background-color: #404bbf;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 72px;
  text-align: center;
}

.list {
  display: flex;
  margin: 0 auto;
}

.input {
  width: 100%;
  border: 1px solid rgba(46, 47, 66, 0.4);
  height: 40px;
  background-color: transparent;
  outline: transparent;
  border-radius: 4px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  padding-left: 16px;
}

.input:focus {
  border-color: #4d5ae5;
}

.logo {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
  padding: 16px 0;
  animation: logo-anim 5.4s ease-in-out infinite;
}

.header .span-logo {
  color: #2e2f42;
}

.header {
  border-bottom: 1px solid #e7e9fc;
  box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16), 0px 1px 6px rgba(46, 47, 66, 0.08);
}

.header.no-shadow {
  border: none;
  box-shadow: none;
}

.link-contacts {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.address {
  display: flex;
  align-items: flex-end;
}

.list-contacts {
  display: flex;
  flex-direction: column-reverse;
  gap: 24px;
  margin-bottom: 48px;
}

.list-nav {
  flex-direction: column;
  gap: 40px;
  margin-bottom: 168px;
}

.box-nav.is-open {
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  z-index: 999;
  background-color: #ffffff;
  left: 50%;
  width: 320px;
  transform: translate(-50%, -50%);
  top: 50%;
  padding: 72px 16px 40px 16px;
  height: 100dvh;
}

.box-nav {
  display: none;
}

.box-btn-close {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  align-items: flex-end;
  padding-top: env(safe-area-inset-top, 24px);
}

.nav .item-nav {
  align-items: flex-start;
}

.header .list-social {
  gap: 40px;
}

.link-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header .link-social:hover,
.header .link-social:focus {
  background-color: #31d0aa;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.item-social {
  width: 40px;
  height: 40px;
}

.icon-menu {
  width: 24px;
  height: 24px;
  fill: #2f2f37;
}

.btn-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  padding: 0;
}

.btn-menu:hover .icon-menu,
.btn-menu:focus .icon-menu {
  fill: #f4f4fd;
}

.box-header-logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: border 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-close:hover,
.btn-close:focus {
  border: none;
  background-color: #404bbf;
}

.btn-close:hover .icon-close,
.btn-close:focus .icon-close {
  fill: #ffffff;
}

.icon-close {
  width: 8px;
  height: 8px;
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background-image: linear-gradient(
      to bottom,
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/people-office.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  max-width: 320px;
  padding: 0;
  height: 432px;
}

.title-hero {
  max-width: 216px;
  color: #ffffff;
}

.btn-order {
  min-width: 169px;
  height: 56px;
  margin: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.icon-feature {
  width: 64px;
  height: 64px;
}

.box-icon-feature {
  display: none;
  align-items: center;
  justify-content: center;
  background-color: #f4f4fd;
  width: 100%;
  height: 112px;
  margin-bottom: 8px;
  border-radius: 4px;
  border: 1px solid #8e8f99;
}

.list-benefits {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 72px;
}

.item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.title-item {
  margin-bottom: 8px;
}

.section-benefits .text-item {
  font-weight: 500;
}

.section-team img {
  width: 264px;
  height: 260px;
}

.section-team {
  background-color: #f4f4fd;
}

.section-team .title-item {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.list-team {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 72px;
}

.item-card {
  background-color: #ffffff;
  max-width: 264px;
  flex-basis: calc((100% - 72px) / 4);
  border-radius: 0 0 4px 4px;
  box-shadow: 0px 1px 6px 0px rgba(46, 47, 66, 0.08),
    0px 1px 1px 0px rgba(46, 47, 66, 0.16),
    0px 2px 1px 0px rgba(46, 47, 66, 0.08);
}

.box-card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 32px 0;
}

.section-team .list-social {
  gap: 24px;
}

.section-team .icon-social {
  width: 16px;
  height: 16px;
}

.section-portfolio img {
  height: 280px;
  object-fit: cover;
  object-position: 0;
}

.section-portfolio .title-item {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
}

.list-portfolio {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
}

.box-text-portfolio-hover {
  position: relative;
  overflow: hidden;
}

.box-text-portfolio-hover .page-text {
  position: absolute;
  top: 0;
  color: #f4f4fd;
  padding: 40px 32px;
  background-color: #4d5ae5;
  width: 100%;
  height: 100%;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.item-portfolio:hover .page-text,
.item-portfolio:focus .page-text {
  transform: translateY(0%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.item-portfolio {
  cursor: pointer;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.item-portfolio:hover,
.item-portfolio:focus {
  box-shadow: 0px 1px 6px 0px rgba(46, 47, 66, 0.08),
    0px 1px 1px 0px rgba(46, 47, 66, 0.16),
    0px 2px 1px 0px rgba(46, 47, 66, 0.08);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.box-portfolio-info {
  width: 100%;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: start;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.footer {
  background-color: #2e2f42;
}

.footer .container {
  display: flex;
  flex-direction: column;
  gap: 72px;
  justify-content: center;
  align-items: center;
}
.box-footer-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.box-footer-social {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.footer .list-social {
  gap: 16px;
}

.footer .link-social:hover,
.footer .link-social:focus {
  background-color: #31d0aa;
}

.box-form-subscribe {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.box-form-subscribe .text {
  font-weight: 500;
}

.form-subscribe {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-subscribe {
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 165px;
  height: 40px;
}

.footer .span-logo {
  color: #f4f4fd;
}

.footer .text {
  color: #f4f4fd;
}

.input-subscribe {
  width: 288px;
  border-color: #ffffff;
  color: #ffffff;
}

.box-modal-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
}

.box-modal-bg.is-open {
  opacity: 1;
  pointer-events: auto;
}

.box-modal-window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 288px;
  min-height: 623px;
  background: #fcfcfc;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 16px 24px 16px;
}

.fieldset {
  border: none;
  width: 320px;
  max-width: 100%;
  padding: 0;
}
.legend-modal {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 16px;
}

.input-modal {
  box-shadow: none;
  padding-left: 34px;
}

.textarea-modal {
  height: 120px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  resize: none;
  padding-top: 8px;
  color: #8e8f99;
  box-shadow: none;
}

.label-modal {
  display: block;
  margin-bottom: 4px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.accept-privacy {
  cursor: pointer;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.btn-send {
  width: 169px;
  height: 56px;
  margin: 0 auto;
  padding: 0;
}

.link-modal-privacy {
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.icon-placeholder {
  fill: #2e2f42;
  width: 18px;
  height: 24px;
  position: absolute;
  left: 16px;
  top: 50%;

  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.box-input-modal {
  position: relative;
}

.box-label-modal {
  margin-bottom: 8px;
}

.box-comment-modal {
  margin-bottom: 16px;
}

.input-modal:focus + .icon-placeholder {
  fill: #4d5ae5;
}

.span-icon-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1),
    fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: transparent;
  margin-right: 8px;
}

.icon-checkbox {
  width: 10px;
  height: 8px;
  fill: none;
}

.input-checkbox-modal:checked + .accept-privacy .span-icon-checkbox {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.input-checkbox-modal:checked
  + .accept-privacy
  .span-icon-checkbox
  .icon-checkbox {
  fill: #f4f4fd;
}

.box-footer-social .page-text {
  color: #ffffff;
}

@media (min-resolution: 192dpi) {
  .hero {
    background-image: linear-gradient(
        to bottom,
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/people-office@2x.jpg);
  }
}

/* tablet */
@media (min-width: 768px) {
  .go-up {
    display: block;
  }

  .container {
    max-width: 768px;
    padding: 0 16px;
  }

  .hero {
    max-width: 768px;
    height: 436px;
  }

  .header > .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .nav {
    display: flex;
  }

  .box-nav {
    display: flex;
    flex-direction: row;
  }

  .box-btn-close {
    display: none;
  }

  .header .list-social {
    display: none;
  }

  .btn-menu {
    display: none;
  }

  .link-nav {
    font-weight: 500;
    font-size: 16px;
    padding: 24px 0;
  }

  .link-nav.active {
    color: #404bbf;
  }

  .link.active::after {
    display: block;
    content: "";
    width: 100%;
    bottom: -1px;
    height: 4px;
    border-radius: 2px;
    position: absolute;
    transition: 0.4s;
    background-color: #404bbf;
  }

  .list-nav {
    flex-direction: row;
    margin: 0;
    margin-right: 121px;
  }

  .list-contacts {
    margin: 0;
    gap: 12px;
    flex-direction: column;
  }

  .link-contacts {
    font-weight: 400;
    font-size: 12px;
  }

  .address {
    align-items: center;
  }

  .title-hero {
    max-width: 496px;
    font-size: 56px;
  }

  .list-benefits {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 72px 24px;
  }

  .item-feature {
    max-width: 356px;
    align-items: flex-start;
  }

  .list-team {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 64px 24px;
  }

  .list-portfolio {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 72px 24px;
  }

  .box-footer-logo {
    max-width: 264px;
    align-items: flex-start;
  }

  .footer .logo {
    padding: 0;
    margin-bottom: 16px;
  }

  .footer .container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 72px 24px;
    max-width: 496px;
    padding: 0;
  }

  .box-footer-social {
    align-items: flex-start;
  }

  .box-form-subscribe {
    align-items: flex-start;
  }

  .form-subscribe {
    flex-direction: row;
    gap: 24px;
  }

  .input-subscribe {
    width: 264px;
  }

  .box-modal-window {
    width: 408px;
  }
  .box-modal-window .box-btn-close {
    display: flex;
  }

  .form-modal {
    display: flex;
    justify-content: center;
  }

  .input-modal {
    width: 100%;
  }

  .fieldset {
    width: 360px;
  }

  .box-label-modal {
    margin-bottom: 24px;
  }
}

/* desctop */
@media (min-width: 1158px) {
  .container {
    max-width: 1158px;
    padding: 0 15px;
  }

  .section {
    padding: 120px 0;
  }

  .header > .container {
    justify-content: flex-start;
  }

  .box-nav {
    width: 100%;
    justify-content: space-between;
  }

  .link-contacts {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }

  .header .logo {
    margin-right: 76px;
  }

  .list-contacts {
    flex-direction: row;
    gap: 40px;
  }

  .hero {
    max-width: 1440px;
    height: 600px;
  }

  .title-hero {
    margin-bottom: 48px;
    line-height: 1.07143;
    letter-spacing: 0.02em;
  }

  .box-icon-feature {
    display: flex;
  }

  .item-feature {
    max-width: 264px;
  }

  .section-benefits .title-item {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }

  .section-benefits .text-item {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }

  .list-portfolio {
    gap: 48px 24px;
  }

  .footer > .container {
    max-width: 100%;
    justify-content: center;
    gap: 0;
  }

  .box-footer-logo {
    margin-right: 120px;
  }

  .box-footer-social {
    margin-right: 80px;
  }
}
/* by ClutchPowers/aka/Shaq */