/* ТПК Стелла — единая база для всех страниц.
   Источник истины по переменным, контейнеру, чёрной полосе, шапке и меню.
   Подключается ПЕРВОЙ, до страничных стилей (blog/style.css, sectors/style.css,
   inline на главной). Всё, что здесь, дублировать в страничных файлах нельзя —
   именно так они дважды разъезжались.
   Правишь шапку или меню — правишь только здесь и бампаешь ?v= в ссылках. */

/* ===== Переменные ===== */
:root{
  --bg:#F6F5F1;
  --bg-2:#ECEAE2;
  --ink:#121316;
  --ink-2:#2C2E33;
  --ink-3:#4A4D54;
  --line:#D9D6CC;
  --line-2:#C3BFB2;
  --accent:#2D63A8;
  --accent-ink:#ffffff;
  --paper:#FFFFFF;
  /* алиасы для страничных файлов, писавшихся раньше базы */
  --border:var(--line);
  --muted:var(--ink-3);
}

/* ===== Сброс и типографика ===== */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; padding:0;
  background:var(--bg); color:var(--ink);
  font-family:"Inter", system-ui, sans-serif;
  font-size:16px; line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img,picture{ max-width:100%; height:auto; display:block; }
h1,h2,h3,h4{ font-family:"Manrope", system-ui, sans-serif; font-weight:700; letter-spacing:-0.02em; margin:0; text-wrap:balance; }

/* ===== Контейнер ===== */
.container{ max-width:1360px; margin:0 auto; padding:0 40px; }
@media (max-width:900px){ .container{ padding:0 24px; } }
@media (max-width:520px){ .container{ padding:0 18px; } }

/* ===== Кнопка ===== */
.btn{
  display:inline-flex; align-items:center; gap:10px; padding:12px 20px;
  border:1px solid var(--ink); background:var(--ink); color:var(--bg);
  font-weight:600; font-size:14px; cursor:pointer; font-family:"Inter";
  transition:background .15s, color .15s, border-color .15s; white-space:nowrap;
  text-decoration:none;
}
.btn:hover{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.btn.accent{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }

/* ===== Чёрная полоса с контактами ===== */
.pre-header{ background:var(--ink); color:var(--bg); border-bottom:1px solid var(--ink); font-family:"Inter"; font-size:13px; }
.pre-header-inner{ display:flex; align-items:center; gap:16px; height:40px; }
.pre-header a{ color:var(--bg); font-weight:700; text-decoration:none; }
.pre-header a:hover{ color:var(--accent); }
.ph-sep{ color:rgba(246,245,241,.35); }
.ph-addr{ color:rgba(246,245,241,.7); font-weight:500; margin-left:auto; }
@media (max-width:720px){
  .ph-addr, .ph-sep:last-of-type{ display:none; }
  .pre-header-inner{ gap:10px; height:36px; font-size:12px; }
}

/* ===== Шапка и меню ===== */
.topbar{ position:sticky; top:0; z-index:50; background:var(--bg); border-bottom:1px solid var(--line); }
.topbar-inner{ display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:48px; height:72px; }
.brand{ display:flex; align-items:center; gap:0; text-decoration:none; flex-shrink:0; }
.brand picture{ display:block; flex-shrink:0; line-height:0; }
.brand-logo{ height:40px; width:auto; max-width:none; display:block; flex-shrink:0; object-fit:contain; }

nav.primary{ display:flex; gap:28px; justify-self:start; }
nav.primary a{ font-size:14px; color:var(--ink-2); font-weight:500; text-decoration:none; }
nav.primary a:hover{ color:var(--accent); }

.top-cta{ display:flex; align-items:center; gap:20px; }
.top-cta .phone{ font-family:"Manrope"; font-weight:700; font-size:15px; letter-spacing:-0.01em; white-space:nowrap; color:var(--ink); text-decoration:none; }

.burger{
  display:none; width:40px; height:40px; border:1px solid var(--line);
  background:transparent; cursor:pointer; align-items:center; justify-content:center;
}
.burger span{ display:block; width:18px; height:2px; background:var(--ink); position:relative; }
.burger span::before, .burger span::after{ content:""; position:absolute; left:0; width:18px; height:2px; background:var(--ink); }
.burger span::before{ top:-6px; }
.burger span::after{ top:6px; }

.mobile-menu{
  position:fixed; inset:64px 0 0 0; z-index:49; background:var(--bg);
  padding:32px 24px; transform:translateX(100%); transition:transform .3s; overflow-y:auto;
}
.mobile-menu.open{ transform:translateX(0); }
.mobile-menu a{
  display:block; font-size:22px; font-family:"Manrope"; font-weight:600;
  padding:14px 0; border-bottom:1px solid var(--line);
  color:var(--ink); text-decoration:none;
}
.mobile-menu .mm-phone{ margin-top:32px; display:block; font-size:20px; color:var(--accent); }
.mobile-menu .btn{ margin-top:20px; width:100%; justify-content:center; padding:16px; }

@media (max-width:1080px){
  nav.primary{ display:none; }
  .top-cta .phone{ display:none; }
}
@media (max-width:720px){
  .topbar-inner{ gap:16px; height:64px; }
  .top-cta .btn{ display:none; }
  .burger{ display:flex; }
}

/* ===== Подвал (единый, эталон — главная) ===== */
footer{ background:var(--ink); color:var(--bg); padding:72px 0 32px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:48px; margin-bottom:56px; }
.footer-brand{ font-family:"Manrope"; font-weight:800; font-size:22px; margin-bottom:16px; }
.footer-about{ font-size:13.5px; color:rgba(246,245,241,.6); line-height:1.55; }
.footer-legal{ font-size:12px; color:rgba(246,245,241,.45); line-height:1.55; margin-top:14px; font-family:"JetBrains Mono",monospace; letter-spacing:.02em; }
footer h5{ font-family:"JetBrains Mono"; font-size:11px; color:rgba(246,245,241,.5); text-transform:uppercase; letter-spacing:0.08em; margin:0 0 16px; font-weight:500; }
footer a{ display:block; color:rgba(246,245,241,.75); text-decoration:none; padding:5px 0; font-size:14px; }
footer a:hover{ color:#fff; }
footer .f-static{ display:block; color:rgba(246,245,241,.5); padding:5px 0; font-size:14px; }
.footer-bottom{ padding-top:32px; border-top:1px solid rgba(255,255,255,.1); display:flex; justify-content:space-between; align-items:center; font-size:12px; color:rgba(246,245,241,.5); font-family:"JetBrains Mono"; letter-spacing:0.05em; }
@media (max-width:900px){
  .footer-grid{ grid-template-columns:1fr 1fr; gap:32px; }
  footer{ padding:56px 0 28px; }
}
@media (max-width:520px){
  .footer-grid{ grid-template-columns:1fr; }
  .footer-bottom{ flex-direction:column; gap:12px; align-items:flex-start; }
}
