:root {
  --iris: #4d5ae5;
  --ocean: #404bbf;
  --navy-blue: #2e2f42;
  --green: #31d0aa;
  --slate: #434455;
  --light-slate: #8e8f99;
  --cornflower: #e7e9fc;
  --cloud: #f4f4fd;
  --navy-blue-modal: rgba(46, 47, 66, 0.4);
  --grey: rgba(46, 47, 66, 0.7);
  --white: #fff;
  --dairy: #fcfcfc;

  --font-family: "Roboto", sans-serif;
  --second-family: "Raleway", sans-serif;
}

body {
  font-family: var(--font-family);
  color: var(--slate);
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

ul,
ol {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

img {
  display: block;
  height: auto;
}

a {
  text-decoration: none;
}

address {
  font-style: normal;
}

.list {
  list-style: none;
}

.link {
  text-decoration: none;
}

.container {
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 766px;
  }
}

@media screen and (min-width: 1158px) {
  .container {
    max-width: 1158px;
  }
}

.section {
  padding-top: 96px;
  padding-bottom: 96px;
}

@media screen and (min-width: 1158px) {
  .section {
    padding-top: 120px;
    padding-bottom: 120px;
  }
}

.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;
}

/* ------------------------- HEADER ------------------------ */

@media screen and (min-width: 320px) {
  .header {
    padding-top: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--cornflower);
  }
}

@media screen and (min-width: 1158px) {
  .header {
    padding-top: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--cornflower);
  }
}

.header .container {
  align-items: center;
  display: flex;
}

@media screen and (min-width: 768px) and (max-width: 1158px) {
  .header .container {
    justify-content: space-between;
  }
}

.header-logo-link {
  font-family: var(--second-family);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy-blue);

  margin-right: 76px;
}

.header-logo-web {
  color: var(--iris);
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .header-menu-icon {
    border: none;
    background-color: transparent;
    margin-left: auto;
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .header-menu-icon:hover,
  .header-menu-icon:focus {
    color: var(--ocean);
  }
}

@media screen and (min-width: 768px) {
  .header-menu-icon {
    display: none;
  }
}

.header-nav {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .header-nav {
    display: none;
  }
}

.header-nav-list {
  display: flex;
  gap: 40px;
}

@media screen and (min-width: 768px) {
  .header-nav-list {
    margin-right: 121px;
  }
}

@media screen and (min-width: 1158px) {
  .header-nav-list {
    margin-right: 332px;
  }
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .header-address {
    display: none;
  }
}

.header-nav-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .header-address-link {
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: var(--slate);
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media screen and (min-width: 1158px) {
  .header-address-link {
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--slate);
    transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }
}

.header-nav-link {
  content: "";
  position: relative;
  padding-top: 24px;
  padding-bottom: 24px;
}

.header-nav-link:hover,
.header-nav-link:focus,
.header-address-link:hover,
.header-address-link:focus {
  color: var(--ocean);
}

.current {
  color: var(--ocean);
}

@media screen and (min-width: 768px) {
  .current::after {
    content: "";
    position: absolute;
    display: block;
    width: 100%;
    height: 4px;
    background-color: var(--ocean);
    border-radius: 2px;
    left: 0;
    bottom: 0;
  }
}

@media screen and (min-width: 1158px) {
  .header-address-list {
    display: flex;
    gap: 40px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .header-address-link {
    margin-bottom: 12px;
  }

  .header-address-link:last-child {
    margin-bottom: 0;
  }
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .header-mob-menu {
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background-color: #fff;
    width: 100vw;
    height: 100vh;
    padding: 24px 24px 40px 16px;
    overflow-y: auto;
  }

  .header-mob-menu .container {
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: flex-start;
    padding: 0;
    justify-content: flex-start;
  }
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .header-mob-close {
    border-radius: 50%;
    border: 2px solid var(--cornflower);
    background-color: transparent;

    margin-bottom: 24px;
    display: block;
    margin-left: auto;
  }

  .header-mob-close:hover,
  .header-mob-close:focus {
    border-color: var(--ocean);
    background-color: var(--ocean);
  }
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .header-close-menu:hover,
  .header-close-menu:focus {
    fill: #fff;
  }
}

@media screen and (min-width: 768px) {
  .header-mob-menu {
    display: none;
  }
}

.header-mob-nav {
  margin-bottom: 168px;
}

.header-mob-nav-item {
  margin-bottom: 40px;
}

.header-mob-nav-item:last-child {
  margin-bottom: 0;
}

.header-mob-nav-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-mob-nav-link:hover,
.header-mob-nav-link:focus {
  color: var(--ocean);
}

@media screen and (max-width: 767px) {
  .header-mob-address {
    width: 100%;
    display: flex;
    flex-direction: column;
  }
}

.header-mob-address-list {
  margin-bottom: 48px;
}

.header-mob-address-item {
  margin-bottom: 24px;
}

.header-mob-address-item:last-child {
  margin-bottom: 0;
}

.header-mob-address-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--slate);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-mob-address-link:hover,
.header-mob-address-link:focus {
  color: var(--ocean);
}

.header-soc-list {
  display: flex;
  gap: 24px;
  margin-right: auto;
  justify-content: space-between;
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .header-soc-list {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 0;
    margin-right: 0;
  }
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .header-mob-menu.is-hidden {
    display: none;
  }
}

/* -------------------------- HERO ------------------------- */

.hero {
  padding-top: 72px;
  padding-bottom: 72px;
  background-image: linear-gradient(var(--grey), var(--grey)),
    url(../images/hero-mobile.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover, 320px;
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .hero {
    background-image: linear-gradient(var(--grey), var(--grey)),
      url(../images/hero-mobile-2x.jpg);
  }
}

@media screen and (min-width: 768px) {
  .hero {
    padding-top: 112px;
    padding-bottom: 112px;
    background-image: linear-gradient(var(--grey), var(--grey)),
      url(../images/hero-tablet.jpg);
    background-size: cover, 768px 100%;
  }
}

@media screen and (min-width: 768px) and (min-device-pixel-ratio: 2),
  screen and (min-width: 768px) and (min-resolution: 192dpi),
  screen and (min-width: 768px) and (min-resolution: 2dppx) {
  .hero {
    background-image: linear-gradient(var(--grey), var(--grey)),
      url(../images/hero-tablet-2x.jpg);
  }
}

@media screen and (min-width: 1158px) {
  .hero {
    padding-top: 188px;
    padding-bottom: 188px;
    background-image: linear-gradient(var(--grey), var(--grey)),
      url(../images/hero.jpg);
    background-size: cover, 1440px;
  }
}

@media screen and (min-width: 1158px) and (min-device-pixel-ratio: 2),
  screen and (min-width: 1158px) and (min-resolution: 192dpi),
  screen and (min-width: 1158px) and (min-resolution: 2dppx) {
  .hero {
    background-image: linear-gradient(var(--grey), var(--grey)),
      url(../images/hero-2x.jpg);
  }
}

.hero-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--white);

  width: 216px;
  margin-right: auto;
  margin-left: auto;
}

@media screen and (min-width: 768px) {
  .hero-title {
    font-size: 56px;
    line-height: 1.07;

    width: 496px;
  }
}

.hero-btn {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--white);

  border: none;
  border-radius: 4px;
  width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: var(--iris);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);

  margin-top: 48px;
  margin-right: auto;
  margin-left: auto;
  display: block;
}

.hero-btn:hover,
.hero-btn:focus {
  background-color: var(--ocean);
}

/* -------------------- OUR CORE VALUES ------------------- */

@media screen and (min-width: 768px) {
  .values-list {
    display: flex;
    flex-wrap: wrap;
  }
}

@media screen and (min-width: 1158px) {
  .values-list {
    display: flex;
    gap: 24px;
  }
}

@media screen and (max-width: 1157px) {
  .values-item {
    margin-bottom: 72px;
  }
}

.values-item:last-child {
  margin-bottom: 0;
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .values-item {
    flex-basis: calc((100% - 24px) / 2);
    margin-bottom: 72px;
    margin-right: 24px;
  }

  .values-item:nth-child(2n) {
    margin-right: 0;
  }

  .values-item:nth-last-child(-n + 2) {
    margin-bottom: 0;
  }
}

.values-icon {
  display: none;
}

@media screen and (min-width: 1158px) {
  .values-icon {
    display: block;
    border: 1px solid var(--light-slate);
    border-radius: 4px;
    width: 264px;
    height: 112px;
  }
}

.values-item-img {
  margin-bottom: 8px;
}

.values-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
  margin-bottom: 8px;
}

@media screen and (max-width: 767px) {
  .values-title {
    text-align: center;
  }
}

@media screen and (min-width: 1158px) {
  .values-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--navy-blue);

    margin-top: 8px;
    margin-bottom: 8px;
  }
}

.values-paragraf {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);

  width: 288px;
  margin-right: auto;
  margin-left: auto;
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .values-paragraf {
    width: 356px;
  }
}

@media screen and (min-width: 1158px) {
  .values-paragraf {
    font-weight: 400;
    width: 264px;
  }
}

/* ------------------------ OUR TEAM ----------------------- */

.team {
  background-color: var(--cloud);
}

.team-title,
.portfolio-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);

  margin-bottom: 72px;
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .team-list {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media screen and (min-width: 768px) {
  .team-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media screen and (min-width: 1158px) {
  .team-list {
    gap: 24px;
  }
}

.team-item {
  border-radius: 0 0 4px 4px;
  width: 264px;

  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: var(--white);
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .team-item {
    margin-bottom: 72px;
  }

  .team-item:last-child {
    margin-bottom: 0;
  }
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .team-item {
    margin-right: 24px;
    margin-bottom: 64px;
  }

  .team-item:nth-last-child(-n + 2) {
    margin-bottom: 0;
  }

  .team-item:nth-child(2n) {
    margin-right: 0;
  }
}

@media screen and (min-width: 1158px) {
  .team-list {
    gap: 24px;
  }
}

.team-container {
  padding-top: 32px;
  padding-bottom: 32px;
}

.team-subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);

  margin-bottom: 8px;
}

.team-paragraf {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 8px;
}

.team-soc-list {
  display: flex;
  gap: 24px;
  margin-right: auto;
  justify-content: center;
}

.team-soc-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-soc-icon {
  width: 40px;
  height: 40px;
}

.team-soc-link:hover .team-soc-icon,
.team-soc-link:focus .team-soc-icon {
  --color1: var(--ocean);
  --color2: #fff;
}

/* ------------------------ FOOTER -----------------------  */
.footer {
  background-color: var(--navy-blue);
  padding-top: 100px;
  padding-bottom: 100px;
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .footer {
    padding-left: 108px;
    padding-right: 164px;
  }
}

.footer-list {
  display: flex;
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-list {
    flex-direction: column;
    align-items: center;
  }
}

@media screen and (min-width: 768px) {
  .footer-list {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-link {
    display: block;
    text-align: center;
  }
}

.footer-link {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cloud);
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-link {
    text-align: center;
  }
}

.footer-link-web {
  color: var(--iris);
}

.footer-paragraf {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--cloud);

  width: 264px;

  margin-top: 16px;
}

.footer-subtitle {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 16px;
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-subtitle {
    text-align: center;
  }
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-media-item {
    margin-top: 72px;
  }
}

@media screen and (min-width: 768px) {
  .footer-media-item {
    margin-left: 24px;
  }
}

@media screen and (min-width: 1158px) {
  .footer-media-item {
    margin-left: 120px;
  }
}

.footer-media-list {
  display: flex;
  gap: 16px;
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-media-list {
    margin-bottom: 72px;
  }
}

.footer-media-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--iris);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-media-icon {
  width: 40px;
  height: 40px;
}

.footer-media-link:hover .footer-media-icon,
.footer-media-link:focus .footer-media-icon {
  --color1: var(--green);
  --color2: #fff;
}

@media screen and (min-width: 1158px) {
  .footer-subscribe {
    margin-left: 80px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .footer-subscribe {
    margin-top: 72px;
    margin-right: auto;
  }
}

.footer-form {
  display: flex;
  align-items: center;
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-form {
    flex-direction: column;
  }
}

.footer-input {
  border: 1px solid var(--white);
  border-radius: 4px;
  width: 264px;
  height: 40px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: var(--navy-blue);
  padding: 8px 16px;
}

.footer-input::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--white);
}

.footer-btn {
  display: flex;

  border-radius: 4px;
  padding: 8px 24px;
  background-color: var(--iris);
  border: none;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--white);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .footer-btn {
    margin-top: 16px;
  }
}

@media screen and (min-width: 768px) {
  .footer-btn {
    margin-left: 24px;
  }
}

.footer-btn:hover,
.footer-btn:focus {
  background-color: #31d0aa;
}

.footer-icon {
  margin-left: 16px;
  fill: #fff;
}

/* ------------------------ Our Portfolio ----------------------- */

@media screen and (min-width: 320px) and (max-width: 767px) {
  .portfolio-list {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media screen and (min-width: 768px) {
  .portfolio-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.portfolio-item {
  width: 288px;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 48px;
}

.portfolio-item:last-child {
  margin-bottom: 0;
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .portfolio-item {
    width: 356px;
    margin-right: 24px;
    margin-bottom: 72px;
  }

  .portfolio-item:nth-last-child(-n + 2) {
    margin-bottom: 0;
  }

  .portfolio-item:nth-child(2n) {
    margin-right: 0;
  }
}

@media screen and (min-width: 1158px) {
  .portfolio-item {
    width: 360px;
    margin-right: 24px;
    margin-bottom: 48px;
  }

  .portfolio-item:nth-last-child(-n + 3) {
    margin-bottom: 0;
  }

  .portfolio-item:nth-child(3n) {
    margin-right: 0;
  }
}

.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 .portfolio-top-text,
.portfolio-item:focus .portfolio-top-text {
  transform: translateY(0%);
}

.portfolio-top-wrap {
  position: relative;
  overflow: hidden;
}

.portfolio-img {
  width: 100%;
}

.portfolio-top-text {
  position: absolute;
  top: 0;
  padding-top: 40px;
  padding-right: 32px;
  padding-left: 32px;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);

  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  height: 100%;
  overflow: auto;

  color: var(--cloud);
  background-color: var(--iris);
}

.portfolio-container {
  border-bottom: 1px solid var(--cornflower);
  border-left: 1px solid var(--cornflower);
  border-right: 1px solid var(--cornflower);
  padding: 32px 16px;
  width: 288px;
}

@media screen and (min-width: 768px) {
  .portfolio-container {
    width: 356px;
  }
}

@media screen and (min-width: 1158px) {
  .portfolio-container {
    width: 360px;
  }
}

.portfolio-paragraf {
  margin-top: 8px;
}

/* ------------------------ MODAL ----------------------- */
.backdrop {
  position: fixed;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);

  background-color: rgba(0, 0, 0, 0.5);
  opacity: 1;
  visibility: visible;
}

.backdrop.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.modal {
  position: absolute;
  border-radius: 4px;
  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);
  background-color: var(--dairy);

  transform: translateY(-100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .modal {
    width: 288px;
    padding: 72px 16px 24px 16px;
    min-height: 623px;
  }
}

@media screen and (min-width: 768px) {
  .modal {
    width: 408px;
    padding: 72px 24px 24px 24px;
    min-height: 584px;
  }
}

.backdrop:not(.is-hidden) .modal {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;

  border-radius: 50%;
  border-width: 1px;
  border-color: rgba(0, 0, 0, 0.1);
}

.modal-close-icon {
  fill: var(--navy-blue);
}

.modal-close-btn:hover .modal-close-icon,
.modal-close-btn:focus .modal-close-icon {
  fill: var(--white);
}

.modal-close-btn:hover,
.modal-close-btn:focus {
  border-color: var(--ocean);
  background-color: var(--ocean);
}

.modal-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
  margin-bottom: 16px;
}

.modal-label {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--light-slate);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper {
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
}

.modal-input {
  margin-top: 4px;
  margin-bottom: 8px;
  height: 40px;
  padding-left: 38px;
  border: 1px solid var(--navy-blue-modal);
  border-radius: 4px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .modal-input {
    width: 256px;
  }
}

@media screen and (min-width: 768px) {
  .modal-input {
    width: 360px;
  }
}

.modal-input:hover,
.modal-input:focus,
.modal-text:hover,
.modal-text:focus {
  border: 1px solid var(--iris);
  outline: none;
}

.modal-input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 24px;
  top: 26px;
  pointer-events: none;
  fill: black;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 0;
}

.input-wrapper:hover .modal-input-icon,
.modal-input:focus + .modal-input-icon {
  fill: var(--iris);
}

.modal-btn {
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  display: block;
  margin-top: 24px;
  margin-left: auto;
  margin-right: auto;
  width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: var(--iris);

  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--white);

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn:hover,
.modal-btn:focus {
  background-color: var(--ocean);
}

.modal-text {
  margin-top: 4px;
  padding: 8px 16px;

  resize: none;

  border: 1px solid var(--navy-blue-modal);
  border-radius: 4px;
  width: 100%;
  height: 120px;
  margin-bottom: 16px;
}

.modal-text::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--navy-blue-modal);
}

.modal-checkbox-text {
  align-items: center;
  display: flex;
}

@media screen and (min-width: 320px) and (max-width: 767px) {
  .modal-input {
    width: 256px;
  }
}

@media screen and (min-width: 768px) {
  .modal-input {
    width: 360px;
  }
}

.modal-contract-text {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--light-slate);
}

.modal-contract {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--iris);
  text-decoration: underline;
  text-decoration-skip-ink: none;
  margin-left: 3px;
}

@media screen and (max-width: 767px) {
  .modal-checkbox-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }

  .modal-contract {
    display: block;
    flex-basis: 100%;
  }
}

@media screen and (max-width: 767px) {
  .modal-checkbox-text {
    display: grid;
    grid-template-columns: 16px 1fr;
    column-gap: 8px;
    align-items: center;
  }

  .modal-checkbox-text::before {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .modal-contract-text {
    grid-column: 2;
    grid-row: 1;
  }

  .modal-contract {
    grid-column: 2;
    grid-row: 2;
    margin-top: 4px;
  }
}

@media screen and (max-width: 767px) {
  .modal-contract {
    margin-top: 0;
  }
}

.modal-checkbox-text::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid var(--navy-blue-modal);
  margin-right: 8px;
}

.modal-checkbox:checked + .modal-checkbox-text::before {
  background-color: var(--ocean);
  border: none;
  background-image: url(../images/checkbox.svg);
  background-repeat: no-repeat;
  background-position: center;
}
