:root {
  --primary-font: 'Roboto', sans-serif;
  --second-font: 'Raleway', sans-serif;
  --primary-background-white-color: #ffffff;
  --second-background-color: #2e2f42;
  --primary-accent-color: #2e2f42;
  --secondary-accent-color: #434455;
  --hover-color: #404bbf;
  --hover-background-social-footer: #31d0aa;
  --hover-background-social: #404bbf;
  --background-color-social-button: #4d5ae5;
  --color-icon: #f4f4fd;
}

body {
  font-family: var(--primary-font);
  color: var(--secondary-accent-color);
  background-color: var(--primary-background-white-color);
  letter-spacing: 0.02em;
  font-size: 16px;
}

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

a {
  text-decoration: none;
}

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

input {
  background-color: transparent;
}

button {
  cursor: pointer;
}

img {
  display: block;
}

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

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

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

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

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

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

.logo {
  font-family: var(--second-font);
  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;
}

.logo-part-header {
  color: var(--primary-accent-color);
}

.header-nav-link {
  font-weight: 500;
  position: relative;
  line-height: 1.5;
  padding: 24px 0;
  color: var(--primary-accent-color);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-nav-link.current::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--hover-color);
  left: 0;
  bottom: -1px;
}

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

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

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

.address-link {
  line-height: 1.5;
  color: var(--secondary-accent-color);
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.title-hero {
  font-weight: 700;
  max-width: 496px;
  font-size: 56px;
  line-height: 1.07;
  color: #fff;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;
  text-align: center;
}

.button-hero-modal {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #fff;
  background-color: var(--background-color-social-button);
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 4px;
  min-width: 169px;
  height: 56px;
  border: none;
  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-hero-modal:hover,
.button-hero-modal:focus {
  background-color: var(--hover-color);
}

/* section-2 advantages */
.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;
}

.advantages-list {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.advantages-item {
  width: calc((100% - 72px) / 4);
}

.title-advantages {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  color: var(--primary-accent-color);
  margin-bottom: 8px;
}

.page-advantages {
  line-height: 1.5;
}

.title-section-all {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  color: var(--primary-accent-color);
  text-align: center;
  text-transform: capitalize;
}

/* section-3  Our Team */
.section-our-team {
  background-color: #f4f4fd;
}

.hero-our-team {
  margin-bottom: 72px;
}

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

.item-our-team {
  max-width: calc((100% - 72px) / 4);
  border-radius: 0 0 4px 4px;
}

.our-team-title-under-img {
  display: block;
  text-align: center;
  padding: 32px 0;
}

.title-our-team {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  text-transform: capitalize;
  color: var(--primary-accent-color);
  text-align: center;
  margin-bottom: 8px;
}

.page-our-team {
  line-height: 1.5;
  text-align: center;
  margin-bottom: 8px;
}

.item-our-team {
  background-color: var(--primary-background-white-color);
  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);
}

.mark-social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.icon-team {
  width: 40px;
  height: 40px;
}

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

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

.icon {
  fill: var(--color-icon);
}

/* section-4  Our Portfolio */
.title-portfolio {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  text-transform: capitalize;
  color: var(--primary-accent-color);
  margin-bottom: 8px;
}

.hero-our-portfolio {
  margin-bottom: 72px;
}

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

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

.portfolio-item:hover,
.portfolio-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);
  transform: translatey(0);
}

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

.page-portfolio {
  line-height: 1.5;
}

.container-overlay {
  position: relative;
  overflow: hidden;
}

.container-overlay p {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
  color: #f4f4fd;
  padding: 40px 32px;
}

.portfolio-item:hover .container-overlay p {
  transform: translateY(0%);
}

/* footer */
.basement {
  background-color: var(--second-background-color);
  padding: 100px 0;
}

.container-logo {
  margin-right: 120px;
}

.page-basement {
  line-height: 1.5;
  color: #f4f4fd;
  max-width: 264px;
}

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

.logo-part-basement {
  color: #f4f4fd;
}

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

.footer-social-list {
  display: flex;
  gap: 16px;
}

.page-social-subscribe {
  font-weight: 500;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 16px;
}

.foter-icon-hover:hover,
.foter-icon-hover:focus {
  background-color: var(--hover-background-social-footer);
}

.container-subscribe {
  margin-left: auto;
}

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

.input-subscribe {
  border: 1px solid var(--hover-background-social-footer);
  border-radius: 4px;
  width: 264px;
  height: 40px;
  padding-left: 16px;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  outline: none;
  color: #fff;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.input-subscribe:placeholder-shown {
  border-color: #fff;
}

.input-subscribe::placeholder {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #fff;
}

.button-subscribe {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 165px;
  height: 40px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  background-color: var(--background-color-social-button);
  border: none;
  margin-bottom: 0;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.button-subscribe:hover,
.button-subscribe:focus {
  background-color: var(--hover-background-social-footer);
}

.svg-subscribe {
  fill: #fff;
  margin-left: 16px;
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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;
}

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

.container-modal {
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;
  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;
  z-index: 999;
  border-radius: 4px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.close-btn:hover,
.close-btn:focus {
  border: none;
  background-color: var(--hover-color);
  fill: #fff;
}

.close-btn-icon {
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.page-modal {
  margin-bottom: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: var(--primary-accent-color);
}

.person-modal {
  margin-bottom: 8px;
}

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

.person-modal-comment {
  margin-bottom: 16px;
}

.review-form-input-wrapper {
  position: relative;
}

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

.input-modal:focus {
  border-color: var(--background-color-social-button);
}

.input-modal:focus + .icon-person-modal {
  fill: var(--background-color-social-button);
}

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

.comment-modal:focus {
  border-color: var(--background-color-social-button);
}

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

.person-modal-checkbox {
  margin-bottom: 24px;
}

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

.accept-checkbox:checked
  + .review-form-own-checkbox-label
  > .review-form-own-checkbox {
  background-color: var(--hover-color);
  fill: #f4f4fd;
  border: none;
}

.review-form-own-checkbox-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}
.modal-link {
  line-height: 1.33;
  text-decoration: underline;
  color: #4d5ae5;
}

.button-modal:hover,
.button-modal:focus {
  background-color: var(--hover-color);
}
