/* Подвал Studentix (переработка 2026-10-01, docs/night/reports/footer-day.md).
   Светлый Apple-UI по docs/DESIGN.md: логотип, 4 колонки (Виды работ, Сервис, Документы, Контакты), нижняя строка с реквизитами.
   Подключается из modules/stx-footer.tpl, поэтому работает на всех страницах, даже где нет tokens.css: у каждой переменной есть запасное значение.
   Классы .stx-foot__* не пересекаются со старыми .footer__* из style.min.css и header.css. */

.stx-foot {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  background: var(--stx-surface-2, #F8FAFF);
  border-top: 1px solid var(--stx-separator, rgba(27, 36, 48, .08));
  font-family: "Inter", var(--stx-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: var(--stx-text-2, #566274);
  text-align: left;
}
/* мягкое свечение снизу (как footer__bg.webp, но без краёв картинки и без лишнего запроса) */
.stx-foot::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(55% 70% at 50% 115%, rgba(47, 107, 255, .10), rgba(47, 107, 255, 0) 70%),
    radial-gradient(35% 45% at 12% 105%, rgba(120, 170, 255, .10), rgba(120, 170, 255, 0) 70%),
    radial-gradient(35% 45% at 88% 105%, rgba(120, 170, 255, .10), rgba(120, 170, 255, 0) 70%);
  pointer-events: none;
}

.stx-foot__in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 28px;
}

.stx-foot a {
  display: inline;
  color: inherit;
  text-decoration: none;
  transition: color var(--stx-dur, 180ms) var(--stx-ease, ease);
}
.stx-foot a:hover { color: var(--stx-accent-text, #1F52D9); }
.stx-foot a:focus-visible,
.stx-foot summary:focus-visible {
  outline: 3px solid var(--stx-accent-ring, rgba(47, 107, 255, .3));
  outline-offset: 2px;
  border-radius: 6px;
}
.stx-foot :where(p) { margin: 0; }
.stx-foot :where(ul) { list-style: none; margin: 0; padding: 0; }

/* --- верх: логотип и одна строка о сервисе --- */
.stx-foot__top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 32px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--stx-separator, rgba(27, 36, 48, .08));
}
.stx-foot a.stx-foot__logo { display: inline-flex; align-items: center; flex: none; min-height: 44px; line-height: 0; }
.stx-foot__logo img { display: block; width: 140px; height: auto; }
.stx-foot__tagline {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* --- колонки --- */
.stx-foot__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr);
  gap: 32px;
}
.stx-foot__h {
  display: block;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--stx-text, #1B2430);
  list-style: none;
}
.stx-foot__h::-webkit-details-marker { display: none; }
.stx-foot__h::marker { content: ""; }
.stx-foot__chev { display: none; }
.stx-foot__list { display: flex; flex-direction: column; gap: 2px; }
.stx-foot__list a {
  display: inline-block;
  padding: 5px 0;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
/* виды работ: все 14 посадочных + хаб, в две колонки (п. 3 правок 2026-10-07) */
.stx-foot__grid { grid-template-columns: minmax(0, 2.2fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.15fr); }
.stx-foot__list--types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); grid-auto-flow: column; gap: 2px 24px; }
.stx-foot .stx-foot__more { color: var(--stx-accent-text, #1F52D9); font-weight: 500; }
.stx-foot .stx-foot__more:hover { color: var(--stx-accent-hover, #2258EE); }

/* на компьютере колонки всегда раскрыты: заголовок не кликается */
@media (min-width: 641px) {
  .stx-foot details > summary { pointer-events: none; cursor: default; }
}

.stx-foot .stx-foot__contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--stx-text, #1B2430);
  overflow-wrap: anywhere;
}
.stx-foot__ico {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--stx-accent, #2F6BFF);
}
.stx-foot__note {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
}

/* --- нижняя строка --- */
.stx-foot__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--stx-separator, rgba(27, 36, 48, .08));
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0;
}
.stx-foot__legal { color: var(--stx-text-2, #566274); }
.stx-foot__seg { white-space: nowrap; }
.stx-foot__sep { margin: 0 4px 0 8px; color: var(--stx-text-3, #8A94A6); }
.stx-foot__dot { margin: 0 8px; color: var(--stx-text-3, #8A94A6); }
.stx-foot__disclaimer { margin-top: 4px; color: var(--stx-text-2, #566274); }

/* --- планшет: две колонки ссылок в ряд --- */
@media (max-width: 960px) {
  .stx-foot__in { padding: 48px 24px 28px; }
  .stx-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .stx-foot__grid > .stx-foot__col:first-child { grid-column: 1 / -1; }
  .stx-foot__list--types { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); }
}

/* --- телефон: аккордеон, зоны нажатия 44 px --- */
@media (max-width: 640px) {
  .stx-foot__in { padding: 36px 16px 24px; }
  .stx-foot__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 24px;
    margin-bottom: 8px;
  }
  .stx-foot__logo img { width: 124px; }
  .stx-foot__grid { display: block; }
  .stx-foot__col { border-bottom: 1px solid var(--stx-separator, rgba(27, 36, 48, .08)); }
  .stx-foot details > summary.stx-foot__h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    margin: 0;
    font-size: 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .stx-foot__chev {
    display: block;
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--stx-text-2, #566274);
    transition: transform var(--stx-dur-slow, 220ms) var(--stx-ease, ease);
  }
  .stx-foot details[open] > summary .stx-foot__chev { transform: rotate(180deg); }
  .stx-foot details .stx-foot__list { padding: 0 0 10px; gap: 0; }
  .stx-foot details .stx-foot__list--types { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); gap: 0 16px; }
  .stx-foot__list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    font-size: 16px;
  }
  .stx-foot__col--contacts { padding: 16px 0 18px; border-bottom: 0; }
  .stx-foot__col--contacts .stx-foot__h { margin-bottom: 2px; font-size: 16px; }
  .stx-foot .stx-foot__contact { display: inline-flex; }
  .stx-foot__bottom { margin-top: 8px; padding-top: 16px; }
  .stx-foot__sep { display: none; }
  .stx-foot__legal .stx-foot__seg { display: block; }
  .stx-foot__legal a.stx-foot__seg { display: flex; width: max-content; }
  .stx-foot__legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    vertical-align: middle;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stx-foot a,
  .stx-foot__chev { transition: none; }
}
