:root {
  /* color */
  --cornflower: #e7e9fc;
  --iris: #4d5ae5;
  --ocean: #404bbf;
  --navy-blue: #2e2f42;
  --green: #31d0aa;
  --slate: #434455;
  --light-slate: #8e8f99;
  --cloud: #f4f4fd;
  --navy-blue-modal: #2e2f42;
  --grey: #2e2f42;
  --white: #ffffff;
  --dairy: #fcfcfc;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  color: #434455;
  background-color: #fff;
}
/* section {
  padding-top: 120px;
  padding-bottom: 120px;
} */

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

p {
  font-weight: 400;
  font-size: 16px;
  margin: 0;
  /* line-height: 24px; */
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
ul {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
}
ul,
ol,
a {
  list-style-type: none;
  text-decoration: none;
}
a {
  color: #4d5ae5;
}
img {
  display: block;
  max-width: 100%;
}

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

/* header */
header {
  border-bottom: 1px solid #e7e9fc;
}
.page-header {
  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);
}
.page-header .container {
  display: flex;
  justify-content: space-between;
}
.nav {
  display: flex;
  align-items: center;
}
.logo-web {
  display: block;
  margin-right: 76px;
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.page-header .logo-studio {
  color: #2e2f42;
}
.page-nav {
  display: flex;
  gap: 40px;
}

.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);
}
.link:hover,
.link:focus {
  color: #404bbf;
}
.current {
  position: relative;
  color: #404bbf;
}
.current::after {
  position: absolute;
  left: 0;
  bottom: -1px;
  content: '';
  height: 4px;
  width: 100%;
  border-radius: 2px;
  background-color: #404bbf;
}
.contacts {
  font-style: normal;
  display: flex;
  gap: 40px;
  align-items: center;
}
.page-address {
  display: flex;
  align-items: center;
  gap: 40px;
}
.address {
  /* display: block; */

  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.address:hover,
.address:focus {
  color: #404bbf;
}

/* section-page-title */

.section-page-title {
  padding: 188px 0;
  max-width: 1440px;
  margin: 0 auto;
  background-color: #2e2f42;
  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-position: center;
  background-size: cover;
}
.page-title {
  margin: 0 auto;
  max-width: 496px;
  margin-bottom: 45px;
  font-weight: 700;
  font-size: 56px;

  /* line-height: 60px; */
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: #ffffff;
}
.btn {
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 auto;
  padding: 16px 32px;

  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.ben-icon-container {
  margin-bottom: 8px;
  display: flex;

  width: 264px;
  height: 112px;
  background-color: #f4f4fd;
  border: solid 1px #8e8f99;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* .ben-item:hover .ben-icon-container,
.ben-item:focus .ben-icon-container {
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
} */
.ben-icon-container:hover,
.ben-icon-container:focus {
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.ben-title {
  margin-bottom: 8px;
}

.section-title {
  padding-bottom: 72px;
  font-weight: 700;
  font-size: 36px;

  /* line-height: 40px; */
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: capitalize;
  color: #2e2f42;
}

/* h3 titles */

.ben-title,
.team-names,
.port-name {
  font-weight: 500;
  font-size: 20px;

  /* line-height: 24px; */
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}
/* section team */

.team {
  padding: 120px 0;
  background-color: #f4f4fd;
}
.team-title {
  text-align: center;
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
}
.team-list {
  display: flex;
  gap: 24px;
  /* padding-bottom: 120px; */
}
.name-position {
  padding: 32px 0;
}
.team-names {
  margin-bottom: 8px;
  text-align: center;
}
.position {
  margin-bottom: 8px;
  text-align: center;
}

.team-member {
  flex-basis: calc((100% - 72px) / 4);
  /* width: calc((100% - 72px) / 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);
  background-color: #ffffff;
}
.social-list {
  display: flex;
  gap: 24px;
  justify-content: center;
  padding-top: 8px;
}
.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);
}
.social-item {
  width: 40px;
  height: 40px;
}
.social-link:hover,
.social-link:focus {
  background-color: #404bbf;
}
.social-icon {
  fill: #f4f4fd;
}

/* section portfolio */

.portfolio {
  padding-top: 120px;
  padding-bottom: 120px;
}
.port-title {
  text-align: center;
  font-weight: 700;
  font-size: 36px;
  margin-bottom: 72px;
}

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

.port-item {
  flex-basis: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.port-item:hover .port-overlay {
  transform: translateY(0);
}
.port-item-block {
  position: relative;
  overflow: hidden;
}

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

.port-item:hover,
.port-item:focus {
  cursor: pointer;
}

.port-item:hover {
  box-shadow: 0px 1px 6px 0px rgba(46, 47, 66, 0.08),
    0px 1px 1px 0px rgba(46, 47, 66, 0.16),
    0px 2px 1px 0px rgba(46, 47, 66, 0.08);
}
.app {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}
.port-name {
  margin-bottom: 8px;
}

/* footer */

.page-footer {
  padding-top: 100px;
  padding-bottom: 100px;
  background-color: #2e2f42;
}
.container-footer {
  display: flex;
  align-items: baseline;
}
.container-footer-logo {
  margin-right: 120px;
}
.logo-footer {
  display: inline-block;

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

.copyright-text {
  width: 264px;
  color: #f4f4fd;
}
.container-footer-social {
  margin-right: 80px;
}
.text-social-media {
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 16px;
}
.footer-social-list {
  display: flex;
  gap: 16px;
}
.footer-social-item {
  width: 40px;
  height: 40px;
}

.footer-social-link {
  display: flex;
  height: 100%;
  width: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  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 {
  fill: #fdf4f4;
}
.container-footer-sub {
  /* display: flex; */
  align-items: flex-end;
  margin-left: auto;
}
.form-subscribe {
  display: flex;
  gap: 24px;
}

.input-sub {
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--white);
  padding: 8px 16px;
  border: 1px solid #ffffff;
  background-color: transparent;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}
.input-sub::placeholder {
  color: #ffffff;
}
.input-sub:focus {
  border: 1px solid #4d5ae5;
  outline: none;
}

.footer-sub-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-sub-btn:hover,
.footer-sub-btn:focus {
  background-color: #404bbf;
  cursor: pointer;
}
.footer-subscribe-icon {
  margin-left: 16px;
}

/* modal-overlay */
input,
textarea,
button {
  font-family: inherit;
  line-height: inherit;
}
.modal-overlay {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  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-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fcfcfc;
  padding: 72px 24px 24px;

  width: 408px;
  min-height: 584px;
  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);
  border-radius: 4px;

  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay:not(.is-open) .modal {
  transform: translate(-50%, -50%) scale(1.5);
}

.close-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);

  position: absolute;
  top: 24px;
  right: 24px;
  fill: #2e2f42;
  background-color: #e7e9fc;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: rgba(0, 0, 0, 0.1) solid 1px;
}
.close-icon {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.close-btn:hover,
.close-btn:focus {
  background-color: #404bbf;
  border: none;
  fill: #ffffff;
}
/* .close-btn:hover .close-icon {
  fill: #ffffff;
} */

.form {
  width: 100%;
  font-size: 12px;
}
.modal-header {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  text-align: center;
  color: #2e2f42;
}
.container-input {
  margin-bottom: 8px;
}
.form-label {
  display: block;
  flex-direction: column;
  margin-bottom: 4px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.input-wrapper {
  position: relative;
  margin-bottom: 8px;
}
.form-input {
  /* margin-bottom: 8px; */
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  width: 360px;
  height: 40px;
  padding-left: 38px;
  background-color: transparent;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-input:focus {
  border: 1px solid #4d5ae5;
}

.form-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 16px;
  fill: #2e2f42;
  cursor: pointer;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-input:focus + .form-icon {
  fill: #4d5ae5;
}
.container-textarea {
  margin-bottom: 16px;
}
.textarea {
  resize: none;
  padding: 8px 16px;
  width: 100%;
  height: 120px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.textarea::placeholder {
  color: rgba(46, 47, 66, 0.4);
}
.textarea:focus {
  border: 1px solid #4d5ae5;
}
.container-policy {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.label-policy {
  font-size: 12px;
  color: #8e8f99;
  line-height: 1.17;
  letter-spacing: 0.04em;
}
.link-policy {
  text-decoration: underline;
  color: #4d5ae5;
}

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

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

.form-button {
  align-self: center;
  color: #ffffff;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: var(--iris);

  display: block;
  margin: 0 auto;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  border: none;
  border-radius: 4px;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-button:hover,
.form-button:focus {
  background-color: #404bbf;
  cursor: pointer;
}
