/* Legal/content layout polish — 2026-08-31 */

/* Pages updated in the legal pass intentionally load this file after styles.css. */

/* The simplified legal/content headers do not include the inline SVG mark.
   Restore the same visual weight without duplicating markup. */
.site-header .brand:not(:has(.brand__mark))::before,
.footer .brand:not(:has(.brand__mark))::before {
  content: "";
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  background: #fff url("/favicon.svg") center / 36px 36px no-repeat;
}

.footer .brand:not(:has(.brand__mark))::before {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 13px;
}

/* script.js creates a VK clone for plain Telegram links. On these pages the
   primary CTA is intentionally a single generic "Написать менеджеру" button. */
.header__actions > [data-vk-contact="true"],
.mobile-menu__contact[data-vk-contact="true"] {
  display: none !important;
}

/* Keep long-form pages centred and comfortably readable. */
.page-hero > .container.narrow {
  width: min(calc(100% - 40px), 980px);
  max-width: 980px;
  margin-inline: auto;
}

main > .section > .article-content.narrow.prose,
main > .section > .article-content.narrow {
  width: min(calc(100% - 40px), 980px);
  max-width: 980px;
  margin-inline: auto;
}

.article-content {
  box-shadow: 0 18px 50px rgba(16, 20, 18, 0.055);
}

.article-content p,
.article-content li {
  overflow-wrap: anywhere;
}

.article-content a {
  overflow-wrap: anywhere;
}

/* Balance the legalised footer: two real columns rather than an auto-width
   legal string squeezing the description into a tall narrow strip. */
.footer__grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr) !important;
  gap: 24px 56px;
}

.footer__nav {
  grid-column: 1 / -1;
}

.footer__disclaimer {
  max-width: 520px;
  line-height: 1.65;
}

.footer__copy {
  width: min(100%, 680px);
  max-width: 680px;
  justify-self: end;
  text-align: left;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.footer__legal-line {
  display: block;
  margin-bottom: 4px;
}

.footer__legal-line br {
  display: none;
}

.footer__copy a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.28);
  text-underline-offset: 3px;
}

@media (max-width: 1040px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 22px 34px;
  }

  .footer__copy {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .page-hero > .container.narrow,
  main > .section > .article-content.narrow.prose,
  main > .section > .article-content.narrow {
    width: min(calc(100% - 28px), 980px);
  }

  .page-hero h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 11vw, 3.35rem);
    line-height: 0.98;
    overflow-wrap: break-word;
  }

  .page-hero p:not(.eyebrow) {
    font-size: 1rem;
    line-height: 1.6;
  }

  .article-content {
    padding: 24px 20px;
  }

  .article-content section {
    padding-block: 26px;
  }

  .article-content h2 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
    line-height: 1.12;
  }

  .article-content p,
  .article-content li {
    font-size: 1rem;
    line-height: 1.68;
  }

  .footer__grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .footer__links {
    justify-content: flex-start;
  }

  .footer__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    padding-top: 2px;
  }

  .footer__nav a {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .footer__disclaimer,
  .footer__copy {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    text-align: left;
  }

  .footer__copy {
    padding-top: 2px;
  }
}

@media (max-width: 420px) {
  .page-hero > .container.narrow,
  main > .section > .article-content.narrow.prose,
  main > .section > .article-content.narrow {
    width: min(calc(100% - 20px), 980px);
  }

  .page-hero h1 {
    font-size: clamp(2.05rem, 10.5vw, 2.75rem);
  }

  .article-content {
    padding: 20px 16px;
    border-radius: 10px;
  }

  .article-content h2 {
    font-size: 1.4rem;
  }

  .footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }

  .footer__disclaimer,
  .footer__copy {
    font-size: 0.92rem;
  }
}
