* {
  margin: 0;
  text-decoration: none;
  list-style-type: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}
p {
  margin: 0;
}
ul {
  margin: 0;
  padding-left: 0;
}
img {
  display: block;
}

a {
  text-decoration: none;
}

body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  background-color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
}

/* --- COLORS --- */

.iris-color {
  color: #4d5ae5;
}

.ocean-color {
  color: #404bbf;
}

.navy-blue-color {
  color: #2e2f42;
}

.slate {
  color: #434455;
}

.white {
  color: #ffffff;
}

.cloud {
  color: #f4f4fd;
}

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

.logo {
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4d5ae5;
  line-height: 1.17;
  letter-spacing: 0.03em;
  margin-right: 76px;
}
.container {
  max-width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}

.header-container {
  display: flex;
  justify-content: space-between;
}

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

.nav-list {
  display: flex;
}

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

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

.nav-item-link.active::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  content: '';
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: #404bbf;
  transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:not(:last-child),
.address-item:not(:last-child) {
  margin-right: 40px;
}

.nav-item-link:hover::after {
  width: 100%;
}

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

.header-address {
  font-style: normal;
  display: flex;
  justify-content: end;
  padding: 24px 0;
}
.address-list {
  display: flex;
}

.header-address .address-link {
  font-weight: 400;
  color: inherit;
  letter-spacing: 0.02em;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.banner {
  background-image: linear-gradient(
      to bottom,
      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-color: #2e2f42;
  background-position: center;
  text-align: center;
  padding: 188px 0;
}
.banner-container {
  max-width: 1440px;
  margin: 0 auto;
}

.banner-title {
  max-width: 496px;
  color: #ffffff;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  margin: 0 auto;
}

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

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

.stand-out {
  padding: 120px 0;
}

.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;
}
.stand-out-list {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.stand-out-item {
  width: calc((100% - 72px) / 4);
}

.stand-out-pic {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #f4f4fd;
  border-radius: 4px;
  border: 1px solid #8e8f99;
  width: 100%;
  height: 112px;
  margin-bottom: 8px;
}
.stand-out-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

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

.our-team {
  background-color: #f4f4fd;
  padding: 120px 0;
}

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

.our-team-list {
  display: flex;
  text-align: center;
  gap: 24px;
  flex-wrap: wrap;
}

.our-team-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  width: calc((100% - 72px) / 4);
  border-radius: 0 0 4px 4px;
  background-color: #ffffff;
  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);
}

.member-desc {
  padding: 32px 0;
}

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

.member-position {
  letter-spacing: 0.02em;
}

.member-icon {
  fill: #f4f4fd;
}

.member-icon-list {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
  padding: 0 16px;
}

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

.member-icon-link:hover {
  background-color: #404bbf;
}
.member-icon-link:focus {
  background-color: #404bbf;
}

.portfolio {
  padding: 120px 0;
}
.portfolio-title {
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: #2e2f42;
  margin-bottom: 72px;
}
.portfolio-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.portfolio-item {
  width: calc((100% - 48px) / 3);
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(46, 47, 66, 0.08), 0 0 0 0 rgba(46, 47, 66, 0.16),
    0 0 0 0 rgba(46, 47, 66, 0.08);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:not(:nth-last-child(-n + 3)) {
  margin-bottom: 48px;
}

.portfolio-item-card {
  display: flex;
  position: relative;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #f4f4fd;
  width: 100%;
  height: 300px;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0.02em;
  overflow: hidden;
}

/* .overlay, */
.portfolio-item-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #f4f4fd;
  background-color: #4d5ae5;
  padding: 40px 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-item: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:hover .overlay,
.portfolio-item:hover .portfolio-item-text {
  transform: translateY(0%);
}

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

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

.portfolio-item-type {
  letter-spacing: 0.02em;
}

.footer {
  background-color: #2e2f42;
  padding: 100px 0;
}
.footer-container {
  display: flex;
  align-items: baseline;
}
.footer-block {
  margin-right: auto;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}
.footer-text {
  width: 264px;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}
.footer-social-title,
.footer-form-title {
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

.footer-social-item {
  display: flex;
  width: 40px;
  height: 40px;
}
.footer-link {
  width: 100%;
  height: 100%;
  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-icon {
  fill: #f4f4fd;
}
.footer-link:hover,
.footer-link:focus {
  background-color: #31d0aa;
}
.footer-block-form {
  margin-left: auto;
}
.footer-form-title {
  margin-bottom: 16px;
}

.footer-form {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: baseline;
}

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

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

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

/* ====================  MODAL WINDOW ================= */

.modal-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 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);
}

.modal-background.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;
  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);
  padding: 72px 24px 24px 24px;
  transform: translate(-50%, -50%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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


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

.modal-close-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;
  border: none;
  /* border-color: rgba(64, 75, 191, 1); */
}
.modal-close-btn:hover .modal-close-icon,
.modal-close-btn:focus .modal-close-icon {
  fill: #fff;
}

.form-title {
  display: block;
  text-align: center;
  font-family: inherit;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.form-box {
  margin-bottom: 8px;
}

.form-box.last {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 4px;
  font-family: inherit;
  font-weight: 400;
  font-size: 12px;
  line-height: 117%;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.form-box-input {
  position: relative;
}

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

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

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

.form-box-textarea:focus {
  border-color: #4D5AE5;
}

.form-input:focus {
  border-color: #4D5AE5;
}
/* .form-box-input:focus-within .form-input-icon {
  fill: #4D5AE5;
} */
.form-input:focus + .form-input-icon {
  fill: #4D5AE5;
}

.form-box-policy {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border: none;
  padding: 0;
  margin-bottom: 24px;  
  gap: 8px;
  line-height: 1.17;
}

/* .checkbox-policy, */
.visually-hidden {
  visibility: hidden;
  width: 16px;
  height: 16px;
}
.modal-form .form-label-policy {
  font-family: inherit;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

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

.checkbox-policy:checked + .form-label-policy>.form-label-checkbox {
  border: none;
  background-color: #404bbf;
  fill: #F4F4FD;
}

.form-label-checkbox>.form-checkbox-icon {
  fill: transparent;
}
.modal-form .form-label-policy>.form-link-policy {
  color: #4d5ae5;
  text-decoration: underline;
}

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

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