:root {
  --footer-text-color: #e7e9fc;
  --title-subtitle-color: #2e2f42;
  --hero-title-btn-color: #ffffff;
  --header-contact-color: #434455;
  --logo-btnbck-color: #4d5ae5;
  --navy-blue-color: #2e2f42;
  --pressed-state-color: #404bbf; /*hover focus*/
  --main-text-color: #434455;
  --main-background-color: #ffffff;
  --background-color: #f4f4fd;
  --hero-background-color: #2e2f42;
  --icon-fill: #8e8f99;
  --success: #31d0aa;
  --card-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);
  --hero-btn-box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  --filter-btn-box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 2px 1px rgba(0, 0, 0, 0.08),
    0px 2px 2px rgba(0, 0, 0, 0.12);
  --cubic-besier: cubic-bezier(0.4, 0, 0.2, 1);
  --modal-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  --modal-overlay: rgba(46, 47, 66, 0.4);
  --mob-menu-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);
}

/* ----------------------------------RESET---------------------------- */

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

ul {
  margin: 0;
  padding: 0;
}

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

button {
  cursor: pointer;
  border: none;
}

.no-scroll {
  overflow: hidden;
}

/* --------------BODY-------------------- */
body {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.37;
  background-color: var(--main-background-color, #ffffff);
  color: var(--main-text-color, #434455);
}

/* ----------default class------------ */

.container {
  max-width: 428px;
  min-width: 290px;
  padding: 0 15px;

  margin-left: auto;
  margin-right: auto;
}

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

.list {
  list-style: none;
}

.link {
  text-decoration: none;
  font-style: normal;
}

.header-link {
  line-height: 1.5;
  letter-spacing: 0.02em;

  transition: color 250ms var(--cubic-besier);
}

.header-link:is(:hover, :focus) {
  color: var(--pressed-state-color, #404bbf);
}

.title {
  margin-bottom: 72px;

  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: var(--title-subtitle-color, #2e2f42);
}

.subtitles {
  margin-bottom: 8px;

  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--title-subtitle-color, #2e2f42);
}

.text {
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--main-text-color, #434455);
}

.logo {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--logo-btnbck-color, #4d5ae5);
}

.btn {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border-radius: 4px;
}

.btn:is(:hover, :focus) {
  background-color: var(--pressed-state-color, #404bbf);
}

.section {
  min-width: 290px;
  padding-top: 96px;
  padding-bottom: 96px;
}

.advantages-list,
.work-list,
.team-list {
  display: flex;
  flex-direction: column;
  row-gap: 72px;
}

/* --------------------------------HEADER-------------------------- */

.header {
  border-bottom: 1px solid #e7e9fc;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: block;
  padding: 24px 0 23px;
}

.header-logo-studio {
  color: var(--title-subtitle-color, #2e2f42);
}

/* -----------------------------menu-burger------------------------- */
.menu-open-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  padding: 0;
  margin: 0;
  background-color: unset;
}

.mob-menu {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 80px 40px 80px 40px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--hero-title-btn-color);
  box-shadow: var(--mob-menu-box-shadow);

  transform: translateX(110%);
  transition: transform 250ms ease-in-out;
}

.mob-menu.is-open {
  transform: translateX(0);
}

.mob-page-navigation {
  margin-bottom: 60px;
}

.mob-contact-item:not(:last-child),
.mob-nav-item:not(:last-child) {
  margin-bottom: 40px;
}

.mob-nav-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--navy-blue-color);
}

.mob-current {
  color: var(--pressed-state-color);
}

.mob-contact-list {
  margin-bottom: 48px;
}

.mob-contact-phone {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #4d5ae5;
}

.mob-contact-mail {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--main-text-color);
}

.mob-soc-list {
  display: flex;
  justify-content: space-between;
}

/* ---------------------------MAIN-------------------------- */
/* ---------------------------HERO------------------------- */
.hero-section {
  min-width: 290px;
  max-width: 428px;
  margin-left: auto;
  margin-right: auto;

  padding: 112px 0;
  background-color: var(--hero-background-color, #2e2f42);
  background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url('../images/people-office-mob.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
@media screen and (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .hero-section {
    background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
      url('../images/people-office-mob@2x.jpg');
  }
}

.hero-title {
  max-width: 320px;
  margin: 0 auto 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  color: var(--hero-title-btn-color, #ffffff);
}

.hero-btn {
  display: block;
  margin-right: auto;
  margin-left: auto;
  padding: 16px 32px;
  box-shadow: var(--hero-btn-box-shadow);
  color: var(--hero-title-btn-color, #ffffff);
  background-color: var(--logo-btnbck-color, #4d5ae5);
  transition: background-color 250ms var(--cubic-besier);
}

/* ---------------TEAM SECTION 3-------------- */

.team {
  background-color: var(--background-color, #f4f4fd);
}

.team-item {
  background-color: var(--main-background-color, #ffffff);
}

.team-item-wrapper {
  padding: 32px 0;

  box-shadow: var(--card-box-shadow);
  border-radius: 0px 0px 4px 4px;
}

.team-subtitle {
  text-align: center;
}

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

/* ----------------------soc-icons---team-items------------ */

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

.soc-item {
  width: 40px;
  height: 40px;
}

.soc-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--logo-btnbck-color, #4d5ae5);
  transition: background-color 250ms var(--cubic-besier);
}

.soc-icon {
  fill: var(--background-color, #f4f4fd);
}

.soc-link:hover,
.soc-link:focus {
  background-color: var(--pressed-state-color, #404bbf);
}

/* ----------------------CUSTOMERS-------------------- */

.customers-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 72px;
}

.customers-item {
  flex-basis: calc((100% - 16px) / 2);
  /* flex-basis: calc((100% - 24px * 5) / 6); */
  height: 88px;
}
.customers-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--icon-fill, #8e8f99);
  border-radius: 4px;
  color: var(--icon-fill, #8e8f99);

  transition: color 250ms var(--cubic-besier), border-color 250ms var(--cubic-besier);
}

.customers-link:is(:hover, :focus) {
  border-color: var(--pressed-state-color, #404bbf);
  color: var(--pressed-state-color, #404bbf);
}

.customers-icon {
  fill: currentColor;
}

/* ------------FOOTER------------- */

.footer {
  min-width: 290px;
  padding-top: 96px;
  padding-bottom: 96px;
  background: var(--hero-background-color, #2e2f42);
}

.container-wrap {
  display: flex;
  flex-direction: column;
}

.footer-logo-text-wrapper {
  max-width: 264px;
  margin: 0 auto 72px;
}

.footer-logo-link {
  display: block;
  margin-bottom: 16px;
  text-align: center;
}

.footer-logo-studio {
  color: var(--background-color, #f4f4fd);
}

.footer-text {
  color: var(--footer-text-color, #e7e9fc);
}

/* --------------------footer-soclinks--------------- */
.footer-soc-wrapper {
  margin: 0 auto 72px;
}

.footer-soc-title {
  margin-bottom: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--hero-title-btn-color, #ffffff);
}

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

.footer-soc-link:is(:hover, :focus) {
  background-color: var(--success, #31d0aa);
}

/* --------------------footer-form-subscribe--------------- */
.subscribe-title {
  margin-bottom: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--hero-title-btn-color, #ffffff);
}

.subscribe-form {
  display: flex;
  flex-direction: column;
}
.email-wrap {
  margin-bottom: 16px;
}

.subscribe-input {
  width: 100%;
  height: 40px;
  background-color: inherit;
  border: 1px solid var(--main-background-color, #ffffff);
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
  border-radius: 4px;
  outline: transparent;
  padding: 8px 16px;

  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--hero-title-btn-color, #ffffff);
}

.subscribe-input::placeholder {
  color: var(--hero-title-btn-color, #ffffff);
}

.subscribe-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 24px;
  font-weight: 500;
}

.subscribe-btn-icon {
  margin-left: 16px;
}

/* -------------PORFOLIO FILTER----------- */

.gallery-section {
  padding-top: 46px;
  padding-bottom: 46px;
}

.filter-menu-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 16px;
  margin-bottom: 48px;
}

.menu-btn {
  padding: 8px 16px;

  color: var(--logo-btnbck-color, #4d5ae5);
  background-color: var(--background-color, #f4f4fd);
  border: 1px solid var(--footer-text-color, #e7e9fc);

  transition: color 250ms var(--cubic-besier), box-shadow 250ms var(--cubic-besier),
    border 250ms var(--cubic-besier), background-color 250ms var(--cubic-besier);
}

.menu-btn:is(:hover, :focus) {
  border-color: var(--pressed-state-color);
  box-shadow: var(--filter-btn-box-shadow);
  color: var(--main-background-color, #ffffff);
}

/* ------------GALLERY------------ */

.gallery-item-wrapper {
  padding-top: 32px;
  padding-bottom: 32px;
  padding-left: 16px;

  border: 1px solid var(--footer-text-color, #e7e9fc);
  border-top: none;
}

.gallery-link {
  display: block;
  transition: box-shadow 250ms var(--cubic-besier);
}
.gallery-link:is(:hover, :focus) {
  box-shadow: var(--card-box-shadow);
}

.gallery-link:is(:hover, :focus) .overlay {
  transform: translateY(0);
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
}
.overlay {
  position: absolute;

  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform: translateY(100%);
  background-color: var(--logo-btnbck-color);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.overlay-description {
  position: absolute;
  padding: 40px 32px 0;

  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--background-color, #f4f4fd);
}

/* ------------------BACKDROP--------------- */

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  overflow-y: auto;
  background-color: rgba(46, 47, 66, 0.4);
  transition: opacity 700ms var(--cubic-besier), visibility 700ms var(--cubic-besier);
}

.modal {
  position: absolute;
  width: calc(100% - 30px);
  min-height: 584px;
  top: 50%;
  left: 50%;
  padding: 72px 16px 24px;

  transform: translate(-50%, -50%) scale(1);
  transition: transform 700ms var(--cubic-besier);

  background-color: #fcfcfc;
  box-shadow: var(--modal-box-shadow);
  border-radius: 4px;
}

.backdrop.is-hidden .modal {
  transform: translate(-50%, -50%) scale(1.25);
}

.button-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--hero-background-color, #2e2f42);
  width: 24px;
  height: 24px;
  background-color: var(--footer-text-color, #e7e9fc);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50% 50%;
  transition: color 250ms var(--cubic-besier), background-color 250ms var(--cubic-besier);
}

.button-close:is(:hover, :focus) {
  color: var(--hero-title-btn-color);
}
.icon-close {
  fill: currentColor;
}
.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ----------------modal-FORM------------------ */

.modal-title {
  margin-bottom: 16px;

  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--hero-background-color, #2e2f42);
}

.modal-field {
  line-height: 0;
  margin-bottom: 8px;
}

.modal-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--icon-fill, #8e8f99);
}

.input-wrap {
  position: relative;
}

.modal-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--modal-overlay);
  border-radius: 4px;
  padding-left: 38px;
  outline: transparent;
  transition: border 250ms var(--cubic-besier);

  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--hero-background-color);
}

.modal-input:focus {
  border: 1px solid var(--logo-btnbck-color, #4d5ae5);
}

.modal-input:focus + .modal-icon {
  fill: var(--logo-btnbck-color);
}

.modal-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  fill: var(--navy-blue-color);
  transition: fill 350ms var(--cubic-besier);
}

.modal-comment {
  margin-bottom: 18px;
}
.modal-textarea {
  height: 120px;
  padding: 8px 16px;
  resize: none;
}

.modal-textarea::placeholder {
  color: var(--modal-overlay);
}

.modal-privacy {
  margin-bottom: 24px;
}

.modal-privacy-label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.span-check {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--modal-overlay);
  border-radius: 2px;
  cursor: pointer;
  margin-right: 8px;
  fill: transparent;
  transition: border 250ms var(--cubic-besier);
}

.modal-privacy-input:checked + label .span-check {
  background-color: var(--pressed-state-color, #404bbf);
  border-color: var(--pressed-state-color, #404bbf);
  fill: var(--background-color);
}
.modal-privacy-input:focus + label .span-check {
  border-color: var(--pressed-state-color, #404bbf);
}

.privacy-link {
  color: var(--logo-btnbck-color, #4d5ae5);
}
.modal-button {
  height: 56px;
  min-width: 169px;
}
