:root {
  --main-text-color: rgb(33, 33, 33);
  --modal-border-color: rgba(33, 33, 33, 0.2);
  --other-text-color: rgb(117, 117, 117);
  --modal-placeholder-text: rgba(117, 117, 117, 0.5);
  --color-hover_focus: rgb(32, 148, 243);
  --modal-submit-button-hover_focus: rgb(24, 140, 232);
  --font-title: "Raleway", sans-serif;
  --font-other: "Roboto", sans-serif;
  --very-light-color: rgb(255, 255, 255);
  --dark-background: hsl(235, 10%, 21%);
  --semi-dark-background: rgba(47, 48, 58, 0.8);
  --grey-light-background: rgb(236, 236, 236);
  --grey-ld-background: rgb(245, 244, 250);
  --border-color: rgb(238, 238, 238);
  --svg-color-cool: rgb(175, 177, 184);
  --semi-black: rgba(255, 255, 255, 0.1);
  --modal-background: rgba(0, 0, 0, 0.2);
  --transform-type: cubic-bezier(0.4, 0, 0.2, 1);
  --background-portfolio-cards: rgba(33, 150, 243, 0.9);
  --modal-svg-border: rgba(0, 0, 0, 0.1);
  --modal-submit-button-shadow: rgba(0, 0, 0, 0.15);
  --footer-input-border: rgba(255, 255, 255, 0.3);
  --footer-mail-color: rgba(255, 255, 255, 0.6);
}
body {
  color: var(--main-text-color);
  font-family: var(--font-other);
  font-weight: 400;
  letter-spacing: 0.03em;
  background: var(--very-light-color);
}
img {
  display: block;
}
.nav-item:last-child {
  margin-right: 0;
}
.nav-item {
  margin-right: 50px;
  color: inherit;
}
.link,
.current {
  display: block;
  padding: 32px 0;
  position: relative;
  color: currentColor;
  transition: color 250ms var(--transform-type);
}
.nav-item:first-child {
  margin-right: 94px;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.header {
  background-color: var(--very-light-color);
  border-bottom: 1px solid var(--grey-light-background);
}
.container {
  width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.header > .container {
  display: flex;
  justify-content: space-between;
}
.nav-site-main,
.contacts-header {
  display: flex;
  align-items: center;
}
.header ul {
  font-size: 14px;
  line-height: 1.14;
}
.header nav {
  letter-spacing: 0.02em;
}
.nav-site .nav-item > .current {
  color: var(--color-hover_focus);
}
.logo-link {
  display: flex;
  font-family: var(--font-title);
  letter-spacing: 0.03em;
  font-size: 26px;
  line-height: 1.19;
  padding: 24px 0 25px 0;
}
.logo {
  color: var(--color-hover_focus);
}
/* задаем псевдоэлемент линкам */
.link::after {
  position: absolute;
  display: inline-block;
  bottom: 0;
  left: 0;
  transform: scale(0);
  transition: transform 250ms var(--transform-type);

  width: 100%;
  content: "";

  border-bottom: 4px solid var(--color-hover_focus);
  border-radius: 2px;
}
.current::after {
  transform: scale(1);
}
/* добавляем плавный переход всем ссылкам и свг, кроме филла соц иконок команды и бордера у клиентов */
.logo-link,
.footer-link,
.contacts-header .contacts-link,
.member-social-link-link,
.member-social-link-link .social-svg,
.clients-list-link .social-svg,
.footer-list-item a,
.footer-social-list-item .footer-social-link,
.portfolio-main .filter-button.button-bc,
.portfolio-list-link,
.portfolio-list-header .overlay-text {
  transition: color 250ms var(--transform-type),
    background-color 250ms var(--transform-type),
    fill 250ms var(--transform-type), box-shadow 250ms var(--transform-type),
    transform 250ms var(--transform-type);
}
.contacts-header {
  display: flex;
  color: var(--other-text-color);
  letter-spacing: 0.02em;
}
.contacts-header .contacts-item {
  margin-right: 50px;
}
.contacts-header .contacts-item:last-child {
  margin-right: 0;
}
.contacts-link:visited,
.contacts-link:link {
  color: var(--other-text-color);
}
.contacts-link {
  display: flex;
  padding: 32px 0;
}
.first-header-svg,
.second-header-svg {
  fill: currentColor;
  margin-right: 10px;
  display: block;
  margin-top: 2px;
}
.second-header-svg {
  margin-top: 0;
}
a {
  text-decoration: none;
}
.nav-site a {
  color: var(--main-text-color);
}
.nav-item:visited {
  color: var(--main-text-color);
}
.logo-link:hover,
.logo-link:focus,
.nav-item:hover,
.nav-item:focus,
.contacts-link:hover,
.contacts-link:focus {
  color: var(--color-hover_focus);
}
.link:visited,
.link:link {
  color: var(--main-text-color);
}
.link:hover,
.link:focus {
  color: var(--color-hover_focus);
}
/* говорим что при ховере/фокусе псевдоэлемент линков будет меняться */
.link:hover::after,
.link:focus::after {
  transform: scale(1);
  visibility: visible;
}
.hero {
  max-width: 1600px;
  padding: 200px 0;
  text-align: center;
  background-image: linear-gradient(
      to right,
      rgba(47, 48, 58, 0.4),
      rgba(47, 48, 58, 0.4)
    ),
    url(../images/background/hero-background.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: var(--very-light-color);
  margin: 0 auto;
}
.font-900 {
  font-weight: 900;
  margin: 0 230px 40px 230px;
  font-size: 44px;
  line-height: 1.36;
}
.button {
  line-height: 1.87;
  background: var(--color-hover_focus);
  color: var(--very-light-color);
  padding: 10px 30px;
  min-width: 200px;
  max-height: 50px;
  transition: background-color 250ms var(--transform-type),
    box-shadow 250ms var(--transform-type);
}
.hero .button.button-bc:hover,
.hero .button.button-bc:focus {
  cursor: pointer;
  outline: none;
  background-color: var(--modal-submit-button-hover_focus);
  box-shadow: var(--modal-submit-button-shadow);
}
.features,
.our-clients,
.portfolio-main {
  padding: 94px 0;
}
.features-list {
  display: flex;
  justify-content: space-between;
  text-align: left;
}
.features-item {
  text-align: left;
  max-width: 270px;
}
.features-list .features-item {
  margin-right: 30px;
}
.features-list .features-item::before {
  width: 100%;
  height: 120px;
  background: var(--grey-ld-background);
  content: "";
  display: inline-block;
  margin-bottom: 30px;
}
.features-list .features-first::before {
  background-image: url("../images/background/attantion-to-details.svg");
  background-position: center;
  background-repeat: no-repeat;
}
.features-list .features-second::before {
  background-image: url("../images/background/time.svg");
  background-position: center;
  background-repeat: no-repeat;
}
.features-list .features-third::before {
  background-image: url("../images/background/planning.svg");
  background-position: center;
  background-repeat: no-repeat;
}
.features-list .features-forth::before {
  background-image: url("../images/background/newtime-techs.svg");
  background-position: center;
  background-repeat: no-repeat;
}
.features-list .features-item:last-child {
  margin-right: 0;
}
.features-list .features-item h3 {
  font-size: 14px;
  line-height: 1.14;
  margin: 0 0 10px 0;
}
.features-list p {
  font-size: 14px;
  line-height: 1.71;
  margin: 0;
}
.what-we-do {
  padding-bottom: 94px;
}
.what-we-do h2,
.team h2 {
  font-size: 36px;
  line-height: 1.17;
  text-align: center;
}
.what-we-do-title {
  margin: 0 0 50px 0;
}
.what-we-do-list {
  display: flex;
  justify-content: space-between;
}
.what-we-do-list .wwd-list-item {
  margin-right: 30px;
  padding: 0;
  position: relative;
}
.what-we-do-list .wwd-list-item:last-child {
  margin-right: 0;
}
.image-text {
  position: absolute;
  content: "";
  bottom: 0;
  left: 0;

  background: var(--semi-dark-background);
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  width: 100%;
  height: 70px;

  color: var(--very-light-color);
  font-size: 14px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.team {
  background: var(--grey-ld-background);
  display: flex;
  padding: 94px 0;
}
.team-title {
  margin: 0;
}
.team .team-list-item {
  margin-right: 30px;
}
.team .team-list-item:last-child {
  margin-right: 0;
}
.team h3,
.team p {
  font-size: 16px;
  line-height: 1.19;
}
.features-list p,
.team p {
  color: var(--other-text-color);
}
.team-list {
  margin: 50px 0 0;
  display: flex;
  justify-content: space-between;
}
.team-list .team-list-item {
  background: var(--very-light-color);
  text-align: center;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  border-radius: 0px 0px 4px 4px;
}
.team-div {
  display: block;
  width: 100%;
  padding: 30px 0 16px 0;
}
.team-title-member {
  margin: 0 0 10px 0;
}
.team-member-chair {
  margin: 0;
}
.member-social-list {
  display: flex;
  padding: 0 32px 30px;
  justify-content: space-between;
}
.member-list-item {
  width: 44px;
  height: 44px;
}
.member-social-link-link {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
}
.social-svg {
  fill: var(--svg-color-cool);
  display: block;
}
.member-social-link-link:hover,
.member-social-link-link:focus {
  background-color: var(--color-hover_focus);
}
.member-social-link-link:hover .social-svg,
.member-social-link-link:focus .social-svg {
  fill: var(--very-light-color);
}
.letter-spacing-06 {
  letter-spacing: 0.06em;
}
.uppercase {
  text-transform: uppercase;
}
.font-500 {
  font-weight: 500;
}
.font-700 {
  font-weight: 700;
}
/* клиенты */
.our-clients-title {
  margin-top: 0;
  margin-bottom: 50px;
  font-size: 36px;
  line-height: 1.17;
  text-align: center;
  letter-spacing: 0.03em;
}
.clients-list {
  display: flex;
}
.clients-list-item {
  margin-right: 30px;
  width: 170px;
  height: 90px;
}
.clients-list-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--svg-color-cool);
  box-sizing: border-box;
  border-radius: 4px;
  transition: border-color 250ms var(--transform-type);
}
.clients-list .clients-list-item:last-child {
  margin-right: 0;
}
.clients-list-link:hover,
.clients-list-link:hover .social-svg,
.clients-list-link:focus,
.clients-list-link:focus .social-svg {
  border-color: var(--color-hover_focus);
  fill: var(--color-hover_focus);
}
/* футер */
.footer {
  background: var(--dark-background);
  padding: 60px 0;
}
.footer > .container {
  display: flex;
  align-items: baseline;
}
.footer a {
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}
.footer-leftside {
  margin-right: 75px;
}
.footer-leftside .footer-link {
  display: flex;
  margin-bottom: 20px;

  color: var(--very-light-color);
  font-family: var(--font-title);
  letter-spacing: 0.03em;
  font-size: 26px;
  line-height: 1.19;
}
.footer a:hover,
.footer a:focus {
  color: var(--color-hover_focus);
}
.footer-list {
  display: flex;
  flex-direction: column;
  font-style: normal;
}
.footer-list .footer-list-item {
  margin: 0 0 9px 0;
}
.footer-list .footer-list-item:last-child {
  margin: 0 0 0 0;
}
.footer-list .city-address {
  color: var(--very-light-color);
}
.footer-center {
  margin-right: auto;
}
.footer-text {
  text-transform: uppercase;
  color: var(--very-light-color);
  margin-top: 0;
  margin-bottom: 20px;
}
.footer-social-list {
  display: flex;
  max-height: 80px;
  justify-content: space-between;
}
.footer-social-list-item {
  margin-right: 10px;
  width: 44px;
  height: 44px;
}
.footer-social-list-item:last-child {
  margin-right: 0;
}
.footer-social-link {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background-color: var(--semi-black);
  box-sizing: border-box;
}
.footer .social-svg {
  fill: var(--very-light-color);
  display: block;
}
.footer-social-link:hover,
.footer-social-link:focus {
  background-color: var(--color-hover_focus);
}
/* form footer */
.footer-form,
.footer-label,
.footer-mail,
.footer-form-button {
  display: flex;
}
.footer-label {
  flex-direction: column;
  color: var(--very-light-color);
  margin-left: auto;
  margin-right: 12px;
}
.footer-label-text {
  margin: 0 0 20px 0;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1.14;
  letter-spacing: 0.03em;
}
.footer-mail {
  align-items: center;
  background-color: var(--dark-background);
  width: 358px;
  height: 50px;
  padding: 0 16px;

  letter-spacing: 0.03em;
  color: var(--footer-mail-color);
  font-size: 16px;
  line-height: 1.25;

  border: 1px solid var(--footer-input-border);
  box-sizing: border-box;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
  border-radius: 4px;
}
.footer-mail:focus {
  outline: none;
  border: 1px solid var(--color-hover_focus);
}
/* transition for footer-form */
.footer-form-button,
.footer-mail {
  transition: background-color 250ms var(--transform-type),
    box-shadow 250ms var(--transform-type), border 250ms var(--transform-type);
}

.footer-form-button {
  align-items: center;
  align-self: flex-end;
  max-width: 200px;
  max-height: 50px;
  border: 1px solid var(--color-hover_focus);
  border-radius: 4px;
  padding: 10px 28px 10px 29px;
  font-size: 16px;
  line-height: 1.87;
  letter-spacing: 0.06em;
  color: var(--very-light-color);
  background-color: var(--color-hover_focus);
  cursor: pointer;
}
.footer-form-button:hover,
.footer-form-button:focus {
  outline: none;
  background-color: var(--modal-submit-button-hover_focus);
  box-shadow: 0px 4px 4px var(--modal-submit-button-shadow);
}
.footer-form-button-text {
  margin-right: 10px;
}
.footer-svg {
  display: block;
  fill: var(--very-light-color);
}
/* подключаем портфолио */
.portfolio-filter {
  display: flex;
  margin-bottom: 50px;
  justify-content: center;
}
.filter-button {
  padding: 6px 22px;
  line-height: 1.62;
}
.pf-button:not(last-child) {
  margin-right: 8px;
}
.button,
.filter-button {
  font-family: inherit;
  font-size: 16px;
  text-align: center;
  border-radius: 4px;
  border: 1px solid transparent;
}
.portfolio-main .filter-button.button-bc {
  background: var(--grey-ld-background);
  color: var(--main-text-color);
}
.portfolio-main .filter-button.button-bc:hover,
.portfolio-main .filter-button.button-bc:focus {
  background: var(--color-hover_focus);
  color: var(--very-light-color);
  cursor: pointer;
  box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.08),
    0px 2px 2px rgba(0, 0, 0, 0.12);
  outline: none;
}
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
}
.portfolio-list-item {
  margin: 0 30px 30px 0;
  width: calc((100% - 60px) / 3);
}
.portfolio-list-item:nth-child(3n) {
  margin-right: 0;
}
.portfolio-list-item:nth-last-child(-n + 3) {
  margin-bottom: 0;
}
.portfolio-list-link {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-color);
  box-sizing: content-box;
}
.portfolio-list-link:hover,
.portfolio-list-link:focus {
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.12), 0px 4px 4px rgba(0, 0, 0, 0.06),
    1px 4px 6px rgba(0, 0, 0, 0.16);
}
.portfolio-list-header {
  position: relative;
  overflow: hidden;
}
.portfolio-list-header .overlay-text {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  transform: translate(0, 100%);

  width: 100%;
  height: 100%;

  background: var(--background-portfolio-cards);
  color: var(--very-light-color);
  padding: 0 24px;
  align-items: center;
  font-size: 18px;
  line-height: 1.56;
  letter-spacing: 0.03em;
}
.portfolio-list-link:hover .overlay-text,
.portfolio-list-link:focus .overlay-text {
  transform: translate(0, 0);
}
.portfolio-card-div {
  display: block;
  width: 100%;
  padding: 20px 24px;
}
.portfolio-list h3 {
  font-weight: 700;
  color: var(--main-text-color);
  letter-spacing: 0.06em;
  font-size: 18px;
  line-height: 2;
  margin: 0 0 4px 0;
}
.portfolio-list p {
  font-weight: 400;
  color: var(--other-text-color);
  font-size: 16px;
  line-height: 1.87;
  margin: 0;
}
/* modal */
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-background);
  transition: opacity 250ms var(--transform-type),
    visibility 250ms var(--transform-type),
    pointer-events 250ms var(--transform-type);
}
.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 528px;
  max-height: 581px;
  background: var(--very-light-color);
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.modal-icon-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--modal-svg-border);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.modal-icon-close-svg {
  fill: currentColor;
}
.modal-icon-close:hover,
.modal-icon-close:focus {
  background-color: var(--color-hover_focus);
}
.modal-icon-close:hover .modal-icon-close-svg,
.modal-icon-close:hover .modal-icon-close-avg {
  fill: var(--very-light-color);
}
/* animation for modal close button */
.modal-icon-close,
.modal-icon-close-svg {
  transition: background-color 250ms var(--transform-type),
    fill 250ms var(--transform-type);
}
/* modal-form */
/* add flex to elements of modal-form */
.modal-form,
.modal-form label,
.modal-feedback,
.checkbox-text,
.checkbox-text::before,
.modal-submit-button {
  display: flex;
}
/* add transition to elements */
.modal-input,
.modal-feedback,
.modal-svg,
.checkbox-text::before,
.modal-submit-button {
  transition: border-color 250ms var(--transform-type),
    fill 250ms var(--transform-type),
    background-color 250ms var(--transform-type),
    box-shadow 250ms var(--transform-type);
}

.modal-form {
  flex-direction: column;
  padding: 40px 40px 0 40px;
}
.modal-form .form-title {
  margin: 0 0 12px 0;
  font-size: 20px;
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0.03em;
  font-weight: bold;
}
.modal-form .is-relative {
  position: relative;
}
.modal-form label {
  flex-direction: column;
}
.modal-form .form-text {
  margin: 0 0 4px 0;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.01em;
  color: #757575;
  text-transform: capitalize;
}
.modal-input,
.modal-feedback {
  font-size: 14px;
  line-height: 1.143;
  letter-spacing: 0.01em;
  width: 100%;
  cursor: pointer;
  border: 1px solid var(--modal-border-color);
  border-radius: 4px;
  box-sizing: border-box;
}
.modal-input {
  height: 40px;
  padding: 0 10px 0 42px;
}
.is-margined {
  margin: 0 0 10px 0;
}
.modal-feedback {
  padding: 12px 16px;
  margin: 0 0 20px 0;
  resize: none;
}
.modal-input::placeholder,
.modal-feedback::placeholder {
  font-size: 14px;
  line-height: 1.14;
  letter-spacing: 0.01em;
  color: var(--modal-placeholder-text);
}
.modal-svg {
  fill: currentColor;
  position: absolute;
  top: 50%;
  left: 4%;
  transform: translate(0, -50%);
}
.modal-input:focus,
.modal-feedback:focus {
  border-color: var(--color-hover_focus);
  outline: none;
}
.modal-input:focus ~ .modal-svg {
  fill: var(--color-hover_focus);
}
.checkbox-text {
  font-size: 14px;
  line-height: 1.71;
  letter-spacing: 0.03em;
  color: var(--other-text-color);
  justify-content: center;
  margin: 0 0 30px 0;
}
.checkbox-text-link {
  color: var(--color-hover_focus);
  text-decoration: underline;
  margin-left: 5px;
}
.checkbox-text::before {
  content: "";
  width: 16px;
  height: 15px;
  border: 2px solid var(--main-text-color);
  border-radius: 2px;
  background-image: url("../images/icons/modal-policy-icon.svg");
  margin: 3px 7px 0 0;
}
.checkbox:checked + .checkbox-text::before {
  background-color: var(--color-hover_focus);
  border-color: var(--color-hover_focus);
}
.checkbox:focus + .checkbox-text::before {
  border-color: var(--color-hover_focus);
}
.visually-hidden {
  position: absolute !important;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
}
.modal-submit-button {
  max-width: 200px;
  height: 50px;
  padding: 10px 55px;
  justify-content: center;
  align-items: center;
  text-transform: capitalize;
  margin: 0 auto 40px;
  background-color: var(--color-hover_focus);
  color: var(--very-light-color);
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
.modal-submit-button:hover,
.modal-submit-button:focus {
  outline: none;
  border-color: var(--color-hover_focus);
  background-color: var(--modal-submit-button-hover_focus);
  box-shadow: 0px 4px 4px var(--modal-submit-button-shadow);
}
