/*
Theme Name: Wan AI Ru
Theme URI: https://wan-ai.click/
Description: Тема сайта Wan AI Ru — открытая модель генерации видео от Alibaba. Монохром, снятый с офсайта: чистый чёрный, сериф в крупных заголовках, инверсные белые блоки вместо цветного акцента, сплошная лента секций.
Author: Wan AI Ru
Version: 1.0.0
Text Domain: wan-ai
*/

/* ══════════════════════════════════════════════════════════
   Токены. Палитра снята с офсайта wan.video по вычисленным
   стилям: фон #000, поверхности #131314 / #26262c, текст
   #fafafc, приглушённый #858693, скругления 16px, пилюли.
   Насыщенных цветов у бренда НЕТ — роль акцента играет
   инверсия: белый блок на чёрном.
   ══════════════════════════════════════════════════════════ */
:root {
	--bg: #000000;
	--surface: #1f1f21;
	--surface-2: #1f1f24;
	--surface-3: #26262c;

	--fg: #fafafc;
	--fg-muted: #a0a1af;
	--fg-dim: #878787;

	--line: rgba(255, 255, 255, .13);
	--line-strong: rgba(255, 255, 255, .26);

	--inv-bg: #fafafc;
	--inv-fg: #000000;
	--inv-muted: #5e5e5e;
	--inv-line: rgba(0, 0, 0, .12);

	--ok: #d6f5d6;
	--warn: #f5e6d6;

	--font-display: "Alegreya", "Georgia", "Times New Roman", serif;
	--font-text: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

	--radius: 16px;
	--radius-sm: 10px;
	--wrap: 1160px;
	--header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box;}
color: #c9c9c9;
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }

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

img, svg, video { max-width: 100%; height: auto; }
a { color: #edf9ff;
    text-decoration: none;
    font-weight: 700;}
p { margin: 0 0 18px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 880px; }

/* ── Типографика: сериф в заголовках, крупно и тесно ─────── */
h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 18px;
	line-height: 1.08;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.7rem); margin-top: 54px; letter-spacing: -0.03em; }
h3 { font-size: clamp(1.18rem, 2.1vw, 1.4rem); margin-top: 32px; }
h4 { font-size: 1.06rem; margin-top: 24px; }

.lead { font-size: 1.14rem; color: var(--fg-muted); max-width: 720px; margin-bottom: 26px; }

.label {
	display: inline-block;
	font-family: var(--font-text);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--fg-dim);
	margin-bottom: 16px;
}

strong, b { font-weight: 700; color: var(--fg); }
.nowrap { white-space: nowrap; }

ul, ol { margin: 0 0 20px; padding-left: 20px; }
li { margin-bottom: 10px; }
.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul li { position: relative; padding-left: 24px; }
.entry-content ul li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .72em;
	width: 8px;
	height: 1px;
	background: var(--fg-dim);
}

/* ── Кнопки: пилюли, как на офсайте. Акцент = инверсия ───── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	font-family: var(--font-text);
	font-weight: 700;
	font-size: .95rem;
	line-height: 1;
	padding: 15px 28px;
	border-radius: 100px;
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.btn--primary { background: var(--inv-bg); color: var(--inv-fg); }
.btn--primary:hover { background: #ffffff; }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg); background: rgba(255, 255, 255, .06); }
.btn--dark { background: var(--inv-fg); color: var(--inv-bg); }
.btn--dark:hover { opacity: .86; }
.btn--lg { padding: 17px 34px; font-size: 1rem; }
.btn--sm { padding: 10px 18px; font-size: .87rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── Шапка ───────────────────────────────────────────────── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(0, 0, 0, .82);
	backdrop-filter: saturate(140%) blur(14px);
	border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); justify-content: space-between;}

.site-logo { display: inline-flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.site-logo__text {
	font-family: var(--font-display);
	font-size: 1.42rem;
	font-weight: 800;
	letter-spacing: -0.04em;
}
.site-logo__text span { color: var(--fg-dim); font-weight: 400; }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { font-size: .92rem; color: #c9cad9; transition: color .18s ease; }
.nav a:hover { color: var(--fg); }

.header-cta { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav + .header-cta { margin-left: 22px; }
.header-cta__short { display: none; }

.burger {
	display: none;
	width: 42px; height: 42px;
	border: 1px solid var(--line-strong);
	border-radius: 100px;
	background: transparent;
	color: var(--fg);
	cursor: pointer;
	padding: 9px;
}
.burger svg { width: 22px; height: 22px; }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav.open { display: block; }
.mobile-nav .wrap { display: flex; flex-direction: column; padding-top: 6px; padding-bottom: 16px; }
.mobile-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--fg-muted); }
.mobile-nav a:last-child { border-bottom: 0; }

/* ── Секции: сплошная лента, делит тон и номер, не линейка ─ */
main { display: block; }
.section { padding: 76px 0; }
.section--tight { padding: 50px 0; }
.section--raise { background: var(--surface); }
.section--raise2 { background: var(--surface-2); }

/* Инверсный блок вместо цветного акцента */
.section--inv { background: var(--inv-bg); color: var(--inv-fg); }
.section--inv h1, .section--inv h2, .section--inv h3, .section--inv h4 { color: var(--inv-fg); }
.section--inv .lead, .section--inv .label { color: var(--inv-muted); }
.section--inv .card { background: #fff; border-color: var(--inv-line); }
.section--inv .card p { color: var(--inv-muted); }
.section--inv .entry-content ul li::before { background: var(--inv-muted); }
.section--inv a.inline { color: var(--inv-fg); border-bottom-color: rgba(0,0,0,.35); }

.section__head { max-width: 780px; margin-bottom: 40px; }
.section__head h2 { margin-top: 0; }

/* Крупный номер секции — вместо разделительных линий */
.section__index {
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 700;
	color: var(--fg-dim);
	letter-spacing: .04em;
	margin-bottom: 10px;
	display: block;
}
.section--inv .section__index { color: var(--inv-muted); }

/* ── Первый экран: текст на всю ширину, цифры под ним ────── */
.hero { padding: 84px 0 64px; }

/* Видеофон. isolation даёт своё окружение наложения: слои
   с отрицательным z-index ложатся поверх фона секции, но под текстом. */
.hero--video { position: relative; overflow: hidden; isolation: isolate; }
.hero__video {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
}
/* Затемнение в два слоя: по горизонтали держит читаемость текста слева,
   по вертикали сводит низ кадра к чёрному фону страницы. */
.hero__scrim {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, .62) 14%, rgba(0, 0, 0, .1) 60%),
  linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .01) 10%, rgba(0, 0, 0, .1) 40%)
}

.hero h1 { max-width: 15ch; margin-bottom: 26px; }
.hero .lead { font-size: 1.24rem; max-width: 640px; }
.hero__note {
	margin-top: 22px;
	font-size: .82rem;
	letter-spacing: .04em;
	color: var(--fg-dim);
}

.figures {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	margin-top: 64px;
	border-top: 1px solid var(--line);
}
.figure { padding: 26px 26px 26px 9px; border-right: 1px solid var(--line); }
.figure:last-child { border-right: 0; }
.figure__value {
	font-family: var(--font-display);
	font-size: 2.6rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	margin-bottom: 8px;
	font-variant-numeric: tabular-nums;
}
.figure__label { font-size: .88rem; color: var(--fg-muted); line-height: 1.45; }

/* ── Ролик под первым экраном: только узкие экраны ────────── */
/* Выше 760 px то же видео работает фоном .hero, поэтому блок скрыт. */
.reel { display: none; padding-top: 0; }
.reel__frame { margin: 0; }
.reel__video {
	display: block;
	width: 100%;
	height: auto;
	/* Натуральные пропорции файла — кадр не обрезается. */
	aspect-ratio: 1376 / 768;
	object-fit: cover;
	background: var(--surface);

}
.reel__cap {
	margin-top: 12px;
	font-size: .84rem;
	line-height: 1.45;
	color: var(--fg-muted);
}

/* ── Хлебные крошки и шапка страницы ─────────────────────── */
.page-head { padding: 40px 0 4px; }
.crumbs { font-size: .8rem; letter-spacing: .04em; color: var(--fg-dim); margin-bottom: 20px; }
.crumbs a:hover { color: var(--fg); }
.crumbs__sep { margin: 0 8px; }

.tldr {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 24px 26px;
	margin: 26px 0 8px;
}
.tldr p { margin: 0; color: var(--fg-muted); }
.tldr p + p { margin-top: 12px; }
.tldr strong { color: var(--fg); }

/* ── Карточки: без рамок, на подложке ────────────────────── */
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
	background: var(--surface);
	border: 1px solid transparent;
	border-radius: var(--radius);
	padding: 26px;
	transition: background .2s ease;
}

.card h3 { margin-top: 0; }
.card p { color: var(--fg-muted); }
.card p:last-child { margin-bottom: 0; }
.card--flat { background: transparent; border: 1px solid var(--line); }
.card--flat:hover { background: var(--surface); }

.card__idx {
	font-family: var(--font-display);
	font-size: 1.7rem;
	font-weight: 800;
	color: var(--fg-dim);
	line-height: 1;
	margin-bottom: 14px;
	display: block;
}

/* Лента шагов без разделителей */
.flow { display: grid; gap: 2px; border-radius: var(--radius); overflow: hidden; }
.flow__item { background: var(--surface); padding: 24px 26px; transition: background .2s ease; }
.flow__item:hover { background: var(--surface-2); }
.flow__item h3 { margin: 0 0 8px; font-size: 1.14rem; }
.flow__item p { margin: 0; color: var(--fg-muted); }
.flow__step {
	font-family: var(--font-display);
	font-size: .9rem;
	color: var(--fg-dim);
	display: block;
	margin-bottom: 6px;
}

/* ── Таблицы ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 0 24px; border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .94rem; }
table.data th, table.data td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th {
	font-family: var(--font-text);
	font-weight: 700;
	font-size: .76rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--fg-dim);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td { color: #c9c9c9; }
table.data td strong { color: var(--fg); }
table.data .is-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .row-hi td { background: var(--surface-3); color: var(--fg); }
.table-note { font-size: .85rem; color: var(--fg-dim); margin: -12px 0 26px; }

.section--inv .table-wrap { background: #fff; border: 1px solid var(--inv-line); }
.section--inv table.data th, .section--inv table.data td { border-bottom-color: var(--inv-line); }
.section--inv table.data td { color: var(--inv-muted); }
.section--inv table.data td strong, .section--inv table.data thead th { color: var(--inv-fg); }

/* ── Тарифы ──────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan { background: #2f2f2f; border-radius: var(--radius); padding: 28px 26px; display: flex; flex-direction: column; }
.plan--hi { background: var(--inv-bg); color: var(--inv-fg); }
.plan--hi .plan__rub, .plan--hi .plan__list li { color: var(--inv-muted); }
.plan__name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; margin-bottom: 6px; }
.plan__price {
	font-family: var(--font-display);
	font-size: 2.4rem;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.04em;
	margin: 12px 0 2px;
	font-variant-numeric: tabular-nums;
}
.plan__rub { font-size: .92rem; color: var(--fg-muted); margin-bottom: 18px; }
.plan__list { list-style: none; padding: 0; margin: 0 0 22px; font-size: .93rem; }
.plan__list li { color: var(--fg-muted); padding-left: 18px; position: relative; margin-bottom: 9px; }
.plan__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: currentColor; opacity: .6; }
.plan .btn { margin-top: auto; width: 100%; }

/* ── Плюсы и минусы ──────────────────────────────────────── */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pros-cons__col { background: var(--surface); border-radius: var(--radius); padding: 26px; }
.pros-cons__col h3 { margin-top: 0; }
.pros-cons__col ul { list-style: none; padding: 0; margin: 0; }
.pros-cons__col li { color: var(--fg-muted); padding-left: 22px; position: relative; }
.pros-cons__col li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--fg-dim); }
.pros-cons__col--minus li::before { height: 10px; width: 1px; left: 4px; top: .35em; }

/* ── Рейтинг ─────────────────────────────────────────────── */
.stars { display: inline-flex; position: relative; line-height: 0; }
.stars__bg, .stars__fill { display: flex; gap: 3px; }
.stars svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.stars__bg { color: var(--fg-dim); opacity: .5; }
.stars__fill { position: absolute; top: 0; left: 0; bottom: 0; overflow: hidden; color: var(--fg); white-space: nowrap; }

.score {
	display: flex;
	align-items: baseline;
	gap: 20px;
	background: var(--surface);
	border-radius: var(--radius);
	padding: 30px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}
.score__value {
	font-family: var(--font-display);
	font-size: 4rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.05em;
}

/* ── FAQ: grid-template-rows, не max-height ──────────────── */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__question {
	width: 100%;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	text-align: left;
	background: none;
	border: 0;
	padding: 22px 0;
	cursor: pointer;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.12rem;
	color: var(--fg);
	line-height: 1.3;
}
.faq__question::after {
	content: "+";
	margin-left: auto;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--fg-dim);
	transition: transform .22s ease;
	flex-shrink: 0;
}
.faq__item.open .faq__question::after { transform: rotate(45deg); color: var(--fg); }
.faq__answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s ease; }
.faq__answer > div { overflow: hidden; }
.faq__item.open .faq__answer { grid-template-rows: 1fr; }
.faq__answer p { margin: 0 0 20px; color: var(--fg-muted); }

/* ── Врезка про посредника ───────────────────────────────── */
.relay { background: var(--surface-2); border-radius: var(--radius); padding: 28px; margin: 30px 0; }
.relay h3 { margin-top: 0; }
.relay p { color: var(--fg-muted); }
.relay p:last-child { margin-bottom: 0; }

/* ── Финальный призыв ────────────────────────────────────── */
.cta { background: var(--inv-bg); color: var(--inv-fg); padding: 64px 0; }
.cta h2 { color: var(--inv-fg); margin: 0 0 12px; }
.cta p { color: var(--inv-muted); margin: 0 0 24px; max-width: 560px; }
.cta .btn--dark { background: var(--inv-fg); color: var(--inv-bg); }

/* ── Подвал ──────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 54px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; margin-bottom: 34px; }
.site-footer a { color: var(--fg-muted); }
.site-footer a:hover { color: var(--fg); }
.footer-col h4 { font-family: var(--font-text); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-dim); margin: 0 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; font-size: .93rem; }
.footer-about p { color: var(--fg-muted); font-size: .93rem; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; font-size: .83rem; color: var(--fg-dim); }
.footer-bottom p { margin: 0 0 9px; }

/* ── Разное ──────────────────────────────────────────────── */
.entry-content h2:first-child { margin-top: 0; }
.entry-content a.inline { color: var(--fg); border-bottom: 1px solid var(--line-strong); }
.entry-content a.inline:hover { border-bottom-color: var(--fg); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ══════════════════════════════════════════════════════════
   Адаптив. Проверено на 1280 / 390 / 360.
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1040px) {
	.nav { display: none; }
	.burger { display: grid; place-items: center; }
	.header-cta { margin-left: auto; }
}

@media (max-width: 980px) {
	.grid--4 { grid-template-columns: repeat(2, 1fr); }
	.figures { grid-template-columns: repeat(2, 1fr); }
	.figure { border-bottom: 1px solid var(--line); }
	.figure:nth-child(2n) { border-right: 0; }
	.figure:nth-last-child(-n+2) { border-bottom: 0; }
	.plans { grid-template-columns: 1fr; }
	.footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
	body { font-size: 16px; }
	.section { padding: 54px 0; }
	.hero { padding: 56px 0 44px; }
	/* Фон первого экрана остаётся постером, ролик показываем блоком ниже. */
	.reel { display: block; }
	.grid--2, .grid--3 { grid-template-columns: 1fr; }
	.pros-cons { grid-template-columns: 1fr; }
	.footer-top { grid-template-columns: 1fr; gap: 26px; }
	.figures { margin-top: 44px; }
	.figure { padding: 22px 18px 22px 0; }
}

@media (max-width: 560px) {
	.figures { grid-template-columns: 1fr; }
	.figure { border-right: 0; }
	.figure:last-child { border-bottom: 0; }
	.btn-row .btn { flex: 1 1 100%; }
	.score { gap: 12px; padding: 24px; }
}

@media (max-width: 480px) {
	.header-cta__full { display: none; }
	.header-cta__short { display: inline; }
	.header-cta .btn { padding: 11px 16px; font-size: .86rem; }
	h2 { margin-top: 40px; }
}

@media (max-width: 360px) {
	.wrap { padding: 0 16px; }
	.site-logo__text { font-size: 1.24rem; }
}

/* Мобильные таблицы — карточки по строкам, без прокрутки вбок */
@media (max-width: 640px) {
	.table-wrap { overflow-x: visible; background: transparent; }
	table.data { min-width: 0; }
	table.data thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
	table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
	table.data tr { background: var(--surface); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
	table.data tr:last-child { margin-bottom: 0; }
	table.data td { padding: 11px 18px 11px 44%; position: relative; border-bottom: 1px solid var(--line); }
	table.data tr td:last-child { border-bottom: 0; }
	table.data td::before {
		content: attr(data-label);
		position: absolute; left: 18px; top: 11px; width: 36%;
		font-size: .76rem; text-transform: uppercase; letter-spacing: .08em;
		color: #b5b5b5;
	}
	.section--inv table.data tr { background: #fff; border: 1px solid var(--inv-line); }
	.section--inv table.data td::before { color: var(--inv-muted); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.bttns {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}