/*
Theme Name: Pipl VPN Ru
Theme URI: https://piplvpn.info/
Description: Тема сайта Pipl VPN Ru. Тёмное полотно офсайта, фирменный градиент розовый→фиолетовый, первый экран-развилка из двух путей подключения.
Author: Pipl VPN Ru
Version: 1.0.8
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: piplvpn-ru
*/

/* ── Токены ─────────────────────────────────────────────── */
:root {
	--ink: #0f0e17;          /* полотно офсайта */
	--ink-2: #171522;        /* поверхность */
	--ink-3: #1e1b2c;        /* вложенная поверхность */
	--line: #2a2740;
	--txt: #e8e6f0;          /* основной текст офсайта */
	--txt-dim: #b8a8ff;      /* вторичный текст офсайта */
	--txt-mute: #8f89a8;
	--pink: #fe588b;
	--violet: #8a67fe;
	--grad: linear-gradient(135deg, #fe588b, #8a67fe);

	--wrap: 1520px;
	--pad: 32px;
	--col: 780px;            /* текстовая колонка */
	--r: 4px;                /* блоки почти без скругления */
	--r-btn: 999px;

	--f-h: "Zen Kaku Gothic New", "Segoe UI", Tahoma, sans-serif;
	--f-t: Carlito, "Segoe UI", Tahoma, sans-serif;

	--ease: cubic-bezier(.16, 1, .3, 1);
}

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

html { -webkit-text-size-adjust: 100%; background: var(--ink); }

body {
	margin: 0;
	background: var(--ink);
	color: var(--txt);
	font: 17px/1.62 var(--f-t);
	overflow-x: hidden;
}

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

a { color: var(--txt); text-decoration: none; }
a:hover { color: #fff; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.skip {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--ink-2); color: var(--txt); padding: 12px 18px;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.col { max-width: var(--col); }

/* ── Фон: звёздное полотно ──────────────────────────────
   Полотно висит под всей страницей. Ширина и высота заданы явно:
   canvas, растянутый одним inset, отдаёт свой внутренний размер в
   раскладку и уводит страницу в горизонтальное переполнение.
   Содержимое поднято на z-index 1 — иначе позиционированное полотно
   ложится поверх статичных блоков main и подвала. */
.sky {
	position: fixed; top: 0; left: 0;
	width: 100%; height: 100%;
	display: block; z-index: 0; pointer-events: none;
}
main, .foot { position: relative; z-index: 1; }

/* ── Типографика ────────────────────────────────────────── */
.h1, .h2, .h3, h1, h2, h3 {
	font-family: var(--f-h);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.02em;
	margin: 0 0 .5em;
	overflow-wrap: break-word;
}
.h1, h1 { font-size: clamp(34px, 4.6vw, 68px); font-weight: 900; }
.h2, h2 { font-size: clamp(26px, 2.7vw, 40px); }
.h3, h3 { font-size: clamp(19px, 1.5vw, 24px); }

/* Одно слово заголовка — фирменным градиентом. Цвет в наборном тексте не используется. */
.gr {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lead { font-size: clamp(18px, 1.35vw, 21px); color: var(--txt); }
.dim { color: var(--txt-dim); }
.mute { color: var(--txt-mute); }

.sect { padding: clamp(56px, 6vw, 104px) 0 0; }
.sect--tight { padding-top: clamp(36px, 3.4vw, 56px); }

/* ── Разделительная строка (приём с референса) ──────────── */
.rule {
	display: flex; align-items: center; gap: 16px;
	margin: clamp(46px, 5vw, 84px) 0 0;
	font-family: var(--f-h);
	font-size: 12px; letter-spacing: .08em; color: var(--txt-mute);
}
.rule__line { flex: 1 1 auto; height: 1px; background: var(--line); }
.rule__mark, .rule__year { flex: 0 0 auto; }

/* ── Кнопки ─────────────────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 11px 26px;
	border: 0; border-radius: var(--r-btn);
	font-family: var(--f-h); font-size: 16px; font-weight: 700; line-height: 1.2;
	cursor: pointer; text-align: center;
	transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.btn--main { background: var(--grad); color: #14101c; }
.btn--main:hover { color: #14101c; box-shadow: 0 10px 30px -12px rgba(254, 88, 139, .75); transform: translateY(-1px); }
.btn--line { background: transparent; color: var(--txt); box-shadow: inset 0 0 0 1px var(--line); }
.btn--line:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--txt-dim); }
.btn--sm { min-height: 38px; padding: 8px 18px; font-size: 14px; }

/* ── Шапка: плавающая полоса поверх первого экрана ──────── */
.top {
	position: sticky; top: 0; z-index: 40;
	background: rgba(15, 14, 23, .82);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}
.top__in {
	display: grid; grid-template-columns: auto 1fr auto;
	align-items: center; gap: 14px;
	min-height: 66px;
}
.top__brand {
	font-family: var(--f-h); font-weight: 900; font-size: 19px; letter-spacing: -.02em;
	justify-self: center; white-space: nowrap;
}
.top__brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top__cta { justify-self: end; }

.burger {
	display: inline-flex; align-items: center; gap: 9px;
	background: none; border: 0; padding: 8px 4px; cursor: pointer;
	color: var(--txt); font-family: var(--f-h); font-size: 14px; font-weight: 700;
}
.burger__ic { display: block; width: 20px; height: 12px; position: relative; }
.burger__ic::before, .burger__ic::after {
	content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
	transition: transform .22s var(--ease), top .22s var(--ease);
}
.burger__ic::before { top: 0; }
.burger__ic::after { top: 10px; }
.burger.is-open .burger__ic::before { top: 5px; transform: rotate(45deg); }
.burger.is-open .burger__ic::after { top: 5px; transform: rotate(-45deg); }

.drawer {
	position: fixed; inset: 66px 0 auto 0; z-index: 39;
	background: var(--ink-2); border-bottom: 1px solid var(--line);
	max-height: calc(100dvh - 66px); overflow-y: auto;
	transform: translateY(-8px); opacity: 0; visibility: hidden;
	transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.drawer.is-open { transform: none; opacity: 1; visibility: visible; }
.drawer__grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
	gap: 2px 28px;
	/* Боковой отступ повторяет .wrap: сокращённое padding с нулём по бокам
	   перебивало padding самой .wrap, и пункты меню липли к краям экрана. */
	padding: 22px var(--pad) 30px;
}
.drawer a {
	display: block; padding: 11px 0;
	font-family: var(--f-h); font-size: 17px; font-weight: 500;
	border-bottom: 1px solid var(--line);
}
.drawer a:hover { color: var(--txt-dim); }

/* ── Первый экран: развилка из двух путей ───────────────── */
.open { position: relative; padding: clamp(44px, 5.6vw, 92px) 0 0; }
.open__top { max-width: 1080px; }
.open__lead { margin-top: 18px; max-width: var(--col); }
.open__act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; align-items: center; }

.fork { margin-top: clamp(34px, 4vw, 62px); }
.fork__stem { display: block; width: 100%; height: 64px; }
.fork__stem line, .fork__stem path { stroke: var(--line); stroke-width: 1; fill: none; }
.fork__grid {
	display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 22px;
}
.path {
	position: relative; background: var(--ink-2); border-radius: var(--r);
	padding: clamp(22px, 2.2vw, 34px);
	display: flex; flex-direction: column; gap: 14px;
}
.path--alt { background: var(--ink-3); }
.path__h { font-size: clamp(21px, 1.8vw, 28px); margin: 0; }

/* Ховер: в заголовок блока наливается фирменный градиент слева направо,
   сам блок не двигается. */
.hv {
	background-image: var(--grad); background-repeat: no-repeat;
	background-size: 0% 100%;
	-webkit-background-clip: text; background-clip: text;
	transition: background-size .38s var(--ease), color .38s var(--ease);
}
.path:hover .hv, .blk:hover .hv, .card:hover .hv { background-size: 100% 100%; color: transparent; }
.path__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.path__list li { position: relative; padding-left: 20px; color: var(--txt); }
.path__list li::before {
	content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 1px; background: var(--txt-dim);
}
.path__foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ── Цифры и цена ───────────────────────────────────────── */
.price { display: inline-flex; flex-direction: column; line-height: 1.05; vertical-align: bottom; }
.price__n { font-family: var(--f-h); font-weight: 900; font-size: clamp(26px, 2.2vw, 36px); letter-spacing: -.03em; }
.price__t { font-size: 13px; color: var(--txt-mute); margin-top: 3px; }

.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 22px; margin-top: 30px; }
.fig__n { font-family: var(--f-h); font-weight: 900; font-size: clamp(28px, 2.6vw, 42px); letter-spacing: -.03em; display: block; }
.fig__t { color: var(--txt-mute); font-size: 15px; display: block; margin-top: 4px; }

/* ── Асимметричные блоки ────────────────────────────────── */
.asym { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.asym--75 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.asym--57 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.asym--84 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }

.blk {
	background: var(--ink-2); border-radius: var(--r);
	padding: clamp(20px, 2vw, 32px);
}
.blk--flat { background: transparent; padding-left: 0; padding-right: 0; }
.blk--edge { background: var(--ink-3); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.card { background: var(--ink-2); border-radius: var(--r); padding: 22px; }
.card__h { font-size: 18px; margin: 0 0 8px; }
.card p { font-size: 16px; }

/* ── Шаги ───────────────────────────────────────────────── */
.steps { counter-reset: st; display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li {
	counter-increment: st; position: relative; padding: 16px 18px 16px 58px;
	background: var(--ink-2); border-radius: var(--r);
}
.steps li::before {
	content: counter(st); position: absolute; left: 20px; top: 15px;
	font-family: var(--f-h); font-weight: 900; font-size: 20px;
	background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Таблицы ────────────────────────────────────────────── */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--f-h); font-weight: 700; font-size: 14px; color: var(--txt-dim); }

@media (max-width: 720px) {
	.tw table, .tw thead, .tw tbody, .tw tr, .tw th, .tw td { display: block; }
	.tw thead { display: none; }
	.tw tr { background: var(--ink-2); border-radius: var(--r); margin-bottom: 12px; padding: 6px 4px; }
	.tw td { border: 0; padding: 8px 14px; }
	.tw td::before {
		content: attr(data-label); display: block;
		font-family: var(--f-h); font-size: 12px; color: var(--txt-mute); margin-bottom: 3px;
	}
}

/* ── Тарифы ─────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 18px; }
.plan { background: var(--ink-2); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.plan--best { background: var(--ink-3); }
.plan__n { font-family: var(--f-h); font-weight: 700; font-size: 17px; }
.plan__note { color: var(--txt-mute); font-size: 15px; }
.plan__btn { margin-top: auto; }
.plan .btn { width: 100%; }

/* ── Звёзды ─────────────────────────────────────────────── */
.stars { position: relative; display: inline-flex; line-height: 0; vertical-align: middle; }
.stars__bg, .stars__fg { display: flex; gap: 2px; }
.stars__bg { color: var(--txt-mute); opacity: .35; }
.stars__fg { position: absolute; top: 0; left: 0; bottom: 0; overflow: hidden; white-space: nowrap; color: var(--pink); }
.stars svg { width: var(--star-size, 18px); height: var(--star-size, 18px); flex-shrink: 0; fill: currentColor; stroke: currentColor; }

.score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.score__n { font-family: var(--f-h); font-weight: 900; font-size: clamp(40px, 4vw, 64px); letter-spacing: -.03em; }

.crit { display: grid; gap: 10px; }
.crit__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.crit__why { grid-column: 1 / -1; color: var(--txt-mute); font-size: 15px; }
.crit__val { font-family: var(--f-h); font-weight: 700; }

.rev { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.rev__i { background: var(--ink-2); border-radius: var(--r); padding: 22px; }
.rev__top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.rev__who { font-family: var(--f-h); font-weight: 700; }
.rev__geo { color: var(--txt-mute); font-size: 14px; }

/* ── Аккордеон ──────────────────────────────────────────── */
.qa { display: grid; gap: 10px; }
.qa__item { background: var(--ink-2); border-radius: var(--r); }
.qa__q {
	width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
	background: none; border: 0; padding: 18px 20px; cursor: pointer;
	color: var(--txt); font-family: var(--f-h); font-size: 17px; font-weight: 700; text-align: left;
}
.qa__ic { position: relative; flex: 0 0 14px; height: 14px; }
.qa__ic::before, .qa__ic::after {
	content: ""; position: absolute; background: var(--txt-dim); transition: transform .22s var(--ease);
}
.qa__ic::before { left: 0; right: 0; top: 6px; height: 2px; }
.qa__ic::after { top: 0; bottom: 0; left: 6px; width: 2px; }
.qa__q[aria-expanded="true"] .qa__ic::after { transform: scaleY(0); }
.qa__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s var(--ease); }
.qa__item.is-open .qa__a { grid-template-rows: 1fr; }
.qa__inner { overflow: hidden; }
.qa__inner p { padding: 0 20px 20px; color: var(--txt); }

/* ── Дальше по теме ─────────────────────────────────────── */
.also { margin-top: clamp(54px, 5vw, 88px); }
.also__h { font-size: clamp(22px, 2vw, 30px); }
.also__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.also__item { display: grid; gap: 6px; background: var(--ink-2); border-radius: var(--r); padding: 20px; }
.also__name { font-family: var(--f-h); font-weight: 700; }
.also__note { color: var(--txt-mute); font-size: 15px; }
.also__go { color: var(--txt-dim); font-family: var(--f-h); transition: transform .2s var(--ease); }
.also__item:hover .also__go { transform: translateX(6px); }

/* ── Крошки ─────────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--txt-mute); padding-top: 22px; }
.crumbs a { color: var(--txt-dim); }
.crumbs__sep { opacity: .5; }

/* ── Подвал ─────────────────────────────────────────────── */
.foot { margin-top: clamp(64px, 6vw, 110px); border-top: 1px solid var(--line); padding: clamp(38px, 4vw, 62px) 0 40px; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
.foot__brand { font-family: var(--f-h); font-weight: 900; font-size: 22px; letter-spacing: -.02em; }
.foot__brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot__about { color: var(--txt-mute); font-size: 15px; margin-top: 12px; max-width: 46ch; }
.foot__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 22px; }
.foot__cols h3 { font-size: 13px; color: var(--txt-dim); letter-spacing: .05em; margin-bottom: 10px; }
.foot__cols a { display: block; padding: 5px 0; font-size: 15px; color: var(--txt); }
.foot__cols a:hover { color: var(--txt-dim); }
.foot__end { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--txt-mute); font-size: 14px; }

/* ── Всплытие блоков ────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(22px) scale(.995); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js .reveal.is-in[data-d="1"] { transition-delay: .07s; }
.js .reveal.is-in[data-d="2"] { transition-delay: .14s; }
.js .reveal.is-in[data-d="3"] { transition-delay: .21s; }

/* ── Адаптив ────────────────────────────────────────────── */
@media (max-width: 1180px) {
	:root { --pad: 26px; }
	.fork__grid, .asym--75, .asym--57, .asym--84 { grid-template-columns: minmax(0, 1fr); }
	/* Развилка имеет смысл только при двух колонках. */
	.fork__stem { display: none; }
	.fork { margin-top: clamp(26px, 3vw, 40px); }
	.foot__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
	:root { --pad: 20px; }
	body { font-size: 16px; }
	.top__in { grid-template-columns: auto 1fr auto; min-height: 60px; }
	.top__brand { font-size: 17px; }
	.drawer { inset-block-start: 60px; }
}
@media (max-width: 520px) {
	:root { --pad: 16px; }
	/* Логотип на узких экранах остаётся в шапке. Раньше здесь стоял
	   display:none, и на телефоне знак бренда пропадал совсем; теперь
	   вместо этого уменьшается кегль и сжимается зазор между колонками. */
	.top__brand { font-size: 15px; }
	.top__in { grid-template-columns: auto 1fr auto; gap: 10px; }
	.top__cta { justify-self: end; }
	.btn { padding: 10px 18px; font-size: 15px; }
	.burger span:not(.burger__ic) { display: none; }
}
@media (max-width: 380px) {
	.top__brand { font-size: 14px; }
	.top__in { gap: 8px; }
	.btn--main { padding: 10px 14px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
	.js .reveal { opacity: 1; transform: none; }
}

/* ── Служебные ──────────────────────────────────────────── */
.nf { padding: clamp(60px, 8vw, 130px) 0; }
.nf__code { font-family: var(--f-h); font-weight: 900; font-size: clamp(64px, 12vw, 150px); line-height: .9; letter-spacing: -.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[hidden] { display: none !important; }
