/* ============================================================
   Synapse Brain Games — тема WordPress
   Тёплая, минималистичная палитра под приложение Synapse.
   ============================================================ */

:root {
	--bg:        #fbeae0;
	--surface:   #ffffff;
	--text:      #2b211c;
	--text-soft: #6b5d54;
	--primary:   #e8794b;
	--primary-d: #cf6136;
	--border:    #ecdccf;
	--radius:    16px;
	--radius-sm: 10px;
	--maxw:      1080px;
	--maxw-narrow: 720px;
	--font: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg:        #1c1613;
		--surface:   #26201c;
		--text:      #f2e7de;
		--text-soft: #b7a595;
		--border:    #38302a;
	}
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary-d); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; margin: 0 0 0.5em; }
h1 { font-size: clamp(28px, 5vw, 44px); }
h2 { font-size: clamp(22px, 3.5vw, 32px); }

.container {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
}
.container--narrow { max-width: var(--maxw-narrow); }

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 9999;
	background: var(--surface); color: var(--text);
	padding: 10px 16px; border-radius: var(--radius-sm);
	clip: auto; width: auto; height: auto;
}

/* ---------- Кнопки ---------- */
.btn {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 999px;
	font-weight: 700;
	border: 0;
	cursor: pointer;
	transition: transform .15s ease, background .2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-d); color: #fff; }
.btn--coffee { background: #ffdd00; color: #2b211c; font-size: 17px; }
.btn--coffee:hover { background: #f2c200; color: #2b211c; }

/* ---------- Шапка ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--border);
}
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 66px; gap: 16px;
}
.site-title { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); }
.site-title:hover { text-decoration: none; }
.site-logo-img { width: 36px; height: 36px; display: block; border-radius: 8px; }
.site-title__text { line-height: 1; }
.custom-logo { max-height: 48px; width: auto; }

.site-nav .nav-menu {
	display: flex; gap: 6px; list-style: none; margin: 0; padding: 0;
}
.nav-menu a {
	display: block; padding: 8px 14px; border-radius: 999px;
	color: var(--text); font-weight: 600;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
	background: var(--surface); color: var(--primary-d); text-decoration: none;
}

.nav-toggle {
	display: none; flex-direction: column; gap: 5px;
	background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
	width: 24px; height: 2px; background: var(--text); border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}

/* ---------- Герой (главная) ---------- */
.hero { padding: 56px 0 28px; text-align: center; }
.hero__title { margin-bottom: 12px; }
.hero__subtitle {
	max-width: 620px; margin: 0 auto 26px;
	color: var(--text-soft); font-size: clamp(17px, 2.4vw, 20px);
}

/* ---------- Встроенные игры ---------- */
.play-section { padding: 12px 0 56px; }
.synapse-embed { text-align: center; }
.synapse-embed iframe { display: block; margin: 0 auto; }
.synapse-fullscreen-link { margin-top: 14px; }
.synapse-fullscreen-link a { font-weight: 700; }

/* ---------- Секция внизу главной ---------- */
.home-bottom { padding: 16px 0 64px; }
.home-bottom__inner { text-align: center; }
.home-bottom__heading { margin-bottom: 12px; }
.home-bottom__text { color: var(--text-soft); font-size: 18px; margin-bottom: 24px; }
.home-bottom__text p { margin: 0 0 1em; }
.home-bottom__bmc { margin: 8px 0 0; }
.home-bottom__tagline {
  margin: 32px auto 0; max-width: 760px;
  font-size: clamp(24px, 4.5vw, 40px); font-weight: 800; line-height: 1.18;
  letter-spacing: -0.01em; color: var(--text);
}

/* ---------- One-page sections (About / Contact) ---------- */
.home-section { padding: 56px 0; scroll-margin-top: 84px; }
.home-contact { border-top: 1px solid var(--border); }
.home-section__title { text-align: center; margin-bottom: 20px; }
.home-section__text { color: var(--text-soft); font-size: 18px; line-height: 1.7; }
.home-section__text p { margin: 0 0 1.1em; }
.home-section__text p:last-child { margin-bottom: 0; }
.home-contact .contact-form { max-width: 560px; margin: 24px auto 0; }

/* ---------- Контент страниц ---------- */
.single-page, .single-post { padding: 44px 0 64px; }
.page-header { margin-bottom: 24px; }
.page-thumbnail, .post-thumbnail { margin-bottom: 24px; }
.page-thumbnail img, .post-thumbnail img { border-radius: var(--radius); }
.entry-content > * { margin-top: 0; margin-bottom: 1.1em; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); }
.page-content { padding: 40px 0; }

/* ---------- Форма контактов ---------- */
.contact-box {
	margin-top: 32px; padding: 28px;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius);
}
.contact-box__title { margin-bottom: 8px; }
.contact-box__hint { color: var(--text-soft); font-size: 15px; margin-bottom: 20px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.contact-form input,
.contact-form textarea {
	font: inherit; padding: 12px 14px;
	border: 1px solid var(--border); border-radius: var(--radius-sm);
	background: var(--bg); color: var(--text);
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.contact-form button { align-self: flex-start; }

/* ---------- Блог ---------- */
.blog-layout { display: flex; gap: 40px; padding: 44px 20px 64px; align-items: flex-start; }
.blog-main { flex: 1 1 auto; min-width: 0; }
.blog-sidebar { flex: 0 0 280px; }
.blog-header { margin-bottom: 28px; }

.post-grid {
	display: grid; gap: 26px;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.post-card {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius); overflow: hidden;
	display: flex; flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.post-card__thumb img { width: 100%; height: 180px; object-fit: cover; }
.post-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.post-card__title { font-size: 20px; margin: 0; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--primary-d); text-decoration: none; }
.post-card__meta { color: var(--text-soft); font-size: 14px; margin: 0; }
.post-card__excerpt { color: var(--text-soft); font-size: 15px; }
.post-card__more { font-weight: 700; margin-top: 4px; }

.widget { margin-bottom: 28px; }
.widget-title { font-size: 17px; margin-bottom: 12px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--border); }

/* ---------- Одиночная запись ---------- */
.post-meta { color: var(--text-soft); font-size: 15px; }
.post-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags li a {
	display: inline-block; padding: 4px 12px; font-size: 14px;
	background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 36px 0; }

/* ---------- Пагинация ---------- */
.pagination { margin-top: 40px; }
.pagination .page-numbers {
	display: inline-block; padding: 8px 14px; margin: 0 3px;
	border-radius: var(--radius-sm); background: var(--surface);
	border: 1px solid var(--border); color: var(--text);
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Подвал ---------- */
.site-footer {
	margin-top: 40px; padding: 40px 0;
	background: var(--surface); border-top: 1px solid var(--border);
}
.footer-widgets {
	display: grid; gap: 30px; margin-bottom: 28px;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.footer-menu {
	display: flex; flex-wrap: wrap; gap: 6px 18px;
	list-style: none; padding: 0; margin: 0 0 16px;
	justify-content: center;
}
.footer-menu a { color: var(--text-soft); font-weight: 600; }
.site-copy { text-align: center; color: var(--text-soft); font-size: 14px; margin: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 782px) {
	.nav-toggle { display: flex; }
	.site-nav {
		position: absolute; top: 66px; left: 0; right: 0;
		background: var(--bg); border-bottom: 1px solid var(--border);
		max-height: 0; overflow: hidden; transition: max-height .3s ease;
	}
	.site-nav.is-open { max-height: 70vh; }
	.site-nav .nav-menu { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
	.nav-menu a { padding: 12px 14px; border-radius: var(--radius-sm); }

	.blog-layout { flex-direction: column; }
	.blog-sidebar { flex-basis: auto; width: 100%; }
}

/* ============================================================
   Privacy Policy page template (template-privacy.php)
   ============================================================ */
.privacy-meta {
	margin: 6px 0 0;
	color: var(--text-soft);
	font-size: 15px;
}
.privacy-meta code {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 1px 6px;
	font-size: 13px;
	word-break: break-word;
}
.privacy-callout {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 22px;
	margin: 28px 0 8px;
}
.privacy-callout p { margin: 0; }
.privacy-body h2 {
	margin-top: 1.8em;
	padding-top: .6em;
	border-top: 1px solid var(--border);
}
.privacy-body h3 { margin-top: 1.5em; }
.privacy-body ul { padding-left: 22px; }
.privacy-body li { margin-bottom: 7px; }
.privacy-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.1em;
	font-size: 15.5px;
}
.privacy-table th,
.privacy-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}
.privacy-table th {
	font-weight: 700;
	background: var(--surface);
}
.privacy-table tr:last-child td { border-bottom: none; }
.privacy-extra {
	margin-top: 1.8em;
	padding-top: 1.2em;
	border-top: 1px solid var(--border);
	color: var(--text-soft);
}
@media (max-width: 520px) {
	.privacy-table { font-size: 14px; }
	.privacy-table th,
	.privacy-table td { padding: 8px 8px; }
	.privacy-callout { padding: 16px 16px; }
}
