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

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}
a {
  text-decoration: none;
}

.container {
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

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

.header-container {
  display: flex;
  align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
}

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
}

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

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

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

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

.nav-link.current {
  position: relative;
}

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

.contacts {
  font-style: normal;
  margin-left: auto;
}

.contacts-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.contacts-link {
  display: block;
  padding: 24px 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link:focus,
.contacts-link:hover,
.contacts-link:focus,
.nav-link.current {
  color: #404bbf;
}

.main-section {
  background-color: #2e2f42;
  padding-top: 188px;
  padding-bottom: 188px;
  background-image:
    linear-gradient(to bottom, rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url("../images/people-office-1.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  position: relative;
  height: 100%;
  width: 100%;
  max-width: 1440px;
  margin: 0 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;
}

.main-text {
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #ffffff;
  margin: 0 auto;
  padding-bottom: 48px;
  max-width: 496px;
}

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

.features-section {
  padding: 120px 0;
}

.features-list {
  display: flex;
  align-items: center;
  gap: 24px;
}

.features-info {
  width: calc((100% - 24px * 3) / 4);
}

.features-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 100px;
  background-color: #f4f4fd;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  margin: 0 auto;
}

.main-team-section {
  background-color: #f4f4fd;
  padding-top: 120px;
  padding-bottom: 120px;
}

.main-section-text {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  padding-bottom: 72px;
}

.team-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.main-team-items {
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  width: calc((100% - 24px * 3) / 4);
}

.team-images {
  display: block;
  max-width: 100%;
  height: auto;
}

.team-card {
  box-shadow:
    0 2px 1px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16),
    0 1px 6px 0 rgba(46, 47, 66, 0.08);
}

.card-info {
  padding: 32px 16px;
  overflow: hidden;
}

.main-team-text {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}

.description-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #434455;
  padding-top: 8px;
}

.icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding-top: 8px;
}

.team-icon {
  fill: #f4f4fd;
}

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

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

.main-portfolio {
  padding-top: 120px;
  padding-bottom: 120px;
}

.main-portfolio-text {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  padding-bottom: 72px;
}

.portfolio-info {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 24px;
}

.main-portfolio-items {
  background-color: #ffffff;
  width: calc((100% - 24px * 2) / 3);
}

.main-portfolio-items:hover .image-text {
  transform: translateY(0);
}

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

.portfolio-card:hover {
  box-shadow:
    0 2px 1px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16),
    0 1px 6px 0 rgba(46, 47, 66, 0.08);
}

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

.portfolio-images {
  display: block;
  max-width: 100%;
  height: auto;
}

.image-text {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  background-color: #4d5ae5;
  height: 100%;
  width: 100%;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 40px 32px;
}

.portfolio-card-text {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.portfolio-images-text {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: left;
  color: #2e2f42;
}

.portfolio-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  padding-top: 8px;
}

.page-footer {
  background-color: #2e2f42;
  padding-top: 100px;
  padding-bottom: 100px;
}

.footer-logo-text {
  width: 264px;
}

.footer-socials {
  margin-left: 120px;
}

.footer-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: left;
  color: #f4f4fd;
  padding-top: 16px;
}

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

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

.socials-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
}

.footer-conteiner {
  display: flex;
  align-items: baseline;
}

.footer-icons {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.footer-icon {
  fill: #f4f4fd;
}

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

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

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: absolute;
  padding: 72px 24px 24px 24px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 408px;
  min-height: 584px;
  background-color: #fcfcfc;
  border-radius: 4px;
  box-shadow:
    0 1px 1px 0 rgba(0, 0, 0, 0.14),
    0 1px 3px 0 rgba(0, 0, 0, 0.12),
    0 2px 1px 0 rgba(0, 0, 0, 0.2);
}

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

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

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

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

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

.modal-input {
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  width: 100%;
  height: 40px;
  background-color: transparent;
  padding-left: 38px;
}

.modal-input::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

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

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

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

.modal-input,
.modal-textarea {
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-button:hover,
.modal-button:focus {
  background-color: #404bbf;
}

.modal-field {
  margin-bottom: 8px;
}

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

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

.modal-field-checkbox {
  margin-bottom: 24px;
}

.modal-field-wrapper {
  position: relative;
}

.modal-field-icon {
  stroke: #111;
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
}

.modal-textarea {
  height: 120px;
  resize: none;
  padding: 8px 16px;
}

.modal-check-label {
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.modal-check-label .policy-link {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

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

.modal-check:checked + .modal-check-label .check-mark {
  background-color: #404bbf;
  border-color: #404bbf;
  fill: #f4f4fd;
}

.policy-link {
  margin-left: 4px;
}

.footer-form {
  display: flex;
  gap: 24px;
}

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

.subscribe-input:focus {
  outline: transparent;
  border-color: #31d0aa;
}

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

.footer-subscribe {
  margin-left: auto;
}

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

.footer-form-button:hover,
.footer-form-button:focus {
  background-color: #31d0aa;
}
.subscribe-icon {
  fill: #fff;
}

.footer-form-text {
  margin-bottom: 16px;
}
