/* ==========================================================================
   Правион — таблица стилей (дизайн по макетам, ноябрь 2026)
   1. Токены · 2. База · 3. Раскладка · 4. Компоненты · 5. Секции · 6. Утилиты
   ========================================================================== */

/* Шрифт Golos Text (SIL OFL 1.1, лицензия — assets/fonts/OFL-golos-text.txt) хранится на сайте,
   без обращений к Google: вариативный, начертания 400–700 в одном файле */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/golos-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/golos-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* 1. ТОКЕНЫ --------------------------------------------------------------- */
:root {
  --c-primary: #1456A0;
  --c-primary-hover: #0F447F;
  --c-navy: #17324D;
  --c-navy-deep: #10263B;
  --c-white: #FFFFFF;
  --c-sky: #EAF2FA;
  --c-mist: #F5F7FA;
  --c-text: #26364A;
  --c-muted: #4B5C70;
  --c-line: #DCE4EE;
  --c-line-strong: #8597AB;
  --c-pill-line: #C6D2DF;
  --c-green: #20A67A;
  --c-green-text: #0E6B4A;
  --c-green-bg: #E4F5EE;
  --c-error: #B42318;
  --c-warning-bg: #FFF6DB;
  --c-warning-line: #C98A00;
  --c-focus: #FFC533;

  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-h1: clamp(2.25rem, 1.4rem + 3vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);

  --radius: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container: 1200px;
  --gutter: 16px;
  --header-h: 72px;
  --section: clamp(56px, 4rem + 3vw, 96px);
  --t: 150ms ease;
  --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}
@media (min-width: 768px) { :root { --gutter: 32px; --fs-base: 1.125rem; } }

/* 2. БАЗА ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.6; color: var(--c-text); background: var(--c-white); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 16px; color: var(--c-navy); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
p, ul, ol, dl { margin: 0 0 16px; }
p { text-wrap: pretty; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 6px; }
strong, b { font-weight: 600; color: var(--c-navy); }
a { color: var(--c-primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--c-primary-hover); text-decoration-thickness: 2px; }
a, button, input, label, summary, textarea { touch-action: manipulation; }

:focus-visible { outline: 3px solid var(--c-navy); outline-offset: 2px; box-shadow: 0 0 0 2px var(--c-white), 0 0 0 7px var(--c-focus); border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--c-white); box-shadow: 0 0 0 2px var(--c-navy), 0 0 0 7px var(--c-focus); }
::selection { background: #CFE1F4; color: var(--c-navy); }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; background: var(--c-focus); color: var(--c-navy); font-weight: 600; padding: 12px 16px; border-radius: var(--radius); text-decoration: none; }
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* 3. РАСКЛАДКА ------------------------------------------------------------ */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }
.section { padding-block: var(--section); }
.section--mist { background: var(--c-mist); }
.section--sky { background: var(--c-sky); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 40px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--c-muted); max-width: 60ch; }
.lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--c-text); max-width: 46ch; }
.muted { color: var(--c-muted); }
.split { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split--top { align-items: flex-start; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 300px)), 1fr)); }
.grid--2 { --min: 460px; }
.grid--4 { --min: 240px; }
.grid > * { min-width: 0; }  /* длинное слово не растягивает колонку шире экрана */
.prose { max-width: 72ch; }

/* 4. КОМПОНЕНТЫ ----------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 26px; border-radius: var(--radius); border: 2px solid transparent; font: 600 var(--fs-base)/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color var(--t), color var(--t), border-color var(--t); }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--c-primary); color: var(--c-white); }
.btn--primary:hover { background: var(--c-primary-hover); color: var(--c-white); }
.btn--secondary { background: var(--c-white); color: var(--c-primary); border-color: var(--c-primary); }
.btn--secondary:hover { background: var(--c-sky); color: var(--c-primary-hover); }
.btn--light { background: var(--c-white); color: var(--c-navy); }
.btn--light:hover { background: var(--c-sky); color: var(--c-navy); }
.btn--sm { min-height: 46px; padding: 0 20px; font-size: var(--fs-sm); }
.btn[disabled] { opacity: .65; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 479px) { .btn-row .btn { width: 100%; } }
.link-strong { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

.tag { display: inline-block; font-size: var(--fs-sm); font-weight: 600; color: var(--c-navy); background: var(--c-sky); border-radius: 999px; padding: 3px 12px; }
.tag--green { color: var(--c-green-text); background: var(--c-green-bg); }
.ph { background: #FFF1C2; color: #5C4200; padding: 0 4px; border-radius: 3px; font-weight: 500; }
.on-dark .ph { background: transparent; color: #E6EEF6; border: 1px dashed #6F88A3; }

/* Шапка */
.topbar { background: var(--c-navy); color: #DCE6F1; font-size: 14px; }
.topbar .container { display: flex; gap: 20px; align-items: center; justify-content: space-between; min-height: 40px; }
/* Всегда одна строка: пункты, которые не помещаются, переносятся во вторую строку и скрываются */
.topbar__items { display: flex; flex-wrap: wrap; column-gap: 28px; max-height: 40px; overflow: hidden; margin: 0; padding: 0; list-style: none; }
.topbar__items li { margin: 0; line-height: 40px; white-space: nowrap; }
.topbar a { color: var(--c-white); }
@media (max-width: 379px) { .topbar { font-size: 13px; } }
@media (max-width: 339px) { .topbar { font-size: 12.5px; } }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--c-white); border-bottom: 1px solid var(--c-line); }
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(23, 50, 77, .08); }
.site-header__inner { display: flex; align-items: center; gap: 16px 32px; min-height: var(--header-h); }
.logo { display: block; margin-right: auto; text-decoration: none; }
.logo__img { display: block; height: 44px; width: auto; }
@media (max-width: 399px) { .logo__img { height: 36px; } }
.nav { display: none; }
.nav__list { display: flex; gap: 4px 24px; list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__link { display: flex; align-items: center; min-height: 44px; color: var(--c-navy); text-decoration: none; font-weight: 500; font-size: 16px; white-space: nowrap; }
.nav__link:hover { color: var(--c-primary); }
.nav__link[aria-current="page"] { color: var(--c-primary); font-weight: 700; }
.header-cta { display: none; white-space: nowrap; }
@media (min-width: 640px) { .header-cta { display: inline-flex; } }
@media (min-width: 1140px) { .nav { display: block; } .menu-toggle { display: none !important; } }
.menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; background: var(--c-white); color: var(--c-navy); border: 2px solid var(--c-line); border-radius: var(--radius); font: 600 var(--fs-sm) var(--font); cursor: pointer; flex: none; }
.menu-toggle:hover { border-color: var(--c-navy); }
.menu-toggle__icon { width: 20px; height: 14px; position: relative; }
.menu-toggle__icon span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--t), opacity var(--t); }
.menu-toggle__icon span:nth-child(1) { top: 0; } .menu-toggle__icon span:nth-child(2) { top: 6px; } .menu-toggle__icon span:nth-child(3) { top: 12px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { border-top: 1px solid var(--c-line); background: var(--c-white); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu__inner { padding-block: 16px 32px; }
.mobile-menu__group { margin-bottom: 24px; }
.mobile-menu__label { font-size: var(--fs-sm); color: var(--c-muted); font-weight: 600; margin-bottom: 8px; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { margin: 0; border-bottom: 1px solid var(--c-mist); }
.mobile-menu a:not(.btn) { display: flex; align-items: center; justify-content: space-between; min-height: 52px; color: var(--c-navy); font-weight: 500; text-decoration: none; }
.mobile-menu a:not(.btn)::after { content: ""; width: 18px; height: 18px; background: var(--c-line-strong); -webkit-mask: var(--i-arrow) center/contain no-repeat; mask: var(--i-arrow) center/contain no-repeat; }
.mobile-menu a[aria-current="page"] { color: var(--c-primary); font-weight: 600; }
.mobile-menu .btn { width: 100%; }
@media (min-width: 1140px) { .mobile-menu { display: none !important; } }
body.menu-open { overflow: hidden; }

/* Хлебные крошки */
.breadcrumbs-bar { background: var(--c-sky); }
.breadcrumbs { padding-block: 20px 0; font-size: var(--fs-sm); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; display: inline-flex; align-items: center; gap: 4px; color: var(--c-muted); }
.breadcrumbs li + li::before { content: "/"; margin: 0 6px; color: var(--c-line-strong); }
.breadcrumbs a { color: var(--c-text); }

/* Шапка внутренней страницы */
.page-head { background: var(--c-sky); border-bottom: 1px solid #D6E3F1; padding-block: 36px 64px; overflow: hidden; }
.page-head h1 { max-width: 22ch; margin-bottom: 18px; }
.page-head .lead { margin-bottom: 0; }
.page-head .btn-row { margin-top: 28px; }
.page-head--cutout { padding-bottom: 0; }
.page-head--cutout .split { align-items: flex-end; }
.page-head--cutout .split > :first-child { padding-bottom: 64px; align-self: center; }

/* Фото-вырез на круге (первый экран, консультация) */
.cutout { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 380px; }
.cutout img { position: relative; z-index: 1; width: 100%; max-width: 460px; height: auto; }

/* Карточки направлений с фото */
.dir-card { position: relative; display: flex; flex-direction: column; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-md); overflow: hidden; transition: border-color var(--t); }
.dir-card:hover { border-color: var(--c-primary); }
.dir-card img { width: 100%; height: 240px; object-fit: cover; }
.dir-card__body { padding: 28px 32px 32px; display: flex; flex-direction: column; flex: 1; }
.dir-card h3 { margin: 0 0 8px; }
.dir-card h3 a { color: var(--c-navy); text-decoration: none; }
.dir-card h3 a::after { content: ""; position: absolute; inset: 0; }
.dir-card h3 a:focus-visible { outline: none; box-shadow: none; }
.dir-card:has(h3 a:focus-visible) { outline: 3px solid var(--c-navy); outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 7px var(--c-focus); }
.dir-card p { color: var(--c-muted); font-size: 16px; }
.dir-card ul { font-size: 16px; margin-bottom: 18px; }
.dir-card__more { margin-top: auto; color: var(--c-primary); font-weight: 600; font-size: 16px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .2em; transition: text-decoration-color var(--t); }
.dir-card:hover .dir-card__more { text-decoration-color: currentColor; }
@media (max-width: 639px) { .dir-card img { height: 170px; } .dir-card__body { padding: 20px 20px 24px; } }

/* Шаги */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }
.steps li { margin: 0; display: flex; gap: 20px; align-items: center; }
.steps__num { flex: 0 0 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; background: var(--c-white); color: var(--c-primary); border: 2px solid var(--c-primary); box-shadow: 0 0 0 6px rgba(20, 86, 160, .08); }
.steps li:last-child .steps__num { background: var(--c-primary); color: var(--c-white); }
.steps__title { color: var(--c-navy); font-weight: 700; font-size: var(--fs-md); line-height: 1.3; }
.steps__text { color: var(--c-muted); font-size: 16px; }
.steps--sm .steps__num { flex-basis: 44px; height: 44px; font-size: 17px; }

/* Фемида, выходящая из рамки */
.themis { position: relative; padding-top: 110px; overflow: hidden; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.themis__frame { position: relative; height: 460px; border-radius: var(--radius-lg); overflow: hidden; background: var(--c-sky); }
.themis__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(3px) saturate(.85); transform: scale(1.06); }
.themis__frame::after { content: ""; position: absolute; inset: 0; background: rgba(234, 242, 250, .38); }
.themis__statue { position: absolute; z-index: 1; left: 6%; bottom: -280px; height: 820px; width: auto; max-width: none; filter: drop-shadow(0 18px 24px rgba(23, 50, 77, .25)); }
@media (max-width: 639px) { .themis { padding-top: 70px; } .themis__frame { height: 300px; } .themis__statue { height: 520px; bottom: -170px; } }

/* Преимущества с полупрозрачным щитом */
.benefits-intro { position: relative; padding-top: 72px; }
.benefits-intro__mark { position: absolute; left: -28px; top: -24px; width: 250px; height: auto; opacity: .16; pointer-events: none; }
.benefits-intro > :not(.benefits-intro__mark) { position: relative; }
.benefits-intro h2 { max-width: 12ch; }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 40px; }
.benefits li { margin: 0; padding: 22px 0; border-top: 1px solid var(--c-line); }
.benefits b { display: block; font-size: var(--fs-md); }
.benefits span { color: var(--c-muted); font-size: 16px; }

/* Статьи */
.art-card { position: relative; display: flex; flex-direction: column; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-md); overflow: hidden; transition: border-color var(--t); }
.art-card:hover { border-color: var(--c-primary); }
.art-card img { width: 100%; height: 200px; object-fit: cover; }
.art-card__body { padding: 22px 26px 26px; }
.art-card h3 { margin: 0; font-size: var(--fs-md); line-height: 1.3; }
.art-card h3 a { color: var(--c-navy); text-decoration: none; }
.art-card h3 a::after { content: ""; position: absolute; inset: 0; }
.art-card h3 a:hover { color: var(--c-primary); }
.art-card__meta { margin: 8px 0 0; color: var(--c-muted); font-size: var(--fs-sm); }
.art-card--big img { height: 320px; }
.art-card--big h3 { font-size: var(--fs-h3); }
@media (min-width: 900px) { .art-grid .art-card--big { grid-column: 1 / -1; } }

/* Главный факт на странице услуги */
.fact { position: relative; margin-top: -32px; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-md); padding: 28px 36px; display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: center; }
.fact__big { font-size: clamp(2.25rem, 1.8rem + 1.5vw, 2.75rem); line-height: 1; font-weight: 700; color: var(--c-primary); letter-spacing: -0.02em; white-space: nowrap; }
.fact p { flex: 1 1 420px; min-width: 0; margin: 0; font-size: var(--fs-base); }
@media (max-width: 639px) { .fact { padding: 22px; } }

/* Способы решения */
.option { background: var(--c-white); border: 1px solid var(--c-line); border-radius: 14px; padding: 24px; }
.option h3 { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; font-size: 21px; margin-bottom: 8px; hyphens: auto; overflow-wrap: anywhere; }
.option p { color: var(--c-muted); font-size: 16px; }
.option dl { margin: 0; font-size: var(--fs-sm); }
.option dl div + div { margin-top: 4px; }
.option dt { display: inline; font-weight: 600; color: var(--c-navy); }
.option dt::after { content: ": "; }
.option dd { display: inline; margin: 0; }

.doc-list { margin: 0; padding-left: 20px; font-size: 16px; }
.photo { width: 100%; height: auto; border-radius: var(--radius-lg); }
.photo--md { border-radius: var(--radius-md); }
.photo--cover { height: 220px; object-fit: cover; }

/* Плашки */
.notice { background: var(--c-sky); border-left: 5px solid var(--c-primary); border-radius: var(--radius); padding: 22px 26px; }
.notice--warning { background: var(--c-warning-bg); border-color: var(--c-warning-line); }
.notice__title { color: var(--c-navy); font-weight: 700; margin-bottom: 6px; }
.notice p:last-child { margin-bottom: 0; }

/* Вопросы */
.faq details { border-top: 1px solid var(--c-line); }
.faq details:last-child { border-bottom: 1px solid var(--c-line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 0; font-weight: 600; font-size: var(--fs-md); color: var(--c-navy); line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--c-primary); background: linear-gradient(var(--c-primary), var(--c-primary)) center/12px 2px no-repeat, linear-gradient(var(--c-primary), var(--c-primary)) center/2px 12px no-repeat; }
.faq details[open] summary::after { background: linear-gradient(var(--c-primary), var(--c-primary)) center/12px 2px no-repeat; }
.faq summary:hover { color: var(--c-primary); }
.faq__answer { padding-bottom: 20px; max-width: 72ch; }
.faq__answer > :last-child { margin-bottom: 0; }

/* Боковые карточки */
.side-card { background: var(--c-navy); color: #DCE6F1; border-radius: var(--radius-md); padding: 32px; }
.side-card h2 { color: var(--c-white); font-size: 24px; line-height: 1.25; margin-bottom: 12px; }
.side-card p { font-size: 16px; margin-bottom: 22px; }
.side-card--sky { position: relative; overflow: hidden; background: var(--c-sky); color: var(--c-text); }
.side-card--sky h2 { color: var(--c-navy); }
.side-card--sky > :not(.side-card__mark) { position: relative; }
.side-card__mark { position: absolute; right: -30px; top: -20px; width: 180px; height: auto; opacity: .18; }
@media (min-width: 1024px) { .sticky { position: sticky; top: calc(var(--header-h) + 24px); } }

/* Определения */
.kv { margin: 0; border-top: 1px solid var(--c-line); }
.kv > div { padding: 14px 0; border-bottom: 1px solid var(--c-line); display: grid; gap: 2px 24px; }
@media (min-width: 640px) { .kv > div { grid-template-columns: 200px 1fr; } }
.kv dt { color: var(--c-muted); font-size: var(--fs-sm); }
.kv dd { margin: 0; color: var(--c-navy); font-weight: 600; }

/* Плитки мессенджеров */
.contact-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.contact-tile { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; padding: 16px 22px; border: 1px solid var(--c-line); border-radius: 14px; text-decoration: none; color: var(--c-navy); font-weight: 600; background: var(--c-white); }
a.contact-tile:hover { border-color: var(--c-primary); color: var(--c-primary); }
.contact-tile span { color: var(--c-muted); font-weight: 400; font-size: var(--fs-sm); text-align: right; }

/* Честный пустой блок */
.honest { position: relative; overflow: hidden; max-width: 820px; background: var(--c-mist); border-radius: 20px; padding: clamp(28px, 4vw, 48px); }
.honest__mark { position: absolute; right: -40px; bottom: -40px; width: 260px; height: auto; opacity: .15; }
.honest > :not(.honest__mark) { position: relative; }

/* АНКЕТА ------------------------------------------------------------------ */
.anketa { position: relative; overflow: hidden; background: var(--c-navy); color: #DCE6F1; padding-block: var(--section); }
.anketa__wave { position: absolute; left: -80px; bottom: -90px; width: 520px; height: auto; opacity: .25; pointer-events: none; }
.anketa__grid { position: relative; display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.anketa__intro { flex: 1 1 340px; min-width: 0; }
.anketa__intro h2 { color: var(--c-white); max-width: 16ch; }
.anketa__intro p { font-size: var(--fs-md); max-width: 40ch; }
.anketa__checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.anketa__checks li { margin: 0; display: flex; gap: 12px; align-items: center; }
.anketa__checks li::before { content: ""; flex: 0 0 26px; height: 26px; border-radius: 50%; background: rgba(32, 166, 122, .2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235FD3A8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/62% no-repeat; }
.anketa__card { flex: 1.5 1 520px; min-width: 0; background: var(--c-white); color: var(--c-text); border-radius: 20px; padding: clamp(22px, 3vw, 40px); box-shadow: 0 24px 60px rgba(5, 20, 35, .35); }
@media (max-width: 639px) { .anketa__wave { display: none; } }

.form { display: flex; flex-direction: column; gap: 26px; }
.field, .fieldset { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field__label, .fieldset legend { padding: 0; color: var(--c-navy); font-weight: 600; font-size: var(--fs-base); }
.fieldset legend { margin-bottom: 10px; }
.field__optional { font-weight: 400; color: var(--c-muted); }
.field__hint { color: var(--c-muted); font-size: var(--fs-sm); }
.field__error { display: flex; gap: 6px; color: var(--c-error); font-weight: 600; font-size: var(--fs-sm); }
.field__error::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--c-error); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
.has-error { border-left: 4px solid var(--c-error); padding-left: 14px; }
.input, .textarea { display: block; width: 100%; min-height: 54px; padding: 12px 14px; font: 400 var(--fs-base)/1.4 var(--font); color: var(--c-text); background: var(--c-white); border: 2px solid var(--c-line-strong); border-radius: 10px; }
.textarea { min-height: 110px; resize: vertical; }
.input:hover, .textarea:hover { border-color: var(--c-navy); }
.input:focus-visible, .textarea:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 0; box-shadow: none; border-color: var(--c-navy); }
.has-error .input, .has-error .textarea { border-color: var(--c-error); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill label { display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--c-pill-line); background: var(--c-white); color: var(--c-navy); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; transition: background-color var(--t), border-color var(--t), color var(--t); }
.pill label:hover { border-color: var(--c-navy); }
.pill input:checked + label { background: var(--c-navy); border-color: var(--c-navy); color: var(--c-white); }
.pill input:focus-visible + label { outline: 3px solid var(--c-navy); outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 7px var(--c-focus); }

.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-sm); }
.checkbox input { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--c-primary); cursor: pointer; }
.checkbox label { cursor: pointer; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form__submit { align-self: flex-start; min-height: 56px; padding: 0 32px; font-size: var(--fs-md); }
@media (max-width: 479px) { .form__submit { align-self: stretch; } }
.form__note { margin: 0; font-size: var(--fs-sm); color: var(--c-muted); }

.error-summary { border: 3px solid var(--c-error); border-radius: 12px; padding: 20px 22px; margin-bottom: 24px; }
.error-summary:focus { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.error-summary h3 { font-size: var(--fs-md); margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-left: 1.1em; }
.error-summary a { color: var(--c-error); font-weight: 600; }
.form-status:empty { display: none; }
.form-status { margin-top: 20px; }
.form-success { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 12px 0; }
.form-success img { width: 72px; height: auto; }
.form-success h3 { margin: 0; font-size: 26px; }
.form-success__ref { font-weight: 700; color: var(--c-navy); }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 5. СЕКЦИИ --------------------------------------------------------------- */
/* Первый экран */
.hero { background: var(--c-sky) url("/assets/img/site/hero-bg-1680.webp") center / cover no-repeat; overflow: hidden; border-bottom: 1px solid #D6E3F1; }
@media (max-width: 959px) { .hero { background-image: url("/assets/img/site/hero-bg-960.webp"); } }
/* фото под текстом (узкие экраны): фон крупнее, поэтому под текстом — светлая подложка для читаемости */
@media (max-width: 899px) {
  .hero { background-image: linear-gradient(to bottom, rgba(234, 242, 250, .82) 0, rgba(234, 242, 250, .6) 45%, rgba(234, 242, 250, 0) 70%), url("/assets/img/site/hero-bg-960.webp"); }
}
.hero .split { align-items: flex-end; padding-top: clamp(40px, 5vw, 64px); }
.hero__text { padding-bottom: clamp(32px, 5vw, 72px); align-self: center; }
.hero h1 { max-width: 13ch; margin-bottom: 20px; }
.hero .lead { margin-bottom: 32px; }
.hero .cutout { min-height: clamp(380px, 40vw, 600px); }
@media (max-width: 899px) {
  .hero .cutout { min-height: 360px; }
  .hero .cutout img { max-width: 300px; }
}

/* Статья */
.article-head { padding-top: 8px; }
.article-head h1 { max-width: 20ch; margin-top: 16px; }
.article-head .photo { height: clamp(220px, 32vw, 440px); object-fit: cover; margin-top: 32px; }
.article-body h2 { display: flex; gap: 12px; align-items: baseline; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); margin-top: 40px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h2 .n { color: var(--c-primary); }
.legal h2 { font-size: 24px; margin-top: 40px; }
.legal h2 .n { color: var(--c-primary); }

/* Страница 404 */
.nf { background: var(--c-sky); overflow: hidden; }
.nf .split { align-items: flex-end; padding-top: 72px; }
.nf__text { padding-bottom: 96px; }
.nf__statue { position: relative; height: 520px; overflow: hidden; }
.nf__statue img { position: absolute; left: 10%; bottom: -200px; height: 720px; width: auto; max-width: none; opacity: .9; }
@media (max-width: 639px) { .nf__statue { height: 300px; } .nf__statue img { height: 440px; bottom: -130px; } }

/* Подвал */
.site-footer { background: var(--c-navy-deep); color: #C3D1E0; padding-top: 56px; font-size: var(--fs-sm); border-top: 1px solid #2A4562; }
.site-footer a { color: #E6EEF6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 40px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-title { color: #fff; font-weight: 600; margin-bottom: 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li + li { margin-top: 10px; }
.site-footer .logo__img { height: 40px; margin-bottom: 16px; }
.footer-disclaimer { color: #A9BBCF; font-size: 14px; max-width: 44ch; }
.footer-bottom { border-top: 1px solid #2A4562; padding-block: 20px; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; color: #A9BBCF; font-size: 13px; }
.footer-bottom p { margin: 0; max-width: 80ch; }

/* 6. УТИЛИТЫ -------------------------------------------------------------- */
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; } .mb-24 { margin-bottom: 24px; } .mb-40 { margin-bottom: 40px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .topbar, .site-header, .site-footer, .anketa, .side-card { display: none !important; } body { font-size: 12pt; color: #000; } }
.h3 { font-size: var(--fs-h3); line-height: 1.25; }

/* Юридические шаблоны: нумерация разделов */
.legal-doc { counter-reset: sec; }
.legal-doc h2 { font-size: 24px; margin-top: 40px; }
.legal-doc h2::before { counter-increment: sec; content: counter(sec) ". "; color: var(--c-primary); }
.legal-doc--plain h2::before { content: none; }

/* Статья и страница вопросов: текст + боковая карточка */
.with-aside { display: flex; flex-wrap: wrap; gap: 48px 56px; align-items: flex-start; }
.with-aside > :first-child { flex: 1 1 560px; min-width: 0; max-width: 72ch; }
.with-aside > aside { flex: 0 1 340px; min-width: 280px; }
.article-head .tag { margin-bottom: 4px; }

/* Блоки страниц услуг */
.value-card { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-md); padding: clamp(24px, 3vw, 36px); }
.value-card--sky { background: var(--c-sky); border-color: #D6E3F1; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { margin: 0; position: relative; padding-left: 34px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .15em; width: 22px; height: 22px; border-radius: 50%; background: var(--c-green-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2320A67A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/66% no-repeat; }
.tags-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags-list li { margin: 0; padding: 10px 18px; border-radius: 999px; background: var(--c-mist); border: 1px solid var(--c-line); color: var(--c-navy); font-weight: 500; font-size: 16px; }
.law-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--c-line); }
.law-list li { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--c-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.law-list span { flex: 1 1 320px; }
.law-list b { flex: 0 1 auto; min-width: 0; max-width: 100%; color: var(--c-primary); font-weight: 600; font-size: var(--fs-sm); }

/* Уведомление о cookie */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 300; background: var(--c-navy-deep); color: #DCE6F1; border-top: 1px solid #2A4562; box-shadow: 0 -8px 24px rgba(5, 20, 35, .25); }
.cookie-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 14px; }
.cookie-bar p { flex: 1 1 420px; margin: 0; font-size: 14px; line-height: 1.5; }
.cookie-bar a { color: #fff; }


/* Cookie: две кнопки и ссылка «Настройки cookie» в подвале */
.cookie-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn--ghost-light { background: transparent; color: #fff; border: 1px solid #6F88A3; }
.btn--ghost-light:hover { border-color: #fff; color: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: #E6EEF6; cursor: pointer; text-align: left; }
.link-btn:hover { color: #fff; text-decoration: underline; }
@media (max-width: 479px) { .cookie-bar__actions { width: 100%; } .cookie-bar__actions .btn { flex: 1 1 0; } }

/* Отзывы клиентов */
.reviews { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.reviews > * { min-width: 0; }
/* Лента: карточки в одну строку, прокрутка вбок со «щелчком» по карточкам */
.reviews--scroll { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(360px, 86%);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
  padding: 2px 2px 18px; margin: -2px -2px 0; scrollbar-width: thin; scrollbar-color: #B9C9DB transparent; }
.reviews--scroll > * { scroll-snap-align: start; }
.reviews--scroll:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 4px; border-radius: 16px; }
@media (prefers-reduced-motion: no-preference) { .reviews--scroll { scroll-behavior: smooth; } }
.reviews-nav { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.reviews-nav .link-strong { margin-right: 8px; }
.reviews-nav__btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  background: var(--c-white); color: var(--c-navy); border: 1px solid var(--c-line); cursor: pointer; }
.reviews-nav__btn:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); }
.reviews-nav__btn:disabled { opacity: .4; cursor: default; }
.reviews-nav__btn:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }
@media (max-width: 639px) { .reviews-nav__btn { display: none; } }  /* на телефоне — свайп */
/* Оглавление страницы «Отзывы» */
.reviews-toc { padding-block: 24px 0; }
.reviews-toc ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.reviews-toc li { margin: 0; }
.reviews-toc a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--c-line); border-radius: 999px; color: var(--c-navy); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); }
.reviews-toc a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.reviews-toc span { color: var(--c-muted); font-weight: 400; }
.review { margin: 0; display: flex; flex-direction: column; gap: 20px; background: var(--c-white); border: 1px solid var(--c-line); border-radius: 14px; padding: 28px 28px 24px; }
.section--mist .review { border-color: transparent; }
.review blockquote { margin: 0; flex: 1; }
.review blockquote p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--c-text); }
.review figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.review__name { font-weight: 600; color: var(--c-navy); }
.review__city { font-size: var(--fs-sm); color: var(--c-muted); }
