/*
Theme Name: Kling AI Ru
Theme URI: https://klingai.help/
Author: Kling AI Ru
Description: Тема русскоязычного сайта о Kling AI. Язык дизайна — «монтажный стол»: тёмное полотно с тонкой сеткой и мягкими засветами, лаймовый акцент офсайта, контейнер 1440px, первый экран занимает видео. Токены сняты с kling.ai.
Version: 1.0.0
License: proprietary
Text Domain: klg
*/

/* ============================================================
   1. ТОКЕНЫ — сняты с kling.ai
   ============================================================
   #74ff52 — фирменный лайм офсайта, единственный горячий цвет.
   #09090a / #1a1a1a / #f9fbfc — оттуда же; контейнер 1440px и
   порог 767px — самые частые значения в разметке офсайта.
   ============================================================ */
:root {
	--ink: #09090A;
	--ink-2: #131316;
	--surface: #17181C;
	--surface-2: #1F2126;
	--line: rgba(255, 255, 255, .10);
	--line-2: rgba(255, 255, 255, .20);

	--text: #F9FBFC;
	--text-2: #B6BBC2;
	--text-3: #7C818A;

	--lime: #74FF52;
	--lime-lo: #57DB38;
	--ember: #F04B22;

	--deck: 1440px;
	--col: 720px;
	--pad: clamp(18px, 3vw, 48px);

	--r-lg: 28px;
	--r: 18px;
	--r-sm: 12px;
	--r-pill: 999px;

	--f-text: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--f-display: 'Prata', 'Manrope', Georgia, serif;
	--f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

	--ease: cubic-bezier(.16, 1, .3, 1);
	--t: .3s var(--ease);
	--head-h: 72px;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--head-h) + 16px);
}

/* Тёмный узор: тонкая сетка плюс два мягких засвета. Фон неподвижен,
   поэтому страница «проявляется» на одном полотне, а не едет вместе с ним. */
body {
	margin: 0;
	background: var(--ink);
	color: var(--text);
	font-family: var(--f-text);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -2;
	pointer-events: none;
	background:
		radial-gradient(58vw 46vw at 78% -6%, rgba(116, 255, 82, .13), transparent 62%),
		radial-gradient(48vw 44vw at 6% 96%, rgba(116, 255, 82, .07), transparent 60%),
		radial-gradient(40vw 36vw at 92% 82%, rgba(240, 75, 34, .07), transparent 62%);
}
body::after {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	opacity: .5;
	background-image:
		linear-gradient(to right, rgba(255, 255, 255, .045) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, .045) 1px, transparent 1px);
	background-size: 68px 68px;
	mask-image: radial-gradient(72% 62% at 50% 34%, #000 30%, transparent 100%);
	-webkit-mask-image: radial-gradient(72% 62% at 50% 34%, #000 30%, transparent 100%);
}

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

a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lime); }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
	position: absolute !important; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}
.skip {
	position: absolute; left: -9999px; top: 0; z-index: 300;
	background: var(--lime); color: var(--ink); padding: 12px 20px; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* ============================================================
   2. КАРКАС — ширина одна на всех страницах
   ============================================================ */
.deck { width: min(100% - var(--pad) * 2, var(--deck)); margin-inline: auto; }
.col { max-width: var(--col); }

.strip { padding: clamp(52px, 5.6vw, 96px) 0 0; }
.strip--tight { padding: clamp(32px, 3.2vw, 56px) 0 0; }
.strip:last-of-type { padding-bottom: clamp(60px, 6vw, 104px); }

.rule { display: flex; align-items: center; gap: 16px; padding: 0 0 clamp(20px, 2.2vw, 36px); }
.rule__l { flex: 1 1 auto; height: 1px; background: var(--line); }
.rule__n {
	font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em;
	text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}

/* ============================================================
   3. ТИПОГРАФИКА
   ============================================================ */
h1, h2, h3, h4 { margin: 0 0 20px; line-height: 1.08; text-wrap: balance; }
h1, h2 { font-family: var(--f-display); font-weight: 400; letter-spacing: -.02em; }
h3, h4 { font-family: var(--f-text); font-weight: 600; letter-spacing: -.01em; }

h1 { font-size: clamp(2.2rem, 1.2rem + 3.9vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.9rem); }
h3 { font-size: clamp(1.06rem, .98rem + .42vw, 1.3rem); line-height: 1.25; }
h4 { font-size: 1rem; }

/* Часть заголовка лаймом — акцент офсайта */
.hot { color: var(--lime); }
.dim { color: var(--text-3); }

p { margin: 0 0 17px; color: var(--text-2); }
p:last-child { margin-bottom: 0; }
.lead {
	font-size: clamp(1.04rem, .98rem + .46vw, 1.3rem);
	line-height: 1.5; color: var(--text); max-width: var(--col);
}
.mute { color: var(--text-3); }
.mono { font-family: var(--f-mono); font-size: .9em; }

ul, ol { margin: 0 0 17px; padding-left: 21px; color: var(--text-2); }
li { margin-bottom: 8px; }
.plain { list-style: none; padding: 0; }
strong, b { color: var(--text); font-weight: 700; }

/* ============================================================
   4. АНИМАЦИЯ ПРИ ПРОКРУТКЕ
   ============================================================
   Два движения, как на офсайте: блок всплывает, заголовок выезжает
   построчно из-под маски. Класс .in вешает наблюдатель пересечений.
   ============================================================ */
.up {
	opacity: 0; transform: translateY(24px);
	transition: opacity .6s var(--ease), transform .6s var(--ease);
	transition-delay: calc(var(--d, 0) * 75ms);
}
.up.in { opacity: 1; transform: none; }

.rise .ln { display: block; overflow: hidden; }
.rise .ln__i {
	display: block; transform: translateY(105%);
	transition: transform .7s var(--ease);
	transition-delay: calc(var(--i, 0) * 85ms);
}
.rise.in .ln__i { transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.up, .rise .ln__i { transition: none !important; }
	.up { opacity: 1; transform: none; }
	.rise .ln__i { transform: none; }
}

/* ============================================================
   5. КНОПКИ И ЧИПЫ
   ============================================================ */
.btn {
	display: inline-flex; align-items: center; gap: 9px;
	padding: 12px 22px; border: 1px solid transparent; border-radius: var(--r-pill);
	font-family: var(--f-text); font-size: 15.5px; font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	white-space: normal; max-width: 100%; text-align: left;
	transition: transform var(--t), background-color var(--t), border-color var(--t), color var(--t);
}
.btn__a { flex: 0 0 auto; transition: transform var(--t); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .btn__a { transform: translateX(4px); }
.btn:active { transform: none; }

.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: var(--lime-lo); color: var(--ink); }
.btn--ghost { background: rgba(255, 255, 255, .05); border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }
.btn--lg { padding: 15px 28px; font-size: 16.5px; }
.btn--sm { padding: 9px 17px; font-size: 14.5px; }

.btnrow { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; }

.chip {
	display: inline-flex; align-items: baseline; gap: 7px;
	padding: 7px 15px; border-radius: var(--r-pill);
	background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
	font-size: 13.5px; color: var(--text-2);
}
.chip b { font-family: var(--f-mono); font-size: 13px; color: var(--lime); font-weight: 400; }
.chiprow { display: flex; flex-wrap: wrap; gap: 9px; }

/* ============================================================
   6. ШАПКА — как на офсайте: тонкая, знак слева, лаймовая кнопка справа
   ============================================================ */
.hdr {
	position: sticky; top: 0; z-index: 90;
	background: rgba(9, 9, 10, .78);
	backdrop-filter: saturate(150%) blur(14px);
	border-bottom: 1px solid var(--line);
}
.hdr__row { display: flex; align-items: center; gap: 14px; min-height: var(--head-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 1 auto; min-width: 0; }
.mark { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; display: block; }
.brand__w {
	font-family: var(--f-text); font-weight: 800; font-size: 17px; letter-spacing: -.02em;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__w i { font-style: normal; color: var(--text-3); font-weight: 600; }

.nav { margin-left: auto; min-width: 0; }
.nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; }
.nav__list a {
	display: block; padding: 8px 13px; border-radius: var(--r-pill);
	font-size: 14.5px; font-weight: 500; color: var(--text-2); text-decoration: none; white-space: nowrap;
	transition: background-color var(--t), color var(--t);
}
.nav__list a:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.nav__list [aria-current="page"] { background: rgba(116, 255, 82, .14); color: var(--lime); }

.hdr__side { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; margin-left: 10px; }

.burger {
	display: none; width: 42px; height: 42px; flex: 0 0 42px;
	align-items: center; justify-content: center; padding: 0;
	background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2);
	border-radius: var(--r-pill); color: var(--text); cursor: pointer;
}
.burger svg { width: 19px; height: 19px; }

.drawer { display: none; padding: 4px 0 16px; }
.drawer.open { display: block; }
.drawer a {
	display: block; padding: 11px 15px; border-radius: var(--r-sm);
	text-decoration: none; color: var(--text-2); font-size: 15.5px;
}
.drawer a:hover, .drawer a[aria-current="page"] { background: rgba(255, 255, 255, .06); color: var(--text); }

/* ============================================================
   7. ПЕРВЫЙ ЭКРАН — его занимает видео
   ============================================================ */
.hero { position: relative; }
.hero__stage {
	position: relative; overflow: hidden;
	border-radius: var(--r-lg);
	min-height: clamp(460px, 74vh, 760px);
	display: flex; align-items: flex-end;
	padding: clamp(24px, 3.4vw, 56px);
	margin-top: clamp(18px, 2.4vw, 36px);
	background:
		radial-gradient(70% 120% at 12% 8%, rgba(116, 255, 82, .16), transparent 60%),
		radial-gradient(60% 110% at 88% 92%, rgba(240, 75, 34, .12), transparent 62%),
		#0E0F12;
	border: 1px solid var(--line);
}
/* Видео лежит подложкой; если файла нет, остаётся градиент выше */
.hero__v {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; z-index: 0;
}
.hero__shade {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(180deg, rgba(9, 9, 10, .55) 0%, rgba(9, 9, 10, .2) 34%, rgba(9, 9, 10, .88) 100%);
}
.hero__in { position: relative; z-index: 2; width: 100%; }
.hero h1 { margin-bottom: 18px; }
.hero__lead { max-width: 58ch; }
.hero__btns { margin-top: 26px; }
.hero__tags { margin-top: 24px; }

.figs { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: clamp(22px, 2.6vw, 40px); }
.fig__v { font-family: var(--f-display); font-size: clamp(1.8rem, 1.2rem + 2vw, 2.9rem); display: block; line-height: 1; }
.fig__k { font-size: 14px; color: var(--text-3); display: block; margin-top: 8px; }

/* ============================================================
   8. БЛОКИ
   ============================================================ */
.split { display: grid; gap: clamp(20px, 2.6vw, 44px); grid-template-columns: minmax(0, 1fr); align-items: start; }

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: clamp(20px, 2vw, 30px);
	min-width: 0;
	transition: border-color var(--t), transform var(--t);
}
.card--lime { background: linear-gradient(160deg, rgba(116, 255, 82, .14), rgba(116, 255, 82, .03)); border-color: rgba(116, 255, 82, .28); }
.card--flat { background: transparent; }
.card__ic {
	width: 42px; height: 42px; border-radius: 12px;
	display: inline-flex; align-items: center; justify-content: center;
	background: rgba(116, 255, 82, .12); color: var(--lime); margin-bottom: 14px;
}
.card__ic .ic { width: 21px; height: 21px; }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }

/* Кадр или ролик с подписью */
.frame { margin: 0; min-width: 0; }
.frame__f {
	display: block; overflow: hidden; position: relative;
	border-radius: var(--r); border: 1px solid var(--line);
	background: linear-gradient(150deg, rgba(116, 255, 82, .1), rgba(255, 255, 255, .04));
}
.frame__f img, .frame__f video { width: 100%; height: 100%; object-fit: cover; }
.frame__c { font-family: var(--f-mono); font-size: 12px; line-height: 1.45; color: var(--text-3); margin-top: 11px; }

/* ============================================================
   9. ЛЕНТА КАДРОВ — только целые, прокрутки нет
   ============================================================ */
.reel { --gap: 16px; --cols: 1; display: flex; gap: var(--gap); overflow: hidden; }
.reel__cell { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); margin: 0; min-width: 0; }
.reel__nav { display: flex; gap: 9px; justify-content: center; margin-top: 22px; }
.reel__nav[hidden] { display: none; }
.reel__btn {
	width: 44px; height: 44px; flex: 0 0 44px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--line-2); border-radius: var(--r-pill);
	background: rgba(255, 255, 255, .05); color: var(--text); cursor: pointer;
	transition: background-color var(--t), opacity var(--t);
}
.reel__btn:hover:not(:disabled) { background: rgba(255, 255, 255, .11); }
.reel__btn:disabled { opacity: .32; cursor: default; }
.reel__btn .ic { width: 19px; height: 19px; }

/* ============================================================
   10. ТАБЛИЦЫ, ТАРИФЫ, ВОПРОСЫ
   ============================================================ */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 13px 17px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
th { font-weight: 700; font-size: 13.5px; color: var(--text); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

.plan { display: flex; flex-direction: column; height: 100%; }
.plan__n { font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--lime); }
.plan__p { font-family: var(--f-display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); margin: 8px 0 4px; }
.plan__y { font-size: 13px; color: var(--text-3); margin: 0 0 14px; }
.plan__l { list-style: none; padding: 0; margin: 0 0 20px; font-size: 14.5px; }
.plan__l li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; color: var(--text-2); }
.plan__l .ic { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 4px; color: var(--lime); }
.plan .btn { margin-top: auto; align-self: flex-start; }

.qa { border-bottom: 1px solid var(--line); }
.qa__q {
	width: 100%; display: flex; gap: 16px; align-items: center; justify-content: space-between;
	background: none; border: 0; padding: 19px 0; cursor: pointer;
	font-family: var(--f-text); font-size: clamp(1rem, .95rem + .3vw, 1.16rem); font-weight: 600;
	color: var(--text); text-align: left;
}
.qa__s { width: 24px; height: 24px; flex: 0 0 24px; position: relative; }
.qa__s::before, .qa__s::after {
	content: ''; position: absolute; left: 50%; top: 50%; background: var(--lime);
	transform: translate(-50%, -50%); transition: transform var(--t);
}
.qa__s::before { width: 12px; height: 1.6px; }
.qa__s::after { width: 1.6px; height: 12px; }
.qa.open .qa__s::after { transform: translate(-50%, -50%) scaleY(0); }
.qa__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.qa__a > div { overflow: hidden; }
.qa.open .qa__a { grid-template-rows: 1fr; }
.qa__a p { padding-bottom: 19px; max-width: 78ch; }

/* ============================================================
   11. ОЦЕНКА
   ============================================================ */
.score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.score__v { font-family: var(--f-display); font-size: clamp(2.8rem, 2rem + 3.4vw, 5rem); line-height: 1; color: var(--lime); }
.stars { position: relative; display: inline-block; font-size: 21px; line-height: 1; letter-spacing: 2px; }
.stars__b { color: rgba(255, 255, 255, .18); }
.stars__f { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--lime); }
.voice__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.voice__w { font-weight: 700; font-size: 14.5px; }
.voice__r { font-size: 12.5px; color: var(--text-3); }

/* ============================================================
   12. ПЕРЕЛИНКОВКА, ПОЛОСА, КРОШКИ, ПОДВАЛ
   ============================================================ */
.rel { display: grid; gap: 13px; grid-template-columns: minmax(0, 1fr); }
.rel__i {
	display: block; position: relative; padding: 22px 52px 24px 24px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
	text-decoration: none; transition: transform var(--t), border-color var(--t);
}
.rel__i:hover { transform: translateY(-3px); border-color: rgba(116, 255, 82, .35); }
.rel__t { display: block; font-weight: 700; font-size: 16.5px; }
.rel__d { display: block; margin-top: 6px; font-size: 14px; color: var(--text-3); }
.rel__a { position: absolute; right: 22px; bottom: 20px; color: var(--lime); }

.band {
	display: grid; gap: 22px; align-items: center; grid-template-columns: minmax(0, 1fr);
	border-radius: var(--r-lg); padding: clamp(26px, 3.2vw, 52px);
	background: linear-gradient(120deg, rgba(116, 255, 82, .16), rgba(116, 255, 82, .04) 58%, rgba(240, 75, 34, .1));
	border: 1px solid rgba(116, 255, 82, .22);
}
.band h2 { margin-bottom: 10px; }
.band p { margin: 0; max-width: 54ch; }

.phead { padding: clamp(26px, 3.2vw, 56px) 0 0; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: clamp(16px, 1.8vw, 28px); }
.crumbs a { text-decoration: none; color: var(--text-3); }
.crumbs a:hover { color: var(--lime); }
.phead .lead, .phead .chiprow { margin-top: 22px; }

.foot { margin-top: clamp(56px, 5.6vw, 100px); border-top: 1px solid var(--line); padding: clamp(36px, 3.6vw, 64px) 0 30px; }
.foot__top { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.foot__about { font-size: 14.5px; color: var(--text-2); max-width: 50ch; margin: 13px 0 0; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot__links a { font-size: 14.5px; color: var(--text-2); text-decoration: none; }
.foot__links a:hover { color: var(--lime); }
.foot__legal { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.foot__legal p { color: inherit; margin: 0 0 7px; }
.foot__w {
	font-family: var(--f-display); font-size: clamp(2.4rem, 1rem + 8vw, 9.5rem);
	line-height: .95; margin-top: clamp(26px, 3vw, 50px); color: rgba(255, 255, 255, .07);
	white-space: nowrap; letter-spacing: -.02em;
}

.ic { width: 20px; height: 20px; flex-shrink: 0; }
.note { font-size: 13.5px; color: var(--text-3); }
.kv { display: grid; gap: 9px; }
.kv > span { font-size: 14.5px; color: var(--text-2); }

/* ============================================================
   13. АДАПТИВ — порог 767px взят с офсайта
   ============================================================ */
@media (min-width: 700px) {
	.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.foot__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
}
@media (min-width: 1000px) {
	.split--73 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
	.split--37 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
	.split--55 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.figs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.rel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.band { grid-template-columns: minmax(0, 1.5fr) minmax(0, .5fr); }
}
@media (min-width: 1240px) {
	.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1219px) {
	.nav { display: none; }
	.burger { display: inline-flex; margin-left: auto; }
	.hdr__side { margin-left: 0; }
}
@media (max-width: 560px) {
	.brand__w i { display: none; }
}
@media (max-width: 430px) {
	body { font-size: 16px; }
	.card { padding: 18px 16px; }
	.btn { padding: 11px 18px; font-size: 15px; }
}
@media (max-width: 370px) {
	.brand__w { display: none; }
}
