/* =========================================================
   CONTACTS PAGE
   ========================================================= */

.contacts-page__main {
  display: flex;
  flex-direction: column;

  min-height: 100vh;
}


.contacts-page__main > .site-footer {
  flex: 0 0 auto;

  width: 100%;
}


/* =========================================================
   PAGE
   ========================================================= */

.contacts-page {
  position: relative;

  flex: 1 0 auto;

  min-height: 500px;

  overflow: hidden;

  padding:
    92px
    var(--page-right-gap, 43px)
    68px
    var(--page-left-gap, 24px);

  color: var(--text, #0d0d0d);

  background-image:
    url("/images/contacts.webp");

  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}


/* =========================================================
   CONTENT
   ========================================================= */

.contacts-page__content {
  position: relative;
  z-index: 2;

  width: min(100%, 620px);
  min-width: 0;
}


.contacts-page h1 {
  max-width: 620px;

  margin: 0;

  font-size:
    clamp(
      38px,
      3.1vw,
      52px
    );

  font-weight: 300;
  line-height: 1.05;

  letter-spacing: -.6px;
}


/* =========================================================
   TEXT
   ========================================================= */

.contacts-page__text {
  width: min(100%, 520px);

  margin-top: 62px;
}


.contacts-page__text p {
  margin: 0;

  font-size: 16px;
  font-weight: 300;
  line-height: 1.35;
}


.contacts-page__text p + p {
  margin-top: 24px;
}


.contacts-page__text a {
  color: inherit;
}


.contacts-page__text a[href^="mailto"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* =========================================================
   <= 1280px
   ========================================================= */

@media (max-width: 1280px) {

  .contacts-page {
    padding:
      76px
      var(--page-right-gap, 28px)
      58px
      var(--page-left-gap, 20px);
  }

}


/* =========================================================
   <= 1024px
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .contacts-page {
    min-height:
      calc(
        100vh -
        var(--mobile-header-height, 76px)
      );

    padding:
      56px
      var(--tablet-page-gap, 20px)
      56px;

    background-position: 44% center;
  }


  .contacts-page h1 {
    font-size:
      clamp(
        34px,
        5vw,
        46px
      );
  }


  .contacts-page__text {
    width: min(100%, 460px);

    margin-top: 44px;
  }

}


/* =========================================================
   <= 760px
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

  .contacts-page {
    min-height: 600px;

    padding:
      38px
      var(--tablet-page-gap, 20px)
      46px;

    /*
     * Обрезаем desktop-изображение так,
     * чтобы текст оставался на светлой части.
     */
    background-position: left center;
  }


  .contacts-page__content {
    width: 100%;
    max-width: none;
  }


  .contacts-page h1 {
    width: 100%;
    max-width: 420px;

    font-size:
      clamp(
        31px,
        7vw,
        40px
      );
  }


  .contacts-page__text {
    width: min(72%, 390px);

    margin-top: 34px;
  }


  .contacts-page__text p {
    font-size: 15px;
  }


  .contacts-page__text p + p {
    margin-top: 22px;
  }

}


/* =========================================================
   <= 480px
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

  .contacts-page {
    min-height: 570px;

    padding:
      34px
      var(--mobile-page-gap, 12px)
      42px;

    background-position: 16% center;
  }


  .contacts-page h1 {
    max-width: 300px;

    font-size: 34px;
    line-height: 1.05;
  }


  .contacts-page__text {
    width: min(76%, 300px);

    margin-top: 32px;
  }


  .contacts-page__text p {
    font-size: 14px;
    line-height: 1.4;
  }


  .contacts-page__text p + p {
    margin-top: 20px;
  }

}


/* =========================================================
   <= 360px
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

  .contacts-page h1 {
    font-size: 30px;
  }


  .contacts-page__text {
    width: 80%;
  }

}