:root {
  --iris: #4d5ae5;
  --ocean: #404bbf;
  --navy-blue: #2e2f42;
  --slate: #434455;
  --light-slate: #8e8f99;
  --cornflower: #e7e9fc;
  --cloud: #f4f4fd;
  --navy-blue-modal: rgba(46, 47, 66, 0.4);
  --white: #ffffff;
  --dairy: #fcfcfc;
}

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #fff;
}

/* reset  */

ul,
ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

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

a {
  text-decoration: none;
}

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

/* common */

.container {
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

.section {
  padding: 120px 0;
}

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

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

.item-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.soc-list {
  display: flex;
  /* align-items: center; */
  justify-content: center;
  gap: 24px;
}

.soc-link {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  fill: #fff;
  background-color: #4d5ae5;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.soc-link:focus {
  background-color: #404bbf;
}

.soc-icon {
  fill: #f4f4fd;
}

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

body:has(.backdrop.is-open) {
  overflow: hidden;
}

/* header  */

.page-header {
  border-bottom: 1px solid #e7e9fc;
  box-shadow:
    0 1px 6px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16),
    0 2px 1px 0 rgba(46, 47, 66, 0.08);
}

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

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

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

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

.header-logo .logo-parth {
  color: #2e2f42;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-link {
  display: block;
  padding: 24px 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;

  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.current {
  position: relative;
}

.nav-link.current::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: -1px;

  width: 100%;
  height: 4px;

  background-color: #404bbf;
  border-radius: 2px;
}

.contacts {
  font-style: normal;
  margin-left: auto;
}

.contacts-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.contacts-link {
  display: block;
  padding: 24px 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;

  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-link:hover,
.contacts-link:focus,
.nav-link:hover,
.nav-link:focus,
.nav-link.current {
  color: #404bbf;
}

/* hero */

.section-hero {
  max-width: 1440px;
  padding: 188px 0;
  margin: 0 auto;
  background-color: #2e2f42;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url(../images/hero-image.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-title {
  margin: auto;
  max-width: 496px;
  text-align: center;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: #fff;
}

.button {
  display: block;
  min-width: 169px;
  margin: auto;
  border-radius: 4px;
  border: none;
  padding: 16px 32px;
  margin-top: 48px;
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* features */

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

.features-item {
  width: calc((100% - 3 * 24px) / 4);
}

.bg-icon-features {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f4f4fd;
  border: 1px solid #8e8f99;
  border-radius: 4px;
  width: 264px;
  height: 112px;
  margin-bottom: 8px;
}

/* team */

.section-team {
  background-color: #f4f4fd;
}

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

.team-list-item {
  width: calc((100% - 3 * 24px) / 4);
  border-radius: 0 0 4px 4px;
  background-color: #ffffff;
  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);
}

.content-team-item {
  padding-top: 32px;
  padding-bottom: 32px;
  text-align: center;
}

.team-text {
  margin-bottom: 8px;
}

.team-list-item:hover .soc-link {
  background-color: #404bbf;
}

/* portfolio */

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 48px;
  column-gap: 24px;
}

.portfolio-list-item {
  width: calc((100% - 2 * 24px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.content-portfolio-item {
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  padding: 32px 16px;
}

.portfolio-wrapper {
  position: relative;
  overflow: hidden;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 40px 32px;
  color: #f4f4fd;
  background-color: #4d5ae5;

  transform: translateY(100%);
  /* transition: transform 250ms ease-in-out; */
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-list-item:hover .overlay {
  transform: translateY(0);
}

/* footer  */

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

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

.footer-content-logo {
  margin-right: 120px;
}

.footer-logo .logo-parth {
  color: #f4f4fd;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-text {
  max-width: 264px;
  color: #f4f4fd;
}

.footer-text-soc {
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}

.footer-soc {
  justify-content: flex-start;
  gap: 16px;
}

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

.footer-content-sub {
  margin-left: auto;
}

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

.subscribe-input {
  background-color: transparent;
  border: 1px solid #fff;
  padding-left: 16px;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  color: #fff;

  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  outline: none;

  transition: border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.subscribe-input:hover,
.subscribe-input:focus {
  border: 1px solid #31d0aa;
}

.subscribe-input::placeholder {
  color: #ffffff;
}

.footer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  /* gap: 16px; */
  min-width: 165px;
  height: 40px;
  border-radius: 4px;
  border: none;

  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: #fff;

  cursor: pointer;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* modal */

.backdrop {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;
  z-index: 999;

  background-color: rgba(46, 47, 66, 0.4);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  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 {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 408px;
  min-height: 584px;
  border-radius: 4px;
  padding: 72px 24px 24px;

  transform: translate(-50%, -50%);

  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: #fcfcfc;

  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop:not(.is-open) .modal {
  transform: translate(-50%, -100%);
}

.modal-close-btn {
  position: absolute;
  right: 24px;
  top: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 24px;
  height: 24px;

  cursor: pointer;

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

.icon-close {
  fill: #2e2f42;

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

.input-wrapper {
  position: relative;
}

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

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

.modal-form-wrapper {
  margin-bottom: 8px;
}

.modal-form-wrapper.field-comm {
  margin-bottom: 16px;
}

.modal-form-wrapper:last-of-type {
  margin-bottom: 24px;
}

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

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding-left: 38px;
  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);

  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
  border-color: #4d5ae5;
}

.form-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);

  pointer-events: none;
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.form-textarea {
  padding: 8px 16px;
  height: 120px;
  resize: none;
}

.form-textarea::placeholder {
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}

.form-privacy-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  border: 1px solid var(--navy-blue-modal);
  width: 16px;
  height: 16px;
  fill: transparent;

  cursor: pointer;

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

.checkbox:checked + .form-privacy > .form-privacy-checkbox {
  background-color: var(--ocean);
  border: none;
  fill: var(--cloud);
}

.form-privacy {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.form-privacy-link {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: #4d5ae5;
}

.modal-btn {
  margin: 0 auto;
}
