/* Палитра «Архив законов»: тёмно-синий и латунь */
:root {
  --bg: #0e1626;
  --bg-deep: #0a101c;
  --bg-muted: #18233a;
  --bg-accent: #22304d;
  --panel: rgba(24, 35, 58, .72);
  --accent: #e0b04a;
  --accent-rgb: 224, 176, 74;
  --on-accent: #0e1626;
  --second: #7fa3d6;
  --live: #3ddc84;
  --accent-bright: #f2c96a;
  --accent-bright-rgb: 242, 201, 106;
  --accent-hover: #c4963a;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --text-soft: rgba(255, 255, 255, .72);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --danger: #ff5252;
  --radius: 10px;
  --wrap: 1200px;
  --font: "Jost", system-ui, sans-serif;
  --font-ui: "Google Sans", "Jost", system-ui, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ===== Типографика ===== */
.h-display, .h-section {
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -.02em;
  margin: 0;
}
.h-display { font-weight: 700; font-size: clamp(36px, 6vw, 72px); line-height: 1.08; }
.h-section { font-weight: 800; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; }
.hl { color: var(--accent); }
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: 14px; letter-spacing: .02em; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 36px; height: 2px; background: var(--accent); }
.lead { color: var(--text-soft); max-width: 620px; margin: 18px 0 0; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-ui); font-weight: 700; font-size: 15px;
  color: var(--on-accent); padding: 13px 30px; border-radius: 7px; cursor: pointer;
  border: 2px solid var(--accent-bright);
  background: linear-gradient(#efc66b, #c8963a);
  box-shadow: 0 0 40px rgba(var(--accent-rgb), .15), 0 0 18px 1px rgba(var(--accent-bright-rgb), .28),
              inset 0 -8px 28px rgba(0, 0, 0, .15), inset 0 2px 0 rgba(255, 255, 255, .2);
  transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--sm {
  font-size: 13px; font-weight: 600; padding: 7px 18px; border-width: 1px; border-radius: 5px;
  background: linear-gradient(var(--accent), rgba(var(--accent-rgb), .75));
  box-shadow: 0 0 8px rgba(var(--accent-rgb), .15), inset 0 0 10px 3px rgba(255, 226, 160, .36);
}
.btn--ghost {
  color: #fff; background: rgba(10, 16, 28, .6); border: 1px solid rgba(var(--accent-bright-rgb), .7); box-shadow: none;
}
.btn--ghost:hover { background: rgba(var(--accent-rgb), .12); }

/* ===== Топографический фон ===== */
.topo { position: absolute; pointer-events: none; opacity: .4; }
.topo path { fill: none; stroke: var(--accent); stroke-width: 1.4; }

/* ===== Шапка ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 22, 38, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header .wrap { display: flex; align-items: center; gap: 36px; height: 64px; }
.logo {
  font-style: italic; font-weight: 900; font-size: 24px; letter-spacing: -.03em;
  display: flex; align-items: baseline; gap: 2px; white-space: nowrap;
}
.logo span { color: var(--accent); }
.nav { display: flex; gap: 26px; font-family: var(--font-ui); font-size: 14px; }
.nav a { color: var(--text-soft); transition: color .2s; }
.nav a:hover, .nav a.active { color: #fff; }
.nav a.active { box-shadow: 0 2px 0 var(--accent); padding-bottom: 2px; }
.header__right { margin-left: auto; display: flex; align-items: center; gap: 20px; font-family: var(--font-ui); font-size: 14px; }
.header__right > a:not(.btn) { color: var(--text-soft); }
.header__right > a:not(.btn):hover { color: #fff; }
.icon-link { display: inline-flex; width: 20px; height: 20px; }
.icon-link svg { width: 100%; height: 100%; fill: currentColor; }
.burger { display: none; background: none; border: 0; color: #fff; width: 40px; height: 40px; margin-left: auto; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  min-height: 640px; display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(900px 500px at 75% 30%, rgba(var(--accent-rgb), .14), transparent 60%),
    linear-gradient(180deg, rgba(14, 22, 38, 0) 60%, var(--bg) 100%),
    linear-gradient(120deg, #17243d 0%, #0e1626 55%, #0a101c 100%);
}
.hero .topo { right: -160px; top: -60px; width: 820px; height: 820px; }
.hero__inner { position: relative; text-align: center; padding: 90px 0 40px; }
.hero__inner .h-display { max-width: 900px; margin: 0 auto; }
.hero__sub {
  font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 14px;
  margin-top: 18px; letter-spacing: .03em;
}
.search {
  margin: 36px auto 0; max-width: 720px; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 8px 8px 8px 20px; box-shadow: 0 16px 32px rgba(0, 0, 0, .35);
}
.search:focus-within { border-color: rgba(var(--accent-bright-rgb), .6); }
.search svg { width: 20px; height: 20px; flex: none; stroke: var(--text-muted); }
.search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff;
  font: 500 17px var(--font); padding: 10px 0;
}
.search input::placeholder { color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chip {
  font-family: var(--font-ui); font-size: 13px; color: var(--text-soft);
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: rgba(10, 16, 28, .5); transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--accent); color: #fff; }

.stats {
  position: relative; display: flex; justify-content: center; margin-top: 70px;
}
.stat { text-align: center; padding: 0 34px; }
.stat + .stat { border-left: 1px solid var(--border-strong); }
.stat b { display: block; font-style: italic; font-weight: 800; font-size: 34px; line-height: 1; }
.stat small { color: var(--text-muted); font-family: var(--font-ui); font-size: 12px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 10px var(--live); margin-right: 6px; vertical-align: middle; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ===== Секции ===== */
.section { position: relative; padding: 100px 0; overflow: hidden; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.more { font-family: var(--font-ui); font-size: 14px; color: var(--accent); white-space: nowrap; }
.more:hover { color: var(--accent-bright); }

/* Разделы */
.grid-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 24px; min-height: 170px; display: flex; flex-direction: column;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.cat:hover { border-color: rgba(var(--accent-bright-rgb), .55); transform: translateY(-3px); box-shadow: 0 0 30px rgba(var(--accent-rgb), .12); }
.cat__icon {
  width: 44px; height: 44px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), .12); border: 1px solid rgba(var(--accent-rgb), .35); margin-bottom: 18px;
}
.cat__icon svg { width: 22px; height: 22px; stroke: var(--accent-bright); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cat h3 { margin: 0 0 6px; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 18px; }
.cat p { margin: 0; color: var(--text-muted); font-size: 14px; }
.cat__count { margin-top: auto; padding-top: 14px; font-family: var(--font-ui); font-size: 12px; color: var(--second); }
.cat--wide { grid-column: span 2; grid-row: span 2; justify-content: flex-end; }
.cat--wide h3 { font-size: 30px; line-height: 1.1; }
.cat--wide p { font-size: 16px; max-width: 420px; }
.cat--wide .cat__count { margin-top: 0; }
.cat--feature {
  border-color: rgba(var(--accent-bright-rgb), .5);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .18), rgba(24, 35, 58, .9) 60%);
}
.badge {
  display: inline-block; font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 4px;
  background: var(--accent); color: var(--on-accent);
}
.cat .badge { position: absolute; top: 18px; right: 18px; }

/* Законка */
.zakonka { background: var(--bg-deep); }
.zakonka .topo { left: -220px; bottom: -260px; width: 760px; height: 760px; opacity: .35; }
.zakonka__grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 60px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 26px 0 32px; display: grid; gap: 10px; color: var(--text-soft); }
.ticks li { display: flex; gap: 10px; }
.ticks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 4px; background: rgba(var(--accent-rgb), .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2c96a' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chat {
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .35); overflow: hidden;
}
.chat__bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-family: var(--font-ui); font-size: 13px; color: var(--text-muted); }
.chat__bar b { color: #fff; font-family: var(--font); font-style: italic; font-weight: 800; text-transform: uppercase; }
.chat__body { padding: 20px 18px; display: grid; gap: 14px; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.msg--q { justify-self: end; background: var(--bg-accent); border-bottom-right-radius: 4px; }
.msg--a { background: rgba(var(--accent-rgb), .08); border: 1px solid rgba(var(--accent-rgb), .3); border-bottom-left-radius: 4px; color: var(--text-soft); }
.msg--a strong { color: #fff; }
.cite { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cite a { font-family: var(--font-ui); font-size: 12px; color: var(--accent-bright); padding: 3px 9px; border-radius: 4px; background: rgba(var(--accent-rgb), .12); }
.chat__input { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.chat__input div { flex: 1; color: var(--text-muted); font-size: 14px; padding: 9px 12px; border-radius: 7px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); }

/* Сервера */
.servers .topo { right: -260px; top: -120px; width: 700px; height: 700px; opacity: .3; }
.grid-servers { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.server {
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 22px; transition: border-color .25s;
}
.server:hover { border-color: rgba(var(--accent-bright-rgb), .5); }
.server__top { display: flex; justify-content: space-between; align-items: center; }
.server__num { font-family: var(--font-ui); font-size: 12px; color: var(--second); }
.server h3 { margin: 4px 0 16px; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; }
.server__online { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.server__online b { color: #fff; }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #c8963a, var(--accent-bright)); box-shadow: 0 0 10px rgba(var(--accent-bright-rgb), .6); }
.server__tag { font-family: var(--font-ui); font-size: 11px; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--border-strong); color: var(--text-muted); }
.server__tag--new { border-color: var(--accent); color: var(--accent-bright); }
.demo-note { margin-top: 18px; font-size: 13px; color: var(--text-muted); font-family: var(--font-ui); }

/* Фракции */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 9px; background: rgba(10, 16, 28, .7); border: 1px solid var(--border); margin-bottom: 26px; }
.tab { font: 600 14px var(--font-ui); color: var(--text-soft); background: none; border: 0; padding: 9px 20px; border-radius: 6px; cursor: pointer; }
.tab.active { color: var(--on-accent); background: linear-gradient(var(--accent), rgba(var(--accent-rgb), .75)); box-shadow: inset 0 0 10px 3px rgba(255, 226, 160, .3); }
.grid-factions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.faction {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: rgba(24, 35, 58, .6); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}
.faction:hover { border-color: rgba(var(--accent-bright-rgb), .5); background: rgba(24, 35, 58, .9); }
.faction__mark {
  flex: none; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center;
  font-style: italic; font-weight: 900; font-size: 13px; color: var(--accent-bright);
  background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .3);
}
.faction b { display: block; font-size: 15px; line-height: 1.2; }
.faction small { color: var(--text-muted); font-size: 12px; font-family: var(--font-ui); }
.faction-panel[hidden] { display: none; }

/* Обновления */
.updates { background: var(--bg-deep); }
.grid-updates { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.upd-main {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border-strong);
  min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
  background: linear-gradient(0deg, rgba(10, 16, 28, .95) 10%, rgba(10, 16, 28, .2) 70%),
              repeating-linear-gradient(135deg, #1b2740 0 14px, #17223a 14px 28px);
}
.ph-label { position: absolute; top: 18px; left: 18px; font-family: var(--font-ui); font-size: 12px; color: var(--text-muted); border: 1px dashed var(--border-strong); padding: 4px 10px; border-radius: 4px; }
.upd-main h3 { margin: 10px 0 8px; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 28px; line-height: 1.1; }
.upd-main p { margin: 0; color: var(--text-soft); max-width: 520px; }
.upd-list { display: grid; gap: 12px; }
.upd {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  transition: border-color .2s;
}
.upd:hover { border-color: rgba(var(--accent-bright-rgb), .45); }
.upd__date { text-align: center; min-width: 52px; padding: 6px 0; border-radius: 7px; background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .3); }
.upd__date b { display: block; font-style: italic; font-weight: 800; font-size: 20px; line-height: 1; color: var(--accent-bright); }
.upd__date small { font-family: var(--font-ui); font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.upd h4 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.upd p { margin: 0; font-size: 13px; color: var(--text-muted); }
.src { font-family: var(--font-ui); font-size: 11px; color: var(--second); margin-left: 6px; }

/* FAQ */
.faq-list { display: grid; gap: 12px; margin-top: 30px; }
.faq {
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--panel);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .35);
}
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: 600 16px/1 var(--font-ui); font-style: normal; color: var(--accent-bright); border: 1px solid rgba(var(--accent-rgb), .5);
  transition: transform .2s;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq__body { padding: 0 24px 22px; color: var(--text-soft); }

/* Подвал */
.footer { border-top: 1px solid var(--border); padding: 60px 0 36px; background: var(--bg); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer p { color: var(--text-soft); font-size: 14px; margin: 14px 0 0; max-width: 340px; }
.footer h5 { margin: 0 0 14px; color: var(--accent); font-size: 15px; font-weight: 700; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-family: var(--font-ui); font-size: 13px; }
.footer ul a { color: var(--text-soft); }
.footer ul a:hover { color: #fff; }
.disclaimer {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-family: var(--font-ui); font-size: 12px; color: var(--text-muted);
}

/* ===== Адаптив ===== */
@media (max-width: 1024px) {
  .nav, .header__right > a:not(.btn) { display: none; }
  .header__right { margin-left: 0; }
  .burger { display: grid; place-items: center; }
  .grid-cats { grid-template-columns: repeat(2, 1fr); }
  .cat--wide { grid-row: auto; }
  .grid-factions { grid-template-columns: repeat(2, 1fr); }
  .zakonka__grid, .grid-updates { grid-template-columns: 1fr; gap: 40px; }
  .grid-servers { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header .wrap { gap: 12px; }
  .header__right .btn { display: none; }
  .hero { min-height: 0; }
  .hero__inner { padding: 60px 0 30px; }
  .search { padding-left: 14px; }
  .search .btn { padding: 10px 14px; }
  .stats { margin-top: 44px; }
  .stat { padding: 0 14px; }
  .stat b { font-size: 26px; }
  .section { padding: 70px 0; }
  .grid-cats, .grid-servers, .grid-factions { grid-template-columns: 1fr; }
  .cat--wide { grid-column: auto; grid-row: auto; }
  .cat--wide h3 { font-size: 22px; }
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1 1 auto; padding: 9px 6px; font-size: 12px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
