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

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

h2,
h3 {
  color: #2e2f42;
}

h2 {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  text-align: center;
}

h3 {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

p {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

a {
  text-decoration: none;
}

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

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

.section {
  padding-top: 120px;
  padding-bottom: 120px;
}

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

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

.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-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

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

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

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

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

.active {
  color: #404bbf;
}

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

.address {
  font-style: normal;
}

.address-list {
  display: flex;
  gap: 40px;
}

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

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

.hero-section {
  max-width: 1440px;
  background-color: #2e2f42;
  padding-top: 188px;
  padding-bottom: 188px;
  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-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

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

.button {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.hero-button {
  display: block;
  min-width: 169px;
  height: 56px;
  background-color: #4d5ae5;
  color: #fff;
  padding: 16px 32px;
  margin: 0 auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

.features-item-icon {
  width: 64px;
  height: 64px;
}

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

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

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

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

.team-item {
  width: calc((100% - 72px) / 4);
  background-color: #fff;
  border-radius: 0px 0px 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);
}

.team-item-text-content {
  padding: 32px 0;
  text-align: center;
}

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

.team-item-text {
  margin-bottom: 8px;
}

.team-social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}

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

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

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

.team-social-icon {
  width: 12px;
  height: 12px;
  fill: #f4f4fd;
}

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

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

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

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

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

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

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

.portfolio-item-text-content {
  padding: 32px 16px;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  border-bottom: 1px solid #e7e9fc;
}

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

/* ----- FOOTER ----- */

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

.footer > .container {
  display: flex;
}

.footer-left-side-wrapper {
  display: flex;
  align-items: baseline;
}

.footer-info {
  margin-right: 120px;
}
.footer .logo-accent {
  color: #f4f4fd;
}

.footer .logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-text {
  max-width: 264px;
  font-size: 16px;
  line-height: 1.5;
  color: #f4f4fd;
}

.footer-social {
  width: 208px;
}

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

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

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

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

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

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

/* ----- FOOTER FORM ----- */

.footer-form-wrapper {
  margin-left: auto;
}

.footer-form-description {
  margin-bottom: 16px;
  font-weight: 500;
  color: #fff;
}

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

.footer-form-input {
  width: 264px;
  max-width: 400px;
  height: 40px;
  padding-left: 16px;
  background-color: transparent;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 4px;
  outline: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

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

.footer-form-button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 165px;
  height: 40px;
  padding: 8px 24px;
  background-color: #4d5ae5;
  color: #fff;
  fill: #fff;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-form-icon {
  margin-left: 16px;
}

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

/* ----- MODAL ----- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(46, 47, 66, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;

  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  margin-bottom: 16px;
  padding: 0;
  width: 24px;
  height: 24px;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  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-close-button:hover,
.modal-close-button:focus {
  background-color: #404bbf;
  border: none;
}

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

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

.modal-description {
  font-weight: 500;
  text-align: center;
  margin-bottom: 16px;
  color: #2e2f42;
}

.modal-input-wrapper {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.modal-input-wrapper-textarea {
  margin-bottom: 16px;
}

.modal-input-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 4px;
}

.modal-input {
  font-family: inherit;
  width: 100%;
  height: 40px;
  padding: 10px 16px 10px 38px;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  background-color: transparent;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-textarea {
  font-family: inherit;
  width: 100%;
  height: 120px;
  padding: 8px 16px;
  resize: none;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  background-color: transparent;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-input-icon-wrapper {
  position: relative;
}

.modal-input:focus-within,
.modal-textarea:focus-within {
  border: 1px solid #4d5ae5;
}

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

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

.modal-button {
  display: block;
  min-width: 169px;
  min-height: 56px;
  margin: 0 auto;
  background-color: #4d5ae5;
  color: #fff;
  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-checkbox-wrapper {
  margin-bottom: 24px;
}

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

.modal-checkbox-link {
  color: #4d5ae5;
  text-decoration: underline;
  margin-left: 4px;
}

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

.modal-checkbox-input:checked + .modal-checkbox-label > .modal-custom-checkbox {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}
