/* =====================================================================
   VSL Landing — «тёплая бумага». Светлая тема, плоские заливки.
   Warm off-white canvas, white cards with 1px hairline borders,
   ink text at varying alpha, single blue CTA, sparse accent hues.
   ===================================================================== */

/* --- Локальные шрифты (файлы кладутся в /fonts, см. fonts/README.md) --- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/spacegrotesk-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/spacegrotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/spacegrotesk-600.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/jetbrainsmono-400.woff2') format('woff2'); }

:root {
	--canvas: #f6f5f4;
	--white: #ffffff;
	--ink: #000000;
	--ink-95: rgba(0, 0, 0, 0.95);
	--ink-60: rgba(0, 0, 0, 0.60);
	--ink-40: rgba(0, 0, 0, 0.40);
	--graphite: #615d59;
	--stone: #757575;

	--blue: #0075de;
	--blue-hover: #0068c4;
	--sky-tint: #e6f3fe;

	--marigold: #ffb110;
	--coral: #f64932;
	--sky-wash: #62aef0;
	--midnight: #02093a;

	--hairline: rgba(0, 0, 0, 0.08);
	--hairline-strong: rgba(0, 0, 0, 0.14);

	--error: #d64027;
	--ok: #157a4e;

	--font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

	--page-max: 1280px;
	--r-card: 12px;
	--r-input: 8px;
	--r-pill: 9999px;

	--elev-nav: 0px 0.7px 1.5px rgba(0, 0, 0, 0.015), 0px 3px 9px rgba(0, 0, 0, 0.03);
	--elev-video: 0px 4px 12px rgba(0, 0, 0, 0.10);
}

/* --- База --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.5;
	color: var(--graphite);
	background: var(--canvas);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: inline-block; vertical-align: middle; }
a { color: var(--blue); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--ink-95); }

.bg { position: fixed; inset: 0; z-index: -1; background: var(--canvas); overflow: hidden; }
.bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: url('/media/bg-abstract.svg') center / cover no-repeat;
	opacity: 0.9;
}

/* --- Кнопки --- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font: 500 15px/1 var(--font-body);
	padding: 12px 20px;
	border-radius: var(--r-pill);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--solid { background: var(--blue); color: #fff; }
.btn--solid:hover { background: var(--blue-hover); }
.btn--solid:disabled { opacity: .6; cursor: default; }
.btn--ghost { background: var(--sky-tint); color: var(--blue); }
.btn--ghost:hover { background: #d6eafd; }
.btn--outline { background: var(--white); color: var(--ink-95); border-color: var(--hairline-strong); }
.btn--outline:hover { background: var(--canvas); }
.btn--block { width: 100%; padding: 16px 20px; border-radius: var(--r-input); font-size: 16px; }
.btn:focus-visible { outline: 3px solid var(--sky-tint); outline-offset: 1px; }

/* --- Topbar --- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: var(--elev-nav); }
.topbar__inner {
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 12px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-95); min-width: 0; }
.brand__logo { flex: none; }
.brand__name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Main --- */
.main { max-width: var(--page-max); margin: 0 auto; padding: 48px 24px 64px; }

.hero-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.eyebrow {
	display: inline-block;
	font: 500 11px/1 var(--font-mono);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--stone);
	padding: 8px 14px;
	border: 1px solid var(--hairline-strong);
	border-radius: var(--r-pill);
	background: var(--white);
}
.hero-title {
	font-family: var(--font-display);
	font-size: clamp(34px, 5vw, 56px);
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin: 18px 0 16px;
}
.hero-sub { font-size: 18px; color: var(--stone); margin: 0 auto; max-width: 600px; }

/* --- Split: видео + форма --- */
.split {
	display: grid;
	/* колонка видео ограничена VIDEO_MAX_WIDTH (вертикальный ролик не должен растягиваться на всю высоту) */
	grid-template-columns: minmax(0, 400px) minmax(0, 520px);
	justify-content: center;
	gap: 24px;
	align-items: start;
	scroll-margin-top: 80px;
}

.video {
	position: relative;
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
	background: #111;
	border-radius: var(--r-card);
	overflow: hidden;
	box-shadow: var(--elev-video);
	aspect-ratio: 9 / 16; /* задаётся ключом VIDEO_ASPECT, по умолчанию 9 / 16 */
}
.video__el {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	transform: scale(1.03);              /* в покое кадр чуть увеличен… */
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.video.is-playing .video__el { transform: scale(1); } /* …и «доезжает» до масштаба при запуске */
.video__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 24px 24px 64px; /* нижний отступ: не наезжать на нативные контролы плеера */
	text-align: center;
	color: #fff;
	background: rgba(0, 0, 0, 0.42);
	cursor: pointer;
	transition: opacity .45s ease, transform .45s ease;
}
.video__overlay.is-hidden { opacity: 0; transform: scale(1.08); pointer-events: none; }
.video__play {
	position: relative;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--blue);
	display: grid;
	place-items: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
	margin-bottom: 6px;
	transition: transform .25s ease, box-shadow .25s ease;
}
.video__play::before {                    /* пульсирующее кольцо вокруг кнопки */
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.75);
	animation: playPulse 1.8s ease-out infinite;
}
.video__overlay:hover .video__play,
.video__overlay:focus-visible .video__play { transform: scale(1.08); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35); }
.video__overlay.is-hidden .video__play { transform: scale(1.4); }
@keyframes playPulse {
	0%   { transform: scale(0.9); opacity: 0.9; }
	100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.video__play::before { animation: none; }
	.video__el, .video__overlay, .video__play { transition: none; }
	.video__el { transform: none; }
}
.video__play svg { margin-left: 3px; }
.video__title { font-weight: 600; font-size: 18px; }
.video__hint { font-size: 13px; opacity: .85; }

/* --- Карточки --- */
.card { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--r-card); }
.card--form { padding: 28px; }

/* --- Форма --- */
.lead__title { font-family: var(--font-display); font-size: 22px; margin: 0 0 12px; }
.badge {
	display: inline-block;
	font: 500 11px/1 var(--font-mono);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	background: var(--marigold);
	color: var(--ink-95);
	padding: 7px 12px;
	border-radius: var(--r-pill);
	margin-bottom: 20px;
}
.field { margin-bottom: 16px; }
.field__label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-95); margin-bottom: 6px; }
.field__input {
	width: 100%;
	font: 400 16px var(--font-body);
	color: var(--ink-95);
	padding: 13px 14px;
	border: 1px solid var(--hairline-strong);
	border-radius: var(--r-input);
	background: var(--white);
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.field__input::placeholder { color: var(--ink-40); }
.field__input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky-tint); }
.field.has-error .field__input { border-color: var(--error); }
.field.is-valid .field__input { border-color: var(--ok); }
.field__msg { display: block; font-size: 12px; color: var(--error); margin-top: 6px; }
.field__msg:empty { display: none; }

.phone { display: flex; }
.phone__prefix {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	border: 1px solid var(--hairline-strong);
	border-right: 0;
	border-radius: var(--r-input) 0 0 var(--r-input);
	background: var(--canvas);
	font-size: 15px;
	color: var(--ink-95);
	white-space: nowrap;
}
.phone .field__input { border-radius: 0 var(--r-input) var(--r-input) 0; }

.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.consent {
	display: grid;
	grid-template-columns: 18px 1fr;
	gap: 4px 10px;
	align-items: start;
	font-size: 13px;
	line-height: 1.5;
	color: var(--stone);
	margin: 4px 0 18px;
	cursor: pointer;
}
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); cursor: pointer; }
.consent__msg { grid-column: 2; display: block; font-size: 12px; color: var(--error); }
.consent__msg:empty { display: none; }
.consent.has-error .consent__text { color: var(--error); }

.lead__note { font-size: 12px; color: var(--stone); line-height: 1.5; margin: 14px 0 0; }
.alert { padding: 10px 14px; border-radius: var(--r-input); font-size: 13px; margin: 0 0 16px; }
.alert--error { background: #fdecea; color: var(--error); border: 1px solid #f5c2bb; }

/* --- Caption, trust --- */
.caption { text-align: center; color: var(--stone); font-size: 15px; max-width: 640px; margin: 36px auto 0; }
.trust {
	list-style: none;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 16px 40px;
	padding: 0;
	margin: 28px 0 0;
	font-size: 14px;
	color: var(--ink-60);
}
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { color: var(--blue); flex: none; }

/* --- Footer --- */
.footer { background: var(--white); border-top: 1px solid var(--hairline); padding: 48px 24px 32px; font-size: 14px; }
.footer__inner { max-width: var(--page-max); margin: 0 auto; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr; gap: 32px; }
.footer__brand { display: grid; grid-template-columns: 28px 1fr; gap: 6px 10px; align-items: center; align-content: start; }
.footer__tagline { grid-column: 1 / -1; color: var(--stone); margin: 0; }
.footer__heading { font: 500 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); margin: 0 0 14px; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__links a { color: var(--ink-60); text-decoration: none; }
.footer__links a:hover { color: var(--ink-95); text-decoration: underline; }
.footer__dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.footer__dl dt { font: 500 10px/1.7 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); }
.footer__dl dd { margin: 0; color: var(--ink-95); }
.footer__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.card--note { padding: 20px; }
.card--note h4 { font-size: 14px; margin: 0 0 8px; }
.card--note p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--stone); }
.footer__line { font-size: 11px; line-height: 1.5; color: var(--stone); margin: 28px 0 0; }
.footer__copy { font-size: 12px; color: var(--ink-60); margin: 16px 0 0; line-height: 1.6; }

/* --- Cookie banner --- */
.cookie-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 60;
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: var(--page-max);
	margin: 0 auto;
	padding: 16px 20px;
	background: var(--white);
	border: 1px solid var(--hairline);
	border-radius: var(--r-card);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-60); }
.cookie-banner__actions { display: flex; gap: 8px; flex: none; }

/* --- Modal --- */
.modal {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.45);
}
.modal.is-open { display: flex; }
.modal__card {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: 100%;
	overflow: auto;
	padding: 28px;
	background: var(--white);
	border-radius: var(--r-card);
}
.modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: var(--ink-40);
	cursor: pointer;
}
.modal__close:hover { color: var(--ink-95); }

/* --- Юридические страницы --- */
.main--doc { max-width: 760px; padding-top: 40px; }
.doc h1 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 16px 0 8px; }
.doc h2 { font-size: 20px; margin: 36px 0 10px; }
.doc h3 { font-size: 16px; margin: 22px 0 8px; }
.doc p, .doc li { font-size: 16px; line-height: 1.7; }
.doc ul, .doc ol { padding-left: 22px; }
.doc__updated { font-size: 13px; color: var(--stone); margin: 0 0 24px; }
.doc__data { list-style: none; padding: 16px 20px; margin: 12px 0 20px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--r-card); }
.doc__data li { margin: 4px 0; font-size: 15px; }
.doc__data strong { color: var(--ink-95); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0 20px; }
.doc th, .doc td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.doc th { font: 500 11px/1.6 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--stone); }
.doc code { font-family: var(--font-mono); font-size: 13px; background: var(--white); border: 1px solid var(--hairline); border-radius: 4px; padding: 1px 5px; }

/* --- Страница «gracias» --- */
.thanks { max-width: 560px; margin: 32px auto; padding: 40px 28px; text-align: center; }
.thanks__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e3f3ea; color: var(--ok); margin-bottom: 16px; }
.thanks__title { font-family: var(--font-display); font-size: 28px; margin: 0 0 10px; }
.thanks__text { color: var(--stone); margin: 0 0 12px; }
.thanks .btn { margin-top: 12px; }

/* --- Responsive --- */
@media (max-width: 860px) {
	.split { grid-template-columns: minmax(0, 520px); }
	.footer__grid { grid-template-columns: 1fr; gap: 28px; }
	.footer__cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.main { padding: 32px 16px 48px; }
	.topbar__inner { padding: 10px 16px; }
	.brand__name { font-size: 15px; }
	.btn { padding: 10px 16px; font-size: 14px; }
	.btn--block { padding: 15px 16px; font-size: 16px; }
	.hero-title { font-size: 34px; }
	.hero-sub { font-size: 16px; }
	.card--form { padding: 20px; }
	.video__overlay { gap: 6px; padding: 16px 16px 56px; }
	.video__play { width: 56px; height: 56px; }
	.video__title { font-size: 16px; }
	.video__hint { font-size: 12px; }
	.trust { flex-direction: column; align-items: center; gap: 14px; }
	.footer { padding: 36px 16px 24px; }
	.footer__dl { grid-template-columns: 1fr; gap: 2px 0; }
	.footer__dl dd { margin-bottom: 8px; }
	.cookie-banner { left: 12px; right: 12px; bottom: 12px; flex-direction: column; align-items: stretch; padding: 14px 16px; }
	.cookie-banner__actions .btn { flex: 1; }
	.modal__card { padding: 22px 18px; }
}
