body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
  font-size: 16px;
}
/* #region reset */

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

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

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

input {
  font-family: inherit;
}

/* #endregion */
.text {
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.container {
  max-width: 1158px;
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}
.section {
  padding-top: 120px;
  padding-bottom: 120px;
}

/* #region Header */

.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;
  justify-content: space-between;
  flex-direction: row;
}

.list-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 40px;
  margin-right: 0;
}

.page-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 0px;
}

.list-address {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row;
}

.logo {
  color: #4d5ae5;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 0px;
}

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

.logo-dark {
  color: #2e2f42;
}

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

.link-nav.active {
  color: #404bbf;
}
.link-nav.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  display: block;
  border-radius: 2px;
  width: 48px;
  height: 4px;
  background-color: #404bbf;
}
.link-nav:hover,
.link-nav:focus {
  color: #404bbf;
}

.page-address {
  font-style: normal;
}

.link-address {
  color: #434455;
  font-weight: 400;
  line-height: 1.5;
  font-style: normal;
  letter-spacing: 0.02em;
  margin-right: 40px;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* #endregion */

/* #region Hero */

.hero {
  background-color: #2e2f42;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url("../images/people-office.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: block;
  padding-top: 188px;
  padding-bottom: 188px;
  max-width: 1440px;
  margin: 0 auto;
}

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

.button {
  color: #ffffff;
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.04em;
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  border-radius: 4px;
  margin: 0 auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.button:focus,
.button:hover {
  background-color: #404bbf;
}
/* #endregion */

/* #region Feature */

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

.feature-icon {
  min-width: 64px;
  min-height: 64px;
  margin-top: 24px;
  margin-bottom: 24px;
}
.list-feature {
  width: 100%;
  max-width: 1128px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: flex-start;
}

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

.section-title {
  color: #2e2f42;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

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

.feature-title {
  margin-bottom: 8px;
  text-align: start;
}

.icon-border {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  background-color: #f4f4fd;
  margin-bottom: 8px;
}
/* #endregion */

/* #region Card */

.card-title {
  margin-bottom: 72px;
}
.list-card {
  display: flex;
  gap: 24px;
}
.item-card {
  background-color: #ffffff;
  width: calc((100% - 3 * 24px) / 4);
  border-radius: 0 0 4px 4px;
  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);
}

.item-card:last-child {
  margin-right: 0;
}

.card-text {
  text-align: center;
  margin-top: 8px;
}
.card {
  background-color: #f4f4fd;
}

.card-content {
  padding-top: 32px;
  padding-bottom: 32px;
}

.card-icon {
  min-width: 16px;
  min-height: 16px;
  fill: #f4f4fd;
}

.icon-card {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

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

.icon-circle:hover {
  background-color: #404bbf;
}

.icon-circle:focus {
  background-color: #404bbf;
}
.icon-item {
  margin-top: 8px;
}

.title-name {
  text-align: center;
  margin-bottom: 8px;
}
/* #endregion */

/* #region Portfolio */

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

.portfolio-title {
  margin-bottom: 72px;
}

.item-portfolio {
  width: calc((100% - 24px * 2) / 3);
  cursor: pointer;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.item-portfolio: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-content {
  padding: 32px 16px;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  border-top: none;
}

.portfolio-list {
  margin-bottom: 8px;
  text-align: start;
}

.portfolio-thumb {
  position: relative;
  overflow: hidden;
}

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

.item-portfolio:hover .overlay {
  transform: translateY(0);
}
/* #endregion */

/* #region Footer */
.footer {
  background-color: #2e2f42;
  padding: 100px 0;
}

.footer-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.footer-logo-text {
  margin-right: 120px;
}
.text-footer {
  color: #f4f4fd;
  line-height: 1.5;
  letter-spacing: 0.02em;
  max-width: 264px;
}

.logo-white {
  color: #f4f4fd;
}
.logo-footer {
  margin-bottom: 16px;
  display: inline-block;
}

.social-media {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  flex-direction: column;
  align-content: space-around;
}
.icon-footer {
  display: flex;
  gap: 16px;
}
.icon-item {
  width: 40px;
  height: 40px;
}

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

.icon-circle-footer:hover {
  background-color: #31d0aa;
}

.icon-circle-footer:focus {
  background-color: #31d0aa;
}

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

.social-media {
  max-width: 280px;
}
.text-social {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}
.subscribe-text {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.email-input-footer {
  margin-left: 80px;
}
.footer-form {
  display: flex;
  gap: 24px;
}

.footer-input {
  width: 264px;
  height: 40px;
  border: 1px solid #ffffff;
  background-color: transparent;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  padding-left: 16px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  color: #ffffff;
}
.footer-input::placeholder {
  color: #ffffff;
}
.footer-btn {
  min-width: 165px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  fill: #FFFFFF;
  cursor: pointer;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
}

.footer-form-icon {
  margin-left: 16px;
}
/* #endregion */

/* #region Form */

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

.backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: initial;
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px;
  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);
  transform: translate(-50%, -50%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-btn:hover,
.modal-btn:focus {
  background-color: #404bbf;
  border: none;
}
.modal-btn-icon {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-slogan {
  max-width: 360px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  margin-bottom: 16px;
}
.modal-form-wrapper {
  margin-bottom: 8px;
}
.modal-form-label {
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 4px;
}

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

.modal-form-input {
  display: block;
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  padding: 11px 24px 11px 38px;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 8px;
  background-color: transparent;
}

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

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

.modal-form-input:focus + .modal-form-icon {
  fill: #4d5ae5;
}
.modal-form-review {
  width: 100%;
  height: 120px;
  color: rgba(46, 47, 66, 0.4);
  background-color: transparent;
  resize: none;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  padding: 8px 16px;
  outline: transparent;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form-review:focus {
  border-color: #4d5ae5;
}
.modal-form-wrapper-comment {
  margin-bottom: 16px;
}

.modal-form-review::placeholder {
  color: rgba(46, 47, 66, 0.4);
}

.modal-form-wrapper-checkbox {
  margin-bottom: 24px;
}
.modal-form-agreement {
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.modal-form-checkbox {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  cursor: pointer;
  fill: transparent;
  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);
}

input[type="checkbox"]:checked + label .modal-form-checkbox {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.privacy-link {
  text-decoration: underline;
  color: #4d5ae5;
}

/* #endregion */
