:root {
  --h-color: #2e2f42;
  --paragraph-color: #434455;
  --accent-color: #4d5ae5;
  --background-color: #ffffff;
  --logo-color: #f4f4fd;
  --focus-color: #404bbf;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

ul {
  margin: 0;
  padding: 0;
}

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

main {
  display: block;
  margin: 0;
  padding: 0;
  /* width: 100%; */
}

.container {
  width: 100%;
  max-width: 1440px;
  padding-left: 156px;
  padding-right: 156px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  background: var(--background-color);
  color: var(--paragraph-color);
  overflow-x: hidden;
  margin: 0;
}

address {
  font-style: normal;
}

button {
  all: unset;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background-color: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(100%);
  white-space: nowrap;
  border: 0;
}

.section {
  padding-top: 120px;
  padding-bottom: 120px;
}

.list {
  list-style: none;
}

.link {
  text-decoration: none;
}

/* header*/

.flex-header {
  border-bottom: 1px solid #e7e9fc;
  background-color: var(--background-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);
}

/* Контейнер */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

/* Логотип */
.header-logo {
  display: inline-block;
  font-family: "Raleway", sans-serif;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.17;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent-color);
  margin-right: 76px;
}

.header-logo-studio {
  font-family: "Raleway", sans-serif;
  font-weight: bold;
  font-size: 18px;
  text-transform: uppercase;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: var(--h-color);
}

/* Навігація */
.header-nav {
  display: flex;
  align-items: center;
}

/* Список навігації */
.header-list {
  display: flex;
  gap: 40px;
}

/* Пункти навігації */
.header-item {
  display: block;
}

/* Посилання */
.header-link {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--h-color);
  padding: 24px 0;
  position: relative;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.current {
  color: var(--focus-color);
}

.current::after {
  content: "";
  display: flex;
  border-radius: 2%;
  transition: background-color 250ms linear;
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--focus-color);
}

.header-link:hover,
.header-link:focus,
.header-link:active {
  color: var(--focus-color);
}

/* Адреса */
.header-address {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--paragraph-color);
  padding: 24px 0 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-list {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.header-address:hover,
.header-address:focus {
  color: var(--focus-color);
}

/* hero*/

.hero {
  background: var(--h-color);
  text-align: center;
  padding: 188px 0 188px 0px;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/hero.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-title {
  max-width: 496px;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--background-color);
  margin-bottom: 48px;
}

.hero-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-btn {
  display: block;
  box-sizing: border-box;
  text-align: center;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--background-color);
  background: #4d5ae5;
  min-width: 169px;
  height: 56px;
  padding: 16px 32px 16px 32px;
  border-radius: 4px;
  box-shadow: 0px 4px 4px 0px #00000026;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-btn:hover,
.hero-btn:focus {
  background: var(--focus-color);
}

/*advantage */

.advantage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.advantage-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--h-color);
  margin-bottom: 8px;
}
.advantage-after-title {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--paragraph-color);
  max-width: 264px;
}

/* icons */
.icon-svg {
  fill: currentColor;
}
.container-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  width: 264px;
  height: 112px;
  background-color: var(--logo-color);
  border-radius: 4px;
  border: 1px solid #8e8f99;
}

/*our_team*/

.our-team {
  background-color: var(--logo-color);
}

.our-team-list {
  display: flex;
  gap: 24px;
}

.our-team-title {
  font-weight: bold;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--h-color);
  margin-bottom: 72px;
}

.subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--h-color);
}
.after-title {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--paragraph-color);
}

.team-list {
  background-color: var(--background-color);
  border-radius: 0px 0px 4px 4px;
  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);
}

.team-list img {
  display: block;
}

.team-card {
  width: 264px;
  text-align: center;
  padding: 32px 0 32px 0;
  border-radius: 0px 0px 4px 4px;
}

.subtitle {
  margin-bottom: 8px;
}

/*our-team social list */
.social-list {
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 8px;
  /* width: 232px; */
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #f4f4fd;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-svg {
  fill: #f4f4fd;
  display: block;
}

.social-link:hover,
.social-link:focus {
  background-color: var(--focus-color);
  color: #ffffff;
}

/* our portfolio */

.portfolio-list {
  display: flex;
  column-gap: 24px;
  flex-wrap: wrap;
  width: 100%;
}

.portfolio-card {
  padding: 32px 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  box-sizing: border-box;
  position: relative;
}

.portfolio-item: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);
}

.portfolio-item {
  background-color: var(--background-color);
  width: fit-content;
  margin-bottom: 48px;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:nth-last-child(-n + 3) {
  margin-bottom: 0;
}

/* portfolio invisible cards  */

.portfolio-item-img-text {
  display: flex;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  height: 100%;
  width: 100%;
  padding: 40px 32px;
  color: var(--logo-color);
  background: var(--accent-color);
  position: absolute;
  top: 0;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.container-item-img:hover .portfolio-item-img-text {
  transform: translateY(0);
}

.container-item-img {
  position: relative;
  overflow: hidden;
}

/*footer*/

.footer-link-container {
  margin-right: 80px;
}

.footer-logo {
  font-family: "Raleway", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  display: inline-block;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.footer-background {
  background: var(--h-color);
  padding: 100px 0 100px 0;
}

.footer-logo-studio {
  font-family: "Raleway", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: var(--logo-color);
}

.footer-after-title {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--logo-color);
  width: 264px;
}

/* footer new */
.footer-container {
  display: flex;
  align-items: baseline;
}

.footer-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-web-studio {
  margin-right: 120px;
}
.social-footer-list {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
}

.social-link-footer:hover,
.social-link-footer:focus {
  background-color: #31d0aa;
  color: #ffffff;
}

.footer-svg {
  fill: #f4f4fd;
  width: 24;
  height: 24;
}

.social-link-footer {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: var(--h-color);
  transition: var(--transition);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* footer form */

.footer-form {
  display: flex;
  gap: 24px;
  width: 100%;
}

.footer-field {
  position: relative;
  width: 453px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.footer-label {
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}

.label-input-container {
}

.footer-input {
  outline: none;
  background-color: transparent;
  border: 1px solid #ffffff;
  box-sizing: border-box;
  box-shadow: 0px 4px 4px 0px #00000026;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  padding: 16px;
  font-size: 12px;
  font-weight: 400;
  font-style: Regular;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.footer-label input::placeholder {
  color: #ffffff;
}

/* footer-btn */

.footer-btn {
  min-width: 165px;
  height: 40px;
  padding: 8px 24px 8px 24px;
  background-color: var(--accent-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-send {
  margin-left: 16px;
}

.footer-btn:hover {
  cursor: pointer;
}

/* modal */

/* modal backdrop */

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background-color: hsla(237, 18%, 22%, 0.4);
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop.is-open {
 opacity: 1;
 visibility: visible;
 pointer-events: auto;
}

/* modal */

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;
  background-color: #fcfcfc;
  box-shadow: 0px 1px 1px 0px #00000024, 0px 1px 3px 0px #0000001f,
    0px 2px 1px 0px #00000033;
  border-radius: 4px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn {
  position: absolute;
  display: inline-block;
  align-items: center;
  bottom: 24px;
  right: 50%;
  transform: translateX(50%);
  border: none;
}

.modal-title {
  color: var(--h-color);
  text-align: center;
}

.modal-close-btn {
  position: absolute;
  right: 24px;
  top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: #e7e9fc;
  border: 1px solid #0000001a;
  border-radius: 50%;
  box-sizing: border-box;
  color: #000000;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close-btn:hover .vector-svg {
  fill: #fff;
}

.modal-close-btn:focus .vector-svg {
  fill: #fff;
}

.vector-svg {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* form */

.modal-form {
}

.form-field {
  position: relative;
}

.form-container {
  margin-bottom: 8px;
}

.form-field textarea::placeholder {
  color: #2e2f4266;
}

.form-input {
  display: flex;
  box-sizing: border-box;
  padding: 8px 16px 8px 38px;
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  outline: transparent;
  background-color: transparent;
  color: rgba(46, 47, 66, 1);
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-input:focus + .input-container {
  color: var(--accent-color);
}

.form-input:focus {
  border: 1px solid var(--accent-color);
}

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

/* textarea */
.textarea-container {
  margin-bottom: 16px;
}

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

.form-textarea:focus {
  border: 1px solid var(--accent-color);
}

.modal-svg {
  fill: currentColor;
  transform: var(--transition);
}

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

.form-input:focus + .input-icon {
  color: var(--accent-color);
}

/* checkbox */

.checkbox-container {
  margin-bottom: 24px;
}

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

.check-text-link {
  color: var(--accent-color);
}

.check-text:hover .checkbox-span {
  cursor: pointer;
}

.policy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  fill: #fff;
}

.policy-check:checked + .check-text .checkbox-span {
  border: none;
  background-color: #404bbf;
  fill: #f4f4fd;
}
