/**
 * assets/css/layout.css
 * Общие для всех страниц блоки: шапка/навигация, подвал.
 */
body{
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size:48px 48px;
}

/* Header */
.site-header{ position:sticky; top:0; z-index:40; background:rgba(18,21,26,0.9); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.nav{ display:flex; align-items:center; justify-content:space-between; gap:24px; padding:16px 32px; flex-wrap:wrap; }
.brand{ display:flex; align-items:center; gap:8px; font-family:var(--font-display); font-size:20px; font-weight:800; letter-spacing:0.02em; text-decoration:none; }
.brand .dot{ width:8px; height:8px; background:var(--accent); border-radius:1px; display:inline-block; }
.brand small{ font-family:var(--font-mono); font-size:10.5px; color:var(--text-faint); font-weight:500; letter-spacing:0.08em; text-transform:uppercase; margin-left:2px; }
.navlinks{ display:flex; gap:28px; font-size:14px; font-family:var(--font-mono); }
.navlinks a{ text-decoration:none; color:var(--text-dim); transition:color .15s; }
.navlinks a:hover, .navlinks a.is-active{ color:var(--text); }
.navcta{ display:flex; align-items:center; gap:16px; }

.nav-burger{ display:none; flex-direction:column; justify-content:center; gap:5px; width:32px; height:32px; background:none; border:none; cursor:pointer; padding:0; }
.nav-burger span{ display:block; height:2px; background:var(--text-dim); border-radius:1px; transition:transform .2s, opacity .2s; }
.navlinks-mobile{ display:none; flex-direction:column; gap:2px; padding:8px 32px 18px; border-top:1px solid var(--line); font-family:var(--font-mono); font-size:14.5px; }
.navlinks-mobile a{ display:block; padding:12px 0; color:var(--text-dim); text-decoration:none; border-bottom:1px solid var(--line); }
.navlinks-mobile a:hover{ color:var(--text); }

@media (max-width:860px){
  .navlinks{ display:none; }
  .nav-burger{ display:flex; }
  .navlinks-mobile.is-open{ display:flex; }
}
/* ШАПКА НА ТЕЛЕФОНЕ — В ОДНУ СТРОКУ. Было две (логотип, ниже «Войти»,
   кнопка и меню): 134 px из 812 закреплённой шапки. «Войти» — в меню. */
@media (max-width:560px){
  .nav{ padding:10px 16px; gap:12px; flex-wrap:nowrap; }
  .brand small{ display:none; }
  .navcta{ gap:10px; }
  /* «Войти», «Кабинет», «Выйти» и плашка роли — в меню под бургером */
  .navcta > .btn-ghost, .navcta > a[href$="logout.php"], .navcta > .role-badge{ display:none; }
  .navcta > .btn-solid{ padding:9px 12px; font-size:13px; white-space:nowrap; }
  .navlinks-mobile{ padding:8px 16px 18px; }
}

/* Footer */
.site-footer{ border-top:1px solid var(--line); padding:56px 0 32px; background:var(--bg-2); margin-top:80px; }
.foot-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:40px; }
.foot-grid h4{ font-family:var(--font-mono); font-size:11px; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-faint); margin:0 0 14px; font-weight:500; }
.foot-grid p, .foot-grid a{ font-size:13.5px; color:var(--text-dim); text-decoration:none; line-height:1.9; }
.foot-grid a:hover{ color:var(--accent); }
.foot-bottom{ display:flex; justify-content:space-between; margin-top:48px; padding-top:22px; border-top:1px solid var(--line); font-family:var(--font-mono); font-size:11px; color:var(--text-faint); flex-wrap:wrap; gap:10px; }

@media (max-width:860px){ .foot-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ .foot-grid{ grid-template-columns:1fr; } }

/* Generic section rhythm reused by pages */
section{ padding:80px 0; }
.section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin:14px 0 40px; flex-wrap:wrap; }
.section-head h2{ font-size:clamp(26px,2.8vw,36px); }
.section-head p{ color:var(--text-dim); max-width:38ch; margin:8px 0 0; font-size:14.5px; }

/* Плашка роли в шапке. Показывается только модератору/админу/хелперу —
   обычному пользователю знать про роли незачем. */
.role-badge{
  font-family:var(--font-mono); font-size:11px; letter-spacing:.02em;
  padding:4px 9px; border-radius:2px; border:1px solid var(--line);
  color:var(--text-faint); background:rgba(255,255,255,.03);
}
.role-badge.role-admin{ color:#e8b4a4; border-color:rgba(224,122,95,.45); }
.role-badge.role-moderator{ color:#a4c8e8; border-color:rgba(95,150,224,.45); }

/* Значок обращений и аватар в шапке.
   Пункты меню кончились: с шестью строка переносилась на вторую, и шапка
   разъезжалась. Личное — обращения и профиль — ушло вправо значками. */
.nav-icon{
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:8px; color:var(--text-dim);
  border:1px solid transparent; text-decoration:none;
}
.nav-icon:hover, .nav-icon.is-active{ color:var(--text); border-color:var(--line); }
.nav-icon .badge{
  position:absolute; top:-3px; right:-3px; background:var(--accent); color:#fff;
  border-radius:9px; padding:0 5px; font-family:var(--font-mono); font-size:10px; line-height:15px;
}
.nav-ava{
  width:34px; height:34px; border-radius:50%; overflow:hidden; flex:0 0 auto;
  display:flex; align-items:center; justify-content:center; text-decoration:none;
  background:linear-gradient(150deg,var(--accent),#7a2f10);
  color:#fff; font-family:var(--font-display); font-size:14px; font-weight:700;
}
.nav-ava img{ width:100%; height:100%; object-fit:cover; }

/* Логотип «Честный цех» — клеймо ОТК (заказчик, 11.10.2026, вариант 4). */
.brand.brand-cc{ gap:10px; letter-spacing:0; }
.brand-cc .brand-mark{ width:34px; height:34px; flex:none; color:var(--accent); }
.brand-cc .brand-txt{ display:flex; flex-direction:column; line-height:1.05; }
.brand-cc .brand-txt b{ font-family:'Unbounded', var(--font-display); font-weight:700; font-size:16px; text-transform:uppercase; letter-spacing:.02em; color:var(--text); }
.brand-cc .brand-txt small{ margin:3px 0 0; font-size:9.5px; letter-spacing:.14em; }
@media (max-width:760px){ .brand-cc .brand-mark{ width:28px; height:28px; } .brand-cc .brand-txt b{ font-size:13px; } }
/* The long editor CTA otherwise pushes the menu outside a 320 px screen. */
.nav-launch-short{display:none}
@media(max-width:380px){.nav-launch-full{display:none}.nav-launch-short{display:inline}.navcta .nav-launch{padding:9px 10px;font-size:12px}.nav .brand{min-width:0}.navcta{flex-shrink:0;gap:7px}}
