:root {
  --main-bg-color: #ffffff;
  --main-text-color: #2e2f42;
  --main-nav-color: #4d5ae5;
  --main-hover-color: #404bbf;
  --main-p-color: #434455;
  --main-p-bottom-color: #f4f4fd;
  --top-line-color: #e7e9fc;
  --icon-hover-green: #31d0aa;
  --customers-border: #8e8f99;
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --input-color: rgba(46, 47, 66, 0.2);
}
body {
  font-family: "Roboto", sans-serif;
  background-color: var(--main-bg-color);
  color: var(--main-text-color);
  font-size: 16px;
}
.container {
  max-width: 428px;
  padding-left: 15px;
  padding-right: 15px;
  margin: 0 auto;
}
@media only screen and (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}
@media only screen and (min-width: 1200px) {
  .container {
    max-width: 1158px;
  }
}
.web {
  color: var(--main-nav-color);
}

.nav-links {
  text-decoration: none;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--main-text-color);
  padding: 24px 0;
  transition: color var(--transition);
  align-items: center;
  display: flex;
}
.nav-links-contacts {
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--main-p-color);
  text-decoration: none;
  padding: 24px 0;
  transition: color var(--transition);
}
.contacts {
  margin-left: auto;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}
@media only screen and (min-width: 1200px) {
  .contacts {
    flex-direction: row;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
  }
}
.nav-links-contacts:hover,
.nav-links-contacts:focus {
  color: var(--main-hover-color);
}
.menu-nav {
  display: flex;
}
.navigation {
  display: none;
}
.navigation li {
  margin-right: 40px;
}
.navigation li:last-child {
  margin-right: 0;
}
.list {
  list-style: none;
}
.header {
  border-bottom: 1px solid var(--top-line-color);
  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);
}
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0;
  padding: 0;
  margin-left: auto;
  background-color: transparent;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  outline: none;
}
@media only screen and (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}
.menu-container {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100vw;
  height: 100vh;
  padding: 80px 40px 40px 40px;
  background-color: var(--main-bg-color);
  z-index: 999;
  overflow: scroll;

  transform: translateX(100%);
  transition: transform 250ms ease-in-out;
}

.menu-container.is-open {
  transform: translateX(0);
}

.menu-container .menu-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  color: black;
}

.social.mobile-menu-social {
  gap: 56px;
  margin-top: 48px;
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.nav-links-mobile {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--main-text-color);
}
.contacts-mobile {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.nav-links-contacts-phone {
  font-size: 36px;
  font-weight: 700;
  color: var(--main-p-color);
  letter-spacing: 0.02em;
  line-height: 1.11;
}
.nav-links-contacts-email {
  font-size: 20px;
  font-weight: 500;
  color: var(--main-p-color);
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.mobile-menu .link {
  display: block;
  padding: 10px;
  color: black;
  text-decoration: none;
}
.active {
  color: var(--main-nav-color);
}
@media only screen and (min-width: 768px) {
  .navigation {
    display: flex;
  }
}
.hero-btn {
  background-color: var(--main-nav-color);
  color: var(--main-bg-color);
  font-family: "Roboto";
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  padding: 16px 32px;
  letter-spacing: 0.04em;
  border: none;
  transition: background-color var(--transition);
}
.hero-title {
  max-width: 320px;
  margin: 0 auto;
  margin-bottom: 72px;
  color: var(--main-bg-color);
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
}
@media only screen and (min-width: 768px) {
  .hero-title {
    font-size: 56px;
    line-height: 1.08;
    max-width: 496px;
    margin-bottom: 36px;
  }
}
@media only screen and (min-width: 1200px) {
  .hero-title {
    margin-bottom: 48px;
  }
}
.hero {
  background-color: var(--main-text-color);
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../hero/mob@1x.jpg);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding-top: 112px;
  padding-bottom: 112px;
  max-width: 1440px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../hero/mob@2x.jpg);
  }
}
@media only screen and (min-width: 481px) {
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../hero/tablet@1x.jpg);
  }
}
@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../hero/tablet@2x.jpg);
  }
}
@media only screen and (min-width: 768px) {
  .hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../hero/desk@1x.jpg);
    padding-top: 188px;
    padding-bottom: 188px;
  }
  @media (min-device-pixel-ratio: 2),
    (min-resolution: 192dpi),
    (min-resolution: 2dppx) {
    .hero {
      background-image: linear-gradient(
          rgba(46, 47, 66, 0.7),
          rgba(46, 47, 66, 0.7)
        ),
        url(../hero/desk@2x.jpg);
    }
  }
}

.nav-links:hover,
.nav-links:focus {
  color: var(--main-hover-color);
}
.hero .hero-btn:hover,
.hero-btn:focus {
  background: var(--main-hover-color);
}
.feature-icon-bg {
  background-color: var(--main-p-bottom-color);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 100px;
  margin-bottom: 8px;
}
.feature-text {
  line-height: 1.5;
  color: var(--main-p-color);
  letter-spacing: 0.02em;
  font-weight: 500;
}

.feature-title {
  font-weight: 700;
  font-size: 36px;
  line-height: calc(40 / 36);
  letter-spacing: 0.02em;
  padding-bottom: 8px;
  text-align: center;
}
@media only screen and (min-width: 768px) {
  .feature-title {
    text-align: left;
  }
}
@media only screen and (min-width: 1200px) {
  .feature-title {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
    text-align: left;
  }
  .feature-text {
    font-weight: 400;
  }
}
.feature-flex {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 72px;
}
@media only screen and (min-width: 768px) {
  .feature-flex {
    flex-wrap: wrap;
    flex-direction: row;
    gap: 72px 24px;
  }
  .feature {
    width: 356px;
  }
}
@media only screen and (min-width: 1200px) {
  .feature {
    width: 264px;
  }
  .feature-flex {
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
  }
}
@media only screen and (max-width: 1200px) {
  .feature-icon {
    display: none;
  }
  .feature-icon-bg {
    display: none;
  }
}
.section-title {
  font-size: 36px;
  line-height: 1.11;
  color: var(--main-text-color);
  text-transform: capitalize;
  letter-spacing: 0.02em;
  text-align: center;
  padding-bottom: 72px;
}
.about-flex {
  display: flex;
  justify-content: center;
}
.about-img:not(:last-child) {
  margin-right: 24px;
}
.team {
  background: var(--main-p-bottom-color);
}
.team-card {
  background: var(--main-bg-color);
  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);
  border-radius: 0px 0px 4px 4px;
  width: 264px;
}
.team-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px 0;
}
.card-content {
  text-align: center;
  padding-top: 32px;
  padding-bottom: 32px;
}
.team-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.team-position {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--main-p-color);
}
.social {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 24px;
}
.social-list-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--main-nav-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--main-p-bottom-color);
  transition: background-color var(--transition);
}
.social-list-icon:hover,
.social-list-icon:focus {
  background-color: var(--main-hover-color);
}
@media only screen and (min-width: 768px) {
  .team-flex {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 64px 24px;
    justify-content: center;
  }
}
@media only screen and (min-width: 1200px) {
  .team-flex {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
  }
}
.card-content-portfolio {
  padding: 32px 16px 32px 16px;
  border: 1px solid var(--top-line-color);
  border-top: none;
}
.customers-list {
  display: flex;
  gap: 72px 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.customers-list-icon {
  fill: var(--customers-border);
  transition: fill var(--transition);
}
.customers-list-link {
  display: flex;
  padding: 16px 40px;
  border: 1px solid var(--customers-border);
  border-radius: 4px;
  outline: transparent;
  transition: border var(--transition);
}
.customers-list-link:hover,
.customers-list-link:focus {
  border: 1px solid var(--main-hover-color);
}

.customers-list-link:hover .customers-list-icon,
.customers-list-link:focus .customers-list-icon {
  fill: var(--main-hover-color);
}
@media only screen and (min-width: 768px) {
  .customers-list-link {
    padding: 15px 31px;
  }
  .customers-list {
    gap: 72px 24px;
  }
}
@media only screen and (min-width: 1200px) {
}
.studio-bottom {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.16;
  text-transform: uppercase;
  color: var(--main-p-bottom-color);
}
.footer {
  padding: 96px 0;
  background-color: var(--main-text-color);
}
.logo-footer {
  font-family: "Raleway";
  font-weight: 800;
  font-size: 18px;
  line-height: 1.33;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--main-text-color);
  display: block;
  text-align: center;
}
.footer-flex {
  display: flex;
  flex-direction: column;
  gap: 72px 0;
  align-items: center;
}
.footer-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--main-p-bottom-color);
  width: 264px;
  padding-top: 16px;
}
.footer-form {
  display: flex;
  flex-direction: column;
}
.footer-input {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  min-width: 264px;
  color: white;
  padding: 8px 16px;
  outline: transparent;
  transition: border var(--transition);
  margin-bottom: 16px;
}
.footer-input:focus {
  border: 1px solid var(--main-nav-color);
}
.footer-input::placeholder {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: white;
}
.footer-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  min-height: 40px;
  min-width: 165px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  background-color: #4d5ae5;
  color: white;
  border: none;
  border-radius: 4px;
  margin: 0 auto;
  transition: background-color var(--transition);
}
.footer-btn > svg {
  vertical-align: middle;
  margin-left: 16px;
}
.subscribe {
  width: 100%;
}

.social-text {
  margin-bottom: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--main-p-bottom-color);
  font-weight: 500;
  text-align: center;
}
@media only screen and (min-width: 768px) {
  .subscribe {
    max-width: 453px;
  }
  .footer-flex {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    padding-left: 108px;
  }
  .footer-form {
    flex-direction: row;
  }
  .footer-input {
    margin-bottom: 0;
    padding: 0 16px;
    height: 40px;
  }
  .social-text {
    text-align: left;
  }
  .social-media {
    margin-left: 24px;
  }
  .footer-btn {
    margin-left: 24px;
  }
  .logo-footer {
    text-align: left;
  }
}
@media only screen and (min-width: 1200px) {
  .footer {
    padding: 100px 0;
  }
  .social-media {
    margin-left: 120px;
  }
  .subscribe {
    margin-left: auto;
  }
  .logo-footer {
    text-align: left;
    margin-right: 76px;
  }
  .footer-input {
    margin-bottom: 0;
    border: 1px solid white;
  }
  .footer-flex {
    flex-direction: row;
    gap: 0;
    align-items: stretch;
    padding-left: 15px;
  }
}
.footer-btn:hover,
.footer-btn:focus {
  background-color: var(--main-hover-color);
}
.social-footer {
  display: flex;
  gap: 16px;
}
.social-list-footer-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--main-p-bottom-color);
  transition: background-color var(--transition);
  background-color: var(--main-nav-color);
}
.social-list-footer-icon:hover,
.social-list-footer-icon:focus {
  background-color: var(--icon-hover-green);
}

.button-list {
  list-style-type: none;
}
.btn-list-flex {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 72px;
}
.portfolio-btn {
  background: var(--main-p-bottom-color);
  border: 1px solid var(--top-line-color);
  border-radius: 4px;
  color: var(--main-nav-color);
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  padding: 12px 24px;
  transition: background-color var(--transition), color var(--transition),
    box-shadow var(--transition), border var(--transition);
}
.button-list .portfolio-btn:hover,
.portfolio-btn:focus {
  background-color: var(--main-hover-color);
  color: var(--main-bg-color);
  box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 2px 1px rgba(0, 0, 0, 0.08),
    0px 2px 2px rgba(0, 0, 0, 0.12);
  border: 1px solid transparent;
  outline: transparent;
}
.img-list-flex {
  display: flex;
  gap: 48px 24px;
  flex-wrap: wrap;
}
.card-portfolio {
  width: 360px;
}
.card-portfolio-link:focus,
.card-portfolio-link: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);
  outline: transparent;
}
.card-portfolio-link:focus .overlay,
.card-portfolio-link:hover .overlay {
  transform: translateY(0);
}
.card-portfolio-link {
  text-decoration: none;
  color: var(--main-text-color);
  display: block;
  transition: box-shadow var(--transition);
}

.portfolio-list {
  padding-bottom: 120px;
  padding-top: 96px;
}
.logo {
  font-family: "Raleway";
  font-weight: 800;
  font-size: 18px;
  line-height: 1.33;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--main-text-color);
  padding: 24px 0;
  margin-right: 76px;
}
.project-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.project-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--main-p-color);
}
.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;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
  margin: 0px;
  padding: 0px;
}
img {
  display: block;
}
button {
  cursor: pointer;
}
a {
  text-decoration: none;
}
ul {
  list-style: none;
}
.section {
  padding-top: 96px;
  padding-bottom: 96px;
}
@media only screen and (min-width: 1200px) {
  .section {
    padding-top: 120px;
    padding-bottom: 120px;
  }
}
.section.about {
  padding-top: 0;
}
.current {
  position: relative;
  color: var(--main-hover-color);
}
.current::after {
  position: absolute;
  bottom: -2px;
  right: 0;
  content: "";
  width: 100%;
  height: 4px;
  background-color: var(--main-hover-color);
  border-radius: 2px;
}
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  opacity: 1;
  transition: opacity var(--transition);
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  max-width: 392px;
  padding: 72px 16px 24px 16px;
  width: 100%;
  background-color: #fcfcfc;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  /* animation: open 1s cubic-bezier(0.4, 0, 0.2, 1) forwards; */
  transition: transform var(--transition);
}
@media only screen and (min-width: 768px) {
  .modal {
    padding: 72px 24px 24px 24px;
    max-width: 408px;
  }
}
.modal-text {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 16px;
  color: var(--main-text-color);
}
.modal-form {
  max-width: 360px;
}
.modal-group:not(:last-child) {
  margin-bottom: 8px;
}
.modal-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-item {
  height: 40px;
}
.form-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.01em;
  color: var(--customers-border);
}
.form-input {
  padding-left: 35px;
  border: 1px solid var(--input-color);
  border-radius: 4px;
  outline: transparent;
  transition: border var(--transition);
}

.form-input:focus {
  border: 1px solid var(--main-nav-color);
}
.form-input:focus + .modal-svg {
  fill: var(--main-nav-color);
}

.modal-svg {
  position: absolute;
  top: 8px;
  left: 16px;
  transition: fill var(--transition);
}
.form-agreement {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.form-text {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--customers-border);
  user-select: none;
}
.form-btn {
  display: block;
  padding: 16px 65px;
  margin: 0 auto;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: var(--main-nav-color);
  border: none;
  border-radius: 4px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  transition: background-color var(--transition);
}
.form-btn:hover,
.form-btn:focus {
  background-color: var(--main-hover-color);
}
.form-custom-checkbox {
  cursor: pointer;
}
.form-checkbox:checked + .form-custom-checkbox > .checked {
  opacity: 1;
}
.form-checkbox:checked + .form-custom-checkbox > .unchecked {
  opacity: 0;
}
.checked {
  opacity: 0;
  transition: opacity var(--transition);
}
.unchecked {
  opacity: 1;
  transition: opacity var(--transition);
}
.form-link {
  text-decoration: underline;
  color: var(--main-nav-color);
}
.form-comment {
  height: 120px;
  resize: none;
  margin-bottom: 16px;
  padding-left: 16px;
  padding-top: 8px;
  border: 1px solid var(--input-color);
  border-radius: 4px;
  outline: transparent;
  transition: border var(--transition);
}
.form-comment:focus {
  border: 1px solid var(--main-nav-color);
}
.form-comment::placeholder {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}
.backdrop.is-hidden > .modal {
  transform: translate(-50%, -50%) scale(0.2);
}
.backdrop.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.close-button {
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  padding: 8px;
  background-color: var(--top-line-color);
  transition: background-color var(--transition);
}
.close-svg {
  transition: fill var(--transition);
}
.close-button:hover,
.close-button:focus {
  background-color: var(--main-nav-color);
}
.close-button:hover .close-svg,
.close-button:focus .close-svg {
  fill: white;
}

/* @keyframes open {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
} */
.card-portfolio-img-wrapper {
  position: relative;
  overflow: hidden;
}
.overlay {
  position: absolute;
  top: 0;
  right: 0;
  overflow: auto;
  width: 100%;
  height: 100%;
  background-color: var(--main-nav-color);
  padding-left: 32px;
  padding-right: 32px;
  padding-top: 40px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--main-p-bottom-color);
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
@media only screen and (max-width: 1199px) {
  .about {
    display: none;
  }
}
