﻿/*
  site-kit: базовые стили.
  Все цвета, шрифты, радиусы и отступы берутся из переменных, которые build.py
  собирает из design.json в assets/css/theme.css. Здесь значений дизайна нет.
  Мобильная версия в первую очередь: базовые правила для 360 px, расширения через min-width.
*/

/* ---------- Сброс и основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(var(--fs-base, 17px) / 16 * 100%); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--c-bg); color: var(--c-text);
  font-family: var(--font-body); line-height: var(--lh, 1.6);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--fw-heading, 600); letter-spacing: var(--ls-heading, -0.01em); line-height: 1.15; margin: 0 0 .5em; overflow-wrap: break-word; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 1.35rem + 3.2vw, 3.7rem); }
h2 { font-size: clamp(1.65rem, 1.25rem + 1.7vw, 2.5rem); }
h3 { font-size: 1.22rem; line-height: 1.25; }
h1 em, h2 em { font-style: italic; color: var(--c-accent); font-weight: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: .18em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
strong { font-weight: 650; }

.container { width: min(100% - 2 * var(--gutter, 20px), var(--container, 1160px)); margin-inline: auto; }
:root { --gutter: clamp(16px, 4.5vw, 32px); }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--c-text); color: var(--c-bg); padding: 12px 18px; border-radius: var(--r-md); }
.skip-link:focus { top: 12px; }

/* Фокус виден всегда: двухцветное кольцо */
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }
.bg-dark :focus-visible, .bg-accent :focus-visible, .site-footer :focus-visible { outline-color: var(--c-on-dark); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px;
  padding: .7em 1.5em; border-radius: var(--r-md); border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--c-primary); color: var(--c-on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--c-primary) 82%, black); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--c-accent); color: var(--c-on-accent); }
.btn-accent:hover { background: color-mix(in srgb, var(--c-accent) 85%, black); }
.btn-outline { background: transparent; border-color: var(--c-primary); color: var(--c-primary); }
.btn-outline:hover { background: color-mix(in srgb, var(--c-primary) 8%, transparent); }
.btn-ghost { background: transparent; border-color: color-mix(in srgb, var(--c-text) 35%, transparent); color: var(--c-text); }
.btn-ghost:hover { border-color: var(--c-text); }
.btn-ghost-light { background: transparent; border-color: color-mix(in srgb, var(--c-on-dark) 55%, transparent); color: var(--c-on-dark); }
.btn-ghost-light:hover { border-color: var(--c-on-dark); }
.btn-lg { min-height: 54px; padding-inline: 1.75em; }
.btn-sm { min-height: 44px; padding: .5em 1.15em; font-size: .95rem; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; min-height: 44px; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--c-bg) 94%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--c-border); }
.header-in { display: flex; align-items: center; gap: 10px; min-height: 64px; flex-wrap: nowrap; }
html:not(.js) .header-in { flex-wrap: wrap; }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-text); margin-right: auto; min-height: 44px; }
.brand-name { font-family: var(--font-heading); font-weight: 650; font-size: 1.25rem; letter-spacing: -.01em; line-height: 1.1; }
.brand-logo { width: 36px; height: 36px; flex: none; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; justify-content: center; color: var(--c-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-phone .icon { width: 22px; height: 22px; }
.header-phone-num { display: none; }
.nav-toggle { width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: 1.5px solid var(--c-border); border-radius: var(--r-md); cursor: pointer; color: var(--c-text); }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav { flex-basis: 100%; padding-bottom: 12px; }
.js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--c-bg); border-bottom: 1px solid var(--c-border); padding: 8px var(--gutter) 20px; box-shadow: var(--shadow-md); }
.js .site-nav.is-open { display: block; }
.nav-list { list-style: none; display: flex; flex-direction: column; }
.nav-list a { white-space: nowrap; display: flex; align-items: center; min-height: 48px; color: var(--c-text); text-decoration: none; font-weight: 550; border-bottom: 1px solid var(--c-border); }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--c-accent); }
.nav-list a[aria-current="page"] { font-weight: 700; }
.lang-switch { list-style: none; display: flex; gap: 6px; margin: 14px 0 6px; }
.lang-switch a, .lang-switch span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm); border: 1.5px solid var(--c-border); font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--c-text); }
.lang-switch .is-current { background: var(--c-text); border-color: var(--c-text); color: var(--c-bg); }
.nav-cta { margin-top: 10px; width: 100%; white-space: nowrap; }
.is-landing .header-in { flex-wrap: nowrap; }
.header-cta { display: none; }
.is-landing .brand-name { white-space: normal; font-size: 1.1rem; }

@media (min-width: 640px) {
  .is-landing .header-cta { display: inline-flex; }
}
@media (min-width: 960px) {
  .header-in { flex-wrap: nowrap; gap: 20px; }
  .brand { margin-right: 0; }
  .nav-toggle { display: none; }
  .site-nav, .js .site-nav { display: flex; position: static; flex-basis: auto; align-items: center; gap: 28px; padding: 0; border: 0; box-shadow: none; background: none; margin-left: auto; order: 1; }
  .header-phone { order: 2; }
  .nav-list { flex-direction: row; gap: 22px; }
  .nav-list a { min-height: 44px; border: 0; font-size: .98rem; }
  .nav-list a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--c-accent); }
  .lang-switch { margin: 0; }
  .lang-switch a, .lang-switch span { min-width: 40px; min-height: 40px; padding: 0 8px; }
  .nav-cta { margin: 0; width: auto; }
  .is-landing .header-phone { margin-left: auto; }
}

/* Пять и более пунктов меню (например, с «Блогом»): плотнее, чтобы шапка не слипалась */
@media (min-width: 960px) {
  .header-in:has(.nav-list li:nth-child(5)) { gap: 12px; }
  .header-in:has(.nav-list li:nth-child(5)) .site-nav { gap: 14px; }
  .header-in:has(.nav-list li:nth-child(5)) .nav-list { gap: 14px; }
}
@media (min-width: 960px) and (max-width: 1399px) {
  .header-in:has(.nav-list li:nth-child(5)) .header-phone-num { display: none; }
}
@media (min-width: 960px) and (max-width: 1119px) {
  .header-in:has(.nav-list li:nth-child(5)) .nav-cta { display: none; }
}
@media (min-width: 640px) { .brand-name { white-space: nowrap; } }
@media (min-width: 640px) and (max-width: 959px) { .header-phone-num { display: inline; } }
@media (min-width: 1220px) { .header-phone-num { display: inline; } }

/* ---------- Блоки: общее ---------- */
.blk { padding-block: var(--section-y); }
.blk.bg-default + .blk.bg-default { padding-top: 0; }
.bg-alt { background: var(--c-surface-alt); }
.bg-accent { background: var(--c-accent); color: var(--c-on-accent); }
.bg-dark { background: var(--c-dark); color: var(--c-on-dark); }
.bg-accent a:not(.btn), .bg-dark a:not(.btn) { color: inherit; }
.bg-accent h1 em, .bg-accent h2 em, .bg-dark h1 em, .bg-dark h2 em { color: inherit; }
.blk-head { max-width: 46rem; margin-bottom: clamp(28px, 4.5vw, 52px); }
.blk-head.is-center { margin-inline: auto; text-align: center; }
.blk-head h2 { margin-bottom: .4em; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 1rem; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent); }
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; flex: none; }
.is-center .eyebrow { justify-content: center; }
.bg-dark .eyebrow, .bg-accent .eyebrow { color: inherit; opacity: .9; }
.lead { font-size: 1.14rem; color: var(--c-muted); max-width: 40rem; margin-bottom: 0; }
.bg-dark .lead, .bg-accent .lead { color: inherit; opacity: .92; }
.is-center .lead { margin-inline: auto; }
.blk-note { margin: 28px 0 0; color: var(--c-muted); font-size: .95rem; max-width: 46rem; }
.icon { width: 24px; height: 24px; flex: none; }
.breadcrumbs { padding-top: 18px; font-size: .9rem; color: var(--c-muted); }
.breadcrumbs ol { list-style: none; }
.breadcrumbs li { display: inline; }
.breadcrumbs li + li::before { content: "/" / ""; margin-inline: 10px; opacity: .6; }
.breadcrumbs a { color: var(--c-muted); }
.page-head { padding-top: clamp(20px, 4vw, 48px); }
.page-head h1 { margin: 0; max-width: 24ch; }
.page-head + .blk { padding-top: clamp(24px, 3vw, 40px); }

/* ---------- Заглушки ---------- */
.ph { display: grid; place-items: center; color: var(--c-muted); font-size: .85rem; letter-spacing: .04em; border: 1.5px dashed color-mix(in srgb, var(--c-text) 28%, transparent);
  background: repeating-linear-gradient(135deg, var(--c-surface-alt) 0 12px, color-mix(in srgb, var(--c-surface-alt) 88%, var(--c-text)) 12px 13px); }
.ph-hero { aspect-ratio: 4 / 5; border-radius: 999px 999px var(--r-lg) var(--r-lg); }
.ph-shot { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
.ph-avatar { width: 120px; height: 120px; border-radius: 50%; font-family: var(--font-heading); font-size: 1.8rem; color: var(--c-primary); }

/* ---------- Hero ---------- */
.blk-hero { padding-block: clamp(28px, 6vw, 84px); background-image: radial-gradient(48rem 26rem at 88% -8%, color-mix(in srgb, var(--c-accent) 11%, transparent), transparent 70%); overflow: hidden; }
.hero-in { display: grid; gap: 36px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-copy h1 { margin-bottom: .45em; }
.hero-copy .lead { font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.hero-bullets { list-style: none; display: grid; gap: 10px; margin-top: 30px; font-size: .98rem; }
.hero-bullets li { display: flex; gap: 10px; align-items: flex-start; }
.hero-bullets .icon { width: 20px; height: 20px; margin-top: .2em; color: var(--c-accent); }
.hero-media { position: relative; width: min(100%, 420px); margin-inline: auto; }
.hero-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px var(--r-lg) var(--r-lg); background: var(--c-surface-alt); box-shadow: var(--shadow-lg); }
.hero-badge { position: absolute; left: -4px; bottom: 28px; max-width: 70%; margin: 0; padding: 12px 16px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--shadow-md); font-size: .92rem; line-height: 1.35; }
.hero-centered .hero-in { max-width: 50rem; text-align: center; }
.hero-centered .lead, .hero-centered .eyebrow { margin-inline: auto; justify-content: center; }
.hero-centered .hero-actions { justify-content: center; }
.hero-centered .hero-bullets { justify-content: center; justify-items: center; grid-auto-flow: row; }
@media (min-width: 640px) { .hero-centered .hero-bullets { display: flex; flex-wrap: wrap; gap: 10px 26px; } }
@media (min-width: 900px) {
  .hero-split .hero-in { grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 80px); }
  .hero-media { width: 100%; max-width: 440px; margin-inline: 0 auto; }
  .hero-badge { left: -32px; }
}

/* ---------- Карточки: преимущества, услуги ---------- */
.cards { list-style: none; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { min-width: 0; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.bg-alt .card { border-color: transparent; }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--c-muted); }
.card-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; margin-bottom: 16px; background: color-mix(in srgb, var(--c-accent) 13%, var(--c-surface)); color: var(--c-accent); }
.services.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.service { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.service-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--c-surface-alt); }
.service-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.service-price { font-family: var(--font-heading); color: var(--c-primary) !important; font-size: 1.08rem; font-weight: 600; margin-top: 4px; }
.more { margin-top: auto; padding-top: 10px; font-weight: 650; color: var(--c-accent); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.more::after { content: "\2192"; content: "\2192" / ""; margin-left: .45em; transition: transform .2s ease; }
.more:hover { text-decoration: underline; }
.more:hover::after { transform: translateX(3px); }
@media (min-width: 900px) {
  .cols-2 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Шаги ---------- */
.steps { list-style: none; display: grid; gap: 26px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.step { min-width: 0; border-top: 1.5px solid color-mix(in srgb, var(--c-text) 55%, transparent); padding-top: 16px; }
.step-num { display: block; font-family: var(--font-heading); font-size: 3rem; line-height: 1; color: var(--c-accent); font-style: italic; margin-bottom: 12px; }
.step h3 { margin-bottom: .3em; }
.step p { color: var(--c-muted); margin: 0; }
@media (min-width: 900px) { .steps.cols-3 { grid-template-columns: repeat(3, 1fr); } .steps.cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Тарифы ---------- */
.plans { list-style: none; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 28px; border-radius: var(--r-lg); background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); }
.plan h3 { margin-bottom: .2em; }
.plan-text { color: var(--c-muted); font-size: .95rem; }
.plan-price { margin: 4px 0 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.plan-amount { font-family: var(--font-heading); font-size: 2.15rem; font-weight: 650; line-height: 1.1; }
.plan-period { color: var(--c-muted); font-size: .95rem; }
.plan-list { list-style: none; display: grid; gap: 10px; margin-bottom: 24px; font-size: .97rem; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; }
.plan-list .icon { width: 20px; height: 20px; margin-top: .2em; color: var(--c-accent); }
.plan .btn { margin-top: auto; }
.plan.is-featured { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); box-shadow: var(--shadow-lg); }
.plan.is-featured .plan-text, .plan.is-featured .plan-period { color: inherit; opacity: .85; }
.plan.is-featured .plan-list .icon { color: inherit; }
.plan.is-featured .btn-primary { background: var(--c-on-primary); color: var(--c-primary); }
.plan-flag { align-self: flex-start; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--c-accent); color: var(--c-on-accent); }

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; border-top: 1px solid var(--c-border); }
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 64px; padding: 14px 0; cursor: pointer; list-style: none; font-family: var(--font-heading); font-size: 1.14rem; font-weight: 600; line-height: 1.3; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--c-accent); }
.faq-ic { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid currentColor; }
.faq-ic::before, .faq-ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .2s ease; }
.faq-ic::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-ic::after { transform: translate(-50%, -50%) rotate(0); }
.faq-a { padding: 0 48px 22px 0; color: var(--c-muted); }
.faq-a p { margin: 0; }

/* ---------- Отзывы ---------- */
.reviews { list-style: none; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.review { min-width: 0; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 28px; }
.review figure { margin: 0; }
.review blockquote { margin: 0 0 18px; position: relative; }
.review blockquote::before { content: "\201C"; display: block; font-family: var(--font-heading); font-size: 3.4rem; line-height: .7; color: var(--c-accent); margin-bottom: 10px; }
.review blockquote p { margin: 0; font-size: 1.05rem; }
.review figcaption { display: grid; gap: 2px; font-size: .92rem; }
.review figcaption span { color: var(--c-muted); }

/* ---------- Галерея ---------- */
.gallery { list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.shot { min-width: 0; }
.shot figure { margin: 0; }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--c-surface-alt); }
.shot figcaption { margin-top: 8px; font-size: .9rem; color: var(--c-muted); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* ---------- Контакты ---------- */
.contacts-grid { display: grid; gap: 32px; }
.contact-list { list-style: none; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .icon { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: color-mix(in srgb, var(--c-accent) 13%, var(--c-surface)); color: var(--c-accent); }
.contact-list li > div { display: grid; min-width: 0; font-size: 1.12rem; }
.k { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--c-muted); margin: 0 0 2px; }
.messengers { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 800px) { .contacts-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; } }

/* ---------- Формы ---------- */
.form-layout { display: grid; gap: 32px; align-items: start; }
.form-copy h2 { margin-bottom: .4em; }
.points { list-style: none; display: grid; gap: 12px; margin-top: 24px; }
.points li { display: flex; gap: 12px; align-items: flex-start; }
.points .icon { width: 22px; height: 22px; color: var(--c-accent); margin-top: .15em; }
.sk-form, .quiz-box { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow-md); color: var(--c-text); }
.field { margin-bottom: 16px; }
.field label:not(.check) { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.req { color: var(--c-danger); }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font-size: 1rem; background: var(--c-bg);
  border: 1.5px solid color-mix(in srgb, var(--c-text) 45%, var(--c-bg)); border-radius: var(--r-md);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 96px; }
input:hover, select:hover, textarea:hover { border-color: var(--c-text); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-accent) 55%, transparent); outline-offset: 1px; border-color: var(--c-primary); }
[aria-invalid="true"] { border-color: var(--c-danger) !important; }
.field-error { margin: 6px 0 0; color: var(--c-danger); font-size: .92rem; font-weight: 550; }
.field-error[hidden], .form-status[hidden] { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .92rem; color: var(--c-muted); line-height: 1.45; }
.check input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--c-primary); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 16px 0 0; padding: 14px 16px; border-radius: var(--r-md); font-weight: 550; }
.form-status.is-ok { background: color-mix(in srgb, var(--c-ok) 12%, var(--c-surface)); color: var(--c-ok); border: 1px solid color-mix(in srgb, var(--c-ok) 40%, transparent); }
.form-status.is-error { background: color-mix(in srgb, var(--c-danger) 10%, var(--c-surface)); color: var(--c-danger); border: 1px solid color-mix(in srgb, var(--c-danger) 40%, transparent); }
.sk-form .btn[type="submit"] { width: 100%; margin-top: 4px; }
@media (min-width: 900px) { .form-layout { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); } .form-copy { padding-top: 12px; } }

/* ---------- Квиз ---------- */
.quiz-box { max-width: 52rem; }
.quiz-intro p { margin-bottom: 20px; color: var(--c-muted); }
.quiz-progress { margin-bottom: 22px; }
.quiz-progress-text { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; font-weight: 600; color: var(--c-muted); margin-bottom: 8px; }
.quiz-track { height: 8px; border-radius: 999px; background: var(--c-surface-alt); overflow: hidden; }
.quiz-bar { height: 100%; width: 0; border-radius: 999px; background: var(--c-accent); transition: width .35s ease; }
.quiz-q { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.quiz-q legend { padding: 0; margin-bottom: 6px; font-family: var(--font-heading); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); font-weight: var(--fw-heading, 600); line-height: 1.25; }
.quiz-q legend:focus { outline: none; }
.quiz-hint { margin: 0 0 16px; color: var(--c-muted); font-size: .95rem; }
.q-opts { display: grid; gap: 10px; }
.q-opt { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 12px 16px; border: 1.5px solid color-mix(in srgb, var(--c-text) 35%, var(--c-bg)); border-radius: var(--r-md); cursor: pointer; background: var(--c-bg); transition: border-color .15s ease, background-color .15s ease; }
.q-opt:hover { border-color: var(--c-text); }
.q-opt input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--c-primary); }
.q-opt:has(input:checked) { border-color: var(--c-primary); background: color-mix(in srgb, var(--c-primary) 8%, var(--c-bg)); box-shadow: inset 0 0 0 1px var(--c-primary); }
.q-opt:has(input:focus-visible) { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.q-opt-label { min-width: 0; overflow-wrap: anywhere; }
.q-opt-hint { display: block; color: var(--c-muted); font-size: .88rem; }
.quiz-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 8px; }
.quiz-nav .btn-primary { margin-left: auto; }
.quiz-thanks { text-align: center; padding: 12px 0; }
.quiz-thanks .icon { width: 64px; height: 64px; padding: 16px; margin: 0 auto 16px; border-radius: 50%; background: color-mix(in srgb, var(--c-ok) 14%, var(--c-surface)); color: var(--c-ok); }
.quiz-thanks h3 { font-size: 1.6rem; }
.quiz-thanks h3:focus { outline: none; }

/* ---------- CTA, текст, команда, логотипы ---------- */
.cta-box { display: grid; gap: 24px; align-items: center; }
.cta-copy h2 { margin-bottom: .3em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
@media (min-width: 860px) { .cta-box { grid-template-columns: 1fr auto; gap: 48px; } }
.blk-text { padding-block: clamp(26px, 3.5vw, 44px); }
.blk-text .blk-head { margin-bottom: 14px; }
.blk-text .blk-head h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); margin: 0; }
.prose { max-width: 44rem; }
.prose ul { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin-bottom: .45em; padding-left: .3em; }
.prose li::marker { color: var(--c-accent); }
.team { list-style: none; display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.member { min-width: 0; }
.member h3 { margin: 14px 0 2px; }
.member .role { color: var(--c-accent); font-weight: 600; font-size: .92rem; margin-bottom: .5em; }
.member p:last-child { color: var(--c-muted); font-size: .95rem; margin: 0; }
.avatar { width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); background: var(--c-surface-alt); }
.logos { list-style: none; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.logos img { height: 40px; width: auto; max-width: 160px; object-fit: contain; filter: grayscale(1); opacity: .75; }
.logo-text { font-family: var(--font-heading); font-size: 1.25rem; color: var(--c-muted); }

/* ---------- Подвал ---------- */
.site-footer { background: color-mix(in srgb, var(--c-dark) 80%, black); color: var(--c-on-dark); padding-top: clamp(40px, 6vw, 72px); margin-top: 0; }
.site-footer a { color: inherit; }
.footer-grid { display: grid; gap: 28px; padding-bottom: 36px; }
.footer-brand { font-family: var(--font-heading); font-size: 1.5rem; margin: 0 0 6px; }
.footer-about p:last-child { opacity: .82; max-width: 28rem; }
.footer-nav ul { list-style: none; display: grid; gap: 2px; }
.footer-nav a, .footer-contacts a { display: inline-flex; align-items: center; min-height: 40px; }
.footer-contacts p { margin: 0 0 4px; opacity: .95; }
.footer-messengers { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 20px 28px; border-top: 1px solid color-mix(in srgb, var(--c-on-dark) 22%, transparent); font-size: .88rem; }
.footer-bottom p { margin: 0; opacity: .85; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; gap: 48px; } }

/* ---------- Cookie ---------- */
.cookie { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 12px; max-width: 620px; padding: 16px 18px; background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.cookie p { margin: 0 0 12px; font-size: .93rem; line-height: 1.45; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { flex: 1 1 140px; }
@media (min-width: 700px) { .cookie { left: 24px; right: auto; bottom: 24px; } }

.nf { padding-block: var(--section-y); }
.nf h1 { max-width: 16ch; }

/* ---------- Блог: список, карточки, пагинация ---------- */
.blog-main { padding-block: clamp(20px, 4vw, 48px) clamp(40px, 7vw, 96px); }
.blog-head { max-width: 46rem; margin-bottom: clamp(20px, 3vw, 36px); }
.blog-head h1 { margin-bottom: .35em; }
.blog-head .lead { margin-bottom: 0; }
.blog-cats ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(22px, 3vw, 34px); }
.blog-cats a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--c-border); border-radius: 999px; background: var(--c-surface); color: var(--c-text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.blog-cats a:hover { border-color: var(--c-text); }
.blog-cats a[aria-current="page"] { background: var(--c-text); border-color: var(--c-text); color: var(--c-bg); }
.blog-cats .cnt { opacity: .65; font-weight: 500; }
.post-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.post-card { position: relative; padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card:has(a:focus-visible) { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.post-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--c-surface-alt); }
.post-card-body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.post-card-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0 0 10px; font-size: .84rem; color: var(--c-muted); }
.post-cat { font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c-accent); }
.post-card-title { font-size: 1.25rem; line-height: 1.25; margin: 0 0 .45em; }
.post-card-title a { color: var(--c-text); text-decoration: none; }
.post-card-title a::after { content: ""; position: absolute; inset: 0; }
.post-card-title a:focus-visible { outline: none; }
.post-card:hover .post-card-title a { color: var(--c-accent); }
.post-card-text { margin: 0; font-size: .97rem; }
.pagination { margin-top: clamp(28px, 4vw, 44px); }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.pg-num, .pg-step, .pg-gap { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border-radius: var(--r-md); }
.pg-num, .pg-step { border: 1.5px solid var(--c-border); background: var(--c-surface); color: var(--c-text); text-decoration: none; font-weight: 600; }
a.pg-num:hover, a.pg-step:hover { border-color: var(--c-text); }
span.pg-num[aria-current] { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.blog-feed { margin: 28px 0 0; font-size: .92rem; }
.blog-feed a { color: var(--c-muted); }
.blog-empty { color: var(--c-muted); }
.blk-more { margin: 28px 0 0; }

/* ---------- Блог: статья ---------- */
.post-wrap { width: min(100% - 2 * var(--gutter), 42rem); margin-inline: auto; padding-block: clamp(16px, 3vw, 36px) clamp(36px, 6vw, 72px); }
.post-head { margin-bottom: 28px; }
.post-cat-line { margin: 0 0 .9rem; }
.post-cat-line a { text-decoration: none; }
.post-head h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); line-height: 1.12; margin-bottom: .4em; }
.post-lead { font-size: 1.18rem; line-height: 1.5; color: var(--c-muted); margin: 0 0 1.1rem; }
.post-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding-top: 14px; border-top: 1px solid var(--c-border); font-size: .9rem; color: var(--c-muted); }
.post-meta .k { font-weight: 650; color: var(--c-text); }
.post-cover { margin: 0 0 32px; }
.post-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); background: var(--c-surface-alt); }
.toc { margin: 0 0 32px; padding: 20px 24px; background: var(--c-surface-alt); border-radius: var(--r-md); }
.toc-title { margin: 0 0 8px; font-family: var(--font-heading); font-weight: 600; font-size: 1.1rem; }
.toc ol { padding-left: 1.3em; display: grid; gap: 6px; }
.toc a { color: var(--c-text); }
.post-body { font-size: 1.06rem; line-height: 1.72; overflow-wrap: break-word; }
.post-body > :first-child { margin-top: 0; }
.post-body h2 { margin: 2em 0 .6em; font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem); scroll-margin-top: 84px; }
.post-body h3 { margin: 1.6em 0 .5em; font-size: 1.3rem; scroll-margin-top: 84px; }
.post-body h4 { margin: 1.4em 0 .4em; font-size: 1.1rem; }
.post-body p { margin: 0 0 1.15em; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1.15em; }
.post-body li { margin-bottom: .4em; padding-left: .25em; }
.post-body li::marker { color: var(--c-accent); }
.post-body li > ul, .post-body li > ol { margin: .4em 0; }
.post-body li > p { margin-bottom: .5em; }
.post-body blockquote { margin: 1.6em 0; padding: .3em 0 .3em 1.2em; border-left: 3px solid var(--c-accent); color: var(--c-muted); font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.55; }
.post-body blockquote > :last-child { margin-bottom: 0; }
.post-body hr { border: 0; border-top: 1px solid var(--c-border); margin: 2.2em 0; }
.post-body figure { margin: 1.8em 0; }
.post-body img { border-radius: var(--r-md); }
.post-body figcaption { margin-top: 8px; font-size: .9rem; color: var(--c-muted); }
.post-body code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; background: var(--c-surface-alt); padding: .1em .35em; border-radius: 4px; }
.post-body pre { overflow-x: auto; margin: 0 0 1.3em; padding: 16px; background: var(--c-dark); color: var(--c-on-dark); border-radius: var(--r-md); font-size: .9rem; line-height: 1.5; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-surface); }
.post-body table { border-collapse: collapse; width: 100%; font-size: .96rem; line-height: 1.45; }
.post-body th, .post-body td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-border); }
.post-body th { background: var(--c-surface-alt); font-weight: 650; }
.post-body tbody tr:last-child td { border-bottom: 0; }
.post-body .ta-right { text-align: right; }
.post-body .ta-center { text-align: center; }
.post-faq { margin-top: 2.6em; }
.post-faq h2 { font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem); }
.post-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 2em 0 0; }
.post-tags a, .post-tags span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-surface); color: var(--c-muted); font-size: .88rem; text-decoration: none; }
.post-tags a:hover { border-color: var(--c-text); color: var(--c-text); }
.post-cta { margin: 2.6em 0 0; padding: clamp(24px, 4vw, 36px); border-radius: var(--r-lg); background: var(--c-dark); color: var(--c-on-dark); }
.post-cta-title { font-size: 1.5rem; margin: 0 0 .4em; }
.post-cta p { margin: 0 0 1em; opacity: .92; }
.post-cta p:last-child { margin: 0; opacity: 1; }
.post-nav { display: grid; gap: 12px; margin-top: 40px; }
.post-nav-link { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 20px; border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-surface); color: var(--c-text); text-decoration: none; }
.post-nav-link:hover { border-color: var(--c-text); }
.post-nav-link .k { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.post-nav-link .t { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav-link.is-next { grid-column: 2; text-align: right; }
}
.post-related { padding-block: 0 clamp(40px, 6vw, 80px); }
.post-related h2 { margin-bottom: 20px; font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem); }

/* ---------- Движение ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:hover { transform: none; }
}
@media print { .site-header, .site-nav, .cookie, .nav-toggle, .skip-link { display: none !important; } .blk { padding-block: 24px; } }




