/* The client asked for dark text: white was hard to read on the beige background */
.footer {
  color: var(--color-dark);
  background-color: var(--color-beige);
}

.footer .contacts {
  color: inherit;
}

/* phone.svg is white for the hero; here it is tinted to --color-dark */
.footer .contacts__icon img {
  filter: brightness(0) invert(14%);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  min-height: 31.9rem;
  padding: 5.5rem 29.8rem 1.55rem 27.4rem;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 25.1rem;
  padding-top: 0.4rem;
}

.footer__logo {
  width: 25.1rem;
  height: auto;
}

.footer__copy {
  margin: 11.65rem 0 0 0.7rem;
  font-size: max(1.2rem, 11px);
  line-height: 1.25;
}

.footer__info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}

/* Messenger links sit inside .contacts, to the left of the handset icon */
.footer__row {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
}

.footer .contacts .messengers__link {
  margin-top: 0.4rem;
}

/* The client asked for one right edge for all lines (the design had the hours sticking out) and more air between the lines */
.footer__hours {
  min-width: 19.3rem;
  max-width: 100%;
  margin: 1.8rem 0 1rem;
  text-align: right;
  font-size: max(1.6rem, 13px);
  font-weight: 500;
  line-height: 1.221;
  letter-spacing: -0.02em;
}

.footer__hours small {
  font-size: 0.625em;
  line-height: 1;
  letter-spacing: -0.02em;
}

.footer__email {
  display: block;
  font-size: max(1rem, 10px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.footer__policy {
  margin-top: 0.4rem;
  margin-bottom: 1rem;
  font-size: max(0.7rem, 7px);
  font-weight: 500;
  line-height: 1.221;
  letter-spacing: -0.02em;
  text-align: right;
  text-decoration: underline;
}

.footer__legal {
  max-width: 40rem;
  margin-top: 0.55rem;
  font-size: max(1rem, 9px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: right;
}

/* Tablet & mobile
   ========================================================================== */

@media (max-width: 1279.98px) {
  .footer__inner {
    flex-wrap: wrap;
    align-items: flex-start;
    min-height: 0;
    padding: 4.8rem var(--gutter);
  }

  .footer__brand {
    width: auto;
    padding-top: 0;
  }

  .footer__logo {
    width: 18rem;
  }

  .footer__copy {
    margin: 2.4rem 0 0;
  }

  .footer__hours {
    min-width: 0;
    margin: 1.6rem 0 0;
    font-size: 1.6rem;
    text-align: right;
  }

  .footer__email {
    margin-top: 0.8rem;
    font-size: 1.4rem;
  }

  .footer__policy {
    margin-top: 1.6rem;
    font-size: 1.2rem;
  }

  .footer__legal {
    margin-top: 1.2rem;
    font-size: 1.2rem;
    line-height: 1.3;
  }
}

@media (max-width: 767.98px) {
  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__brand {
    order: 2;
  }

  .footer__info {
    align-items: center;
  }

  .footer__hours,
  .footer__policy,
  .footer__legal {
    text-align: center;
  }

  .footer__hours small {
    font-size: 1.2rem;
  }

  /* Thin one-line links get a finger-sized tap area without moving the text */
  .footer__email,
  .footer__policy {
    padding-block: 1rem;
  }

  .footer .contacts__icon {
    position: relative;
  }

  .footer .contacts__icon::after {
    content: "";
    position: absolute;
    inset: -0.7rem;
  }
}

@media (max-width: 500px) {
  .footer .contacts {
    flex-wrap: wrap;
    justify-content: center;
  }

  .contacts__phone {
    align-items: center;
  }
}
