.hidden {
  display: none;
}

body {
  background-color: #ffffff;
  color: #434455;
  font-size: 16px;
  line-height: 1, 5;
  letter-spacing: 2%;
  font-family: 'Roboto', sans-serif;
}

a {
  text-decoration: none;
  color: #434455;
  font-size: 12px;
  line-height: 1.333;
  letter-spacing: 4%;
}

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

ul {
  padding: 0;
  margin: 0;
}

a:hover,
a:focus {
  color: #4d5ae5;
}

.color {
  color: #2e2f42;
}

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

p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.button {
  cursor: pointer;
}

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

.container {
  max-width: 320px;
  padding-left: 16px;
  padding-right: 16px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media screen and (min-width: 1158px) {
  .container {
    max-width: 1158px;
    padding-right: 15px;
    padding-left: 15px;
  }
}

/* header */

.page-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);
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #ffffff;
}

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

.nav-header-list {
  display: none;
}

.address-header {
  display: none;
}

.logo-header {
  text-transform: uppercase;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: #4d5ae5;
  padding: 16px 0;
  display: block;
}

.menu-button {
  padding: 0;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.menu-icon {
  fill: #2f2f37;
  display: block;
}

.menu-icon:focus {
  fill: #404bbf;
}

@media screen and (min-width: 768px) {
  .menu-button {
    display: none;
  }

  .logo-header {
    padding: 24px 0;
    margin-right: 120px;
  }

  .nav-header-list {
    display: flex;
    justify-content: center;
    gap: 40px;
  }

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

  .nav-header-list {
    display: flex;
    justify-content: center;
    gap: 40px;
  }

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

  .studio-item {
    position: relative;
    color: #404bbf;
  }

  .studio-item::after {
    content: '';
    width: 100%;
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 4px;
    background-color: #404bbf;
    border-radius: 2px;
  }

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

  .address-header {
    font-style: normal;
    display: block;
  }

  .address-header-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .address-item {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    transition-property: color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .address-item:first-child {
    padding-top: 16px;
    padding-bottom: 6px;
  }

  .address-item:last-child {
    padding-top: 6px;
    padding-bottom: 16px;
  }
}

@media screen and (min-width: 1158px) {
  .logo-header {
    margin-right: 76px;
  }

  .address-header-list {
    align-items: center;
    flex-direction: row;
    gap: 40px;
  }

  .address-item {
    padding: 24px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
  }

  .address-item:first-child {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .address-item:last-child {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .address-item:hover,
  .address-item:focus {
    color: #404bbf;
  }
}

@media screen and (min-width: 768px) {
  .mobile-menu {
    display: none;
  }
}
@media screen and (min-width: 320px) {
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-100%);
  }
  .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-menu.closing {
    transform: translateY(-100%); /* Slide back up */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-menue-container {
    position: relative;
    padding-top: 72px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .mobile-menu-close {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e7e9fc;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 24px;
    height: 24px;
    padding: 0;
    margin-bottom: 24px;
    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;
  }

  .mobile-menu-close-cross {
    fill: black;
    transition-property: fill;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-menu-close:hover,
  .mobile-menu-close:focus {
    background-color: #404bbf;
    border: none;
  }

  .mobile-menu-close:hover .mobile-menu-close-cross,
  .mobile-menu-close:focus .mobile-menu-close-cross {
    fill: #fff;
  }

  .mobile-menu-nav {
    margin-bottom: auto;
    width: 100%;
  }

  .mobile-menu-nav-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 0;
  }

  .mobile-menu-nav-list-item {
    font-weight: 700;
    font-size: 36px;
    line-height: 111%;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-align: left;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-menu-nav-list-item:hover,
  .mobile-menu-nav-list-item:focus {
    color: #404bbf;
  }

  .mobile-menu-adress {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
    width: 100%;
  }

  .mobile-address-item {
    font-weight: 500;
    font-size: 20px;
    line-height: 120%;
    letter-spacing: 0.02em;
    color: #434455;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-address-item:hover,
  .mobile-address-item:focus {
    color: #4d5ae5;
  }

  .mobile-menu-social-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0;
    margin-top: 48px;
    margin-bottom: 0;
  }

  .mobile-menu-social-list-item {
    width: 40px;
    height: 40px;
  }

  .mobile-menu-social-list-link {
    width: 100%;
    height: 100%;
    background-color: #4d5ae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-property: background-color;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

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

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

/*main*/

.main-section {
  display: flex;
  background-color: #2e2f42;
  color: #ffffff;
  justify-content: center;
  padding-top: 72px;
  padding-bottom: 72px;
  background-image:
    linear-gradient(rgba(46, 47, 66, 70%), rgba(46, 47, 66, 70%)),
    url(../images/people-office.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
  max-width: 1440px;
  margin: 0 auto;
}

@media (min-resolution: 2x) {
  .main-section {
    background-image:
      linear-gradient(rgba(46, 47, 66, 70%), rgba(46, 47, 66, 70%)),
      url(../images/people-office@2x.jpg);
  }
}

.main-section-text {
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.02em;
  line-height: 1.11;
  margin-bottom: 72px;
  max-width: 216px;
  text-align: center;
}

.main-section-button {
  font-family: 'Roboto', sans-serif;
  color: #ffffff;
  background-color: #4d5ae5;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  display: block;
  min-width: 169px;
  padding: 16px 32px;
  border: none;
  border-radius: 4px;
  margin: 0 auto;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media screen and (min-width: 768px) {
  .main-section {
    padding-top: 112px;
    padding-bottom: 112px;
  }

  .main-section-text {
    font-weight: 700;
    font-size: 56px;
    letter-spacing: 0.02em;
    line-height: 1.07;
    margin-bottom: 36px;
    max-width: 496px;
    text-align: center;
  }
}

@media screen and (min-width: 1158px) {
  .main-section {
    padding-top: 188px;
    padding-bottom: 188px;
  }

  .main-section-text {
    margin-bottom: 48px;
  }
}

/*second section*/

.second-section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.second-section-list-item:not(:last-child) {
  margin-bottom: 72px;
}

.second-section-picture {
  display: none;
}

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

.second-section-text {
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: #434455;
}

@media screen and (min-width: 768px) {
  .second-section-list {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
    row-gap: 72p;
  }

  .second-section-list-item {
    width: calc((100% - 24px) / 2);
    margin: 0;
  }
}

@media screen and (min-width: 1158px) {
  .second-section {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .second-section-list {
    flex-wrap: nowrap;
    gap: 24px;
  }

  .second-section-list-item {
    flex-basis: calc((100% - 72px) / 4);
  }

  .second-section-picture {
    box-sizing: border-box;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    padding: 24px 100px;
    background-color: #f4f4fd;
    height: 112px;
  }

  .second-section-header {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 0.02em;
    text-align: left;
  }

  .second-section-text {
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.02em;
    line-height: 1.5;
    color: #434455;
  }
}

/*team*/

.team-section {
  padding-top: 96px;
  padding-bottom: 96px;
  background-color: #f4f4fd;
}

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

.team-section-item {
  background-color: #ffffff;
  width: 100%;
  padding: 0px 0px 32px 0px;
  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);
}

.team-section-item:not(:last-child) {
  margin-bottom: 72px;
}

.team-image {
  margin-bottom: 32px;
  width: 100%;
}

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

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

.team-sosial-media-list {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0;
}

.team-sosial-media-list-item {
  width: 40px;
  height: 40px;
}

.team-sosial-media-list-link {
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

.team-icon {
  fill: #f4f4fd;
}

@media screen and (min-width: 768px) {
  .team-container {
    padding-left: 108px;
    padding-right: 108px;
  }
  .team-section-list {
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
    row-gap: 64px;
  }

  .team-section-item {
    width: calc((100% - 24px) / 2);
  }

  .team-section-item:not(:last-child) {
    margin: 0;
  }
}

@media screen and (min-width: 1158px) {
  .team-section {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .team-container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .team-section-list {
    flex-wrap: nowrap;
  }

  .team-section-item {
    width: calc((100% - 72px) / 4);
    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);
  }
}

/*portfolio*/

.portfolio-section {
  padding-top: 96px;
  padding-bottom: 96px;
}

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

.portfolio-section-list-item {
  box-shadow: 0 1px 6px 0 rgba(46, 47, 66, 0.08);
  overflow: hidden;
}

.portfolio-section-list-item:not(:last-child) {
  margin-bottom: 48px;
}

.portfolio-section-item-text-together {
  box-sizing: border-box;
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.overlay-text {
  display: none;
}

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

.portfolio-cection-item-txt {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

@media screen and (min-width: 768px) {
  .portfolio-section-list {
    display: flex;
    flex-wrap: wrap;
    row-gap: 72px;
    column-gap: 24px;
  }

  .portfolio-image {
    height: 300px;
  }

  .portfolio-section-list-item {
    width: calc((100% - 24px) / 2);
  }

  .portfolio-section-list-item:not(:last-child) {
    margin: 0;
  }
}

@media screen and (min-width: 1158px) {
  .portfolio-section {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .portfolio-section-list {
    row-gap: 48px;
  }

  .portfolio-section-list-item {
    width: calc((100% - 48px) / 3);
    transition-property: box-shadow;
    transition-duration: 250ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }

  .portfolio-section-list-item:hover,
  .portfolio-section-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-image {
    width: 100%;
    height: auto;
  }

  .box {
    position: relative;
    overflow: hidden;
  }

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

  .box:hover .overlay-text {
    transform: translateY(0);
  }
}

.page-footer {
  background-color: #2e2f42;
  padding-top: 96px;
  padding-bottom: 96px;
}

.logo-footer {
  display: block;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: #4d5ae5;
  text-align: center;
}

.color-footer {
  color: #f4f4fd;
}

.txt-footer {
  line-height: 1.5;
  color: #f4f4fd;
  letter-spacing: 0.02em;
  margin-bottom: 72px;
}

.footer-sosial-media-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
  text-align: center;
}

.footer-sosial-media-list {
  display: flex;
  gap: 16px;
  padding: 0;
  justify-content: center;
  margin-bottom: 72px;
}

.footer-sosial-media-list-item {
  width: 40px;
  height: 40px;
}

.icon-footer {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #4d5ae5;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.title-footer-form {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
  text-align: center;
}

.footer-form-input {
  width: 100%;
  height: 40px;
  background-color: inherit;
  border-radius: 4px;
  border: 1px solid #fff;
  padding: 8px 16px;
  font-weight: 400;
  font-size: 12px;
  line-height: 200%;
  letter-spacing: 0.04em;
  color: white;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
}

.sbc-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
  background-color: #4d5ae5;
  border: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: white;
  cursor: pointer;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto;
}

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

.footer-button-picture {
  margin-left: 16px;
}

@media screen and (min-width: 768px) {
  .footer-container {
    padding-left: 108px;
  }

  .logo-footer {
    text-align: start;
  }

  .text-social-together {
    display: flex;
  }

  .footer-text {
    max-width: 264px;
    margin-right: 24px;
    margin-bottom: 0;
  }

  .footer-sosial-media-title {
    text-align: left;
  }

  .title-footer-form {
    text-align: left;
  }

  .footer-form {
    display: flex;
    justify-content: start;
    align-items: center;
  }

  .footer-form-input {
    margin-bottom: 0;
    min-width: 264px;
  }

  .sbc-button {
    margin-left: 24px;
  }
}

@media screen and (min-width: 1158px) {
  .page-footer {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .footer-container {
    padding-left: 15px;
    display: flex;
    align-items: baseline;
  }

  .logo-footer {
    display: inline-block;
  }

  .footer-text {
    max-width: 264px;
    margin-right: 120px;
  }

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

  .text-social-together {
    margin-bottom: 0;
  }

  .footer-sosial-media-list {
    display: flex;
    gap: 16px;
    padding: 0;
    justify-content: center;
    margin-bottom: 0;
    margin-right: 80px;
  }

  .footer-sosial-media-title {
    text-align: start;
  }

  .sbc-button {
    margin-left: 0;
  }

  .txt-footer {
    margin-bottom: 0;
  }

  .footer-sosial-media-list {
    margin-bottom: 0;
  }
}

/*modal*/
.modal-overlay {
  background-color: rgba(46, 47, 66, 0.4);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* form open*/
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background-color: #fcfcfc;
  width: 288px;
  min-height: 623px;
  padding: 72px 16px 24px 16px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  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);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e7e9fc;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 24px;
  height: 24px;
  padding: 0;
  margin-bottom: 24px;
  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;
  cursor: pointer;
}

.modal-icon-close {
  fill: black;
  transition-property: fill;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-icon:hover,
.modal-icon:focus {
  background-color: #404bbf;
  border: none;
}

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

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

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

.form-item-wraper {
  margin-bottom: 8px;
}

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

.input-wraper {
  position: relative;
}

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

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

.modal-form-input:focus {
  border: 1px solid #4d5ae5;
}

.modal-form-input:focus + .input-icon {
  fill: #4d5ae5;
}

.form-textarea-wraper {
  margin-bottom: 16px;
}

.modal-text-input {
  width: 100%;
  height: 120px;
  border-radius: 4px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  resize: none;
  padding: 8px 16px;
  background-color: transparent;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

.modal-text-input:focus {
  border: 1px solid #4d5ae5;
}

.modal-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 8px;
}

.modal-checkbox-label {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.visually-hidden:checked + .modal-checkbox-label .modal-policy-span {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}

.modal-policy-span {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  fill: transparent;
  margin-right: 8px;
  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);
}

:root {
  --some-color: #4d5ae5;
}

.modal-policy-link {
  color: #4d5ae5;
  text-decoration: underline;
  display: block;
  margin-left: 24px;
}

.modal-button {
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
  border: inherit;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  text-align: center;
  margin-right: auto;
  transition-property: background-color;
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

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

@media screen and (min-width: 768px) {
  .modal {
    width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px 24px;
  }

  .modal-policy-link {
    color: #4d5ae5;
    text-decoration: underline;
    display: inline;
    margin-left: 0;
  }
}
