.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;
}
/* main styles */
body {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  background-color: #ffffff;
}
a {
  text-decoration: none;
  color: currentColor;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol {
  padding: 0;
  margin: 0;
}
ul {
  list-style-type: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}

.heading-second {
  font-weight: 700;
  font-size: 36px;
  color: #2e2f42;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: capitalize;
}
.heading-third {
  font-weight: 700;
  font-size: 36px;
  color: #2e2f42;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}
.paragraph {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.container {
  /* width: 1158px; */
  margin: 0 auto;
  padding: 0 16px;
  max-width: 320px;
}

/* navigation */
.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;
  justify-content: space-between;
  align-items: center;
}
.navigation {
  display: flex;
  align-items: center;
}
.navigation-list {
  display: flex;
  gap: 40px;
}
.navigation-list .link {
  position: relative;
  display: block;
  padding: 24px 0;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #2e2f42;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.navigation-list .link.active-el {
  color: #404bbf;
}
.navigation-list .link.active-el::after {
  content: "";
  position: absolute;
  display: block;
  background-color: #404bbf;
  width: 100%;
  height: 4px;
  bottom: -1px;
  left: 0;
  border-radius: 2px;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.navigation-list .link:hover,
.navigation-list .link:focus {
  color: #404bbf;
}

.navigation-list .link:active .navigation-list.link::after {
  background: red;
}
/* logo styles */
.header .logo {
  padding: 16px 0;
}
.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: #4d5ae5;
}
.logo > span {
  color: #2e2f42;
}

/* contacts */
.contacts {
  font-style: normal;
}
.contacts-list {
  display: flex;
  gap: 40px;
}
.contacts-list-item-link {
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contacts-list-item-link:hover,
.contacts-list-item-link:focus {
  color: #404bbf;
}

/* hero */
.hero {
  background: linear-gradient(rgba(46, 47, 66, 70%), rgba(46, 47, 66, 70%)),
    url("../images/hero-bg-mobile.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 72px 0;
  max-width: 320px;

  margin: 0 auto;
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.hero .main-heading {
  color: #ffffff;
  max-width: 216px;
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11111;
}
.hero .btn {
  display: block;
  color: #ffffff;
  background-color: #4d5ae5;
  cursor: pointer;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hero .btn:hover,
.hero .btn:focus {
  background-color: #404bbf;
}

/* features */

.features-icon-box {
  display: none;
  align-items: center;
  justify-content: center;
  background-color: #f4f4fd;
  border-radius: 4px;
  border: 1px solid #8e8f99;
  width: 264px;
  height: 112px;
  margin-bottom: 8px;
}
.features {
  padding: 96px 0;
}
.features .text {
  letter-spacing: 0.02em;
}
.features-list {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 72px;
}

.features-list-item-title {
  text-align: center;
  margin-bottom: 8px;
}

/* team */
.team {
  background-color: #f4f4fd;
  padding: 96px 0;
}
.team-title {
  margin-bottom: 72px;
}
.team-list {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 72px;
}
.team-list-item-title {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
}
.team-list-item-text {
  font-weight: 400;
}
.team-list-item-title,
.team-list-item-text {
  text-align: center;
}
.team-list-item-box {
  padding: 32px 0px;
}
.team-list-item {
  background-color: #ffffff;
  letter-spacing: 0.02em;
  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);
}
.social-list {
  margin-top: 8px;
  line-height: 0;
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
}
.social-list-item {
  width: 40px;
  height: 40px;
}
.social-list-item-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #4d5ae5;
  border-radius: 50%;
  cursor: pointer;
  height: 100%;
  width: 100%;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.social-list-item-link:hover,
.social-list-item-link:focus {
  background-color: #404bbf;
}
.social-list-item-icon {
  fill: #f4f4fd;
}

/* portfolio */
.portfolio {
  padding: 96px 0;
}
.portfolio-title {
  margin-bottom: 72px;
}
.portfolio-list {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 48px;
}

.portfolio-list-item .portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300px;
  text-align: left;
  background-color: #4d5ae5;
  padding: 40px 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}
.portfolio-overlay-box {
  position: relative;
  overflow: hidden;
}
.portfolio-list-item {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-list-item:hover,
.portfolio-list-item:focus {
  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-list-item:hover .portfolio-overlay {
  transform: translateY(0);
}
.portfolio-list-item-title {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
}
.portfolio-list-item-text {
  font-weight: 400;
}
.portfolio-list-item .portfolio-list-text-box {
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  padding: 32px 16px;
}

/* footer */
.basement {
  background-color: #2e2f42;
  padding: 96px 0;
}
.basement .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 72px;
}
.basement .logo {
  display: block;
  margin-bottom: 16px;
}
.basement .logo,
.basement .social-text,
.basement .subscribe-text {
  text-align: center;
}
.basement .individ {
  color: #f4f4fd;
}
.basement .text {
  color: #f4f4fd;
  max-width: 264px;
  font-weight: 400;
}
.basement .social-list {
  gap: 16px;
  margin-top: 0px;
}
.basement .social-list-item-link:hover,
.basement .social-list-item-link:focus {
  background-color: #31d0aa;
}
.social-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 16px;
}
.subscribe-newsletter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  max-width: 453px;
  gap: 24px;
}

.subscribe-text {
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
}
.subscribe-input {
  border: 1px solid #fff;
  border-radius: 4px;
  width: 288px;
  height: 40px;
  padding: 8px 16px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: none;
  font-size: 12px;
  line-height: 2;
  margin: 0 auto;
  letter-spacing: 0.04em;
  color: #ffffff;
}
.subscribe-input::placeholder {
  font-weight: 400;
  font-size: 12px;
  color: #ffffff;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
}
.subscribe-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
  background-color: #4d5ae5;
  border: none;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
}
.subscribe-button .subscribe-button-icon {
  fill: white;
  margin-left: 16px;
}
.subscribe-button:hover,
.subscribe-button:active {
  background-color: #404bbf;
}

/* modal */
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 40%);
  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 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 288px;
  min-height: 623px;
  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 16px 24px 16px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;

  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);

  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-icon {
  display: block;
  fill: #2e2f42;
  transition: fill 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:hover .modal-close-icon,
.modal-close-button:focus .modal-close-icon {
  fill: #fff;
}
.modal-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
}
.modal-form-label {
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 4px;
}
.custom-input {
  position: relative;
}
.modal-form-inputbox {
  margin-bottom: 8px;
}
.modal-form-textareabox {
  margin-bottom: 16px;
}
.modal-form-input {
  border: 1px solid rgba(46, 47, 66, 40%);
  background-color: transparent;
  border-radius: 4px;
  outline: transparent;
  width: 100%;
  height: 40px;
  padding-left: 38px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-form-input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-form-input:focus {
  border-color: #4d5ae5;
}
.modal-form-input:focus + .modal-form-input-icon {
  fill: #4d5ae5;
}
.modal-form-textarea {
  border: 1px solid rgba(46, 47, 66, 40%);
  border-radius: 4px;
  width: 100%;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  height: 120px;
  padding: 8px 16px;
  resize: none;
  outline: transparent;
  background-color: transparent;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-form-textarea:focus {
  border-color: #4d5ae5;
}
.checkbox-field {
  margin-bottom: 24px;
}
.checkbox-label {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.privacy-link {
  line-height: 1.33333;
  text-decoration: underline;
  color: #4d5ae5;
}
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  fill: transparent;
  border-radius: 2px;
  border: 1px solid rgba(46, 47, 66, 40%);
  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);
}
.old-checkbox:checked + .checkbox-label > .custom-checkbox {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.modal-form-button {
  display: block;
  color: #ffffff;
  font-family: "Roboto", sans-serif;
  background-color: #4d5ae5;
  cursor: pointer;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  margin: 0 auto;
  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-form-button:hover,
.modal-form-button:focus {
  background-color: #404bbf;
}
.burger-btn {
  padding: 0;
  border: none;
  background-color: transparent;
  cursor: pointer;
}
.burger-icon {
  display: block;
  fill: #2f2f37;
}
.navigation-list,
.contacts {
  display: none;
}
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: 100;
  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);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu-container {
  position: relative;
  padding-top: 72px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.mobile-navigation {
  margin-bottom: auto;
}
.mobile-close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-close-icon {
  display: block;
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-close-button:hover,
.mobile-close-button:focus {
  background-color: #404bbf;
  border: none;
}
.mobile-close-button:hover .mobile-close-icon,
.mobile-close-button:focus .mobile-close-icon {
  fill: #fff;
}
.mobile-menu-list-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: var(--ocean);
}
.mobile-menu-list-link:hover,
.mobile-menu-list-link:focus {
  color: #404bbf;
}
.mobile-menu-list-link.active-element {
  color: #404bbf;
}
.mobile-menu-list {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-direction: column;
  gap: 40px;
}
.mobile-contacts {
  margin-bottom: 48px;
  font-style: normal;
}
.mobile-contacts-list {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 24px;
}
.mobile-contacts .contacts-list-item-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  padding: 0;
}
.mobile-contacts-list-item:first-child {
  color: #4d5ae5;
}
.mobile-contacts .contacts-list-item-link:hover,
.mobile-contacts .contacts-list-item-link:focus {
  color: #404bbf;
}
.mobile-menu .social-list {
  gap: 40px;
}
.mobile-menu .social-list {
  margin: 0;
  justify-content: flex-start;
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 768px;
  }
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 70%),
        rgba(46, 47, 66, 70%)
      ),
      url("../images/hero-bg-tablet.jpg");
    max-width: 768px;
    padding: 112px 0px;
  }
  .hero .main-heading {
    margin-bottom: 36px;
    max-width: 496px;
    font-size: 56px;
    line-height: 1.07143;
  }
  .basement .logo,
  .basement .social-text,
  .basement .subscribe-text {
    text-align: inherit;
  }
  .navigation .logo {
    margin-right: 120px;
  }
  .features-list {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 72px;
    column-gap: 24px;
  }
  .features-list-item {
    width: calc((100% - 24px) / 2);
  }
  .features-list-item-title {
    text-align: left;
  }
  .burger-btn {
    display: none;
  }
  .navigation-list {
    display: flex;
    align-items: center;
  }
  .contacts {
    display: block;
    font-style: normal;
  }
  .contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .contacts-link {
    display: block;
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: #434455;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
  .mobile-menu {
    display: none;
  }
  .team-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 64px;
    column-gap: 24px;
  }
  .portfolio-list {
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 72px;
    column-gap: 24px;
  }
  .portfolio-list-item {
    flex-basis: calc((100% - 24px) / 2);
  }
  .basement .container {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 72px;
    column-gap: 24px;
    text-align: left;
    padding-left: 108px;
    padding-right: 164px;
  }
  .subscribe-newsletter {
    flex-direction: row;
  }
  .subscribe-input {
    width: 264px;
  }
  .modal {
    width: 408px;
    min-height: 584px;
    padding: 74px 24px 24px 24px;
  }
}

@media screen and (min-width: 1158px) {
  .container {
    max-width: 1158px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .contacts-list-item-link {
    padding: 24px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 70%),
        rgba(46, 47, 66, 70%)
      ),
      url("../images/hero-bg-pc.jpg");
    max-width: 1440px;
    padding: 188px 0px;
  }
  .hero .main-heading {
    margin-bottom: 48px;
  }
  .contacts-list {
    flex-direction: row;
    gap: 40px;
  }

  .basement .container {
    padding: 0;
    gap: 0;
  }
  .logo-copy {
    margin-right: 120px;
  }
  .basement-social {
    margin-right: 80px;
  }
  .contacts-list-item-link {
    padding: 24px 0px;
  }
  .features-list {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }
  .features-list-item {
    width: calc((100% - 72px) / 4);
  }
  .features-icon-box {
    display: flex;
  }
  .heading-third {
    font-weight: 500;
    font-size: 20px;
  }
  body {
    font-weight: 400;
  }
  .portfolio-list {
    row-gap: 48px;
    column-gap: 24px;
  }
  .portfolio-list-item {
    flex-basis: calc((100% - 48px) / 3);
  }
  .features,
  .team,
  .portfolio {
    padding: 120px 0px;
  }
}

@media (min-resolution: 2x) {
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 70%),
        rgba(46, 47, 66, 70%)
      ),
      url("../images/hero-bg-mobile@2x.jpg");
  }
}
@media (min-resolution: 2x) and (min-width: 768px) {
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 70%),
        rgba(46, 47, 66, 70%)
      ),
      url("../images/hero-bg-tablet@2x.jpg");
  }
}
@media (min-resolution: 2x) and (min-width: 1158px) {
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 70%),
        rgba(46, 47, 66, 70%)
      ),
      url("../images/hero-bg-pc@2x.jpg");
  }
}
