/* ============================================================
   ∞ 8эйт — UNIFIED FOOTER CSS  v2
   Подключается на ВСЕХ 4 сайтах холдинга после основного CSS сайта.

   v2: !important на критичные цвета фона/текста — иначе локальный
   main.css сайта (с собственными правилами для .footer / .site-footer
   / общего body color) перекрывает наш фон.
   ============================================================ */

/* Глобальные переменные холдинга (дублируем для надёжности — на случай
   если header-unified.css не подключился) */
.footer {
  --eit-ink: #15140f;
  --eit-ink-soft: #2a2820;
  --eit-on-dark: #faf7f0;
  --eit-on-dark-mute: #a5a29a;
  --eit-font-display: 'Onest', system-ui, sans-serif;
  --eit-font-serif: 'Cormorant Garamond', serif;
  --eit-font-mono: 'JetBrains Mono', ui-monospace, monospace;

  background: #15140f !important;
  color: #faf7f0 !important;
  padding: 56px 0 36px !important;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--eit-font-display);
  margin: 0;
}
.footer * { box-sizing: border-box; }
.footer .inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  background: transparent !important;
}
@media (max-width: 640px) {
  .footer .inner { padding: 0 20px; }
}

/* ============== MAIN GRID — 4 columns (brand + 3 lists) ============== */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: transparent !important;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Brand block */
.footer-brand {
  display: flex; flex-direction: column;
  gap: 16px;
  color: #faf7f0 !important;
}
.footer-brand .wordmark {
  color: #faf7f0 !important;
}
.footer-brand .wordmark .wm-inf svg path {
  stroke: #faf7f0 !important;
}
.footer-brand p {
  font-size: 13px;
  color: #a5a29a !important;
  line-height: 1.55;
  max-width: 280px;
  margin: 0;
}

/* Column headings */
.footer-col h6 {
  font-family: var(--eit-font-mono);
  font-size: 10px;
  color: #a5a29a !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  margin-top: 0;
  font-weight: 500;
  background: transparent !important;
}
.footer-col ul {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 0; margin: 0;
}
.footer-col li {
  background: transparent !important;
}
.footer-col a {
  font-size: 14px;
  color: #faf7f0 !important;
  text-decoration: none;
  transition: color .2s;
  background: transparent !important;
}
.footer-col a:hover { color: #fff !important; }

/* External-link icon */
.footer .ext-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: #faf7f0 !important;
}
.footer .ext-link .ext-ico {
  opacity: 0.55;
  transition: transform .25s, opacity .25s;
}
.footer .ext-link:hover .ext-ico {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* ============== FOOTER GROUP — cross-site bridge ============== */
.footer-group {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: transparent !important;
}
.fg-top {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.fg-mono {
  font-family: var(--eit-font-mono);
  font-size: 11px;
  color: #a5a29a !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.fg-h {
  font-family: var(--eit-font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
  color: #faf7f0 !important;
}
.fg-h .serif {
  font-family: var(--eit-font-serif);
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  color: #a5a29a !important;
}

.fg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08) !important;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 820px) {
  .fg-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .fg-grid { grid-template-columns: 1fr; }
}

.fg-cell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  background: #15140f !important;
  color: #faf7f0 !important;
  text-decoration: none;
  transition: background .25s ease, padding .25s ease;
  position: relative;
}
.fg-cell:hover {
  background: #1f1d18 !important;
  padding-left: 22px;
}
.fg-cell.is-current {
  background: rgba(255,255,255,0.04) !important;
  cursor: default;
  pointer-events: none;
}
.fg-cell.is-current::before {
  content: "";
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: #faf7f0;
}
.fg-ix {
  grid-row: 1 / span 2;
  font-family: var(--eit-font-mono);
  font-size: 11px;
  color: #a5a29a !important;
  letter-spacing: 0.08em;
}
.fg-cell.is-current .fg-ix { color: #faf7f0 !important; }
.fg-name {
  grid-column: 2;
  font-family: var(--eit-font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  line-height: 1.1;
  color: #faf7f0 !important;
}
.fg-sub {
  grid-column: 2;
  font-family: var(--eit-font-mono);
  font-size: 10px;
  color: #a5a29a !important;
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.fg-arrow {
  grid-row: 1 / span 2;
  grid-column: 3;
  width: 26px; height: 26px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .3s, background .3s, color .3s, transform .3s;
  color: #faf7f0;
}
.fg-cell:hover .fg-arrow {
  background: #faf7f0 !important;
  border-color: #faf7f0;
  color: #15140f !important;
  transform: rotate(-45deg);
}
.fg-here {
  grid-row: 1 / span 2;
  grid-column: 3;
  font-family: var(--eit-font-mono);
  font-size: 9px;
  color: #a5a29a !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
}

/* ============== BOTTOM LINE ============== */
.footer-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 20px;
  font-family: var(--eit-font-mono);
  font-size: 11px;
  color: #a5a29a !important;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
  margin-top: 24px;
  background: transparent !important;
}
.footer-bottom a {
  color: #a5a29a !important;
  text-decoration: none;
  transition: color .2s;
  background: transparent !important;
}
.footer-bottom a:hover { color: #faf7f0 !important; }
.footer-bottom .dim { color: #a5a29a !important; }
