/* ============================================================
   TownshipDonat — редизайн 2026
   Светлая тема · акцент зелёный · Unbounded (display) + Montserrat (body)
   ============================================================ */

/* ---------- Шрифты ---------- */
@font-face {
	font-family: 'Montserrat';
	font-display: swap;
	font-weight: 100 900;
	src: url(/assets/fonts/Montserrat-VariableFont_wght.ttf);
}
/* Unbounded подключается в <head> (Google Fonts), fallback — Montserrat */

/* ---------- Токены ---------- */
* { padding: 0; margin: 0; border: 0; box-sizing: border-box; }
:root {
	--bg: #F4F6F5;
	--card: #FFFFFF;
	--ink: #1B1F1D;
	--muted: #667069;
	--border: #E4E9E6;
	--accent: #14A36B;
	--accent-dark: #0E7F52;
	--accent-soft: #E4F5EC;
	--gold: #F0B429;
	--red: #E2584B;
	--shadow: 0 1px 2px rgba(16,24,20,.04), 0 8px 24px rgba(16,24,20,.06);
	--radius: 16px;
	--font-display: 'Unbounded', 'Montserrat', Arial, sans-serif;
	--font-body: 'Montserrat', Arial, sans-serif;
}
*, *:before, *:after { -webkit-box-sizing: border-box; box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.5;
	min-width: 320px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C9D2CD; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #AEB9B3; }
::selection { background: var(--accent); color: #fff; }

img { vertical-align: top; max-width: 100%; }
a { color: inherit; }
a:link, a:visited, a:hover { text-decoration: none; }
ul li { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: inherit; font-size: inherit; color: var(--ink); }

input, button, textarea {
	font-family: var(--font-body);
	font-size: inherit;
	outline: none;
	border: 1px solid transparent;
}
button { cursor: pointer; color: inherit; background-color: transparent; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; flex: 0 0 auto; }
input::-webkit-search-decoration, input::-webkit-search-cancel-button,
input::-webkit-search-results-button, input::-webkit-search-results-decoration { display: none; }

.text { color: var(--muted); line-height: 1.6; font-size: 0.9rem; }
.ns { height: 100px; }

/* ---------- Раскладка ---------- */
.wrapper { padding: 40px 0 16px; }
[class*="__container"], .container {
	width: 100%;
	max-width: 1160px;
	padding: 0 24px;
	margin: 0 auto;
}

/* ---------- Шапка ---------- */
.header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.header__container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 12px;
	padding-bottom: 12px;
}
.header__logo { display: flex; align-items: center; gap: 12px; }
.header__logo img { width: 44px; height: 44px; border-radius: 12px; }
.logo-text {
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .01em;
}
.logo-text p {
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 0.72rem;
	color: var(--muted);
}
.header__nav { display: flex; align-items: center; gap: 8px; }
.header__nav a.nav-link {
	padding: 9px 14px;
	border-radius: 10px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink);
	transition: background .2s;
}
.header__nav a.nav-link:hover { background: #EFF3F0; }
.header__nav-online {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--accent-soft);
	padding: 9px 16px;
	border-radius: 999px;
}
.header__nav-online::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	animation: online 1.6s ease infinite;
	flex: 0 0 auto;
}
.header__nav-online span { font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.header__nav-online p {
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--accent-dark);
}
@keyframes online {
	0%   { box-shadow: 0 0 0 0 rgba(20,163,107,.45); }
	70%  { box-shadow: 0 0 0 6px rgba(20,163,107,0); }
	100% { box-shadow: 0 0 0 0 rgba(20,163,107,0); }
}
/* Универсальная кнопка (используется и в links.php) */
.button__htb {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	padding: 12px 22px;
	border-radius: 12px;
	transition: background .2s, transform .2s;
	box-shadow: 0 8px 18px rgba(20,163,107,.25);
}
.button__htb:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* ---------- LIVE-лента покупок ---------- */
.livebuy { background: var(--card); border-bottom: 1px solid var(--border); }
.livebuy__container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 10px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.livebuy__title { flex: 0 0 auto; display: flex; align-items: baseline; gap: 10px; }
.livebuy__title p:first-child {
	font-weight: 700;
	font-size: 0.82rem;
	letter-spacing: .1em;
	color: var(--ink);
}
.livebuy__title p:first-child span {
	color: var(--red);
	padding-right: 2px;
	animation: livedot 1.4s ease infinite;
}
.livebuy__title p:last-child {
	font-weight: 600;
	font-size: 0.68rem;
	letter-spacing: .14em;
	color: var(--muted);
}
@keyframes livedot {
	0%, 100% { opacity: 1; }
	50% { opacity: .35; }
}
.livebuy__items {
	display: flex;
	align-items: center;
	gap: 10px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 6px 0;
}
.livebuy__items::-webkit-scrollbar { display: none; }
.livebuy__item {
	display: grid;
	grid-template-columns: auto auto;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 10px;
	flex: 0 0 auto;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 6px 16px 6px 6px;
	animation: liveIn .45s ease;
	-webkit-user-select: none;
	user-select: none;
	transition: border-color .2s;
}
@keyframes liveIn { from { opacity: 0; transform: translateY(-8px); } }
.livebuy__item img {
	grid-row: 1 / 3;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	padding: 3px;
	box-shadow: 0 0 0 2px var(--live-c, var(--accent));
}
.livebuy__item-time { font-size: 0.78rem; font-weight: 700; position: static; }
.livebuy__item-tag { font-size: 0.66rem; font-weight: 500; color: var(--accent-dark); white-space: nowrap; }
.item_first  { --live-c: var(--gold); }
.item_second { --live-c: var(--accent); }
.item_third  { --live-c: #5E9FE8; }
.livebuy__item:hover { border-color: var(--accent); }
.livebuy__item-img {
	width: 60px;
	height: 60px;
	border-radius: 0.5rem;
	background: url('/assets/img/banknotes.png');
	background-position: center;
	background-size: cover;
}

/* ---------- Секции ---------- */
.section { margin-top: 56px; }
.section-head { margin-bottom: 22px; }
.section-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.3rem;
	letter-spacing: .01em;
	display: flex;
	align-items: center;
	gap: 12px;
}
.section-title::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 22px;
	border-radius: 2px;
	background: var(--accent);
}
.section-sub { margin-top: 8px; color: var(--muted); font-size: 0.88rem; }

/* ---------- Hero ---------- */
.hero { padding: 8px 0 4px; max-width: 760px; }
.hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--accent-soft);
	color: var(--accent-dark);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 7px 14px;
	border-radius: 999px;
	margin-bottom: 20px;
}
.hero h1 {
	font-family: var(--font-display);
	font-size: clamp(1.7rem, 4vw, 2.4rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .01em;
}
.hero__text { margin-top: 14px; color: var(--muted); font-size: 1rem; max-width: 580px; line-height: 1.6; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 9px 16px;
	font-size: 0.82rem;
	font-weight: 600;
}

/* ---------- Товары ---------- */
.tovars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tovar {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px 16px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	transition: transform .25s ease, box-shadow .25s ease;
}
.tovar:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tovar--popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.tovar__title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.tovar__title p {
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 0.76rem;
	color: var(--muted);
	margin-top: 2px;
}
.tovar__img {
	width: 96px;
	height: 96px;
	margin: 16px 0;
	filter: drop-shadow(0 10px 16px rgba(20,163,107,.28));
}
.tovar__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--gold);
	color: #3D2B00;
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
}
.tovar__discount { display: none; }
.tovar__button-buy {
	margin-top: auto;
	width: 100%;
	padding: 13px 16px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #17B877, #0E9A5F);
	border-radius: 12px;
	position: relative;
	overflow: hidden;
	-webkit-user-select: none;
	user-select: none;
	box-shadow: 0 8px 18px rgba(20,163,107,.25);
	transition: transform .2s ease, box-shadow .2s ease;
}
.tovar__button-buy b { font-weight: 800; }
.tovar__button-buy:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(20,163,107,.36); }
.tovar__button-buy:active { transform: translateY(0); }
.tovar__button-buy::after {
	top: -0.7rem;
	position: absolute;
	content: '';
	background-color: rgba(255,255,255,0.18);
	height: 200%;
	padding: 0.2rem 0.6rem;
	transform: translateX(-160px) rotate(-25deg);
	animation: button 4s ease infinite forwards;
}
@keyframes button {
	from { transform: translateX(-200px) rotate(-25deg); }
	to { transform: translateX(160px) rotate(-25deg); }
}

/* ---------- Доверие (features) ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px;
	transition: transform .25s ease, box-shadow .25s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature__icon {
	width: 46px;
	height: 46px;
	border-radius: 13px;
	background: var(--accent-soft);
	color: var(--accent-dark);
	display: flex;
	align-items: center;
	justify-content: center;
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 0.95rem; font-weight: 700; margin: 14px 0 6px; }
.feature p { font-size: 0.83rem; color: var(--muted); line-height: 1.55; }

/* ---------- Как купить (steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
}
.step__num {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 18px rgba(20,163,107,.3);
}
.step h3 { font-size: 1rem; font-weight: 700; margin: 14px 0 6px; }
.step p { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 780px; }
.faq details {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 16px 20px;
	transition: border-color .2s;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
	font-weight: 600;
	font-size: 0.92rem;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
	content: '+';
	font-size: 1.4rem;
	line-height: 1;
	color: var(--accent);
	transition: transform .2s;
}
.faq details[open] summary::after { content: '−'; }
.faq details p { margin-top: 10px; font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* ---------- Футер ---------- */
.footer {
	margin-top: 64px;
	background: #171B19;
	color: rgba(255,255,255,.65);
	padding: 40px 0 28px;
}
.footer__container {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 40px;
}
.footer .header__logo { margin-bottom: 14px; }
.footer .logo-text { color: #fff; }
.footer .logo-text p { color: rgba(255,255,255,.5); }
.footer__tagline { font-size: 0.85rem; max-width: 300px; line-height: 1.5; }
.footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 48px; }
.footer__nav a {
	font-size: 0.85rem;
	font-weight: 500;
	color: rgba(255,255,255,.75);
	transition: color .2s;
}
.footer__nav a:hover { color: #fff; }
.footer__bottom {
	display: block;
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid rgba(255,255,255,.12);
}
.footer__text { font-size: 0.78rem; line-height: 1.6; color: rgba(255,255,255,.42); max-width: 920px; }
.footer__text strong { color: rgba(255,255,255,.68); font-weight: 600; }
.footer__copy { margin-top: 16px; font-size: 0.78rem; color: rgba(255,255,255,.38); }

/* ---------- Модальное окно ---------- */
.popup__background {
	z-index: 1000;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	position: fixed;
	display: none;
	background: rgba(12,18,15,.55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.modal__popupbox {
	z-index: 1001;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	position: fixed;
	display: none;
	flex-direction: column;
	row-gap: 10px;
	background: var(--card);
	box-shadow: 0 24px 64px rgba(0,0,0,.28);
	padding: 26px;
	border-radius: 20px;
	width: 400px;
	max-width: calc(100% - 32px);
	-webkit-animation: modalIn .28s cubic-bezier(.2,.9,.3,1.15);
	animation: modalIn .28s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes modalIn {
	from { opacity: 0; transform: translate(-50%,-48%) scale(.96); }
	to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
.popup__close {
	cursor: pointer;
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: #F0F2F0;
	color: var(--muted);
	font-size: 0.8rem;
	transition: background .2s, color .2s;
}
.popup__close:hover { background: #E4E7E5; color: var(--ink); }
.popup__title {
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 700;
	text-align: center;
	padding-right: 32px;
}
.popup__subtitle {
	font-size: 0.8rem;
	color: var(--muted);
	text-align: center;
	margin-top: -4px;
}
.popup__price {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--accent-soft);
	border-radius: 12px;
	padding: 12px 16px;
	font-size: 0.88rem;
	font-weight: 600;
	margin-top: 4px;
}
.popup__price b { color: var(--accent-dark); font-size: 1.05rem; font-weight: 800; }
.popup__label { font-size: 0.78rem; font-weight: 700; }
.popup__input {
	margin-top: 2px;
	width: 100%;
	padding: 12px 14px;
	font-size: 0.92rem;
	border: 1.5px solid var(--border);
	border-radius: 12px;
	background: #fff;
	color: var(--ink);
	transition: border-color .2s, box-shadow .2s;
}
.popup__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,163,107,.12); }
.popup__input::placeholder { color: #A9B2AC; font-size: 0.85rem; }
.popup__msg { font-size: 0.76rem; color: var(--red); font-weight: 500; }
.popup__rules {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 0.78rem;
	color: var(--muted);
	margin-bottom: 2px;
}
.popup__rules a { color: var(--accent-dark); font-weight: 600; text-decoration: underline; }
.button__confirm {
	margin-top: 6px;
	width: 100%;
	padding: 14px;
	border-radius: 12px;
	font-size: 0.95rem;
	font-weight: 700;
	color: #96A09A;
	background: #E9EDEB;
	cursor: not-allowed;
	position: relative;
	overflow: hidden;
	transition: background .25s, transform .2s, box-shadow .2s;
	-webkit-user-select: none;
	user-select: none;
}
.button__confirm.is-ready {
	background: linear-gradient(135deg, #17B877, #0E9A5F);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(20,163,107,.32);
}
.button__confirm.is-ready:hover { transform: translateY(-2px); }
.button__confirm.is-ready::after {
	top: -0.7rem;
	position: absolute;
	content: '';
	background-color: rgba(255,255,255,0.18);
	height: 200%;
	padding: 0.2rem 0.6rem;
	transform: translateX(-160px) rotate(-25deg);
	animation: button 4s ease infinite forwards;
}
.popup__note {
	font-size: 0.72rem;
	color: var(--muted);
	text-align: center;
	margin-top: 2px;
}
.popup__wait { display: none; }

/* ---------- Попап «Как купить» (links.php) ---------- */
.htb__popup {
	z-index: 1002;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	position: fixed;
	display: none;
	flex-direction: column;
	row-gap: 1rem;
	background: #202421;
	color: #fff;
	box-shadow: 0 24px 64px rgba(0,0,0,.35);
	padding: 2rem 2.5rem;
	border-radius: 20px;
	max-width: 520px;
	width: calc(100% - 32px);
}
.htb__popup img { max-width: 300px; margin: 0.5rem auto; border-radius: 12px; }

/* ---------- Адаптив ---------- */
@media (max-width: 935px) {
	.tovars { grid-template-columns: repeat(3, 1fr); }
	.features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 735px) {
	.wrapper { padding-top: 24px; }
	.section { margin-top: 40px; }
	.header__nav a.nav-link { display: none; }
	.logo-text { font-size: 0.9rem; }
	.header__logo img { width: 38px; height: 38px; }
	.hero { padding-top: 4px; }
	.tovars { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.features { grid-template-columns: 1fr; }
	.steps { grid-template-columns: 1fr; }
	.footer__container { flex-direction: column; gap: 28px; }
}
@media (max-width: 420px) {
	.tovar { padding: 18px 12px 14px; }
	.tovar__img { width: 72px; height: 72px; margin: 12px 0; }
	.tovar__title { font-size: 1rem; }
	.header__nav-online p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}
