/* ==========================================================================
   Sakishima — базовые стили темы
   Спокойная светлая палитра, мягкие поверхности, крупная типографика.
   ========================================================================== */

:root {
	--bg: #f4f6f3;
	--surface: #ffffff;
	--surface-2: #edf2ec;
	--text: #1e2521;
	--text-soft: #3d4842;
	--muted: #6a7770;
	--border: #e2e8e1;
	--border-strong: #d2dbd1;
	--accent: #3f7d5c;
	--accent-strong: #33684b;
	--accent-soft: #e6f0e9;
	--shadow-sm: 0 1px 2px rgba(24, 32, 27, 0.05);
	--shadow: 0 2px 4px rgba(24, 32, 27, 0.04), 0 14px 30px rgba(24, 32, 27, 0.07);
	--radius: 16px;
	--radius-sm: 10px;
	--container: 1120px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141815;
		--surface: #1b211d;
		--surface-2: #222a25;
		--text: #e9eee9;
		--text-soft: #cfd8d2;
		--muted: #9aa79f;
		--border: #2b342e;
		--border-strong: #39443d;
		--accent: #6fa98a;
		--accent-strong: #86bd9c;
		--accent-soft: #223029;
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
		--shadow: 0 2px 4px rgba(0, 0, 0, 0.25), 0 14px 30px rgba(0, 0, 0, 0.3);
	}
}

/* --- Сброс ---------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.4em;
	color: var(--text);
	letter-spacing: -0.015em;
	line-height: 1.2;
	font-weight: 700;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	color: var(--accent-strong);
}

button {
	font: inherit;
}

.container {
	width: min(var(--container), 100% - 40px);
	margin-inline: auto;
}

.container.narrow {
	max-width: 780px;
}

.icon {
	width: 18px;
	height: 18px;
	flex: none;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--surface);
	padding: 12px 18px;
	border-radius: 0 0 10px 0;
}

.skip-link:focus {
	left: 0;
}

/* --- Кнопки --------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
	white-space: nowrap;
}

.btn-lg {
	padding: 13px 22px;
	font-size: 15.5px;
}

.btn-primary {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}

.btn-primary:hover {
	background: var(--accent-strong);
	border-color: var(--accent-strong);
	color: #fff;
	transform: translateY(-1px);
}

.btn-outline {
	background: var(--surface);
	border-color: var(--border-strong);
	color: var(--text);
}

.btn-outline:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.btn-ghost {
	background: transparent;
	color: var(--text-soft);
}

.btn-ghost:hover {
	background: var(--surface-2);
	color: var(--text);
}

/* --- Шапка ---------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid var(--border);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 74px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	flex: none;
}

.brand:hover {
	color: var(--text);
}

.brand-mark {
	width: 30px;
	height: 30px;
}

.brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.05;
}

.brand-name {
	font-size: 19px;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.brand-sub {
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 600;
}

.main-nav {
	margin-left: auto;
}

.main-nav .menu,
.main-nav ul {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-nav a {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--text-soft);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
	background: var(--surface-2);
	color: var(--text);
}

.main-nav .current-menu-item > a {
	color: var(--accent);
	background: var(--accent-soft);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
}

.header-actions .btn {
	padding: 9px 16px;
	font-size: 14.5px;
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
	padding: 60px 0 76px;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.02fr 0.98fr;
	gap: 60px;
	align-items: center;
}

.eyebrow {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

.hero-title {
	font-size: clamp(36px, 4.6vw, 58px);
	line-height: 1.06;
	letter-spacing: -0.03em;
	margin: 0 0 18px;
}

.hero-lead {
	font-size: 18px;
	color: var(--muted);
	max-width: 46ch;
	margin: 0 0 28px;
}

.ip-block {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 18px;
	margin-bottom: 28px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: var(--shadow-sm);
}

.ip-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.ip-value {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--text);
	font-family: var(--mono);
	font-size: 20px;
	font-weight: 600;
	cursor: pointer;
}

.ip-value .icon {
	width: 15px;
	height: 15px;
	color: var(--muted);
}

.ip-value:hover .icon {
	color: var(--accent);
}

.ip-hint {
	font-size: 12px;
	color: var(--muted);
}

.ip-hint.is-copied {
	color: var(--accent);
	font-weight: 600;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hero-art img {
	display: block;
	width: 100%;
	border-radius: 24px;
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	background: #e9f1ec;
}

/* --- Секции --------------------------------------------------------------- */

.section {
	padding: 68px 0;
}

.section + .section {
	border-top: 1px solid var(--border);
}

.section-head {
	margin-bottom: 32px;
	max-width: 640px;
}

.section-head-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	max-width: none;
}

.section-title {
	font-size: clamp(26px, 3vw, 36px);
	margin: 0;
}

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 600;
	color: var(--accent);
	text-decoration: none;
	white-space: nowrap;
}

.link-arrow .icon {
	width: 16px;
	height: 16px;
	transition: transform 0.15s ease;
}

.link-arrow:hover .icon {
	transform: translateX(3px);
}

/* --- О проекте ------------------------------------------------------------ */

.about-grid {
	display: grid;
	grid-template-columns: 1.45fr 0.75fr;
	gap: 56px;
	align-items: start;
}

.about-grid .section-head {
	max-width: none;
	margin-bottom: 0;
}

.about-grid .prose {
	margin: 18px 0 22px;
}

.facts-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 26px 26px 20px;
	box-shadow: var(--shadow-sm);
}

.facts-card h3 {
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--muted);
	margin-bottom: 14px;
}

.facts {
	margin: 0;
}

.facts > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px dashed var(--border);
}

.facts > div:last-child {
	border-bottom: 0;
}

.facts dt {
	color: var(--muted);
	font-size: 14.5px;
}

.facts dd {
	margin: 0;
	font-weight: 700;
	font-size: 14.5px;
	text-align: right;
}

.facts-note {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--muted);
}

/* --- Карточки ------------------------------------------------------------- */

.card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
	border-color: var(--border-strong);
}

.card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 26px;
	color: inherit;
	text-decoration: none;
}

.card-meta {
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0.01em;
}

.card-title {
	font-size: 20px;
	margin: 8px 0 10px;
}

.card-text {
	margin: 0 0 18px;
	color: var(--muted);
	font-size: 15px;
}

.card-more {
	margin-top: auto;
	font-size: 14px;
	font-weight: 700;
	color: var(--accent);
}

/* --- Плитки разделов ------------------------------------------------------ */

.tile-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.tile {
	display: block;
	padding: 26px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: inherit;
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tile:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
	border-color: var(--border-strong);
	color: inherit;
}

.tile-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-bottom: 16px;
	border-radius: 11px;
	background: var(--accent-soft);
	color: var(--accent);
}

.tile-icon .icon {
	width: 21px;
	height: 21px;
}

.tile h3 {
	font-size: 17px;
	margin-bottom: 6px;
}

.tile p {
	margin: 0;
	font-size: 14.5px;
	color: var(--muted);
}

/* --- Призыв --------------------------------------------------------------- */

.cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 40px 44px;
	border-radius: 24px;
	border: 1px solid var(--border);
	background: linear-gradient(135deg, var(--accent-soft), var(--surface));
}

.cta-title {
	font-size: clamp(22px, 2.4vw, 28px);
	margin-bottom: 8px;
}

.cta-text {
	margin: 0;
	color: var(--muted);
	max-width: 52ch;
}

/* --- Внутренние страницы -------------------------------------------------- */

.page-head {
	padding: 52px 0 8px;
}

.page-head .container {
	padding-bottom: 22px;
	border-bottom: 1px solid var(--border);
}

.page-title {
	font-size: clamp(30px, 4vw, 44px);
	margin: 6px 0 0;
}

.page-body {
	padding: 36px 0 92px;
}

.prose {
	color: var(--text-soft);
	font-size: 17px;
	line-height: 1.75;
}

.prose > *:first-child {
	margin-top: 0;
}

.prose h2 {
	margin: 2em 0 0.6em;
	font-size: 25px;
}

.prose h3 {
	margin: 1.6em 0 0.5em;
	font-size: 19px;
}

.prose ul,
.prose ol {
	margin: 0 0 1.2em;
	padding-left: 1.3em;
}

.prose li {
	margin: 0.35em 0;
}

.prose blockquote {
	margin: 1.6em 0;
	padding: 2px 0 2px 18px;
	border-left: 3px solid var(--accent);
	color: var(--muted);
}

.prose code {
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--surface-2);
	font-family: var(--mono);
	font-size: 0.9em;
}

.prose a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* --- Новости -------------------------------------------------------------- */

.post-list {
	border-top: 1px solid var(--border);
}

.post-row {
	border-bottom: 1px solid var(--border);
}

.post-row-link {
	display: block;
	padding: 26px 4px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.post-row-link:hover {
	color: inherit;
}

.post-row-title {
	font-size: 22px;
	margin: 6px 0 8px;
	transition: color 0.15s ease;
}

.post-row-link:hover .post-row-title {
	color: var(--accent);
}

.post-row-text {
	margin: 0;
	color: var(--muted);
	font-size: 15.5px;
	max-width: 70ch;
}

.single-post .page-head {
	padding-top: 56px;
}

.post-nav {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
	font-size: 15px;
}

.post-nav a {
	font-weight: 600;
}

.back-link {
	margin-top: 28px;
}

.pagination {
	margin-top: 36px;
}

.pagination .nav-links {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-radius: 9px;
	background: var(--surface);
	color: var(--text-soft);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.pagination .current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.empty-state {
	color: var(--muted);
}

.notfound {
	padding: 90px 0 110px;
	max-width: 620px;
}

.notfound .hero-actions {
	margin-top: 24px;
}

/* --- Подвал --------------------------------------------------------------- */

.site-footer {
	margin-top: 20px;
	padding: 56px 0 22px;
	border-top: 1px solid var(--border);
	background: var(--surface);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 36px;
}

.footer-note {
	margin: 14px 0 0;
	color: var(--muted);
	font-size: 14.5px;
	max-width: 40ch;
}

.footer-title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 14px;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menu li {
	margin: 8px 0;
	color: var(--muted);
	font-size: 14.5px;
}

.footer-menu a {
	color: var(--text-soft);
	text-decoration: none;
}

.footer-menu a:hover {
	color: var(--accent);
}

.footer-label {
	display: inline-block;
	min-width: 62px;
	color: var(--muted);
	font-size: 13px;
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 13.5px;
}

.footer-bottom p {
	margin: 0;
}

.footer-bottom a {
	color: var(--muted);
}

.footer-bottom a:hover {
	color: var(--accent);
}

/* --- bbPress ---
   Форум оформляется отдельным файлом assets/css/bbpress.css,
   он подключается только на страницах форума. */

/* --- SupportCandy ---
   Интерфейс тикетов оформляется отдельным файлом
   assets/css/supportcandy.css, он подключается только на /support/. */

/* --- Адаптивность --------------------------------------------------------- */

@media (max-width: 1000px) {
	.hero-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.hero-art {
		order: -1;
		max-width: 640px;
	}

	.hero {
		padding-top: 44px;
	}

	.about-grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.card-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.tile-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-grid {
		grid-template-columns: 1.4fr 1fr;
	}
}

@media (max-width: 860px) {
	.header-inner {
		flex-wrap: wrap;
		gap: 12px 20px;
		padding: 12px 0;
		min-height: 0;
	}

	.main-nav {
		order: 3;
		width: 100%;
		margin-left: 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.main-nav::-webkit-scrollbar {
		display: none;
	}

	.main-nav .menu,
	.main-nav ul {
		flex-wrap: nowrap;
	}

	.header-actions {
		margin-left: auto;
	}

	.header-actions .btn-ghost {
		display: none;
	}
}

@media (max-width: 640px) {
	body {
		font-size: 16px;
	}

	.container {
		width: min(var(--container), 100% - 32px);
	}

	.hero {
		padding: 34px 0 52px;
	}

	.hero-title {
		font-size: 34px;
	}

	.hero-lead {
		font-size: 16.5px;
	}

	.section {
		padding: 48px 0;
	}

	.section-head-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.card-grid,
	.tile-grid {
		grid-template-columns: 1fr;
	}

	.cta {
		flex-direction: column;
		align-items: flex-start;
		padding: 28px;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.footer-bottom {
		flex-direction: column;
	}

	.page-head {
		padding-top: 36px;
	}

	.post-nav {
		flex-direction: column;
	}
}

@media print {
	.site-header,
	.site-footer,
	.cta-section {
		display: none;
	}
}

/* --- Видео о сервере ----------------------------------------------------- */

.video-card {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #10130f;
	border: 1px solid var(--border);
	border-radius: 20px;
	box-shadow: var(--shadow);
}

.video-card iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.video-play {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.video-play img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease, filter 0.2s ease;
}

.video-play:hover img {
	transform: scale(1.02);
	filter: brightness(0.92);
}

.video-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	transform: translate(-50%, -50%);
	background: rgba(20, 26, 22, 0.62);
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	color: #fff;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.video-play:hover .video-play-icon {
	background: var(--accent);
	transform: translate(-50%, -50%) scale(1.05);
}

.video-play-icon svg {
	width: 34px;
	height: 34px;
	margin-left: 4px;
}

@media (max-width: 640px) {
	.video-play-icon {
		width: 64px;
		height: 64px;
	}

	.video-play-icon svg {
		width: 26px;
		height: 26px;
	}
}

/* --- Бейджи рангов ------------------------------------------------------- */

.mpc-rank {
	display: inline-block;
	padding: 1px 7px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text-soft);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.mpc-rank-hermit {
	background: #2f5f47;
	border-color: #2f5f47;
	color: #fff;
}

.mpc-rank-admin {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.mpc-rank-moder {
	background: #4f6b8a;
	border-color: #4f6b8a;
	color: #fff;
}

.mpc-rank-helper {
	background: #6f9a7f;
	border-color: #6f9a7f;
	color: #fff;
}

.mpc-rank-contentmaker {
	background: #8a6f4f;
	border-color: #8a6f4f;
	color: #fff;
}

.mpc-rank-eventmaker {
	background: #9a7b4f;
	border-color: #9a7b4f;
	color: #fff;
}

.mpc-rank-master {
	background: #7a6a8a;
	border-color: #7a6a8a;
	color: #fff;
}

.mpc-rank-builder {
	background: #6a8a7a;
	border-color: #6a8a7a;
	color: #fff;
}

.mpc-msg-rank {
	margin-left: 6px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.5;
}

.mpc-msg-rank.mpc-rank-admin,
.mpc-msg-rank.mpc-rank-hermit,
.mpc-msg-rank.mpc-rank-moder,
.mpc-msg-rank.mpc-rank-helper {
	color: #fff;
	background: var(--accent);
}

/* --- Чат: ссылки на профиль ---------------------------------------------- */

.mpc-msg-avatar-link {
	display: inline-flex;
	flex: none;
}

.mpc-msg-name,
.mpc-msg-name:hover {
	color: var(--text);
	text-decoration: none;
}

a.mpc-msg-name:hover {
	color: var(--accent);
	text-decoration: underline;
}
