/* Сквозной подвал (footer.js + footer.html). Подключать после css/site.css */

/* main.element — align-items: flex-start; без stretch #main-footer сжимается по ширине контента */
#main-footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  flex-shrink: 0;
}

.page-shell > #main-footer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------------------
   Сквозной подвал: пилюли, контакты справа, юридический блок (fine print)
   Палитра: --color-brand-secondary / --color-brand-primary (--font-sans)
   --------------------------------------------------------------------------- */
.pto-home-footer {
  /* Графит с холодным синим оттенком (не «чистый» navy) */
  --fh-navy: #242b35;
  --fh-blue: var(--color-brand-primary, #3448f0);
  --fh-line: rgba(255, 255, 255, 0.1);
  --fh-zone-divider: rgba(255, 255, 255, 0.16);
  --fh-muted: rgba(255, 255, 255, 0.55);
  --fh-text: rgba(255, 255, 255, 0.92);
  --fh-content-max: 1405px;

  position: relative;
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
  box-sizing: border-box;
  margin: 0 auto;
  font-family: var(--font-sans);
  background: var(--fh-navy);
  color: var(--fh-text);
}

.pto-home-footer__main {
  padding: clamp(1.35rem, 3vw, 1.85rem) clamp(1.25rem, 5vw, 90px)
    clamp(1.05rem, 2.4vw, 1.45rem);
  border-bottom: 1px solid var(--fh-zone-divider);
}

.pto-home-footer__hero {
  max-width: var(--fh-content-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1.2rem, 3vw, 2rem);
}

.pto-home-footer__hero-left {
  flex: 1 1 min(42rem, 100%);
  min-width: 0;
}

.pto-home-footer__logo-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0 0.35rem;
  margin-bottom: 0.1rem;
  text-decoration: none;
  transform: translateY(-4px);
}

.pto-home-footer__logo-chip .logo-img-footer {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.pto-home-footer__pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.62rem;
  align-items: flex-start;
}

.pto-home-footer__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  min-height: 2.5rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.pto-home-footer__pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.14);
}

.pto-home-footer__pill:focus-visible {
  outline: 2px solid var(--fh-blue);
  outline-offset: 3px;
}

.pto-home-footer__hero-contacts {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 2vw, 1.2rem);
  align-items: flex-end;
  text-align: right;
}

.pto-home-footer__tel-block + .pto-home-footer__tel-block {
  padding-top: 0.35rem;
  border-top: 1px solid var(--fh-line);
}

@media (max-width: 720px) {
  .pto-home-footer__hero-contacts {
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }
}

.pto-home-footer__tel-num {
  display: block;
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
  text-decoration: none;
  line-height: 1.25;
}

.pto-home-footer__tel-num:hover {
  color: var(--fh-blue);
}

.pto-home-footer__mail-line {
  display: block;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  word-break: break-all;
}

.pto-home-footer__mail-line:hover {
  color: var(--fh-blue);
}

.pto-home-footer__tel-note {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--fh-muted);
}

.pto-home-footer__legal-zone {
  padding: clamp(0.7rem, 1.8vw, 0.95rem) clamp(1.25rem, 5vw, 90px);
}

.pto-home-footer__legal-inner {
  max-width: var(--fh-content-max);
  margin: 0 auto;
}

.pto-home-footer__legal-links {
  margin: 0 0 clamp(0.65rem, 2vw, 0.95rem);
  font-size: 0.6875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
}

.pto-home-footer__legal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.75rem, 2.2vw, 1.35rem);
}

.pto-home-footer__skolkovo-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 100%;
}

.pto-home-footer__skolkovo-wrap .sko-logo {
  display: block;
  height: 36px;
  width: auto;
  flex-shrink: 0;
  opacity: 0.9;
  transform: translateY(-4px);
}

.pto-home-footer__legal-stack {
  flex: 1 1 min(32rem, 100%);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
}

.pto-home-footer__legal-stack .pto-home-footer__copy {
  margin: 0;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.35);
}

.pto-home-footer__legal-login {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  align-self: flex-start;
  transform: translateY(-5px);
}

.pto-home-footer__login-btn.btn {
  flex-shrink: 0;
  padding: 0.5rem 1.1rem;
  font-size: 0.8125rem;
}

.pto-home-footer__login-btn.btn:hover {
  text-decoration: none;
}

.pto-home-footer__disclaimer {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.01em;
}

@media (max-width: 520px) {
  .pto-home-footer__legal-foot {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .pto-home-footer__skolkovo-wrap {
    align-self: center;
    order: -1;
  }

  .pto-home-footer__skolkovo-wrap .sko-logo {
    transform: translateY(-6px);
  }

  .pto-home-footer__legal-stack {
    align-items: center;
  }

  .pto-home-footer__legal-login {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .pto-home-footer__login-btn.btn {
    width: 100%;
    max-width: 20rem;
  }
}

.pto-home-footer__legal-links a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.pto-home-footer__legal-links a:hover {
  color: #fff;
}

.pto-home-footer__dot {
  margin: 0 0.25rem;
  color: rgba(255, 255, 255, 0.22);
}



@media (prefers-reduced-motion: reduce) {
  .pto-home-footer__pill {
    transition: none;
  }
}
