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

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

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

a {
  text-decoration: none;
}

address {
  font-style: normal;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: 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;
}

.header {
border-bottom: 1px solid #e7e9fc;
position: sticky;
top: 0;
background-color: #fff;
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);
z-index: 10;
}

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

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

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

.header-logo {
font-family: "Raleway", sans-serif;
font-weight: 700;
font-size: 18px;
line-height: 1.17;
letter-spacing: 0.03em;
text-transform: uppercase;
color: #2e2f42;
margin-right: 76px;
padding-block: 24px;
}

.header-logo-span {
color: #4d5ae5;
}

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

.header-adress {
margin-left: auto;
}

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

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

.header-link-studio {
font-weight: 500;
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.02em;
color: #404bbf;
padding: 24px 0;
position: relative;
transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-link-studio::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% - 3px);
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
}

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

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

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

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

.main-section {
background-color: #2e2f42;
background-image: linear-gradient(
  rgba(46, 47, 66, 0.7), 
  rgba(46, 47, 66, 0.7)
  ), 
  url("../images/img-bg.png");
background-repeat: no-repeat;
max-width: 1440px;
margin: 0 auto;
background-size: cover;
background-position: center;
padding-top: 188px;
padding-bottom: 188px;
}

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

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

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

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

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

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

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

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

.features-item-text {
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.02em;
color: #434455;
margin-top: 8px;
}

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

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

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

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

/*.team-photo {
}*/

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

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

.team-position {
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.02em;
text-align: center;
color: #434455;
margin-top: 8px;
margin-bottom: 8px;
}

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

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

.team-icon {
  fill: #f4f4fd;
} 

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

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

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

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

.port-link:hover .port-overlay,
.port-link:focus .port-overlay {
  transform: translateY(0);
}

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

.port-list {
display: flex;
flex-wrap: wrap;
gap: 48px 24px;
}

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

.port-item:hover,
.port-item:focus {
  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);
}

.port-photo {
}

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

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

.port-item-text {
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.02em;
color: #434455;
margin-top: 8px;
}

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

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

.footer-info {
  margin-right: 120px
}

.foot-logo {
font-family: "Raleway", sans-serif;
font-weight: 700;
font-size: 18px;
line-height: 1.17;
letter-spacing: 0.03em;
text-transform: uppercase;
color: #f4f4fd;
margin-bottom: 16px;
display: block;
}

.foot-logo-span {
color: #4d5ae5;
}

.foot-text {
font-size: 16px;
line-height: 1.5;
letter-spacing: 0.02em;
color: #f4f4fd;
max-width: 264px;
}

.footer-social {
  margin-right: 80px;
}

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

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

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

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

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

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

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

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

.footer-subscribe-input::placeholder {
color: #ffffff;
}

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

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

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

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

.footer-subscribe-icon {
  margin-left: 0px;
  fill: #ffffff;
}

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

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 408px;
  min-height: 584px;
  border-radius: 4px;
  background-color: #fcfcfc;
  transform: translate(-50%, -50%);
  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);
  padding: 72px 24px 24px 24px;
}

/*.backdrop:not(.is-open) .modal {
  transform: translate(-50%, -50%) scale(1.5);
}*/

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

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

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

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

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

.modal-input {
  width: 100%;
  height: 40px;
  border-radius: 4px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  padding-left: 38px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)
}

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

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

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

.modal-field-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

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

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

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

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

.modal-check-label-text {
  display: inline;
}

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

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

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

.modal-check:focus + .modal-check-label .check-mark {
  border-color: #4d5ae5;
}

.modal-button {
  display: block;
  min-width: 169px;
  height: 56px;
  margin: 0 auto;
  border: none;
  border-radius: 4px;
  background-color: #4d5ae5;
  color: #ffffff;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;

  cursor: pointer;

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