/* Сайт проекта BeardMC: системные шрифты, без внешних шрифтов и скриптов (CSP 'self') */
:root {
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-2: #eceee8;
  --text: #1b211e;
  --muted: #5b645f;
  --accent: #2f7d32;
  --accent-hover: #256528;
  --accent-text: #ffffff;
  --error: #b3261e;
  --warn-bg: #fff4d6;
  --border: #d5d9d2;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 6px 18px rgb(0 0 0 / 6%);
  /* Шапка главной тёмная в обеих темах */
  --hero-from: #1b2720;
  --hero-to: #2d4231;
  --hero-text: #f1f4ef;
  --hero-muted: #c2ccc5;
  --hero-accent: #e39a5f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --surface: #1a201e;
    --surface-2: #232b28;
    --text: #e6ebe8;
    --muted: #a3ada8;
    --accent: #5fb763;
    --accent-hover: #7cc97f;
    --accent-text: #0f1310;
    --error: #ff8a80;
    --warn-bg: #3d3420;
    --border: #323b38;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 18px rgb(0 0 0 / 25%);
    --hero-from: #0e1411;
    --hero-to: #1b2a20;
  }
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 16px; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 24px 0 10px; }
h3 { font-size: 1.05rem; line-height: 1.35; margin: 0 0 6px; }

code {
  font: 0.9em ui-monospace, "Cascadia Mono", Consolas, monospace;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-2);
}

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Шапка */
.top { background: var(--surface); border-bottom: 1px solid var(--border); }
.top-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { image-rendering: pixelated; border-radius: 4px; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.top nav a { color: var(--muted); font-weight: 500; text-decoration: none; }
.top nav a:hover { color: var(--text); }
.top nav a.nav-account {
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 3px 12px;
}
.top nav a.nav-account:hover { background: var(--accent); color: var(--accent-text); }

main { flex: 1 0 auto; width: 100%; }
main.page { max-width: 760px; margin: 0 auto; padding: 32px 16px 56px; }

/* Главная */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text);
}
.hero::before {
  /* Сетка блоков поверх фона */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 56px;
}
.hero-text { flex: 1 1 420px; max-width: 640px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--hero-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1.1; margin: 0 0 14px; }
.lead { font-size: 1.15rem; color: var(--hero-muted); margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero .button.secondary { color: var(--hero-text); border-color: rgb(255 255 255 / 40%); }
.hero .button.secondary:hover { background: rgb(255 255 255 / 10%); }
.hero-logo {
  flex: 0 0 auto;
  width: 176px;
  height: 176px;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 24px rgb(0 0 0 / 35%));
}
@media (max-width: 600px) {
  .hero-inner { padding-top: 40px; padding-bottom: 40px; }
  .hero-logo { width: 112px; height: 112px; }
}

.section { padding: 48px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: 1.6rem; margin: 0 0 20px; }
.section p { margin: 0 0 12px; }

.server-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 760px) {
  .server-grid { grid-template-columns: minmax(0, 1fr); }
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.85rem;
  font-weight: 600;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chips li {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.9rem;
}

.features, .steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.features li, .steps li {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.features p, .steps p { margin: 0 0 8px; }
.features p:last-child, .steps p:last-child { margin-bottom: 0; }

.steps { counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li { position: relative; padding-top: 56px; background: var(--bg); counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

/* Подвал */
.bottom { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.9rem; }
.bottom-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
.bottom p { margin: 0; }
.bottom strong { color: var(--text); }
.bottom nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.bottom a { color: var(--muted); }
.bottom a:hover { color: var(--text); }

/* Кабинет, вход и формы */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}

form.card label { display: block; margin: 0 0 12px; }
form.card input[type="text"], form.card input:not([type]), form.card input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

button, a.button {
  display: inline-block;
  padding: 9px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
button:hover, a.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
button.secondary, a.button.secondary { background: transparent; color: var(--text); border-color: var(--border); }
button.secondary:hover, a.button.secondary:hover { background: var(--surface-2); color: var(--text); }
button.link { padding: 0; border: 0; background: none; color: var(--muted); font-weight: 500; text-decoration: underline; }
button.link:hover { background: none; color: var(--text); }
form.inline { display: inline; margin: 0; }

.code { font: 600 1.6rem/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.08em; }

.error { color: var(--error); font-weight: 600; }
.warning { background: var(--warn-bg); padding: 10px 14px; border-radius: 6px; }
.hint, .muted { color: var(--muted); font-size: 0.9rem; }
.server { color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }

.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { margin-top: 5px; }

form.card label .hint { display: block; margin-top: 4px; }

/* Правила и политика: таблицы прокручиваются по горизонтали на узком экране */
.doc table { display: block; overflow-x: auto; margin: 0 0 16px; }
.doc blockquote { margin: 0 0 16px; padding: 8px 12px; border-left: 4px solid var(--border); color: var(--muted); }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.doc h2 { margin-top: 32px; }
.doc h3 { margin: 20px 0 8px; }
