/* ============================================================
   ФОРМА ЖИЗНИ — дизайн-система («тихий люкс»: светлый, воздух,
   крупная типографика). Палитра от логотипа: песочный + болотный.
   Эффекты R1–R6 по рецептам плейбука §H — только transform/opacity.
   ============================================================ */

:root {
	--paper: #FAF7F1;        /* тёплый белый, основной фон */
	--paper-2: #F1EBDF;      /* песочная секция */
	--paper-3: #E9E1D0;      /* песочный глубокий */
	--ink: #22281F;          /* графит с зелёным подтоном */
	--ink-soft: #5C6355;     /* вторичный текст */
	--swamp: #44573F;        /* болотно-зелёный, главный акцент */
	--swamp-deep: #32412D;
	--sand: #C7B48E;         /* песочный акцент */
	--line: #E2D9C6;
	--white: #FFFFFF;
	--radius: 14px;
	--radius-lg: 22px;
	--shadow: 0 18px 50px rgba(34, 40, 31, .10);
	--ease: cubic-bezier(.22, .61, .36, 1); /* фирменная «яблочная» кривая */
	--wrap: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
	background: var(--paper);
	color: var(--ink);
	font-size: 17px;
	line-height: 1.65;
	font-weight: 400;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 48px); }

/* ---------- Типографика ---------- */
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 640px; }
.eyebrow {
	display: inline-block; font-size: .78rem; font-weight: 600;
	letter-spacing: .18em; text-transform: uppercase; color: var(--swamp);
	margin-bottom: 18px;
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- Секции ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--paper2 { background: var(--paper-2); }
.section--dark { background: var(--swamp-deep); color: #EDEFE8; }
.section--dark .lead, .section--dark .muted { color: #B9C2AF; }
.section--dark .eyebrow { color: #CDBF9B; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }

/* ---------- Шапка ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(250, 247, 241, .88);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.site-header__in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.02rem; letter-spacing: .02em; }
.logo__mark {
	width: 34px; height: 34px; border-radius: 9px; background: var(--swamp);
	color: #F2EDE1; display: grid; place-items: center; font-size: .82rem; font-weight: 800;
}
.logo img { height: 34px; width: auto; }
.main-nav { margin-left: auto; display: flex; gap: clamp(14px, 2vw, 28px); font-size: .95rem; font-weight: 500; }
.main-nav a { opacity: .82; transition: opacity .25s var(--ease); }
.main-nav a:hover { opacity: 1; }
.header-cta { white-space: nowrap; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
	.main-nav {
		position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
		background: var(--paper); border-bottom: 1px solid var(--line);
		padding: 8px 24px 20px; transform: translateY(-8px); opacity: 0; visibility: hidden;
		transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
	}
	.main-nav.open { transform: none; opacity: 1; visibility: visible; }
	.main-nav a { padding: 13px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
	.main-nav a:last-child { border-bottom: 0; }
	.nav-toggle {
		display: grid; place-items: center; margin-left: auto; width: 44px; height: 44px;
		background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
	}
	.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
		content: ''; display: block; width: 18px; height: 2px; background: var(--ink);
		position: relative; transition: transform .3s var(--ease), opacity .3s;
	}
	.nav-toggle span::before { position: absolute; top: -6px; }
	.nav-toggle span::after { position: absolute; top: 6px; }
	.nav-toggle[aria-expanded="true"] span { background: transparent; }
	.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
	.header-cta { display: none; }
}

/* ---------- Кнопки ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 15px 30px; border-radius: 999px; border: 1px solid transparent;
	font: inherit; font-weight: 600; font-size: .98rem; cursor: pointer;
	background: var(--swamp); color: #F2EDE1;
	transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover { background: var(--swamp-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
.btn--light { background: #F2EDE1; color: var(--swamp-deep); }
.btn--light:hover { background: var(--white); }
.btn--sm { padding: 10px 20px; font-size: .88rem; }

/* ---------- Герой ---------- */
.hero { position: relative; min-height: calc(100svh - 68px); display: flex; align-items: flex-end; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.4s var(--ease); }
body.loaded .hero__bg img { transform: scale(1); }
.hero__bg::after {
	content: ''; position: absolute; inset: 0;
	background: linear-gradient(178deg, rgba(34,40,31,.18) 0%, rgba(34,40,31,.06) 40%, rgba(250,247,241,.94) 96%);
}
.hero__in { position: relative; z-index: 1; width: 100%; padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 110px); }
.hero__badge {
	display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
	background: rgba(250,247,241,.82); border: 1px solid var(--line);
	font-size: .84rem; font-weight: 600; margin-bottom: 26px;
}
.hero__price { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; }
.hero__price strong { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
.hero__price span { color: var(--ink-soft); }
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Полоса доверия ---------- */
.trust { border-block: 1px solid var(--line); background: var(--paper); }
.trust__in { display: flex; flex-wrap: wrap; gap: 14px 42px; padding-block: 22px; font-size: .92rem; font-weight: 500; color: var(--ink-soft); }
.trust__in b { color: var(--ink); font-weight: 700; }

/* ---------- Карточки (R3 hover-zoom) ---------- */
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
	position: relative; overflow: hidden; border-radius: var(--radius-lg);
	background: var(--paper-2); aspect-ratio: 4 / 5; display: flex; align-items: flex-end;
}
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover img, .card:focus-within img { transform: scale(1.05); }
.card__body {
	position: relative; z-index: 1; width: 100%; padding: 26px; color: #F5F1E8;
	background: linear-gradient(180deg, transparent, rgba(28, 33, 26, .78) 62%);
}
.card__body p { font-size: .92rem; opacity: .88; margin-top: 6px; max-width: 42ch; }
.card--flat { aspect-ratio: auto; padding: clamp(24px, 3vw, 38px); display: block; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-lg); }
.card--flat h3 { margin-bottom: 10px; }
.card--flat p { color: var(--ink-soft); font-size: .96rem; }
.card--flat .price { margin-top: 18px; font-size: 1.35rem; font-weight: 800; color: var(--swamp); }
.card--flat .price span { font-size: .9rem; font-weight: 500; color: var(--ink-soft); }

/* ---------- Список-чек ---------- */
.checklist li { display: flex; gap: 14px; padding-block: 13px; border-bottom: 1px solid var(--line); }
.checklist li::before {
	content: ''; flex: 0 0 22px; height: 22px; margin-top: 3px; border-radius: 50%;
	background: var(--swamp) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2EDE1' stroke-width='3'%3E%3Cpath d='M5 13l4 4 10-10'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- R2: sticky-окно «Как мы работаем» ---------- */
.sticky-section { height: 260vh; position: relative; }
.sticky-window { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: stretch; }
.sticky-window__pan { position: absolute; inset: -30% 0; will-change: transform; }
.sticky-window__pan img { width: 100%; height: 100%; object-fit: cover; }
.sticky-window__pan::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(24,30,22,.88) 8%, rgba(24,30,22,.55) 55%, rgba(24,30,22,.25)); }
.sticky-window__content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; color: #F2EDE1; }
.steps { max-width: 560px; }
.steps li { display: flex; gap: 20px; padding-block: 16px; border-bottom: 1px solid rgba(242, 237, 225, .22); }
.steps li:last-child { border-bottom: 0; }
.steps__num { flex: 0 0 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(242,237,225,.4); display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #D8CBA6; }
.steps h3 { color: #F2EDE1; }
.steps p { font-size: .93rem; color: #C9CFC0; margin-top: 4px; }
@media (max-width: 640px) { .sticky-section { height: 300vh; } .steps__num { flex-basis: 36px; height: 36px; } }

/* ---------- R4: слайдер «План → Факт» ---------- */
.pf-slider { position: relative; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 16 / 10; user-select: none; touch-action: pan-y; }
.pf-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pf-slider__after { clip-path: inset(0 0 0 50%); }
.pf-slider__handle {
	position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #F2EDE1;
	transform: translateX(-1px); pointer-events: none;
}
.pf-slider__handle::after {
	content: '⇔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 52px; height: 52px; border-radius: 50%; background: #F2EDE1; color: var(--swamp-deep);
	display: grid; place-items: center; font-size: 1.3rem; box-shadow: var(--shadow);
}
.pf-slider__tag {
	position: absolute; bottom: 18px; z-index: 1; padding: 7px 14px; border-radius: 999px;
	background: rgba(28, 33, 26, .72); color: #F2EDE1; font-size: .8rem; font-weight: 600; letter-spacing: .04em;
}
.pf-slider__tag--before { left: 18px; }
.pf-slider__tag--after { right: 18px; }

/* ---------- R6: форма-фраза ---------- */
.form-section { position: relative; overflow: hidden; }
.form-section__bg { position: absolute; inset: 0; }
.form-section__bg img { width: 100%; height: 100%; object-fit: cover; }
.form-section__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(250,247,241,.97) 30%, rgba(250,247,241,.72)); }
.form-section__in { position: relative; z-index: 1; max-width: 640px; }
.field { margin-top: 30px; }
.field label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
	width: 100%; border: 0; border-bottom: 1px solid var(--ink); background: transparent;
	font: inherit; font-size: 1.12rem; padding: 10px 2px; border-radius: 0; color: var(--ink);
	transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 56px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-width: 2px; border-color: var(--swamp); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: .84rem; color: var(--ink-soft); margin-top: 16px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { margin-top: 18px; font-weight: 600; display: none; }
.form-status.ok { display: block; color: var(--swamp); }
.form-status.err { display: block; color: #9C4A2F; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
	cursor: pointer; list-style: none; padding-block: 22px; font-weight: 600; font-size: 1.08rem;
	display: flex; justify-content: space-between; gap: 18px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 1.6rem; color: var(--swamp); line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__a { padding-bottom: 24px; color: var(--ink-soft); max-width: 70ch; }

/* ---------- Тарифы ---------- */
.price-cards { align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card .price { font-size: 2rem; font-weight: 800; color: var(--swamp); margin-top: 14px; }
.price-card .price span { font-size: .95rem; font-weight: 500; color: var(--ink-soft); }
.price-card ul { margin-top: 18px; flex-grow: 1; }
.price-card .btn { margin-top: 26px; }
.price-card--hit { border-color: var(--swamp); box-shadow: var(--shadow); }
.badge {
	display: inline-block; align-self: flex-start; padding: 5px 12px; border-radius: 999px;
	background: var(--sand); color: var(--swamp-deep); font-size: .74rem; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px;
}

/* ---------- Подвал ---------- */
.site-footer { background: var(--swamp-deep); color: #C9CFC0; padding-block: clamp(48px, 6vw, 80px) 32px; font-size: .93rem; }
.site-footer a:hover { color: #F2EDE1; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #F2EDE1; font-size: .84rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer li { padding-block: 5px; }
.site-footer__bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(242,237,225,.16); display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: .82rem; opacity: .75; }
.footer-seo { margin-top: 26px; font-size: .82rem; opacity: .65; max-width: 90ch; }

/* ============================================================
   ЭФФЕКТЫ
   R1 reveal: [data-rv] → .rv-in (IO в app.js)
   ============================================================ */
[data-rv] {
	opacity: 0; transform: translateY(3rem);
	transition: opacity 1.1s ease-out, transform 1.1s var(--ease);
}
.rv-in { opacity: 1; transform: none; }

/* R5: микро-сглаживание параллакса (rAF в app.js ставит transform) */
[data-pan] { transition: transform .1s linear; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	[data-rv] { opacity: 1; transform: none; transition: none; }
	.hero__bg img { transform: none; transition: none; }
	.card img, .btn { transition: none; }
	.sticky-window__pan { transition: none; }
}

/* ---------- Куки-баннер (свой, 152-ФЗ; Метрика только после согласия) ---------- */
.cookie-bar {
	position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
	max-width: 860px; margin-inline: auto; padding: 14px 18px;
	background: rgba(34, 40, 31, .96); color: #DDE2D6; border-radius: 14px;
	display: none; gap: 16px; align-items: center; font-size: .88rem;
	box-shadow: var(--shadow);
}
.cookie-bar.show { display: flex; flex-wrap: wrap; }
.cookie-bar p { flex: 1 1 320px; margin: 0; }
.cookie-bar__btns { display: flex; gap: 10px; }
.cookie-bar .btn { padding: 9px 18px; font-size: .84rem; }
.cookie-bar .btn--ghost { color: #DDE2D6; border-color: #77816D; }

/* ---------- Бот-виджет ---------- */
.chat-fab {
	position: fixed; right: 18px; bottom: 18px; z-index: 95;
	width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--swamp); color: #F2EDE1; font-size: 1.5rem;
	box-shadow: var(--shadow); transition: transform .3s var(--ease), background .3s;
}
.chat-fab:hover { transform: scale(1.06); background: var(--swamp-deep); }
.chat-panel {
	position: fixed; right: 18px; bottom: 90px; z-index: 95;
	width: min(370px, calc(100vw - 36px)); max-height: min(560px, calc(100svh - 130px));
	background: var(--white); border-radius: var(--radius-lg); box-shadow: 0 24px 70px rgba(28,33,26,.28);
	display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-panel__head { background: var(--swamp-deep); color: #F2EDE1; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.chat-panel__head b { font-size: .98rem; }
.chat-panel__head small { display: block; opacity: .75; font-size: .78rem; margin-top: 2px; }
.chat-panel__close { background: none; border: 0; color: #F2EDE1; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat-panel__log { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 16px; font-size: .93rem; line-height: 1.5; }
.msg--bot { background: var(--paper-2); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg--user { background: var(--swamp); color: #F2EDE1; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-panel__actions { padding: 0 18px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	border: 1px solid var(--line); background: var(--white); border-radius: 999px;
	padding: 9px 15px; font: inherit; font-size: .87rem; font-weight: 500; cursor: pointer;
	transition: background .25s, border-color .25s;
}
.chip:hover { background: var(--paper-2); border-color: var(--sand); }
.chat-form { padding: 0 18px 18px; display: none; flex-direction: column; gap: 12px; }
.chat-form.show { display: flex; }
.chat-form input { border: 0; border-bottom: 1px solid var(--line); font: inherit; padding: 8px 2px; }
.chat-form input:focus { outline: none; border-color: var(--swamp); }

@media (prefers-reduced-motion: reduce) {
	.chat-fab:hover { transform: none; }
}
