body {
  background-color: #fff;
  line-height: 1.5;
  color: #2e2f42;
  font-family: 'Roboto', sans-serif;
}

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

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

.header {
  padding: 16px 0;
  border-bottom: 1px solid #e7e9fc;
  box-shadow:
    0 1px 6px rgba(46, 47, 66, 0.08),
    0 1px 1px rgba(46, 47, 66, 0.16),
    0 2px 1px rgba(46, 47, 66, 0.08);
}
.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-mobile-btn {
  border: none;
  background-color: transparent;
}

.main-navigation {
  display: flex;
  gap: 120px;
  align-items: center;
}

.logo {
  text-decoration: none;
  color: #2e2f42;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  line-height: 1.17;
  letter-spacing: 0.03em;
}

.blue-logo {
  color: #4d5ae5;
}

ul {
  list-style: none;
}

.navigation-list {
  display: none;
  gap: 40px;
}

.navigation-link {
  text-decoration: none;
  color: #2e2f42;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 24px 0;
  font-size: 16px;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
  display: inline-block;
  position: relative;
}

.header-contact {
  display: none;
}

.burger-contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.navigation-link:hover,
.navigation-link:focus {
  color: #404bbf;
}

.contact-link {
  text-decoration: none;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
  font-style: normal;
  display: inline-block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.link-active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
  bottom: -1px;
  left: 0;
}

.contact-link:hover,
.contact-link:focus {
  color: #404bbf;
}

.hero {
  padding: 72px 0;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url(../images/people-office.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  max-width: 1440px;
  margin: 0 auto;
}

@media (min-resolution: 2dppx) {
  .hero {
    background-image:
      linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
      url(../images/people-office2x.jpg);
  }
}
.hero-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
img {
  display: block;
  max-width: 100%;
}
h1 {
  max-width: 216px;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.11111;
  letter-spacing: 0.02em;
  margin-bottom: 72px;
}
.hero-cta-button {
  background-color: #4d5ae5;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  padding: 16px 32px;
  border: none;
  cursor: pointer;
  line-height: 1.5;
  border-radius: 4px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.04em;
}
.hero-cta-button:hover,
.hero-cta-button:focus {
  background-color: #404bbf;
}

.secondary-title {
  font-weight: 700;
  font-size: 36px;
  text-align: center;
  line-height: 1.11;
  letter-spacing: 0.02em;
  margin-bottom: 72px;
}

.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;
}

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

.features-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 72px;
  column-gap: 24px;
}

.features-item {
  width: 100%;
}

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

p {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
.section {
  padding: 96px 0;
}

.team {
  background-color: #f4f4fd;
}

.team-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 24px;
  row-gap: 72px;
}
.team-item {
  background-color: #fff;
  box-shadow:
    0 1px 6px rgba(46, 47, 66, 0.08),
    0 1px 1px rgba(46, 47, 66, 0.16),
    0 2px 1px rgba(46, 47, 66, 0.08);
  max-width: 264px;
  width: 100%;
  border-radius: 0 0 4px 4px;
}

.team-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  gap: 24px;
}

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

.social-icon svg,
.footer-social-icon svg {
  fill: #f4f4fd;
}

.social-icon:hover,
.social-icon:focus {
  background-color: #404bbf;
}

.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

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

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

.worker-name {
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.profession {
  text-align: center;
  color: #434455;
  letter-spacing: 0.02em;
}

.portfolio-list {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
}

.portfolio-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.portfolio-image-wrapper {
  position: relative;
  overflow: hidden;
}

.bottom-page {
  padding: 96px 0;
  background-color: #2e2f42;
}

.item-wrapper {
  padding: 32px 16px;
}

.portfolio-item {
  width: 100%;
  max-width: 360px;
  border: 1px solid #e7e9fc;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 1px 6px rgba(46, 47, 66, 0.08),
    0 1px 1px rgba(46, 47, 66, 0.16),
    0 2px 1px rgba(46, 47, 66, 0.08);
}

.portfolio-item:hover .overlay,
.portfolio-item:focus .overlay {
  transform: translateY(0);
}

.overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 300px;
  background-color: #4d5ae5;
  padding: 40px 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay p {
  color: #f4f4fd;
}

.secondary-logo {
  color: #f4f4fd;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  text-transform: uppercase;
  line-height: 1.17;
  letter-spacing: 0.03em;
  margin: 0 auto;
  display: inline-block;
}

.bottom-page-paragraph {
  color: #f4f4fd;
  letter-spacing: 0.02em;
  max-width: 264px;
  margin-top: 16px;
}

.socials-title {
  margin-bottom: 16px;
  text-align: center;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}

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

.icon:hover {
  fill: #31d0aa;
}

.footer-form {
  display: flex;
  gap: 16px;
  flex-direction: column;
  align-items: center;
}

.footer-info-wrapper {
  width: 288px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-input {
  padding: 8px 16px;
  outline: none;
  width: 288px;
  height: 40px;
  background-color: transparent;
  border: 1px solid #fff;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 2;
  font-weight: 400;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-input:hover,
.footer-input:focus {
  border-color: #31d0aa;
}

.footer-input::placeholder {
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 2;
  font-weight: 400;
}

.footer-form-btn {
  max-width: 165px;
  background-color: #4d5ae5;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-form-btn:hover,
.footer-form-btn:focus {
  background-color: #31d0aa;
}

.modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  display: none;
  background-color: rgba(46, 47, 66, 0.4);
  justify-content: center;
  align-items: center;
}

.modal-wrapper.is-open,
.burger.is-open {
  display: flex;
}

.burger {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background-color: #fff;
  display: none;
}

.burger-wrapper {
  display: flex;
  flex-direction: column;
  padding: 72px 16px 40px 16px;
  width: 100%;
  height: 100%;
}

.burger-navigation-list {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.burger-contact-wrap {
  margin-top: auto;
}

.burger-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-decoration: none;
}

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

.number-active {
  color: #4d5ae5;
}

.burger-socials {
  margin-top: 48px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 40px;
}

.burger-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  border: 1px solid #2e2f42;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #e7e9fc;
}

.form-wrapper {
  position: relative;
  background-color: #fcfcfc;
  flex-basis: 288px;
  padding: 72px 16px 24px 16px;
  border-radius: 4px;
  box-shadow:
    0 2px 1px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 1px rgba(0, 0, 0, 0.14);
}

.form-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
}

.form-data {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 12px;
  line-height: 1.16;
  letter-spacing: 0.04em;
  color: #8e8f99;
  font-weight: 400;
}

.checkbox-label {
  font-size: 12px;
  line-height: 1.16;
  letter-spacing: 0.04em;
  color: #8e8f99;
  font-weight: 400;
}

.form-input {
  padding: 8px 16px 8px 38px;
  border-radius: 4px;
  outline: none;
  width: 100%;
  border: 1px solid rgba(46, 47, 66, 0.4);
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

textarea {
  padding: 8px 16px;
  border-radius: 4px;
  outline: none;
  border: 1px solid rgba(46, 47, 66, 0.4);
  resize: none;
  width: 100%;
  height: 120px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

textarea::placeholder {
  font-size: 12px;
  line-height: 1.16;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.4);
  font-weight: 400;
}

.form-input::placeholder {
  font-size: 12px;
  line-height: 1.16;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.4);
  font-weight: 400;
}

.input-icon-wrap {
  position: relative;
  width: 100%;
}

.input-icon {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.form-input:hover,
.form-input:focus {
  border: 1px solid #4d5ae5;
}

.form-input:hover + .input-icon,
.form-input:focus + .input-icon {
  fill: #4d5ae5;
}

textarea:hover,
textarea:focus {
  border: 1px solid #4d5ae5;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.data-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-btn {
  width: 169px;
  cursor: pointer;
  padding: 16px 32px;
  background-color: #4d5ae5;
  border-radius: 4px;
  color: #fff;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-btn-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-btn:hover,
.form-btn:focus {
  background-color: #404bbf;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

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

.icon-checked {
  opacity: 0;
  fill: #fff;
}

.footer-socials-wrapper {
  width: 208px;
}

.checkbox-input:checked + .checkbox-box {
  background-color: #404bbf;
  border-color: #404bbf;
}

.checkbox-input:checked + .checkbox-box .icon-checked {
  opacity: 1;
  fill: #f4f4fd;
}

.checkbox-link {
  color: #4d5ae5;
  line-height: 1.33;
  text-decoration: underline;
}

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

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

.modal-close-btn:hover,
.modal-close-btn:focus {
  background-color: #404bbf;
  box-shadow:
    0 1px 6px rgba(0, 0, 0, 0.08),
    0 1px 1px rgba(0, 0, 0, 0.16),
    0 2px 1px rgba(0, 0, 0, 0.08);
}

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

.footer-form-wrapper {
  row-gap: 72px;
  column-gap: 24px;
  width: 288px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .footer-form-wrapper {
    width: 453px;
  }
  .footer-info-wrapper {
    width: 264px;
  }
  .secondary-logo {
    margin: 0;
  }
  .portfolio-list {
    row-gap: 72px;
  }
  .burger.is-open {
    display: none;
  }
  .contact-link {
    font-weight: 400;
    font-size: 12px;
    line-height: 1.16667;
    letter-spacing: 0.04em;
  }
  h1 {
    font-size: 56px;
    margin-bottom: 36px;
    line-height: 1.07;
  }
  .hero {
    padding: 112px 0;
  }
  .header-mobile-btn {
    display: none;
  }
  .header {
    padding: 0;
  }
  .header-contact {
    display: block;
  }
  .contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .navigation-list {
    display: flex;
  }
  .socials-title {
    text-align: left;
  }
  .footer-form {
    flex-direction: row;
    gap: 24px;
  }
  .footer-container-wrap {
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    padding: 0 108px;
    column-gap: 24px;
    row-gap: 72px;
  }
  .form-wrapper {
    flex-basis: 408px;
    padding: 72px 24px 24px 24px;
  }
  .footer-input {
    width: 264px;
  }
  .portfolio-item {
    width: calc((100% - 24px) / 2);
  }
  .team-list {
    row-gap: 64px;
  }
  .ternary-title {
    text-align: left;
  }
  .hero {
    padding: 112px 0;
  }
  h1 {
    font-size: 56px;
    max-width: 496px;
  }
  .features-item {
    flex-basis: calc((100% - 24px) / 2);
  }
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1158px) {
  .portfolio-list {
    row-gap: 48px;
  }
  .burger.is-open {
    display: none;
  }
  p {
    font-weight: 400;
  }
  .contact-link {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }
  .main-navigation {
    gap: 76px;
  }
  h1 {
    margin-bottom: 48px;
  }
  .hero {
    padding: 188px 0;
  }
  .contact-list {
    flex-direction: row;
    gap: 40px;
  }
  .footer-info-wrapper {
    margin-right: 120px;
  }
  .footer-socials-wrapper {
    margin-right: auto;
  }
  .bottom-page {
    padding: 100px 0;
  }
  .portfolio-item {
    width: calc((100% - 72px) / 3);
    box-shadow: none;
  }
  .portfolio-item:hover,
  .portfolio-item:focus {
    cursor: pointer;
    box-shadow:
      0 1px 6px rgba(46, 47, 66, 0.08),
      0 1px 1px rgba(46, 47, 66, 0.16),
      0 2px 1px rgba(46, 47, 66, 0.08);
  }
  .ternary-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #2e2f42;
  }
  .hero {
    padding: 188px 0;
  }
  .features-item {
    flex-basis: calc((100% - 96px) / 4);
  }
  .features-icons-wrapper {
    display: flex;
  }
  .section {
    padding: 120px 0;
  }
  .container {
    max-width: 1158px;
    padding: 0 15px;
  }
}
