/*
Theme Name: Seedance Ru
Theme URI: https://seedance-ai.info/
Author: Seedance Ru
Description: Тема брендового сайта Seedance Ru (seedance-ai.info). Палитра снята с официального сайта ByteDance Seed.
Version: 1.0.0
Text Domain: seedance-ru
*/

/* ── Токены (палитра снята с main.css офсайта seed.bytedance.com) ── */
:root {
	--bg: #171719;
	--bg-2: #131315;
	--surface: #1e1f24;
	--surface-2: #212121;
	--line: #2b2c31;
	--line-soft: #232429;
	--text: #fcfcfd;
	--text-mut: #b9bbc6;
	--text-dim: #8b8d98;
	--accent: #3c56f4;
	--accent-soft: rgba(60, 86, 244, 0.14);
	--mint: #53ffe2;
	--green: #58ff73;
	--amber: #ffc857;
	--grad: linear-gradient(90deg, #5989f8 0%, #9b70f5 50%, #73dcbf 100%);
	--grad-soft: linear-gradient(135deg, rgba(89,137,248,.16) 0%, rgba(155,112,245,.14) 50%, rgba(115,220,191,.12) 100%);
	--radius: 16px;
	--radius-sm: 10px;
	--maxw: 1160px;
	--font-h: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-b: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 { font-family: var(--font-h); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: 2.2em; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.35rem); margin-top: 1.6em; }
p { margin: 0 0 1.1em; color: var(--text-mut); }
a { color: #8fa6ff; text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--text); font-weight: 600; }
img, video { max-width: 100%; height: auto; display: block; }

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

.grad-text {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

/* ── Хедер ── */
.hdr {
	position: sticky; top: 0; z-index: 60;
	background: rgba(23,23,25,.86);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line-soft);
}
.hdr__in { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo__icon {
	width: 34px; height: 34px; border-radius: 9px;

	display: grid; place-items: center; flex-shrink: 0;
}
.logo__icon svg { width: 20px; height: 20px; }
.logo__text { font-family: var(--font-h); font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; white-space: nowrap; }
.logo__text span { color: var(--text-dim); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
	color: var(--text-mut); font-size: .885rem; font-weight: 500;
	padding: 7px 10px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.is-active { color: var(--text); background: var(--accent-soft); }

.burger { display: none; background: none; border: 0; color: var(--text); padding: 7px; cursor: pointer; border-radius: 8px; }
.burger:hover { background: var(--surface); }
.burger svg { width: 24px; height: 24px; }

/* ── Кнопки ── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: var(--font-h); font-weight: 700; font-size: .95rem;
	padding: 13px 24px; border-radius: 11px; border: 0; cursor: pointer;
	text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
	line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn--primary { background: var(--grad); color: #0d0d10; box-shadow: 0 6px 22px rgba(89,137,248,.26); }
.btn--primary:hover { box-shadow: 0 10px 30px rgba(89,137,248,.36); }
.btn--tg { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn--tg:hover { border-color: #3d5cff; background: #26272c; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--text-dim); }
.btn--sm { padding: 9px 15px; font-size: .855rem; border-radius: 9px; }

/* CTA в шапке видна ВСЕГДА — и на десктопе, и на мобильном рядом с бургером */
.hdr__cta { flex-shrink: 0; }
.nav__more { display: none; }

/* ── Hero ── */
.hero { position: relative; padding: 74px 0 64px; overflow: hidden; }

/* Свечения оставляем только там, где НЕТ фонового видео — поверх ролика
   они лишний шум и съедают контраст. */
.hero:not(.hero--video)::before {
	content: ''; position: absolute; inset: -30% 30% 40% -10%;
	background: radial-gradient(closest-side, rgba(89,137,248,.20), transparent 72%);
	filter: blur(20px); pointer-events: none;
}
.hero:not(.hero--video)::after {
	content: ''; position: absolute; inset: 10% -15% 20% 45%;
	background: radial-gradient(closest-side, rgba(155,112,245,.16), transparent 70%);
	filter: blur(24px); pointer-events: none;
}

/* ── Фоновое видео hero ── */
.hero--video { padding: 88px 0 80px; background: var(--bg); }
.hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
	pointer-events: none;
}
/* Затемнение поверх ролика: сильнее слева, где лежит текст */
.hero__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(13,13,15,.86) 0%, rgba(13,13,15,.62) 46%, rgba(13,13,15,.30) 100%),
		linear-gradient(180deg, rgba(13,13,15,.55) 0%, transparent 30%, rgba(13,13,15,.72) 100%);
}
.hero__in { position: relative; z-index: 2; }

/* ── Плашка под текстом ── */
.hero--video .hero__panel {
	max-width: 660px;
	padding: 30px 32px 32px;
	border-radius: 20px;
	background: rgba(18, 19, 23, .68);
	border: 1px solid rgba(255, 255, 255, .09);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .85);
}

.badge {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--surface); border: 1px solid var(--line);
	color: var(--text-mut); font-size: .8rem; font-weight: 500;
	padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.badge svg { width: 14px; height: 14px; color: var(--mint); }

/* Текст в hero мельче основной шкалы — поверх видео крупный кегль давит */
.hero h1 { font-size: clamp(1.55rem, 3.3vw, 2.35rem); margin-bottom: .5em; }
.hero p.lead { font-size: 1rem; line-height: 1.6; color: var(--text-mut); max-width: 600px; margin-bottom: 22px; }
.hero--video p.lead { color: #d4d6dd; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero__note { font-size: .8rem; color: var(--text-dim); margin: 12px 0 0; }
.hero--video .hero__note { color: #a2a5ae; }

.hero__rating { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero__rating b { font-family: var(--font-h); font-size: 1.35rem; }
.hero__rating span { color: var(--text-dim); font-size: .84rem; }
.hero--video .hero__rating span { color: #a2a5ae; }

/* Экономим трафик и батарею: на узких экранах вместо ролика — постер.
   Переменная --hero-poster приходит инлайном из шаблона. */
@media (max-width: 640px) {
	.hero--video { padding: 56px 0 52px; background-image: var(--hero-poster); background-size: cover; background-position: center; }
	.hero__bg { display: none; }
	.hero--video .hero__panel { padding: 22px 20px 24px; border-radius: 16px; }
}

/* ── Ролик отдельным блоком под hero ──
   На тех же 640px, где hero гасит фоновое видео и оставляет постер, ролик
   показываем сразу под hero. Шире — блок скрыт, видео играет фоном в hero. */
.hero-vid { display: none; }

@media (max-width: 640px) {
	.hero-vid { display: block; padding: 0 0 26px; background: var(--bg); }
	.hero-vid__frame {
		aspect-ratio: 16 / 9;
	
		overflow: hidden;
		border: 1px solid var(--line);
		background: var(--hero-poster, none) center / cover no-repeat #000;
	}
	.hero-vid__player { width: 100%; height: 100%; object-fit: cover; }
}

/* Уважаем системную настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
	.hero--video { background-image: var(--hero-poster); background-size: cover; background-position: center; }
	.hero__bg { display: none; }
	/* Ролик убираем — под ним остаётся постер, он же фон рамки */
	.hero-vid__player { display: none; }
}

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

/* ── Секции ── */
.sec { padding: 58px 0; }
.sec--alt { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.sec__head { max-width: 720px; margin-bottom: 34px; }
.sec__head h2 { margin-top: 0; }
.sec__head p { color: var(--text-mut); margin-bottom: 0; }

/* ── Сетки и карточки ── */
.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 var(--line);
	border-radius: var(--radius); padding: 24px;
}
.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
	width: 42px; height: 42px; border-radius: 11px;
	background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 15px;
}
.card__icon svg { width: 21px; height: 21px; color: #8fa6ff; }
.card--accent { border-color: rgba(60,86,244,.4); background: linear-gradient(180deg, rgba(60,86,244,.08), transparent 60%), var(--surface); }

/* Статистика */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat b { display: block; font-family: var(--font-h); font-size: 1.7rem; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.stat span { color: var(--text-dim); font-size: .86rem; }

/* ── Таблицы ── */
.tbl-wrap { overflow-x: auto; margin: 22px 0; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
table.tbl th, table.tbl td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { font-family: var(--font-h); font-weight: 700; color: var(--text); font-size: .87rem; background: var(--surface); white-space: nowrap; }
table.tbl td { color: var(--text-mut); }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td strong { color: var(--text); }

/* ── Тарифные карточки ── */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.plan--best { border-color: rgba(89,137,248,.55); background: linear-gradient(180deg, rgba(89,137,248,.10), transparent 55%), var(--surface); }
.plan__tag { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); font-weight: 600; margin-bottom: 8px; }
.plan__name { font-family: var(--font-h); font-weight: 700; font-size: 1.12rem; margin-bottom: 10px; }
.plan__price { font-family: var(--font-h); font-size: 1.85rem; font-weight: 800; line-height: 1.1; }
.plan__rub { color: var(--text-dim); font-size: .87rem; margin: 4px 0 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 18px; }
.plan li { color: var(--text-mut); font-size: .9rem; padding: 5px 0 5px 22px; position: relative; }
.plan li::before { content: ''; position: absolute; left: 4px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.plan .btn { margin-top: auto; width: 100%; }

/* ── Список с галочками ── */
.checks { list-style: none; padding: 0; margin: 18px 0; }
.checks li { position: relative; padding: 7px 0 7px 30px; color: var(--text-mut); }
.checks li::before {
	content: ''; position: absolute; left: 2px; top: 14px; width: 14px; height: 8px;
	border-left: 2px solid var(--mint); border-bottom: 2px solid var(--mint);
	transform: rotate(-45deg);
}
.minus { list-style: none; padding: 0; margin: 18px 0; }
.minus li { position: relative; padding: 7px 0 7px 30px; color: var(--text-mut); }
.minus li::before { content: ''; position: absolute; left: 4px; top: 18px; width: 12px; height: 2px; background: #ff8f6b; }

/* ── Шаги ── */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 16px; }
.steps li {
	counter-increment: s; position: relative; padding: 20px 22px 20px 66px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
	content: counter(s); position: absolute; left: 20px; top: 20px;
	width: 32px; height: 32px; border-radius: 9px; background: var(--grad);
	color: #0d0d10; font-family: var(--font-h); font-weight: 800; font-size: .95rem;
	display: grid; place-items: center;
}
.steps h3 { margin: 0 0 6px; font-size: 1.05rem; }
.steps p:last-child { margin-bottom: 0; }

/* ── TL;DR ── */
.tldr {
	background: var(--grad-soft); border: 1px solid rgba(89,137,248,.28);
	border-radius: var(--radius); padding: 20px 24px; margin: 0 0 30px;
}
.tldr p { color: var(--text); margin-bottom: 0; font-size: 1.02rem; }
.tldr p + p { margin-top: .7em; }

/* ── Врезка ── */
.note {
	border-left: 3px solid var(--accent); background: var(--surface);
	padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 24px 0;
}
.note p:last-child { margin-bottom: 0; }
.note--warn { border-left-color: var(--amber); }

/* ── Аккордеон FAQ ── */
.acc { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.acc__item + .acc__item { border-top: 1px solid var(--line); }
.acc__q {
	width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
	color: var(--text); font-family: var(--font-h); font-weight: 700; font-size: 1.02rem;
	padding: 19px 52px 19px 22px; position: relative; line-height: 1.4;
}
.acc__q:hover { background: rgba(255,255,255,.02); }
.acc__q::after {
	content: ''; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px;
	border-right: 2px solid var(--text-dim); border-bottom: 2px solid var(--text-dim);
	transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.acc__item.is-open .acc__q::after { transform: translateY(-30%) rotate(-135deg); }
.acc__a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.acc__a-in { padding: 0 22px 20px; }
.acc__a p { margin-bottom: 0; }

/* ── Отзывы ── */
.rev { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.rev__top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rev__ava {
	width: 40px; height: 40px; border-radius: 50%; background: var(--grad);
	display: grid; place-items: center; color: #0d0d10;
	font-family: var(--font-h); font-weight: 800; font-size: .95rem; flex-shrink: 0;
}
.rev__name { font-family: var(--font-h); font-weight: 700; font-size: .98rem; }
.rev__role { color: var(--text-dim); font-size: .82rem; }
.rev__date { color: var(--text-dim); font-size: .8rem; margin-left: auto; }
.rev p { margin-bottom: 0; font-size: .95rem; }

/* Разбивка рейтинга */
.rbars { display: grid; gap: 12px; }
.rbar { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; }
.rbar__label { color: var(--text-mut); font-size: .92rem; }
.rbar__val { font-family: var(--font-h); font-weight: 700; font-size: .95rem; }
.rbar__track { grid-column: 1 / -1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
/* display:block обязателен — .rbar__fill это <span>, у инлайнового элемента
   width/height игнорируются и полоса не заливается */
.rbar__fill { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* ── CTA-блок ── */
.ctabox {
	background: linear-gradient(135deg, rgba(89,137,248,.14), rgba(155,112,245,.10) 55%, rgba(115,220,191,.08));
	border: 1px solid rgba(89,137,248,.3); border-radius: 20px; padding: 36px; text-align: center;
}
.ctabox h2 { margin-top: 0; }
.ctabox p { max-width: 620px; margin-left: auto; margin-right: auto; }
.ctabox__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ── Читайте также ── */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.related a {
	display: block; background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--radius-sm); padding: 15px 18px; color: var(--text);
	font-family: var(--font-h); font-weight: 600; font-size: .94rem;
}
.related a:hover { border-color: rgba(89,137,248,.5); text-decoration: none; }
.related span { display: block; color: var(--text-dim); font-family: var(--font-b); font-weight: 400; font-size: .84rem; margin-top: 3px; }

/* ── Хлебные крошки ── */
.crumbs { font-size: .85rem; color: var(--text-dim); padding: 20px 0 0; }
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--text-mut); }
.crumbs__sep { margin: 0 8px; opacity: .5; }
.crumbs__cur { color: var(--text-mut); }

/* ── Страница ── */
.page-head { padding: 26px 0 8px; }
.page-head h1 { margin-bottom: .35em; }
.page-head .lead { font-size: 1.1rem; color: var(--text-mut); max-width: 720px; }
.content { padding-bottom: 60px; }
.content ul, .content ol { color: var(--text-mut); padding-left: 22px; }
.content li { margin-bottom: .5em; }

/* ── Футер ── */
.ftr { background: var(--bg-2); border-top: 1px solid var(--line-soft); padding: 44px 0 28px; margin-top: 20px; }
.ftr__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.ftr__about p { font-size: .9rem; margin-top: 14px; }
.ftr h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 12px; }
.ftr ul { list-style: none; padding: 0; margin: 0; }
.ftr li { margin-bottom: 8px; }
.ftr li a { color: var(--text-mut); font-size: .9rem; }
.ftr li a:hover { color: var(--text); }
.ftr__bottom { border-top: 1px solid var(--line-soft); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ftr__bottom p { font-size: .82rem; color: var(--text-dim); margin: 0; max-width: 720px; }

/* ── Адаптив ── */
@media (max-width: 1000px) {
	.grid--4 { grid-template-columns: repeat(2, 1fr); }
	.plans { grid-template-columns: repeat(2, 1fr); }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.ftr__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
	.burger { display: inline-flex; order: 3; }
	.hdr__cta { margin-left: auto; order: 2; }
	.nav {
		display: none; position: absolute; top: 66px; left: 0; right: 0;
		background: var(--bg); border-bottom: 1px solid var(--line);
		flex-direction: column; align-items: stretch; padding: 10px 20px 18px; gap: 2px; margin-left: 0;
	}
	.nav.is-open { display: flex; }
	.nav__more { display: block; }
	.nav a { padding: 11px 12px; font-size: .97rem; }
	.grid--3 { grid-template-columns: 1fr; }
	.related { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.hero { padding: 48px 0 44px; }
	.sec { padding: 44px 0; }
	.grid--2, .grid--4, .plans, .stats { grid-template-columns: 1fr; }
	.ftr__grid { grid-template-columns: 1fr; gap: 24px; }
	.ctabox { padding: 26px 20px; }
	.hero__cta .btn { width: 100%; }

	/* Таблицы → карточки по строкам (patterns.md, п.12) */
	table.tbl { min-width: 0; }
	table.tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	table.tbl tr {
		display: block; background: var(--surface); border: 1px solid var(--line);
		border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px;
	}
	table.tbl td { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border: 0; text-align: right; }
	table.tbl td::before {
		content: attr(data-label); font-family: var(--font-h); font-weight: 700;
		color: var(--text); font-size: .84rem; text-align: left; flex-shrink: 0;
	}
	.tbl-wrap { overflow-x: visible; }
}

@media (max-width: 400px) {
	.logo__text { display: none; }
}
