
/* ========================================
   TerraStroy — Global Footer
   ======================================== */

.tsFooter {
  --footerBackground: #202020;
  --footerText: #f3f3f3;
  --footerMuted: #d8d8d8;
  --footerAccent: #c68a5d;

  width: 100%;
  padding: 64px 0 58px;

  background: var(--footerBackground);
  color: var(--footerText);

  font-family: var(--fontBody, "Mulish", sans-serif);
}

/* ========================================
   Сетка
   ======================================== */

.tsFooterGrid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1fr);

  column-gap: clamp(32px, 4vw, 64px);
  row-gap: 40px;
  align-items: start;
}

.tsFooterColumn {
  min-width: 0;
}

/* ========================================
   Логотип и описание
   ======================================== */

.tsFooterLogo {
  display: inline-flex;
  align-items: center;

  max-width: 100%;
  min-height: 45px;
  margin-bottom: 19px;

  color: #ffffff;
  text-decoration: none;
}

.tsFooterLogo .terrastroyBrandLogo {
  display: block;

  width: auto;
  max-width: 100%;
  max-height: 45px;
  height: auto;

  object-fit: contain;
  object-position: left center;
}

.tsFooterLogoText {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.tsFooterBrandLine {
  max-width: 300px;
  margin: 0;

  color: var(--footerMuted);

  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

.tsFooterBrandLine + .tsFooterBrandLine {
  margin-top: 9px;
}

/* ========================================
   Заголовки колонок
   ======================================== */

.tsFooterHeading {
  margin: 0 0 24px;

  color: var(--footerText);

  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ========================================
   Навигация
   ======================================== */

.tsFooterLinks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 18px;
  margin: 0;
  padding: 0;

  list-style: none;
}

.tsFooterLinks li {
  margin: 0;
  padding: 0;
}

.tsFooterLinks a {
  display: inline-block;

  color: var(--footerText);

  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;

  text-decoration: none;

  transition:
    color 200ms ease,
    transform 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .tsFooterLinks a:hover {
    color: var(--footerAccent);
    transform: translateX(3px);
  }
}

/* ========================================
   Контакты
   ======================================== */

.tsFooterPhones {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tsFooterPhones a,
.tsFooterEmail {
  display: block;
  width: fit-content;
  max-width: 100%;

  color: var(--footerText);

  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;

  text-decoration: none;
  overflow-wrap: anywhere;

  transition: color 200ms ease;
}

.tsFooterEmail {
  margin-top: 24px;
}

.tsFooterPhones a:hover,
.tsFooterEmail:hover {
  color: var(--footerAccent);
}

/* ========================================
   Соцсети
   ======================================== */

.tsFooterSocials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  gap: 14px;
  margin-top: 24px;
}

.tsFooterSocial {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  overflow: hidden;
  border-radius: 50%;

  background: #ffffff;
  color: #202020;

  text-decoration: none;

  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 240ms ease;
}

.tsFooterSocialImage {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

@media (hover: hover) and (pointer: fine) {
  .tsFooterSocial:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgb(0 0 0 / 20%);
  }
}

/* ========================================
   Нижняя строка
   ======================================== */

.tsFooterBottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  column-gap: 26px;
  row-gap: 12px;

  margin-top: 32px;

  color: var(--footerMuted);

  font-size: 16px;
  line-height: 1.5;
}

.tsFooterCopyright {
  white-space: nowrap;
}

.tsFooterBottom a {
  color: var(--footerMuted);

  font-size: inherit;
  line-height: inherit;

  text-decoration: underline;
  text-underline-offset: 3px;

  transition: color 200ms ease;
}

.tsFooterBottom a:hover {
  color: var(--footerAccent);
}

/* ========================================
   Доступность
   ======================================== */

.tsFooter a:focus-visible {
  outline: 2px solid var(--footerAccent);
  outline-offset: 5px;
  border-radius: 3px;
}

/* ========================================
   До 1440px
   ======================================== */

@media (max-width: 1440px) {
  .tsFooter {
    padding: 58px 0 50px;
  }

  .tsFooterGrid {
    column-gap: 32px;
  }

  .tsFooterHeading {
    margin-bottom: 22px;
  }
}

/* ========================================
   До 1200px
   ======================================== */

@media (max-width: 1200px) {
  .tsFooterGrid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    column-gap: 40px;
    row-gap: 42px;
  }

  .tsFooterBottom {
    margin-top: 44px;
  }
}

/* ========================================
   До 700px
   ======================================== */

@media (max-width: 700px) {
  .tsFooter {
    padding: 42px 0 36px;
  }

  .tsFooterGrid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 36px 18px;
  }

  .tsFooterLogo {
    margin-bottom: 16px;
  }

  .tsFooterLogo .terrastroyBrandLogo {
    max-height: 38px;
  }

  .tsFooterLogoText {
    font-size: 21px;
  }

  .tsFooterBrandLine {
    font-size: 13px;
  }

  .tsFooterHeading {
    margin-bottom: 18px;
    font-size: 20px;
  }

  .tsFooterLinks {
    gap: 14px;
  }

  .tsFooterLinks a,
  .tsFooterPhones a,
  .tsFooterEmail {
    font-size: 14px;
  }

  .tsFooterEmail {
    margin-top: 18px;
  }

  .tsFooterSocials {
    gap: 10px;
    margin-top: 18px;
  }

  .tsFooterSocial {
    width: 38px;
    height: 38px;
  }

  .tsFooterBottom {
    flex-direction: column;
    align-items: flex-start;

    gap: 12px;
    margin-top: 42px;

    font-size: 13px;
  }

  .tsFooterCopyright {
    white-space: normal;
  }
}

/* Узкие телефоны */

@media (max-width: 420px) {
  .tsFooterGrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tsFooterHeading {
    margin-bottom: 14px;
  }
}

/* ========================================
   Reduced motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .tsFooter a,
  .tsFooterSocial {
    transition: none;
  }
}


.tsFooterDeveloper{display:inline-flex;align-items:center;gap:14px;margin-left:auto;text-decoration:none;color:inherit;font-size:12px}.tsFooterDeveloper img{display:block;width:auto;max-width:160px;height:30px;object-fit:contain;filter:grayscale(1);transition:filter .25s,transform .25s}.tsFooterDeveloper:hover img{filter:grayscale(0);transform:translateY(-2px)}@media(max-width:700px){.tsFooterDeveloper{margin:14px 0 0}}

/* Compact developer credit, without link underline. */
.tsFooterBottom a.tsFooterDeveloper {
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  text-transform: none;
  gap: 8px;
  white-space: nowrap;
}
.tsFooterBottom a.tsFooterDeveloper:hover,
.tsFooterBottom a.tsFooterDeveloper:focus-visible { text-decoration: none; }
.tsFooterDeveloper img { max-width: 105px; height: 20px; transition: filter .18s ease; }
.tsFooterDeveloper:hover img { transform: none; }
.tsFooterBottom > a:not(.tsFooterDeveloper) { font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .tsFooterDeveloper img { transition: none; } }

/* Footer legal navigation — muted, without underline. */
.tsFooterBottom a.tsFooterLegalLink,
.tsFooterBottom a.tsFooterLegalLink:visited {
  color: rgba(255,255,255,.52);
  text-decoration: none;
  text-underline-offset: initial;
  font-size: 12px;
  font-weight: 400;
  transition: color .18s ease;
}
.tsFooterBottom a.tsFooterLegalLink:hover,
.tsFooterBottom a.tsFooterLegalLink:focus-visible {
  color: rgba(255,255,255,.88);
  text-decoration: none;
}

/* Legal links: readable, muted, without underline, including visited state. */
.tsFooter .tsFooterBottom { min-width: 0; max-width: 100%; gap: 12px 22px; }
.tsFooter .tsFooterBottom > * { max-width: 100%; }
.tsFooter .tsFooterBottom a.tsFooterLegalLink,
.tsFooter .tsFooterBottom a.tsFooterLegalLink:visited {
  color: rgba(255,255,255,.56);
  text-decoration: none !important;
  text-transform: none;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.tsFooter .tsFooterBottom a.tsFooterLegalLink:hover,
.tsFooter .tsFooterBottom a.tsFooterLegalLink:focus-visible {
  color: rgba(255,255,255,.92);
  text-decoration: none !important;
}
@media (max-width: 700px) {
  .tsFooter .tsFooterBottom { align-items: flex-start; }
  .tsFooter .tsFooterBottom a.tsFooterDeveloper { margin-left: 0; }
}
