/* Fabrika — базовые стили. Пресеты ниш (presets/*.css) переопределяют токены :root и пару фирменных деталей. */

:root {
	--bg: #fbfaf8;
	--surface: #ffffff;
	--muted: #f3f0eb;
	--ink: #1b1916;
	--ink-2: #5d564e;
	--line: #e7e1d8;
	--dark: #1b1916;
	--dark-2: #26231f;
	--dark-ink: #f6f3ee;
	--dark-ink-2: #c4bcb1;
	--accent: #9f1d2b;
	--accent-ink: #ffffff;
	--accent-soft: color-mix(in srgb, var(--accent) 10%, var(--surface));
	--accent-line: color-mix(in srgb, var(--accent) 28%, transparent);
	--todo: #fff1a6;

	--font-head: "Playfair Display", Georgia, "Times New Roman", serif;
	--font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--head-weight: 700;
	--head-tracking: -0.015em;
	--head-transform: none;
	--head-line: 1.12;
	--h1: clamp(2.15rem, 1.4rem + 3.4vw, 4rem);
	--h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
	--h3: 1.2rem;

	--radius: 14px;
	--radius-lg: 22px;
	--radius-img: 14px;
	--radius-btn: 999px;
	--shadow-sm: 0 1px 2px rgb(20 16 12 / 6%), 0 4px 14px rgb(20 16 12 / 5%);
	--shadow: 0 18px 40px -18px rgb(20 16 12 / 32%);

	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 32px);
	--sec-y: clamp(56px, 7vw, 108px);
	--header-h: 76px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Сброс и основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 1.0625rem/1.62 var(--font-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: var(--head-weight);
	letter-spacing: var(--head-tracking);
	text-transform: var(--head-transform);
	line-height: var(--head-line);
	margin: 0 0 .5em;
	text-wrap: balance;
	color: inherit;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); font-family: var(--font-body); font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1.3; }
.sf-skip { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--surface); padding: 10px 16px; border-radius: 8px; }
.sf-skip:focus { left: 8px; }
mark.sf-todo {
	background: var(--todo);
	color: #3b3100;
	padding: .05em .35em;
	border-radius: 5px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
	border-bottom: 1px dashed #b49600;
	font-size: .92em;
	font-family: var(--font-body);
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

/* ---------- Секции ---------- */
.sf-main { display: block; }
.sf-main :where(.wp-block-group) { margin: 0; }
.sf-sec { padding: var(--sec-y) var(--gutter); background: var(--bg); position: relative; }
.sf-sec + .sf-sec.sf-tone--light { padding-top: calc(var(--sec-y) * .55); }
.sf-tone--muted { background: var(--muted); }
.sf-tone--light { background: var(--bg); }
.sf-tone--dark { background: var(--dark); color: var(--dark-ink); }
.sf-tone--dark .sf-lead, .sf-tone--dark p { color: var(--dark-ink-2); }
.sf-tone--dark h1, .sf-tone--dark h2, .sf-tone--dark h3, .sf-tone--dark strong { color: var(--dark-ink); }
.sf-tone--accent { background: var(--accent); color: var(--accent-ink); }
.sf-tone--accent p, .sf-tone--accent .sf-lead { color: color-mix(in srgb, var(--accent-ink) 86%, transparent); }
.sf-wrap { max-width: var(--wrap); margin-inline: auto; }
.sf-wrap--narrow { max-width: 820px; }
.sf-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 52px); }
.sf-head--center { margin-inline: auto; text-align: center; }
.sf-head h2 { margin-bottom: .35em; }
.sf-eyebrow {
	display: inline-flex; align-items: center; gap: .6em;
	font: 700 .78rem/1.2 var(--font-body);
	letter-spacing: .14em; text-transform: uppercase;
	color: var(--accent); margin-bottom: 1.1em;
}
.sf-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.sf-tone--dark .sf-eyebrow, .sf-tone--accent .sf-eyebrow { color: inherit; opacity: .85; }
.sf-lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.sf-sec .wp-block-image { margin: 0; }
.sf-sec .wp-block-image img { border-radius: var(--radius-img); width: 100%; }
.sf-sec figcaption, .sf-sec .wp-element-caption { font-size: .88rem; color: var(--ink-2); margin-top: .6em; text-align: left; }

/* ---------- Кнопки ---------- */
.sf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.sf-main .wp-block-button__link,
.sf-button {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 52px; padding: 14px 26px;
	border-radius: var(--radius-btn);
	font: 700 1rem/1.2 var(--font-body);
	text-decoration: none; text-align: center;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s, border-color .2s;
	background: var(--ink); color: var(--surface);
}
.sf-btn--primary .wp-block-button__link, .sf-button--primary {
	background: var(--accent); color: var(--accent-ink);
	box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.sf-btn--primary .wp-block-button__link:hover, .sf-button--primary:hover {
	color: var(--accent-ink); transform: translateY(-2px);
	box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--accent) 90%, transparent);
	background: color-mix(in srgb, var(--accent) 88%, black);
}
.sf-btn--ghost .wp-block-button__link, .sf-button--ghost {
	background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 22%, transparent);
}
.sf-btn--ghost .wp-block-button__link:hover, .sf-button--ghost:hover { border-color: var(--ink); color: var(--ink); }
.sf-tone--dark .sf-btn--ghost .wp-block-button__link { color: var(--dark-ink); border-color: color-mix(in srgb, var(--dark-ink) 35%, transparent); }
.sf-tone--dark .sf-btn--ghost .wp-block-button__link:hover { border-color: var(--dark-ink); }
.sf-tone--accent .sf-btn--primary .wp-block-button__link { background: var(--accent-ink); color: var(--accent); box-shadow: none; }
.sf-tone--accent .sf-btn--ghost .wp-block-button__link { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 50%, transparent); }
.sf-button--block { width: 100%; }
.sf-main .wp-block-button__link:active, .sf-button:active, .sf-option:active span, .sf-chip:active span { transform: translateY(1px) scale(.985); }
.sf-price__value, .sf-card__price, .sf-stat__v, .sf-badge__v, .sf-header__phone, .sf-footer__phone { font-variant-numeric: tabular-nums; }
.sf-main .wp-block-button__link::after { content: ""; width: 1.05em; height: 1.05em; background: currentColor; -webkit-mask: var(--i-arrow) center/contain no-repeat; mask: var(--i-arrow) center/contain no-repeat; transition: transform .2s var(--ease); }
.sf-btn--ghost .wp-block-button__link::after { display: none; }
.sf-main .wp-block-button__link:hover::after { transform: translateX(3px); }

/* ---------- Шапка ---------- */
.sf-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s, box-shadow .2s;
}
.sf-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgb(0 0 0 / 35%); }
.sf-header__inner { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.sf-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; flex: 0 1 auto; max-width: 300px; }
.sf-brand:hover { color: inherit; }
.sf-brand__logo { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; flex: none; }
.sf-brand__text { display: flex; flex-direction: column; min-width: 0; }
.sf-brand__name { font: var(--head-weight) 1.2rem/1.1 var(--font-head); letter-spacing: var(--head-tracking); text-transform: var(--head-transform); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-brand__tagline { font-size: .78rem; color: var(--ink-2); line-height: 1.3; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.sf-nav__list { display: flex; flex-wrap: nowrap; gap: 4px clamp(12px, 1.4vw, 22px); list-style: none; margin: 0; padding: 0; justify-content: center; }
.sf-nav__list a { display: inline-block; padding: 10px 0; text-decoration: none; font-weight: 600; font-size: .93rem; color: var(--ink); position: relative; white-space: nowrap; }
.sf-nav__list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.sf-nav__list a:hover::after, .sf-nav__list .current-menu-item a::after { transform: scaleX(1); }
.sf-nav__list a:hover { color: var(--ink); }
.sf-nav__mobile-extra { display: none; }
.sf-header__actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 14px; flex: none; }
.sf-header__phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.02rem; text-decoration: none; white-space: nowrap; }
.sf-header__phone .sf-ico { color: var(--accent); }
.sf-header__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--muted); color: #229ed9; text-decoration: none; }
.sf-header__icon:hover { color: #1a7fb0; }
.sf-header__cta { min-height: 46px; padding: 10px 20px; font-size: .95rem; }
.sf-burger { display: none; width: 46px; height: 46px; border: 0; background: var(--muted); border-radius: 12px; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.sf-burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.sf-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sf-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sf-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.sf-sec--hero { padding-top: clamp(28px, 5vw, 72px); overflow: hidden; }
.sf-hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.sf-hero__text h1 { margin-bottom: .38em; }
.sf-hero__img { position: relative; }
.sf-sec--hero .sf-hero__img img { aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.sf-checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.sf-checks li { position: relative; padding-left: 34px; font-weight: 600; line-height: 1.45; }
.sf-checks li::before { content: ""; position: absolute; left: 0; top: .05em; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); }
.sf-checks li::after { content: ""; position: absolute; left: 5px; top: calc(.05em + 5px); width: 14px; height: 14px; background: var(--accent); -webkit-mask: var(--i-check) center/contain no-repeat; mask: var(--i-check) center/contain no-repeat; }
.sf-tone--dark .sf-checks li::before { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.sf-tone--dark .sf-checks li::after { background: var(--dark-ink); }
.sf-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; margin-top: 30px; max-width: 620px; }
.sf-badge { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.sf-badge p { margin: 0; }
.sf-badge__v { font: 800 1.35rem/1 var(--font-body); color: var(--accent); }
.sf-badge__l { font-size: .8rem; line-height: 1.3; color: var(--ink-2); }
.sf-tone--dark .sf-badge { background: var(--dark-2); border-color: rgb(255 255 255 / 8%); }
.sf-tone--dark .sf-badge__l { color: var(--dark-ink-2); }

/* ---------- Шапка внутренних страниц ---------- */
.sf-sec--pagehead { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(32px, 5vw, 56px); background: var(--muted); }
.sf-crumbs { font-size: .88rem; color: var(--ink-2); margin-bottom: 1.2em; }
.sf-crumbs a { color: var(--ink-2); }
.sf-sec--pagehead h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); margin-bottom: .3em; }

/* ---------- Цифры доверия ---------- */
.sf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sf-stat { padding: 26px 22px; border-left: 1px solid var(--line); }
.sf-stat:first-child { border-left: 0; }
.sf-stat p { margin: 0; }
.sf-stat__v { font: var(--head-weight) clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem)/1.05 var(--font-head); letter-spacing: var(--head-tracking); color: var(--ink); }
.sf-stat__l { margin-top: 8px !important; color: var(--ink-2); font-size: .95rem; line-height: 1.4; }
.sf-sec--trust { padding-top: 0; padding-bottom: 0; }
.sf-tone--dark .sf-stats, .sf-tone--dark .sf-stat { border-color: rgb(255 255 255 / 12%); }
.sf-tone--dark .sf-stat__v { color: var(--dark-ink); }

/* ---------- Сетки карточек ---------- */
.sf-grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.sf-grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.sf-grid--features { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.sf-grid--team { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.sf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.sf-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sf-sec .sf-card__img img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.sf-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.sf-card__body h3 { margin-bottom: .45em; }
.sf-card__body p { color: var(--ink-2); font-size: .98rem; }
.sf-card__body > p:first-of-type { flex: 1 0 auto; }
.sf-card__price { margin-top: 4px !important; padding-top: 6px; font-weight: 800; color: var(--ink) !important; font-size: 1.05rem !important; }
.sf-card__more { margin: 10px 0 0 !important; }
.sf-card__more a { font-weight: 700; color: var(--accent); text-decoration: none; }
.sf-card__more a::after { content: " →"; }
.sf-tone--dark .sf-card { background: var(--dark-2); border-color: rgb(255 255 255 / 8%); }
.sf-tone--dark .sf-card__body p { color: var(--dark-ink-2); }
.sf-tone--dark .sf-card__price { color: var(--dark-ink) !important; }

/* ---------- Портфолио: карточки-скриншоты ---------- */
.sf-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: clamp(18px, 2.5vw, 32px); }
.sf-work { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.sf-work:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.sf-sec .sf-work__img img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; border-radius: 0; }
.sf-work__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.sf-work__body > p:first-of-type { margin-bottom: 8px; }
.sf-work__niche { font: 700 .75rem/1.2 var(--font-body) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2) !important; }
.sf-work__body h3 { font-size: 1.35rem; margin-bottom: .35em; }
.sf-work__body p { color: var(--ink-2); font-size: .98rem; }
.sf-work .sf-card__more { margin-top: auto !important; padding-top: 6px; }
@media (min-width: 1024px) {
	.sf-works.sf-n2, .sf-works.sf-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sf-works.sf-n3, .sf-works.sf-n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Каталог сайтов (витрина): поиск, фильтры по нишам, карточки ---------- */
.sf-catalog__bar { position: sticky; top: calc(var(--header-h) + 6px); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px; margin: 0 -12px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 18px; }
.sf-catalog__search { position: relative; flex: 0 1 380px; min-width: 240px; }
.sf-catalog__search .sf-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.sf-catalog__search input { width: 100%; min-height: 48px; padding: 12px 16px 12px 46px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font: 500 .98rem var(--font-body); color: var(--ink); }
.sf-catalog__search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--accent-soft); }
.sf-catalog__chips { display: flex; gap: 8px; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.sf-catalog__chips::-webkit-scrollbar { display: none; }
.sf-cchip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font: 700 .92rem var(--font-body); color: var(--ink); cursor: pointer; transition: background-color .2s, border-color .2s; }
.sf-cchip span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--muted); font-size: .76rem; }
.sf-cchip:hover { border-color: var(--ink); }
.sf-cchip.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sf-cchip.is-active span { background: var(--accent); color: var(--ink); }
.sf-catalog__count { font-size: .9rem; color: var(--ink-2); margin: 0 0 18px; }
.sf-catalog__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(16px, 2vw, 26px); }
.sf-tpl { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.sf-tpl:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.sf-tpl[hidden] { display: none !important; }
.sf-tpl__shot { display: block; background: var(--muted); aspect-ratio: 16 / 10; overflow: hidden; }
.sf-tpl__shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.sf-tpl:hover .sf-tpl__shot img { transform: scale(1.03); }
.sf-tpl__body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.sf-tpl__niche { font: 700 .74rem/1.2 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.sf-tpl__title { font-size: 1.3rem; margin: 0 0 6px; }
.sf-tpl__text { color: var(--ink-2); font-size: .95rem; margin: 0 0 14px; }
.sf-tpl__tags { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.sf-tpl__tags li { padding: 4px 10px; border-radius: 8px; background: var(--muted); font-size: .8rem; font-weight: 600; }
.sf-tpl__actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.sf-tpl__actions .sf-button { min-height: 46px; padding: 10px 18px; font-size: .92rem; flex: 1 1 auto; }
.sf-tpl--custom { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); justify-content: center; }
.sf-tpl--custom .sf-tpl__niche, .sf-tpl--custom .sf-tpl__text { color: var(--dark-ink-2); }
.sf-tpl--custom .sf-tpl__title { color: var(--dark-ink); font-size: 1.6rem; }
.sf-catalog__empty { text-align: center; padding: 40px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius-lg); }
.sf-catalog__empty p { color: var(--ink-2); }
@media (max-width: 767px) {
	.sf-catalog__bar { top: calc(var(--header-h) + 2px); }
	.sf-catalog__search { flex-basis: 100%; }
}

/* ---------- Преимущества с иконками ---------- */
.sf-feature { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sf-tone--muted .sf-feature { border-color: transparent; }
.sf-feature__ico { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); position: relative; margin-bottom: 16px !important; }
.sf-feature__ico::after { content: ""; position: absolute; inset: 12px; background: var(--accent); -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat; }
.sf-feature h3 { margin-bottom: .4em; }
.sf-feature p { color: var(--ink-2); font-size: .98rem; margin: 0; }
.sf-tone--dark .sf-feature { background: var(--dark-2); border-color: rgb(255 255 255 / 8%); }
.sf-tone--dark .sf-feature p { color: var(--dark-ink-2); }

/* ---------- Боли → ответы ---------- */
.sf-pains { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(14px, 2vw, 20px); }
.sf-pain { background: var(--surface); border-radius: var(--radius); padding: 24px 24px 22px; border: 1px solid var(--line); }
.sf-pain p { margin: 0; }
.sf-pain__q { position: relative; padding-left: 32px; color: var(--ink-2); font-style: italic; line-height: 1.45; margin-bottom: 14px !important; }
.sf-pain__q::before { content: ""; position: absolute; left: 0; top: .1em; width: 20px; height: 20px; background: #b4493f; -webkit-mask: var(--i-x) center/contain no-repeat; mask: var(--i-x) center/contain no-repeat; }
.sf-pain__a { position: relative; padding: 14px 0 0 32px; border-top: 1px dashed var(--line); font-weight: 600; line-height: 1.5; }
.sf-pain__a::before { content: ""; position: absolute; left: 0; top: 16px; width: 20px; height: 20px; background: var(--accent); -webkit-mask: var(--i-check) center/contain no-repeat; mask: var(--i-check) center/contain no-repeat; }
.sf-tone--dark .sf-pain { background: var(--dark-2); border-color: rgb(255 255 255 / 8%); }
.sf-tone--dark .sf-pain__a { border-color: rgb(255 255 255 / 14%); }

/* ---------- Шаги ---------- */
.sf-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: clamp(16px, 2vw, 24px); counter-reset: step; }
.sf-step { counter-increment: step; position: relative; padding-top: 64px; }
.sf-step::before { content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; font: var(--head-weight) 2.4rem/1 var(--font-head); color: var(--accent); }
.sf-step::after { content: ""; position: absolute; top: 20px; left: 72px; right: 0; height: 1px; background: var(--accent-line); }
.sf-step:last-child::after { display: none; }
.sf-step h3 { margin-bottom: .4em; }
.sf-step p { color: var(--ink-2); font-size: .98rem; margin: 0; }
.sf-tone--dark .sf-step p { color: var(--dark-ink-2); }

/* ---------- Галерея ---------- */
.sf-gallery { columns: 3 280px; column-gap: clamp(12px, 1.6vw, 18px); }
.sf-gallery .wp-block-image { break-inside: avoid; margin: 0 0 clamp(12px, 1.6vw, 18px); }
.sf-gallery .wp-block-image img { transition: transform .4s var(--ease), filter .3s; }
.sf-gallery .wp-block-image:hover img { filter: saturate(1.08) brightness(1.03); }

/* ---------- О компании ---------- */
.sf-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.sf-about__text p { color: var(--ink-2); max-width: 68ch; }
.sf-sec--text p, .sf-legal p { max-width: 68ch; }
.sf-about .sf-stats { margin-top: 28px; border-bottom: 0; }
.sf-about .sf-stat { padding: 20px 18px 0 0; border-left: 0; }
.sf-about .wp-block-image img { aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); }

/* ---------- Цены ---------- */
.sf-pricelist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(8px, 2vw, 16px) clamp(18px, 3vw, 36px); }
.sf-price { display: flex; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sf-price:last-child { border-bottom: 0; }
.sf-price p { margin: 0; }
.sf-price__name { flex: 1; font-weight: 600; }
.sf-price__name small { display: block; font-weight: 400; color: var(--ink-2); font-size: .88rem; margin-top: 2px; }
.sf-price__value { font-weight: 800; white-space: nowrap; color: var(--ink); }
.sf-price__note { margin-top: 18px !important; font-size: .9rem; color: var(--ink-2); }

/* ---------- Отзывы ---------- */
.sf-reviews-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(24px, 3vw, 40px); }
.sf-reviews-head .sf-head { margin-bottom: 0; }
.sf-reviews { columns: 3 300px; column-gap: clamp(14px, 2vw, 22px); }
.sf-reviews > .sf-review { break-inside: avoid; margin-bottom: clamp(14px, 2vw, 22px); }
.sf-review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 22px; display: flex; flex-direction: column; position: relative; }
.sf-review::before { content: "★★★★★"; color: #f5a524; letter-spacing: 2px; font-size: .95rem; margin-bottom: 12px; }
.sf-review__text { line-height: 1.55; }
.sf-review__author { margin: 14px 0 0 !important; font-weight: 700; font-size: .95rem; }
.sf-review__author small { display: block; font-weight: 500; color: var(--ink-2); font-size: .82rem; }
.sf-tone--muted .sf-review { border-color: transparent; }
.sf-rating { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .92rem; color: var(--ink); box-shadow: var(--shadow-sm); }
.sf-rating b { font-size: 1.1rem; }
.sf-rating__stars { color: #f5a524; letter-spacing: 1px; }
.sf-rating span:last-child { color: var(--ink-2); }
a.sf-rating:hover { color: var(--ink); border-color: var(--accent-line); }

/* ---------- FAQ ---------- */
.sf-faq { display: grid; gap: 12px; }
.sf-faq .wp-block-details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; margin: 0; transition: border-color .2s; }
.sf-faq .wp-block-details[open] { border-color: var(--accent-line); }
.sf-faq summary { list-style: none; cursor: pointer; padding: 20px 60px 20px 24px; font-weight: 700; font-size: 1.05rem; position: relative; line-height: 1.4; }
.sf-faq summary::-webkit-details-marker { display: none; }
.sf-faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 22px; height: 22px; margin-top: -11px; background: var(--accent); -webkit-mask: var(--i-plus) center/contain no-repeat; mask: var(--i-plus) center/contain no-repeat; transition: transform .25s var(--ease); }
.sf-faq details[open] summary::after { transform: rotate(45deg); }
.sf-faq details > :not(summary) { padding: 0 24px; color: var(--ink-2); }
.sf-faq details > :last-child { padding-bottom: 20px; margin-bottom: 0; }

/* ---------- CTA ---------- */
.sf-cta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(28px, 5vw, 64px); align-items: center; }
.sf-cta--solo { grid-template-columns: 1fr; text-align: center; max-width: 760px; margin-inline: auto; }
.sf-cta--solo .sf-actions { justify-content: center; }
.sf-cta--solo .sf-lead { margin-inline: auto; }
.sf-cta .wp-block-image img { aspect-ratio: 1; object-fit: cover; }

/* ---------- Команда ---------- */
.sf-member .wp-block-image img { aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: 14px; }
.sf-member h3 { margin-bottom: .2em; }
.sf-member__role { color: var(--accent); font-weight: 700; font-size: .92rem; margin-bottom: .5em !important; }
.sf-member p { color: var(--ink-2); font-size: .96rem; }

/* ---------- Формы ---------- */
.sf-form-card, .sf-quiz-card { background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); border: 1px solid var(--line); }
.sf-form-card p, .sf-quiz-card p { color: var(--ink); }
.sf-form { display: grid; gap: 14px; }
.sf-form__title { font: var(--head-weight) 1.45rem/1.2 var(--font-head) !important; letter-spacing: var(--head-tracking); text-transform: var(--head-transform); margin: 0 !important; }
.sf-form__sub { margin: -4px 0 4px !important; color: var(--ink-2) !important; }
.sf-field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.sf-field__label { font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.sf-field__label b { color: var(--accent); }
.sf-field input, .sf-field textarea {
	width: 100%; min-height: 52px; padding: 13px 16px;
	font: 500 1rem/1.4 var(--font-body); color: var(--ink);
	background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px;
	transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.sf-field textarea { min-height: 96px; resize: vertical; }
.sf-field input:focus, .sf-field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.sf-field.is-invalid input { border-color: #c0392b; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chip { position: relative; }
.sf-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sf-chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .92rem; background: var(--bg); transition: all .2s; }
.sf-chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.sf-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.sf-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.sf-consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.sf-consent.is-invalid { color: #c0392b; }
.sf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.sf-form__note { font-size: .8rem; color: var(--ink-2) !important; margin: 0 !important; text-align: center; }
.sf-form__result:empty { display: none; }
.sf-form__result { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; line-height: 1.45; font-size: .95rem; }
.sf-form__result.is-error { background: #fdecea; color: #8e2b20; }
.sf-form.is-sent > :not(.sf-form__result):not(.sf-form__title) { display: none; }
.sf-form.is-loading button[type="submit"] { opacity: .7; pointer-events: none; }

/* ---------- Квиз ---------- */
.sf-quiz__head { margin-bottom: 18px; }
.sf-quiz__title { font: var(--head-weight) 1.5rem/1.2 var(--font-head) !important; letter-spacing: var(--head-tracking); text-transform: var(--head-transform); margin: 0 0 14px !important; }
.sf-quiz__progress { height: 6px; background: var(--muted); border-radius: 6px; overflow: hidden; }
.sf-quiz__progress span { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .35s var(--ease); }
.sf-quiz__count { font-size: .85rem; color: var(--ink-2) !important; margin: 8px 0 0 !important; }
.sf-quiz__step { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.sf-quiz__q { font-weight: 800; font-size: 1.12rem; margin-bottom: 4px; padding: 0; }
.sf-quiz__options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.sf-option { position: relative; }
.sf-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.sf-option span { display: flex; align-items: center; min-height: 56px; padding: 12px 16px 12px 46px; border: 1.5px solid var(--line); border-radius: 14px; font-weight: 600; line-height: 1.3; background: var(--bg); position: relative; transition: border-color .2s, background-color .2s, transform .15s; }
.sf-option span::before { content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); transition: all .2s; }
.sf-option:hover span { border-color: var(--accent-line); }
.sf-option input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.sf-option input:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
.sf-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.sf-quiz__back { justify-self: start; background: none; border: 0; padding: 6px 0; font: 600 .92rem var(--font-body); color: var(--ink-2); cursor: pointer; }
.sf-quiz__back:hover { color: var(--ink); }
.sf-quizwrap { max-width: 860px; margin-inline: auto; }

/* ---------- Модальные окна ---------- */
.sf-modal { border: 0; padding: 0; background: transparent; width: min(480px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: visible; }
.sf-modal--wide { width: min(760px, calc(100% - 24px)); }
.sf-modal::backdrop { background: rgb(15 12 10 / 55%); backdrop-filter: blur(4px); }
.sf-modal[open] { animation: sf-pop .28s var(--ease); }
.sf-modal > .sf-form, .sf-modal > .sf-quiz { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 36px); max-height: calc(100dvh - 24px); overflow: auto; }
.sf-modal__close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--muted); color: var(--ink); cursor: pointer; display: grid; place-items: center; z-index: 2; }
.sf-modal__close:hover { background: var(--line); }
@keyframes sf-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Контакты ---------- */
.sf-contacts { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(16px, 2.5vw, 28px); align-items: stretch; }
.sf-contacts__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); display: grid; gap: 20px; align-content: start; }
.sf-contacts__row { display: flex; gap: 14px; }
.sf-contacts__row > .sf-ico { width: 40px; height: 40px; padding: 10px; color: var(--accent); background: var(--accent-soft); border-radius: 12px; box-sizing: border-box; -webkit-mask: none; mask: none; position: relative; }
.sf-contacts__row > .sf-ico::after { content: ""; position: absolute; inset: 10px; background: var(--accent); -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat; }
.sf-contacts__row > .sf-ico { background: var(--accent-soft); }
.sf-contacts__label { margin: 0 0 2px !important; font-size: .8rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.sf-contacts__value { margin: 0 !important; font-weight: 700; font-size: 1.05rem; }
.sf-contacts__value a { text-decoration: none; }
.sf-hours { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 0; font-size: .95rem; }
.sf-hours dt { color: var(--ink-2); }
.sf-hours dd { margin: 0; font-weight: 600; }
.sf-contacts__map { border-radius: var(--radius-lg); overflow: hidden; min-height: 380px; background: var(--muted); border: 1px solid var(--line); }
.sf-contacts__map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
.sf-messengers { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-msg { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .92rem; text-decoration: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.sf-msg__max { display: inline-grid; place-items: center; font: 800 .62rem/1 var(--font-body); letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #3d7bff, #8a3dff); border-radius: 7px; padding: 5px 4px; min-width: 30px; }
.sf-msg--tg .sf-ico { color: #229ed9; }
.sf-msg__vk { font: 800 .75rem/1 var(--font-body); background: #0077ff; color: #fff; border-radius: 6px; padding: 4px 5px; }
.sf-msg:hover { border-color: var(--ink); color: var(--ink); }

.sf-toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; width: min(420px, calc(100vw - 32px)); background: #1d1d1f; color: #fff; padding: 14px 18px; border-radius: 14px; font-size: .9rem; line-height: 1.45; box-shadow: 0 16px 40px -14px rgb(0 0 0 / 55%); animation: sf-pop .25s var(--ease); transition: opacity .35s; }
.sf-toast.is-out { opacity: 0; }

/* ---------- Медицинский дисклеймер ---------- */
.sf-medwarn { background: var(--dark-2); color: var(--dark-ink); text-align: center; padding: 18px var(--gutter); font: 800 clamp(.95rem, .8rem + .6vw, 1.25rem)/1.3 var(--font-body); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Подвал ---------- */
.sf-footer { background: var(--dark); color: var(--dark-ink-2); padding: clamp(44px, 6vw, 72px) var(--gutter) 0; }
.sf-footer__inner { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 36px; padding-bottom: 40px; }
.sf-footer__name { font: var(--head-weight) 1.5rem/1.15 var(--font-head); color: var(--dark-ink); text-transform: var(--head-transform); margin-bottom: .4em; }
.sf-footer__tagline { font-size: .92rem; }
.sf-footer .sf-rating { background: var(--dark-2); border-color: rgb(255 255 255 / 10%); color: var(--dark-ink); box-shadow: none; }
.sf-footer .sf-rating span:last-child { color: var(--dark-ink-2); }
.sf-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sf-footer__list a, .sf-footer a { color: var(--dark-ink-2); text-decoration: none; }
.sf-footer__list a:hover, .sf-footer a:hover { color: var(--dark-ink); }
.sf-footer__phone { display: inline-block; font: 800 1.35rem/1.2 var(--font-body); color: var(--dark-ink) !important; margin-bottom: 10px; }
.sf-footer .sf-msg { background: transparent; color: var(--dark-ink); border-color: rgb(255 255 255 / 16%); }
.sf-footer .sf-msg:hover { border-color: var(--dark-ink); }
.sf-footer__legal { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 20px 0 28px; border-top: 1px solid rgb(255 255 255 / 10%); font-size: .84rem; }

/* ---------- Компактная шапка: JS включает, когда меню не помещается (любое число пунктов) ---------- */
.sf-header--compact .sf-burger { display: inline-flex; }
.sf-header--compact .sf-header__phone span:not(.sf-ico) { display: none; }
.sf-header--compact .sf-header__phone { width: 44px; height: 44px; justify-content: center; border-radius: 50%; background: var(--muted); }
.sf-header--compact .sf-header__cta, .sf-header--compact .sf-header__icon, .sf-header--compact .sf-brand__tagline { display: none; }
.sf-header--compact .sf-header__inner { justify-content: space-between; }
.sf-header--compact .sf-nav {
	position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
	background: var(--bg); border-bottom: 1px solid var(--line);
	padding: 8px var(--gutter) 24px; display: block;
	max-height: calc(100dvh - var(--header-h)); overflow: auto;
	transform: translateY(-8px); opacity: 0; visibility: hidden;
	transition: opacity .2s, transform .25s var(--ease), visibility .2s;
	box-shadow: 0 24px 40px -24px rgb(0 0 0 / 35%);
}
.sf-header--compact .sf-nav.is-open { opacity: 1; transform: none; visibility: visible; }
.sf-header--compact .sf-nav__list { flex-direction: column; gap: 0; }
.sf-header--compact .sf-nav__list a { display: block; padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
.sf-header--compact .sf-nav__list a::after { display: none; }
.sf-header--compact .sf-nav__mobile-extra { display: grid; gap: 14px; padding-top: 18px; }
.sf-header--compact .sf-nav__phone { font-weight: 800; font-size: 1.3rem; text-decoration: none; }

/* ---------- Мобильная панель действий ---------- */
.sf-actionbar { display: none; }

/* ---------- Плашка демо ---------- */
.sf-demo { position: fixed; left: 16px; bottom: 16px; z-index: 60; font-family: var(--font-body); }
.sf-demo__chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 0; background: #1d1d1f; color: #fff; font: 700 .82rem/1 var(--font-body); cursor: pointer; box-shadow: 0 8px 24px -10px rgb(0 0 0 / 50%); }
.sf-demo__dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 0 0 rgb(255 210 63 / 70%); animation: sf-pulse 2s infinite; }
.sf-demo__panel { position: absolute; left: 0; bottom: 52px; width: min(360px, calc(100vw - 32px)); background: #1d1d1f; color: #e8e8ea; border-radius: 18px; padding: 20px 20px 16px; box-shadow: 0 24px 48px -16px rgb(0 0 0 / 55%); font-size: .9rem; line-height: 1.5; }
.sf-demo__panel p { margin: 0 0 .8em; }
@media (max-width: 600px) { .sf-demo__chip { min-height: 32px; padding: 6px 11px; font-size: .75rem; } .sf-demo__panel { width: min(300px, calc(100vw - 20px)); padding: 14px 14px 12px; font-size: .84rem; bottom: 42px; } }
.sf-demo__title { font-weight: 800; color: #fff; font-size: 1rem; }
.sf-demo__close { background: #ffd23f; color: #1d1d1f; border: 0; border-radius: 999px; padding: 10px 18px; font: 700 .85rem var(--font-body); cursor: pointer; min-height: 40px; }
@keyframes sf-pulse { 70% { box-shadow: 0 0 0 8px rgb(255 210 63 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(255 210 63 / 0%); } }

.sf-demo__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.sf-demo__cta { display: inline-flex; align-items: center; min-height: 40px; padding: 10px 16px; border-radius: 999px; background: #fff; color: #1d1d1f !important; font: 800 .85rem var(--font-body); text-decoration: none; }
.sf-demo__cta:hover { background: #ffd23f; }

/* ---------- Плашка примера в портфолио ---------- */
.sf-plaque { position: fixed; left: 0; right: 0; bottom: 0; z-index: 58; padding: 6px var(--gutter) calc(6px + env(safe-area-inset-bottom)); background: rgb(22 22 24 / 94%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #f2f2f4; box-shadow: 0 -12px 30px -18px rgb(0 0 0 / 60%); }
.sf-plaque__inner { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; gap: 12px 20px; }
.sf-plaque__text { margin: 0; flex: 1; display: flex; gap: 10px; align-items: baseline; font: 500 .8rem/1.3 var(--font-body); color: #c9c9ce; min-width: 0; }
.sf-plaque__text b { color: #fff; font-weight: 800; font-size: .95rem; }
.sf-plaque__all { color: #fff; font: 700 .88rem var(--font-body); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.sf-plaque__all:hover { color: #ffd23f; }
.sf-plaque__cta { min-height: 36px; padding: 6px 16px; font-size: .82rem !important; white-space: nowrap; background: #ffd23f !important; color: #1d1d1f !important; box-shadow: none; }
.sf-plaque__cta:hover { background: #ffe373 !important; color: #1d1d1f !important; }
.sf-plaque__close { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 10%); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.sf-plaque__chip { display: none; border: 0; border-radius: 999px; padding: 8px 14px; background: #ffd23f; color: #1d1d1f; font: 700 .78rem/1 var(--font-body); cursor: pointer; box-shadow: 0 8px 24px -10px rgb(0 0 0 / 50%); }
.sf-plaque.is-min { left: auto; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.sf-plaque.is-min .sf-plaque__inner { display: none; }
.sf-plaque.is-min .sf-plaque__chip { display: inline-block; }
.sf-mode-portfolio { padding-bottom: 52px; }
.sf-mode-portfolio .sf-actionbar { display: none !important; }

/* ---------- Юридические страницы и 404 ---------- */
.sf-legal h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); }
.sf-legal h2 { font-size: 1.3rem; font-family: var(--font-body); text-transform: none; letter-spacing: 0; margin-top: 1.6em; }
.sf-legal p { color: var(--ink-2); }

/* ---------- Появление при прокрутке ---------- */
.sf-js .sf-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.sf-js .sf-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Раскладка по числу карточек (класс sf-nN ставит сборщик) ---------- */
@media (min-width: 1024px) {
	.sf-reviews.sf-n2, .sf-reviews.sf-n4 { columns: 2; }
	.sf-steps.sf-n3, .sf-steps.sf-n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sf-steps.sf-n4, .sf-steps.sf-n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.sf-steps.sf-n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.sf-steps.sf-n6 .sf-step:nth-child(3)::after { display: none; }
	.sf-grid--cards.sf-n2, .sf-grid--cards.sf-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sf-grid--cards.sf-n3, .sf-grid--cards.sf-n5, .sf-grid--cards.sf-n6, .sf-grid--cards.sf-n9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sf-grid--cards.sf-n7, .sf-grid--cards.sf-n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.sf-grid--cards.sf-n10, .sf-grid--cards.sf-n13, .sf-grid--cards.sf-n16 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	/* одинокая последняя карточка (10/13/16 шт.) — широкая: фото слева, текст справа */
	.sf-grid--cards:is(.sf-n10, .sf-n13, .sf-n16) > .sf-card:last-child { grid-column: 1 / -1; flex-direction: row; }
	.sf-grid--cards:is(.sf-n10, .sf-n13, .sf-n16) > .sf-card:last-child .sf-card__img { flex: 0 0 38%; position: relative; min-height: 260px; }
	.sf-grid--cards:is(.sf-n10, .sf-n13, .sf-n16) > .sf-card:last-child .sf-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
	.sf-grid--cards:is(.sf-n10, .sf-n13, .sf-n16) > .sf-card:last-child .sf-card__body { justify-content: center; padding: 32px; }
	.sf-grid--features.sf-n2, .sf-pains.sf-n2, .sf-pains.sf-n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sf-grid--features.sf-n3, .sf-grid--features.sf-n5, .sf-grid--features.sf-n6, .sf-grid--features.sf-n9, .sf-pains.sf-n3, .sf-pains.sf-n5, .sf-pains.sf-n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sf-grid--features.sf-n4, .sf-grid--features.sf-n7, .sf-grid--features.sf-n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Адаптив ---------- */
/* Поэтапное сжатие шапки (классы ставит JS по фактической нехватке места) */
.sf-header--t1 .sf-brand__tagline, .sf-header--t1 .sf-header__icon { display: none; }
.sf-header--t2 .sf-header__phone span:not(.sf-ico) { display: none; }
.sf-header--t3 .sf-nav__list { gap: 4px 12px; }
.sf-header--t3 .sf-nav__list a { font-size: .86rem; }
.sf-header--t3 .sf-header__cta { padding: 10px 16px; font-size: .9rem; }
.sf-header--t2 .sf-header__phone { width: 44px; height: 44px; justify-content: center; border-radius: 50%; background: var(--muted); }
@media (max-width: 1023px) {
	:root { --header-h: 66px; }
	.sf-burger { display: inline-flex; }
	.sf-nav {
		position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
		background: var(--bg); border-bottom: 1px solid var(--line);
		padding: 8px var(--gutter) 24px; display: block;
		max-height: calc(100dvh - var(--header-h)); overflow: auto;
		transform: translateY(-8px); opacity: 0; visibility: hidden;
		transition: opacity .2s, transform .25s var(--ease), visibility .2s;
		box-shadow: 0 24px 40px -24px rgb(0 0 0 / 35%);
	}
	.sf-nav.is-open { opacity: 1; transform: none; visibility: visible; }
	.sf-nav__list { flex-direction: column; gap: 0; }
	.sf-nav__list a { display: block; padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
	.sf-nav__list a::after { display: none; }
	.sf-nav__mobile-extra { display: grid; gap: 14px; padding-top: 18px; }
	.sf-nav__phone { font-weight: 800; font-size: 1.3rem; text-decoration: none; }
	.sf-header__cta { display: none; }
	.sf-hero__grid, .sf-about, .sf-cta, .sf-contacts { grid-template-columns: minmax(0, 1fr); }
	.sf-sec--hero .sf-hero__img img { aspect-ratio: 16 / 11; }
	.sf-about .wp-block-image img { aspect-ratio: 16 / 11; }
	.sf-footer__inner { grid-template-columns: 1fr 1fr; }
	.sf-footer__brand { grid-column: 1 / -1; }
	.sf-step::after { display: none; }
}
@media (max-width: 767px) {
	body { font-size: 1rem; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	.sf-brand__tagline { display: none; }
	.sf-brand__logo { width: 40px; height: 40px; }
	.sf-brand__name { font-size: 1.05rem; }
	.sf-header__icon { display: none; }
	.sf-actions .wp-block-button { flex: 1 1 100%; }
	.sf-actions .wp-block-button__link { width: 100%; }
	.sf-stats { grid-template-columns: 1fr 1fr; }
	.sf-stat { border-left: 0; border-top: 1px solid var(--line); padding: 20px 14px 20px 0; }
	.sf-stat:nth-child(-n+2) { border-top: 0; }
	.sf-gallery { columns: 2 140px; }
	.sf-footer__inner { grid-template-columns: 1fr; }
	.sf-price { flex-wrap: wrap; gap: 4px 12px; }
	.sf-actionbar {
		display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
		background: var(--surface); border-top: 1px solid var(--line);
		padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
		box-shadow: 0 -10px 30px -18px rgb(0 0 0 / 35%);
	}
	.sf-actionbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: 12px; text-decoration: none; font-size: .74rem; font-weight: 700; color: var(--ink); }
	.sf-actionbar a .sf-ico { width: 22px; height: 22px; }
	.sf-actionbar__main { background: var(--accent); color: var(--accent-ink) !important; }
	.sf-demo { bottom: calc(74px + env(safe-area-inset-bottom)); left: 10px; }
	.sf-mode-portfolio { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
	.sf-plaque__text span, .sf-plaque__all { display: none; }  /* на телефоне — одна строка: подпись, кнопка, свернуть */
	.sf-plaque__text b { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
	.sf-plaque__inner { gap: 8px; }
	.sf-plaque__cta { padding: 6px 12px; font-size: .74rem !important; }
	.sf-plaque__text span { display: none; }
	.sf-plaque__cta { flex: 1; }
	.sf-medwarn { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.sf-js .sf-reveal { opacity: 1; transform: none; }
}
