/* ============================================================ Brigston RP — второстепенные страницы
   Новости, условия, политика. Поверх style.css: те же токены, стекло, шрифты. */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: sub-out .28s cubic-bezier(.22, 1, .36, 1) both; }
::view-transition-new(root) { animation: sub-in .45s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes sub-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes sub-in { from { opacity: 0; transform: translateY(10px); } }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body.sub { background: var(--bg); min-height: 100vh; }
/* анимируем содержимое, а не body: transform на body ломает фиксированную шапку */
body.sub > main, body.sub > .sub-foot { animation: sub-in .55s var(--ease) both; transition: opacity .26s var(--ease), transform .26s var(--ease); }
body.sub.leaving > main, body.sub.leaving > .sub-foot, body.sub.leaving > .subbar { opacity: 0; transform: translateY(-6px); transition: opacity .26s var(--ease), transform .26s var(--ease); }

/* фон: свечение медленно плывёт */
body.sub .bg .glow { animation: sub-drift 24s ease-in-out infinite alternate; }
body.sub .bg .g2 { animation-duration: 30s; animation-direction: alternate-reverse; }
@keyframes sub-drift { to { transform: translate3d(6%, 4%, 0) scale(1.1); } }

/* ---------- шапка */
.subbar { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.subbar.scrolled { background: rgba(7, 7, 10, .72); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 1px 0 var(--stroke); }
.subbar .wrap { display: flex; align-items: center; gap: 18px; height: 72px; }
.sub-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; flex: none; }
.sub-brand img { width: 34px; height: 34px; }
.sub-brand strong { font: 800 15px var(--display); letter-spacing: .06em; }
.sub-brand small { display: block; color: var(--faint); font: 600 9.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.sub-nav { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke); }
.sub-nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 600; transition: color .2s, background .25s var(--ease); }
.sub-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.sub-nav a.on { color: var(--text); background: rgba(255, 255, 255, .08); }
.sub-nav a.sub-donate { color: var(--accent); }
.sub-actions { display: flex; gap: 10px; }
.sub-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.sub-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 12px var(--accent-glow);
  transform: scaleX(0); transform-origin: left; transition: transform .1s linear; }
@media (max-width: 1180px) { .sub-nav a { padding: 8px 10px; font-size: 13px; } }
@media (max-width: 980px) { .sub-nav { display: none; } }
@media (max-width: 480px) { .sub-brand small { display: none; } .sub-actions .btn-glass { display: none; } }

/* ---------- появление блоков */
.sub-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.sub-reveal.in { opacity: 1; transform: none; }

/* ---------- документы: оглавление слева, текст справа */
.doc { position: relative; z-index: 1; padding: 112px 0 80px; }
.doc .wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1180px; }
.doc-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding: 18px; border-radius: 20px; }
.doc-toc > span { display: block; font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 2px 6px 10px; }
.doc-toc a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--muted); font-size: 13.5px; line-height: 1.35; transition: color .2s, background .25s var(--ease); }
.doc-toc a b { flex: none; min-width: 20px; color: var(--faint); font: 700 12px var(--mono); padding-top: 1px; transition: color .2s; }
.doc-toc a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.doc-toc a.on { color: var(--text); background: rgba(252, 221, 8, .1); box-shadow: inset 2px 0 0 var(--accent); }
.doc-toc a.on b { color: var(--accent); }
.doc-head { padding: 40px 44px 34px; margin-bottom: 16px; overflow: hidden; position: relative; }
.doc-head::after { content: ''; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(252, 221, 8, .16), transparent); pointer-events: none; }
.doc-head .eyebrow { margin-bottom: 14px; }
.doc h1 { font: 900 clamp(30px, 4.4vw, 48px)/1.06 var(--display); letter-spacing: -.01em; margin-bottom: 12px; }
.doc .lead-in { color: var(--faint); font-size: 14px; }
.doc .note { margin-top: 20px; padding: 16px 20px; border-radius: 16px; color: #fff1a0; background: rgba(252, 221, 8, .07); border: 1px solid rgba(252, 221, 8, .28); }
.doc-body { padding: 10px 44px 40px; }
.doc-body h2 { font: 800 20px/1.25 var(--display); margin: 34px 0 12px; scroll-margin-top: 100px; display: flex; gap: 12px; align-items: baseline; }
.doc-body h2::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); transform: translateY(-3px); }
.doc-body p, .doc-body li { color: #b9bcc7; line-height: 1.75; margin-bottom: 8px; }
.doc-body ol, .doc-body ul { padding-left: 22px; }
.doc-body li::marker { color: var(--accent); font-weight: 700; }
.doc-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc-body b { color: var(--text); }
.doc-body code { font: 600 .9em var(--mono); color: var(--text); background: rgba(255, 255, 255, .06); padding: 1px 6px; border-radius: 6px; }
.doc .fill { color: var(--warn); font-weight: 700; }
.doc .table-wrap { overflow-x: auto; margin: 6px 0 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--stroke); color: var(--muted); }
.doc th { color: var(--text); font-weight: 700; font-size: 13px; }
.doc tr { transition: background .2s; }
.doc tr:hover td { background: rgba(255, 255, 255, .025); }
.sub-foot { position: relative; z-index: 1; padding: 0 0 50px; color: var(--faint); font-size: 13px; }
.sub-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
.sub-foot a { color: var(--muted); transition: color .2s; }
.sub-foot a:hover { color: var(--accent); }
@media (max-width: 980px) {
  .doc .wrap { grid-template-columns: 1fr; }
  .doc-toc { position: relative; top: 0; max-height: none; display: flex; flex-wrap: wrap; gap: 4px; }
  .doc-toc > span { width: 100%; }
  .doc-toc a { font-size: 12.5px; padding: 6px 10px; }
}
@media (max-width: 560px) { .doc-head { padding: 28px 22px; } .doc-body { padding: 6px 20px 30px; } }

/* документы: без выделения и копирования */
body.no-copy .doc { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media print { body.no-copy .doc { display: none !important; } body.no-copy::after { content: 'Документ доступен на brigstonrp.com'; } }

/* новости: страница внутри общей шапки */
body.sub .news-page { padding-top: 104px; }
@media (prefers-reduced-motion: reduce) { body.sub > main, body.sub > .sub-foot, .sub-reveal, body.sub .bg .glow { animation: none !important; transition: none !important; opacity: 1; transform: none; } }
.news-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 9px 16px 9px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--stroke); color: var(--muted); font-weight: 600; font-size: 14px;
  transition: color .2s, background .25s var(--ease), border-color .2s, transform .25s var(--ease); }
.news-back:hover { color: var(--text); background: rgba(255, 255, 255, .08); border-color: var(--stroke-hi); transform: translateX(-3px); }
.news-back .ic { transition: transform .25s var(--ease); }
.news-back:hover .ic { transform: translateX(-2px); }

.onair { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #ff3b30; vertical-align: 1px; animation: onair 1.6s infinite; }
@keyframes onair { 70% { box-shadow: 0 0 0 7px rgba(255,59,48,0); } 0% { box-shadow: 0 0 0 0 rgba(255,59,48,.6); } }
