/* ============================================================
   РЕБА.РФ — концепция 05 «Навигатор»
   Общие стили для всех страниц прототипа
   ============================================================ */

:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

:root {
  /* Брендовые константы */
  --seashell: #F8F4EC;
  --umber: #7A6753;
  --straw: #C9C868;
  --gray-umber: #2F2C29;
  --olive: #5E5D1F;
  --straw-soft: #ECEAC4;

  /* Семантические токены (светлая тема) */
  --bg: var(--seashell);
  --bg-2: #FFFDF8;
  --bg-3: #F1EBDF;
  --text: var(--gray-umber);
  --text-2: var(--umber);
  --text-3: #9C8B78;
  --accent: var(--straw);
  --accent-2: var(--straw-soft);
  --accent-text: var(--olive);
  --line: rgba(122, 103, 83, .22);
  --line-2: rgba(122, 103, 83, .12);
  --dark: var(--gray-umber);
  --dark-text: var(--seashell);
  --hex-stroke: 122, 103, 83;
  --hex-glow: 201, 200, 104;
  --shadow: 0 24px 60px -30px rgba(47, 44, 41, .35);
  --header-bg: rgba(248, 244, 236, .82);
  --danger: #A8523A;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-text: "Golos Text", "Segoe UI", Arial, sans-serif;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 72px;
  --chamfer: 26px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
}

:root[data-theme="dark"] {
    --bg: #2F2C29;
    --bg-2: #383430;
    --bg-3: #3F3A35;
    --text: #F8F4EC;
    --text-2: #D3C7B7;
    --text-3: #A79A89;
    --accent: #C9C868;
    --accent-2: #4A4730;
    --accent-text: #D9D67C;
    --line: rgba(248, 244, 236, .2);
    --line-2: rgba(248, 244, 236, .1);
    --dark: #201E1B;
    --dark-text: #F8F4EC;
    --hex-stroke: 248, 244, 236;
    --hex-glow: 201, 200, 104;
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, .6);
    --header-bg: rgba(47, 44, 41, .82);
    --danger: #E0846B;
  }

/* ---------- База ---------- */
*, *::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-text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-text); }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--gray-umber); }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site { position: relative; z-index: 1; }

/* Декоративный canvas под контентом */
.hexbg { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%; }

/* ---------- Типографика ---------- */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.05; letter-spacing: .005em; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw, 72px); text-transform: uppercase; font-weight: 600; }
h2 { font-size: clamp(28px, 4vw, 54px); text-transform: uppercase; }
h3 { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.2; }
h4 { font-size: 17px; line-height: 1.3; font-family: var(--font-text); font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: var(--text-2); max-width: 60ch; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 300; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 14px; height: 16px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: end; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head .lead { margin: 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
ul.clean, ol.clean { list-style: none; margin: 0; padding: 0; }
.list { margin: 0; padding-left: 0; list-style: none; }
.list li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 14px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.list--x li::before { background: var(--danger); clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); }
.list--check li::before { background: var(--accent-text); clip-path: polygon(14% 44%, 0 59%, 38% 96%, 100% 34%, 86% 20%, 38% 68%); width: 14px; height: 14px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 1.5px solid var(--text);
  background: var(--text); color: var(--bg); font-weight: 500; font-size: 16px; line-height: 1.2;
  text-decoration: none; white-space: nowrap; position: relative; overflow: hidden;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); color: var(--bg); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--gray-umber); }
.btn--accent:hover { color: var(--gray-umber); background: #D6D57A; }
.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { color: var(--text); background: var(--accent-2); }
.btn--sm { padding: 10px 16px; font-size: 14px; }
.btn--lg { padding: 18px 32px; font-size: 17px; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; text-decoration: none; color: var(--accent-text); }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-2); }
.header__in { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: .02em; text-decoration: none; color: var(--text); display: inline-flex; align-items: baseline; }
.logo em { font-style: normal; color: var(--accent); }
.logo:hover { color: var(--text); }
.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--text-2); transition: background .2s, color .2s; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--accent-2); color: var(--text); }
.header__phone { font-family: var(--font-display); font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap; }
.header__cta { display: inline-flex; }
.burger { display: none; width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; position: relative; }
.burger span, .burger span::before, .burger span::after { content: ""; position: absolute; left: 12px; width: 18px; height: 2px; background: var(--text); transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span { top: 20px; }
.burger span::before { left: 0; top: -6px; }
.burger span::after { left: 0; top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(40px, 6vw, 80px); min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero__title { font-size: clamp(46px, 8.4vw, 120px); line-height: .92; letter-spacing: -.01em; }
.hero__title .flip { color: var(--accent-text); display: inline-block; position: relative; white-space: nowrap; }
.hero__title .flip::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.04em; height: .08em; background: var(--accent); border-radius: 2px; }
.flip-ch { display: inline-block; transform-origin: 50% 50%; transition: transform .38s var(--ease), opacity .3s; backface-visibility: hidden; }
.js .flip-ch.is-out { transform: rotateX(90deg) translateY(-.15em); opacity: 0; }
.js .flip-ch.is-in { transform: rotateX(-90deg) translateY(.15em); opacity: 0; }
.hero__title .hero__line2 { display: block; font-size: clamp(16px, 1.6vw, 22px); font-family: var(--font-text); font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 1.4; margin-top: 22px; max-width: 34ch; color: var(--text-2); }
.hero__lead { margin: 22px 0 28px; }
.hero__micro { font-size: 14px; color: var(--text-3); margin-top: 16px; }
.hero__micro span + span::before { content: "·"; margin: 0 8px; }
.hero__entries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero__entries a { font-size: 14px; text-decoration: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); }
.hero__entries a:hover { border-color: var(--accent-text); color: var(--accent-text); }

/* ---------- Карточка квиза ---------- */
.quiz-card { background: var(--bg-2); border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); padding: clamp(22px, 2.5vw, 36px); position: relative; }
.quiz-card::before { content: ""; position: absolute; top: 0; right: 0; width: var(--chamfer); height: var(--chamfer); background: var(--accent); clip-path: polygon(100% 0, 100% 100%, 0 0); opacity: .9; }
.quiz__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.quiz__title { font-family: var(--font-display); font-weight: 500; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.quiz__counter { font-size: 13px; color: var(--text-3); font-family: var(--font-display); font-weight: 300; }
.quiz__progress { height: 4px; background: var(--line-2); border-radius: 2px; overflow: hidden; margin-bottom: 22px; }
.quiz__bar { height: 100%; width: 20%; background: var(--accent); border-radius: 2px; transition: width .5s var(--ease); }
.quiz-step { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.js .quiz-step { margin: 0; }
.js .quiz-step:not(.is-active) { display: none; }
.js .quiz-step.is-active { animation: stepIn .45s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.quiz-step legend, .quiz-step .q { font-weight: 600; font-size: 18px; margin-bottom: 14px; padding: 0; display: block; line-height: 1.3; }
.opts { display: grid; gap: 8px; }
.opts--2 { grid-template-columns: 1fr 1fr; }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.opt span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 15px; line-height: 1.25; cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.opt span::before { content: ""; width: 10px; height: 12px; flex: none; background: var(--line); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); transition: background .2s; }
.opt:hover span { border-color: var(--accent-text); transform: translateX(3px); }
.opt input:checked + span { border-color: var(--accent-text); background: var(--accent-2); }
.opt input:checked + span::before { background: var(--accent-text); }
.opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.quiz__nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 18px; }
.quiz__foot { font-size: 13px; color: var(--text-3); margin-top: 14px; }
.js .quiz__nav [data-prev][hidden] { display: none; }

/* ---------- Формы ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 500; color: var(--text-2); }
.field input, .field select, .field textarea { width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); transition: border-color .2s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-text); outline: none; }
.field .err { font-size: 13px; color: var(--danger); display: none; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--danger); }
.field.is-invalid .err { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; transition: all .2s; }
.chip input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); margin: 14px 0; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--olive); flex: none; }
.form-sent { display: none; padding: 24px; background: var(--accent-2); border-left: 4px solid var(--accent); }
.form-sent h3 { margin-bottom: 8px; }
.form.is-sent > *:not(.form-sent) { display: none; }
.form.is-sent .form-sent { display: block; animation: stepIn .45s var(--ease) both; }
.form-card { background: var(--bg-2); border: 1px solid var(--line); padding: clamp(22px, 2.5vw, 36px); clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); }

/* ---------- Три входа ---------- */
.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.entry { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; text-decoration: none; background: var(--bg-2); border: 1px solid var(--line); padding: 14px; transition: transform .35s var(--ease), border-color .3s; position: relative; overflow: hidden; }
.entry img { width: 120px; height: 120px; object-fit: cover; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); transition: transform .5s var(--ease); }
.entry:hover { transform: translateY(-4px); border-color: var(--accent-text); color: var(--text); }
.entry:hover img { transform: scale(1.06); }
.entry__k { font-family: var(--font-display); font-weight: 300; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.entry__title { font-weight: 600; font-size: 18px; line-height: 1.25; margin: 6px 0 6px; }
.entry__text { font-size: 14px; color: var(--text-2); }
.entry__arrow { position: absolute; right: 16px; bottom: 12px; font-family: var(--font-display); color: var(--accent-text); transition: transform .3s var(--ease); }
.entry:hover .entry__arrow { transform: translateX(6px); }

/* ---------- Цифры ---------- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 28px 20px 28px 0; border-right: 1px solid var(--line-2); margin-right: 20px; }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.2vw, 44px); line-height: 1; color: var(--text); letter-spacing: -.02em; }
.stat__num small { font-size: .5em; color: var(--accent-text); margin-left: 2px; font-weight: 300; }
.stat__label { font-size: 14px; color: var(--text-2); margin-top: 10px; line-height: 1.4; }

/* ---------- Почему навигатор ---------- */
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.versus__col { padding: clamp(24px, 3vw, 44px); }
.versus__col + .versus__col { border-left: 1px solid var(--line); background: var(--accent-2); }
.versus__col h3 { text-transform: uppercase; font-size: 15px; letter-spacing: .08em; font-weight: 500; margin-bottom: 18px; color: var(--text-2); }
.versus__col + .versus__col h3 { color: var(--accent-text); }
.versus__big { font-family: var(--font-display); font-weight: 300; font-size: clamp(20px, 2vw, 28px); line-height: 1.25; margin-bottom: 18px; }

/* ---------- Маршрут (sticky) ---------- */
.route { display: grid; grid-template-columns: 300px 1fr; gap: clamp(32px, 5vw, 96px); align-items: start; }
.route__aside { position: sticky; top: calc(var(--header-h) + 24px); }
.route__svg { width: 120px; height: auto; display: block; overflow: visible; }
.route__svg .track { fill: none; stroke: var(--line); stroke-width: 2; }
.route__svg .draw { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.route__svg .node { fill: var(--bg); stroke: var(--line); stroke-width: 2; transition: fill .4s, stroke .4s, r .3s; }
.route__svg .node.is-lit { fill: var(--accent); stroke: var(--accent-text); }
.route__svg .node.is-lit + .node-ring { opacity: 1; }
.route__svg .node-ring { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.js .route__svg .node.is-lit + .node-ring { animation: ringPulse 1.6s var(--ease) infinite; }
@keyframes ringPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }
.route__legend { margin-top: 22px; font-family: var(--font-display); font-weight: 300; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.route__steps { display: grid; gap: clamp(24px, 4vw, 48px); }
.step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 42%); gap: clamp(20px, 3vw, 40px); background: var(--bg-2); border: 1px solid var(--line); padding: clamp(22px, 3vw, 40px); transition: border-color .4s, box-shadow .4s; clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); }
.step.is-active { border-color: var(--accent-text); }
.step__num { font-family: var(--font-display); font-weight: 300; font-size: 56px; line-height: 1; color: var(--accent); letter-spacing: -.02em; }
.step.is-active .step__num { color: var(--accent-text); }
.step h3 { margin: 10px 0 8px; text-transform: uppercase; font-size: clamp(18px, 1.7vw, 22px); }
.step__time { display: inline-block; font-family: var(--font-display); font-weight: 300; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; background: var(--accent-2); color: var(--accent-text); margin-bottom: 14px; }
.step__photo { align-self: stretch; min-height: 220px; }
.step__photo img { width: 100%; height: 100%; object-fit: cover; min-height: 220px; }

/* ---------- Гексагональная сетка критериев ---------- */
.hexgrid { --hexclip: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; grid-template-columns: repeat(7, 1fr); column-gap: 6px; max-width: 900px; margin-inline: auto; padding: 0; }
.hex { aspect-ratio: .866; position: relative; clip-path: var(--hexclip); background: var(--line); transition: transform .35s var(--ease-spring); list-style: none; }
.hexgrid .hex:nth-child(1) { grid-area: 1 / 1 / 2 / 3; }
.hexgrid .hex:nth-child(2) { grid-area: 1 / 3 / 2 / 5; }
.hexgrid .hex:nth-child(3) { grid-area: 1 / 5 / 2 / 7; }
.hexgrid .hex:nth-child(4) { grid-area: 2 / 2 / 3 / 4; }
.hexgrid .hex:nth-child(5) { grid-area: 2 / 4 / 3 / 6; }
.hexgrid .hex:nth-child(6) { grid-area: 2 / 6 / 3 / 8; }
.hexgrid .hex:nth-child(7) { grid-area: 3 / 1 / 4 / 3; }
.hexgrid .hex:nth-child(8) { grid-area: 3 / 3 / 4 / 5; }
.hexgrid .hex:nth-child(9) { grid-area: 3 / 5 / 4 / 7; }
.hexgrid .hex:nth-child(n+4) { margin-top: -25%; }
.hex__in { position: absolute; inset: 2px; clip-path: var(--hexclip); background: var(--bg-2); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 22% 13%; transition: background .35s; }
.hex__num { font-family: var(--font-display); font-weight: 300; font-size: 13px; color: var(--accent-text); letter-spacing: .1em; margin-bottom: 8px; }
.hex__title { font-weight: 600; font-size: clamp(13px, 1.25vw, 16px); line-height: 1.25; }
.hex__text { font-size: 13px; line-height: 1.35; color: var(--text-2); margin-top: 8px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s var(--ease), opacity .3s; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.js .quiz-step.shake { animation: shake .35s var(--ease); }
@media (hover: hover) {
  .hex:hover, .hex:focus-within { transform: scale(1.12); z-index: 3; background: var(--accent); }
  .hex:hover .hex__in, .hex:focus-within .hex__in { background: var(--accent-2); }
  .hex:hover .hex__text, .hex:focus-within .hex__text { max-height: 160px; opacity: 1; }
}
@media (hover: none) { .hex__text { max-height: none; opacity: 1; } }
.hexnote { text-align: center; max-width: 60ch; margin: 32px auto 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.4; color: var(--accent-text); }

/* ---------- Обещаем / не обещаем ---------- */
.promise { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.promise__col { padding: clamp(24px, 3vw, 44px); background: var(--bg-2); border: 1px solid var(--line); }
.promise__col--no { background: var(--bg-3); }
.promise__col h3 { text-transform: uppercase; font-size: 16px; letter-spacing: .06em; margin-bottom: 20px; }
.promise__col--no h3 { color: var(--danger); }
.promise__col--no .list li { color: var(--text-2); }
.promise__col--no .list li s { text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
.promise__note { grid-column: 1 / -1; font-family: var(--font-display); font-weight: 300; font-size: clamp(18px, 2vw, 26px); line-height: 1.3; padding: 24px 0 0; max-width: 40ch; }

/* ---------- Форматы и калькулятор ---------- */
.formats { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.fmt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.fmt:last-child { border-bottom: 1px solid var(--line); }
.fmt h3 { font-size: 18px; text-transform: none; margin-bottom: 6px; }
.fmt__price { font-family: var(--font-display); font-weight: 500; font-size: 18px; white-space: nowrap; text-align: right; color: var(--accent-text); }
.fmt__price small { display: block; font-family: var(--font-text); font-weight: 400; font-size: 13px; color: var(--text-3); }
.fmt p { font-size: 15px; color: var(--text-2); }
.calc { position: sticky; top: calc(var(--header-h) + 24px); background: var(--dark); color: var(--dark-text); padding: clamp(22px, 2.5vw, 36px); clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); }
.calc h3 { text-transform: uppercase; font-size: 15px; letter-spacing: .08em; margin-bottom: 18px; color: var(--straw); }
.calc .field label { color: rgba(248, 244, 236, .7); }
.calc .field select { background: rgba(255, 255, 255, .06); border-color: rgba(248, 244, 236, .25); color: var(--dark-text); }
.calc .field select option { color: var(--gray-umber); }
.calc__range { display: flex; gap: 6px; align-items: center; margin: 12px 0 8px; }
.calc__range input[type="range"] { width: 100%; accent-color: var(--straw); }
.calc__months { font-family: var(--font-display); font-weight: 500; font-size: 22px; min-width: 88px; text-align: right; }
.calc__out { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(248, 244, 236, .2); }
.calc__sum { font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 2.4vw, 34px); color: var(--straw); line-height: 1.1; }
.calc__sum small { font-size: 14px; font-family: var(--font-text); font-weight: 400; color: rgba(248, 244, 236, .7); display: block; margin-top: 8px; }
.calc__note { font-size: 13px; color: rgba(248, 244, 236, .6); margin-top: 14px; }

/* ---------- Каталог / карточки центров ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.ccard { background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none; color: inherit; position: relative; transition: transform .35s var(--ease), border-color .3s, opacity .35s; will-change: transform; }
.ccard.is-hidden { display: none; }
.ccard__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.ccard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.ccard:hover .ccard__media img { transform: scale(1.05); }
.ccard__badge { position: absolute; left: 12px; top: 12px; padding: 6px 10px; background: var(--seashell); color: var(--olive); font-family: var(--font-display); font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.ccard__badge--soon { background: var(--gray-umber); color: var(--straw); }
.ccard__body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ccard__region { font-size: 13px; color: var(--text-3); }
.ccard h3 { font-size: 19px; text-transform: uppercase; }
.ccard h3 a { text-decoration: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); }
.passport { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 4px 0 0; padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.passport div { display: grid; gap: 2px; }
.passport dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-family: var(--font-display); font-weight: 300; }
.passport dd { margin: 0; font-weight: 500; font-size: 14px; }
.ccard__price { font-family: var(--font-display); font-weight: 500; font-size: 20px; margin-top: auto; }
.ccard__price small { font-family: var(--font-text); font-weight: 400; font-size: 13px; color: var(--text-3); }
.ccard__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.compare-toggle { margin-left: auto; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--text-2); }
.compare-toggle input { accent-color: var(--olive); }

/* Фильтры */
.filters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 32px; }
.filters .field { margin: 0; }
.filters__reset { grid-column: 1 / -1; justify-self: start; }
.filters-empty { display: none; padding: 32px; border: 1px dashed var(--line); text-align: left; }
.filters-empty.is-on { display: block; }

/* Панель и таблица сравнения */
.compare-bar { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); z-index: 40; display: flex; gap: 12px; align-items: center; padding: 10px 10px 10px 18px; background: var(--dark); color: var(--dark-text); border-radius: 999px; box-shadow: var(--shadow); transition: transform .4s var(--ease-spring); max-width: calc(100% - 32px); }
.compare-bar.is-on { transform: translate(-50%, 0); }
.compare-bar__count { font-family: var(--font-display); font-weight: 500; font-size: 14px; white-space: nowrap; }
.compare-bar .btn { border-color: var(--straw); }
.compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
table.compare th, table.compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare th { font-family: var(--font-display); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
table.compare thead th { background: var(--bg-3); }
table.compare tbody th { color: var(--text-2); font-family: var(--font-text); font-weight: 500; text-transform: none; letter-spacing: 0; width: 200px; }
table.compare .col-hidden { display: none; }
.compare-hint { font-size: 14px; color: var(--text-3); margin-top: 12px; }

/* ---------- Тёмный блок «Кто за проектом» ---------- */
.dark { background: var(--dark); color: var(--dark-text); }
.dark .eyebrow { color: var(--straw); }
.dark .lead, .dark .muted { color: rgba(248, 244, 236, .72); }
.dark a:hover { color: var(--straw); }
.who { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 80px); }
.who__big { font-family: var(--font-display); font-weight: 300; font-size: clamp(22px, 2.6vw, 36px); line-height: 1.2; margin: 0 0 24px; }
.seals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.seal { aspect-ratio: 1 / 1.05; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--straw); padding: 2px; position: relative; }
.seal__in { position: absolute; inset: 2px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--dark); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 22% 18%; }
.seal__k { font-family: var(--font-display); font-weight: 300; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--straw); }
.seal__t { font-family: var(--font-display); font-weight: 500; font-size: clamp(11px, 1.1vw, 14px); line-height: 1.25; margin-top: 8px; }
.seal__s { font-size: 11px; color: rgba(248, 244, 236, .6); margin-top: 6px; line-height: 1.3; }
.docs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.docs a { font-size: 13px; padding: 8px 14px; border: 1px solid rgba(248, 244, 236, .25); text-decoration: none; }
.team { display: grid; gap: 14px; margin-top: 32px; }
.team li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(248, 244, 236, .15); }
.team__ava { width: 56px; height: 62px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--straw); color: var(--gray-umber); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 500; font-size: 16px; }
.team b { display: block; }
.team span { font-size: 14px; color: rgba(248, 244, 236, .65); }

/* ---------- Истории ---------- */
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.story { padding: clamp(22px, 2.5vw, 32px); background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; position: relative; }
.story::before { content: "„"; position: absolute; right: 22px; top: -6px; font-family: var(--font-display); font-size: 84px; line-height: 1; color: var(--accent); font-weight: 300; }
.story__meta { font-family: var(--font-display); font-weight: 300; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px; }
.story blockquote { margin: 0; font-size: 16px; line-height: 1.55; flex: 1; }
.story__who { margin-top: 18px; font-size: 14px; color: var(--text-2); padding-top: 12px; border-top: 1px solid var(--line-2); }
.stories-note { margin-top: 18px; font-size: 13px; color: var(--text-3); }

/* ---------- Что делать прямо сейчас ---------- */
.now { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); }
.now__item { padding: clamp(20px, 2.5vw, 32px); border-right: 1px solid var(--line); }
.now__item:last-child { border-right: 0; }
.now__item h3 { text-transform: uppercase; font-size: 15px; letter-spacing: .06em; margin-bottom: 14px; }
.now__item p, .now__item li { font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 0; font-weight: 600; font-size: 18px; position: relative; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 18px; height: 2px; background: var(--accent-text); transition: transform .3s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq details[open] summary { color: var(--accent-text); }
.faq details > div { padding: 0 0 22px; color: var(--text-2); max-width: 70ch; }
.faq details > div p { margin-bottom: .8em; }

/* ---------- Медиа ---------- */
.media { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.media a { display: flex; flex-direction: column; gap: 14px; padding: 28px 24px 28px 0; text-decoration: none; border-right: 1px solid var(--line-2); margin-right: 24px; min-height: 240px; }
.media a:last-child { border-right: 0; margin-right: 0; }
.media__k { font-family: var(--font-display); font-weight: 300; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.media h3 { text-transform: none; font-size: 20px; flex: 1; transition: color .2s; }
.media a:hover h3 { color: var(--accent-text); }
.media__meta { font-size: 13px; color: var(--text-3); }

/* ---------- Финальный CTA и «что после заявки» ---------- */
.final { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: clamp(32px, 5vw, 80px); align-items: start; }
.timeline { list-style: none; margin: 28px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 22px 36px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 18px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.timeline time { display: block; font-family: var(--font-display); font-weight: 500; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 4px; }
.timeline b { display: block; }
.timeline span { font-size: 15px; color: var(--text-2); }
.messengers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.messengers a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; }
.messengers a:hover { border-color: var(--accent-text); }
.messengers svg { width: 18px; height: 18px; }

/* ---------- Футер ---------- */
.footer { background: var(--dark); color: var(--dark-text); padding: clamp(48px, 6vw, 80px) 0 120px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.footer .logo { color: var(--dark-text); font-size: 26px; }
.footer h4 { font-family: var(--font-display); font-weight: 300; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--straw); margin-bottom: 14px; }
.footer a { text-decoration: none; color: rgba(248, 244, 236, .8); }
.footer a:hover { color: var(--straw); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer p { color: rgba(248, 244, 236, .65); line-height: 1.55; }
.footer__phone { font-family: var(--font-display); font-weight: 500; font-size: 22px; display: block; margin: 16px 0 8px; color: var(--dark-text) !important; }
.footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(248, 244, 236, .15); display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; color: rgba(248, 244, 236, .5); font-size: 13px; }

/* ---------- Плавающая кнопка и нижняя панель ---------- */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px 14px 16px; border-radius: 999px; background: var(--accent); color: var(--gray-umber); text-decoration: none; font-weight: 600; box-shadow: var(--shadow); transition: transform .3s var(--ease); }
.fab:hover { transform: translateY(-3px); color: var(--gray-umber); }
.fab svg { width: 20px; height: 20px; }
.actbar { display: none; }

/* ---------- Модальное окно ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(560px, calc(100% - 24px)); width: 100%; margin: auto; }
.modal::backdrop { background: rgba(47, 44, 41, .6); backdrop-filter: blur(6px); }
.modal .quiz-card { background: var(--bg); }
.modal__close { position: absolute; right: 14px; top: 34px; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 20px; line-height: 1; }
.js .modal[open] { animation: modalIn .35s var(--ease) both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- Внутренние страницы ---------- */
.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { text-decoration: none; color: var(--text-2); }
.page-hero { padding-block: clamp(32px, 5vw, 64px) clamp(32px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.page-hero h1 { font-size: clamp(30px, 4vw, 56px); overflow-wrap: break-word; hyphens: auto; }
.page-hero__photo { position: relative; }
.page-hero__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.page-hero__photo figcaption { position: absolute; left: 0; bottom: 0; padding: 12px 16px; background: var(--seashell); color: var(--olive); font-family: var(--font-display); font-weight: 300; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.facts span { padding: 8px 14px; background: var(--accent-2); color: var(--accent-text); font-size: 14px; font-weight: 500; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.two--sticky > :first-child { position: sticky; top: calc(var(--header-h) + 24px); }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.box { padding: clamp(22px, 2.5vw, 32px); background: var(--bg-2); border: 1px solid var(--line); }
.box--accent { background: var(--accent-2); border-color: transparent; }
.box--dark { background: var(--dark); color: var(--dark-text); border-color: transparent; }
.box--dark .muted { color: rgba(248, 244, 236, .7); }
.box h3 { margin-bottom: 14px; }
.box--num { position: relative; padding-top: 64px; }
.box--num::before { content: attr(data-n); position: absolute; left: 24px; top: 18px; font-family: var(--font-display); font-weight: 300; font-size: 34px; color: var(--accent); line-height: 1; }
.flags { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Переключатель видов зависимости */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tabs button { padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; font-weight: 500; font-size: 15px; transition: all .2s; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabpanels { display: grid; gap: 16px; }
.js .tabpanels [role="tabpanel"][hidden] { display: none; }
.tabpanel { padding: clamp(22px, 2.5vw, 32px); background: var(--bg-2); border: 1px solid var(--line); }
.tabpanel h3 { text-transform: uppercase; font-size: 16px; letter-spacing: .06em; margin-bottom: 12px; }

/* Самооценка */
.selfcheck { max-width: 760px; }
.selfcheck .opt span { border-radius: 14px; padding: 14px 16px; }
.selfcheck__result { margin-top: 22px; padding: 22px; background: var(--accent-2); border-left: 4px solid var(--accent); }
.selfcheck__result[hidden] { display: none; }
.selfcheck__result b { display: block; margin-bottom: 6px; }

/* Чат-форма */
.chat { max-width: 640px; }
.chat__log { display: grid; gap: 12px; padding: clamp(20px, 2.5vw, 32px); background: var(--bg-2); border: 1px solid var(--line); min-height: 220px; }
.msg { max-width: 82%; padding: 12px 16px; font-size: 15px; line-height: 1.45; border-radius: 18px 18px 18px 4px; background: var(--bg-3); align-self: start; }
.msg--user { background: var(--text); color: var(--bg); border-radius: 18px 18px 4px 18px; justify-self: end; }
.js .msg.is-new { animation: stepIn .4s var(--ease) both; }
.chat__opts { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 0; }
.chat__opts button { padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); font-size: 14px; transition: all .2s; }
.chat__opts button:hover { border-color: var(--accent-text); color: var(--accent-text); }
.chat__input { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding-top: 14px; }
.chat__input input { padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); }
.chat__typing { display: inline-flex; gap: 4px; padding: 12px 16px; }
.chat__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.chat__typing i:nth-child(2) { animation-delay: .2s; }
.chat__typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat__fallback { margin-top: 16px; }
.js .chat__fallback { display: none; }
.js .chat__log[data-chat] .msg--static { display: none; }

/* Лестница уровней (после срыва) */
.ladder { list-style: none; padding: 0; margin: 0; counter-reset: lvl; }
.ladder li { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, .8fr) auto; gap: 16px 24px; padding: 24px 0; border-top: 1px solid var(--line); align-items: start; }
.ladder li:last-child { border-bottom: 1px solid var(--line); }
.ladder li::before { counter-increment: lvl; content: "0" counter(lvl); font-family: var(--font-display); font-weight: 300; font-size: 40px; line-height: 1; color: var(--accent); }
.ladder h3 { text-transform: uppercase; font-size: 16px; letter-spacing: .04em; margin-bottom: 8px; }
.ladder p { font-size: 15px; color: var(--text-2); }
.ladder__price { font-family: var(--font-display); font-weight: 500; font-size: 15px; color: var(--accent-text); text-align: right; white-space: nowrap; }
.ladder__price small { display: block; font-family: var(--font-text); font-weight: 400; color: var(--text-3); font-size: 12px; }

/* Маршрут 12 месяцев */
.months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); }
.months div { padding: 22px; border-right: 1px solid var(--line); position: relative; }
.months div:last-child { border-right: 0; }
.months div::before { content: ""; display: block; height: 6px; margin-bottom: 16px; background: var(--accent-2); }
.months div[data-risk="high"]::before { background: var(--danger); }
.months div[data-risk="mid"]::before { background: var(--accent); }
.months b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.months p { font-size: 14px; color: var(--text-2); }
.months-legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; font-size: 13px; color: var(--text-3); }
.months-legend i { display: inline-block; width: 22px; height: 6px; vertical-align: middle; margin-right: 6px; }

/* Галерея центра */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 8px; }
.gallery a { display: block; overflow: hidden; position: relative; }
.gallery a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery a:nth-child(6) { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, calc(100% - 24px)); }
.lightbox::backdrop { background: rgba(20, 18, 16, .85); }
.lightbox img { max-height: 86vh; width: auto; max-width: 100%; margin: auto; }
.lightbox button { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--seashell); font-size: 22px; }

/* Проверено */
.verified { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 64px); padding: clamp(24px, 3vw, 44px); background: var(--dark); color: var(--dark-text); clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); }
.verified h2 { color: var(--straw); font-size: clamp(22px, 2.6vw, 34px); }
.verified__date { font-family: var(--font-display); font-weight: 300; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(248, 244, 236, .6); margin-top: 16px; }
.verified .list { columns: 2; column-gap: 32px; }
.verified .list li { break-inside: avoid; font-size: 15px; }
.verified .list li::before { background: var(--straw); }
.verified__stamp { width: 96px; height: 106px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--straw); color: var(--gray-umber); display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--font-display); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; padding: 12px; margin-bottom: 20px; }

/* Распорядок */
table.schedule { width: 100%; border-collapse: collapse; font-size: 15px; }
table.schedule th, table.schedule td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
table.schedule th { font-family: var(--font-display); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
table.schedule td:first-child { font-family: var(--font-display); font-weight: 500; width: 80px; white-space: nowrap; color: var(--accent-text); }
.schedule-note { font-size: 14px; color: var(--text-2); margin-top: 14px; }

/* Прочее */
.price-big { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.6vw, 52px); line-height: 1; color: var(--accent-text); }
.price-big small { font-size: 15px; font-family: var(--font-text); font-weight: 400; color: var(--text-2); display: block; margin-top: 10px; }
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s4; }
.steps4 li { list-style: none; padding: 22px; border: 1px solid var(--line); background: var(--bg-2); position: relative; }
.steps4 li::before { counter-increment: s4; content: "0" counter(s4); font-family: var(--font-display); font-weight: 300; font-size: 30px; color: var(--accent); display: block; margin-bottom: 12px; line-height: 1; }
.steps4 b { display: block; margin-bottom: 6px; }
.steps4 span { font-size: 14px; color: var(--text-2); }
.seo-text { max-width: 76ch; color: var(--text-2); font-size: 16px; }
.seo-text h2 { font-size: clamp(20px, 2vw, 28px); margin-bottom: 16px; }
.seo-text h3 { font-size: 18px; margin: 20px 0 8px; color: var(--text); }
.callback { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 32px; align-items: center; padding: clamp(24px, 3vw, 44px); background: var(--accent-2); }
.callback h2 { font-size: clamp(22px, 2.6vw, 34px); }

/* ---------- Анимации появления (только при JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="left"] { transform: translateX(-30px); }
.js [data-reveal="scale"] { transform: scale(.94); }
.js [data-reveal-stagger] > * { transition-delay: calc(var(--i, 0) * 70ms); }
[data-tilt] { transform-style: preserve-3d; transition: transform .5s var(--ease); }
.js [data-tilt].is-tilting { transition: transform .08s linear; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3n) { border-right: 0; }
  .stat { padding-block: 20px; }
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .media { grid-template-columns: repeat(2, 1fr); }
  .media a:nth-child(2) { border-right: 0; }
  .now { grid-template-columns: repeat(2, 1fr); }
  .now__item:nth-child(2) { border-right: 0; }
  .now__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .steps4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .route { grid-template-columns: 200px 1fr; }
  .ladder li { grid-template-columns: 56px 1fr; }
  .ladder__price { text-align: left; grid-column: 2; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg); flex-direction: column; padding: 24px var(--gutter); gap: 6px; display: none; z-index: 49; }
  .nav.is-open { display: flex; }
  .nav a { font-size: 22px; font-family: var(--font-display); font-weight: 300; padding: 12px 0; border-radius: 0; border-bottom: 1px solid var(--line-2); }
  .header__phone { margin-left: auto; }
  .header__cta { display: none; }
  .burger { display: block; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__title { font-size: clamp(42px, 12vw, 76px); }
  .section-head, .versus, .promise, .formats, .who, .two, .final, .page-hero, .verified, .flags, .callback { grid-template-columns: 1fr; }
  .versus__col + .versus__col { border-left: 0; border-top: 1px solid var(--line); }
  .entries, .stories, .cols-3 { grid-template-columns: 1fr; }
  .route { grid-template-columns: 1fr; }
  .route__aside { position: relative; top: 0; }
  .route__svg { display: none; }
  .route__legend { margin: 0 0 8px; }
  .hexgrid { max-width: 640px; }
  .step { grid-template-columns: 1fr; }
  .step__photo { order: -1; }
  .calc { position: static; }
  .cards, .cards--4 { grid-template-columns: 1fr 1fr; }
  .seals { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .months { grid-template-columns: 1fr 1fr; }
  .months div:nth-child(2n) { border-right: 0; }
  .months div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery a:nth-child(6) { grid-column: span 1; }
  .verified .list { columns: 1; }
  .page-hero__photo img { aspect-ratio: 4 / 3; }
  .two--sticky > :first-child { position: static; }
  .footer { padding-bottom: 110px; }
  .actbar { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 6px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; padding: 8px; background: var(--dark); border-radius: 999px; box-shadow: var(--shadow); transition: transform .4s var(--ease-spring); }
  .js .actbar { transform: translateY(140%); }
  .js .actbar.is-on { transform: translateY(0); }
  .actbar a, .actbar button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border-radius: 999px; border: 0; background: transparent; color: var(--dark-text); text-decoration: none; font-size: 14px; font-weight: 500; }
  .actbar .is-primary { background: var(--straw); color: var(--gray-umber); }
  .actbar svg { width: 18px; height: 18px; }
  .compare-bar { bottom: 76px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3n) { border-right: 1px solid var(--line-2); }
  .stat:nth-child(2n) { border-right: 0; }
  .cards, .cards--4 { grid-template-columns: 1fr; }
  .media, .now { grid-template-columns: 1fr; }
  .media a { border-right: 0; margin-right: 0; padding-right: 0; min-height: 0; border-bottom: 1px solid var(--line-2); }
  .now__item { border-right: 0; border-bottom: 1px solid var(--line); }
  .now__item:last-child { border-bottom: 0; }
  .filters { grid-template-columns: 1fr 1fr; }
  .steps4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 88px 1fr; }
  .entry img { width: 88px; height: 88px; }
  .opts--2 { grid-template-columns: 1fr; }
  .hexgrid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .hexgrid .hex:nth-child(n) { grid-area: auto; margin-top: 0; }
  .hex__in { padding: 20% 12%; }
  .months { grid-template-columns: 1fr; }
  .months div { border-right: 0; border-bottom: 1px solid var(--line); }
  .months div:last-child { border-bottom: 0; }
  .seal__t { font-size: 10.5px; }
  .seal__s { display: none; }
  .ladder li { grid-template-columns: 1fr; }
  .ladder li::before { font-size: 28px; }
  .ladder__price { grid-column: 1; }
  .gallery { grid-auto-rows: 140px; }
  .gallery a:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .modal__close { top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hexbg { display: none; }
  .js .flip-ch.is-out, .js .flip-ch.is-in { transform: none; opacity: 1; }
}

@media print {
  .header, .fab, .actbar, .hexbg, .compare-bar, .modal { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Защита от горизонтального скролла декоративными элементами */
html, body { overflow-x: clip; }
@media (max-width: 640px) { img, svg, video, table { max-width: 100%; } .wrap > *, .container > * { min-width: 0; } }

@media (max-width: 640px) { h1, h2 { overflow-wrap: break-word; hyphens: auto; } .section-head h2 { font-size: clamp(22px, 7vw, 30px); } }

/* ============================================================
   POLISH: фоны секций, эффекты, микровзаимодействия, мобильные правила
   ============================================================ */

/* --- Номер раздела вместо ярлыка --- */
.h-num { display: block; font-family: var(--font-display); font-weight: 300; font-size: clamp(34px, 5vw, 64px); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--accent-text); margin-bottom: 14px; letter-spacing: -.02em; }
.h-sub { font-size: 15px; color: var(--text-3); margin: 0 0 12px; font-weight: 500; }
.hairline { width: 56px; height: 2px; background: var(--accent); margin-bottom: 18px; }

/* --- Фоны секций --- */
.section--tone { background: var(--bg-3); }
.section--pattern { background-color: var(--bg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 55 16.5v32L28 64 1 48.5v-32zM28 33 55 48.5v32L28 97 1 81.5v-32z' fill='none' stroke='%237A6753' stroke-opacity='.10'/%3E%3C/svg%3E"); background-size: 56px 97px; }
.section--mesh { background: radial-gradient(60% 50% at 10% 20%, rgba(201, 200, 104, .22), transparent 60%), radial-gradient(50% 45% at 90% 80%, rgba(122, 103, 83, .16), transparent 60%), var(--bg); }
.section--photo { position: relative; color: var(--dark-text); overflow: hidden; isolation: isolate; }
.section--photo > img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; z-index: -2; will-change: transform; }
.section--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(47, 44, 41, .92) 0%, rgba(47, 44, 41, .78) 55%, rgba(47, 44, 41, .5) 100%); }
.section--photo .lead, .section--photo .muted { color: rgba(248, 244, 236, .78); }
.section--photo h2 { color: var(--seashell); }
.section--photo .versus { border-color: rgba(248, 244, 236, .25); background: rgba(47, 44, 41, .35); backdrop-filter: blur(4px); }
.section--photo .versus__col + .versus__col { background: rgba(201, 200, 104, .12); border-color: rgba(248, 244, 236, .25); }
.section--photo .versus__col h3 { color: rgba(248, 244, 236, .7); }
.section--photo .versus__col + .versus__col h3 { color: var(--straw); }
:root[data-theme="dark"] .section--pattern { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 55 16.5v32L28 64 1 48.5v-32zM28 33 55 48.5v32L28 97 1 81.5v-32z' fill='none' stroke='%23F8F4EC' stroke-opacity='.08'/%3E%3C/svg%3E"); }
section, .section { overflow-x: clip; }

/* --- Параллакс фото --- */
[data-parallax] { will-change: transform; }
.who__photo { position: relative; margin-top: 32px; overflow: hidden; aspect-ratio: 4 / 3; clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%); }
.who__photo img { width: 100%; height: 124%; object-fit: cover; margin-top: -12%; }

/* --- Цифры доверия: призрачная цифра позади --- */
.stat { position: relative; overflow: visible; }
.stat::before { content: attr(data-ghost); position: absolute; right: 8px; top: -10px; font-family: var(--font-display); font-weight: 600; font-size: 96px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line); pointer-events: none; opacity: .6; }
.stat__text { font-size: 14px; color: var(--text-2); margin-top: 10px; line-height: 1.4; position: relative; }
.stat__num { position: relative; }
.stats[data-reveal-stagger] .stat { transition-delay: calc(var(--i, 0) * 110ms); }

/* --- Варианты появления --- */
.js [data-reveal="right"] { transform: translateX(30px); }
.js [data-reveal="mask"] { transform: none; clip-path: inset(0 100% 0 0); opacity: 1; transition: clip-path .9s var(--ease); }
.js [data-reveal="mask"].is-in { clip-path: inset(0 0 0 0); }
.js [data-reveal="rise"] { transform: translateY(40px) scale(.98); }
.js [data-reveal="lines"] { opacity: 1; transform: none; }
.js [data-reveal="lines"] > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.js [data-reveal="lines"].is-in > * { opacity: 1; transform: none; }
.js [data-reveal="lines"].is-in > *:nth-child(2) { transition-delay: .12s; }
.js [data-reveal="lines"].is-in > *:nth-child(3) { transition-delay: .24s; }
.js [data-reveal="lines"].is-in > *:nth-child(4) { transition-delay: .36s; }
.js [data-reveal="lines"].is-in > *:nth-child(n+5) { transition-delay: .48s; }
.js .hairline { transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease) .2s; }
.js .is-in .hairline, .js .hairline.is-in { transform: scaleX(1); }

/* --- Маршрут: фото активного шага приближается --- */
.step__photo img { transition: transform 1.2s var(--ease); }
.step.is-active .step__photo img { transform: scale(1.06); }

/* --- Гексы: рисуемая галочка --- */
.tick { width: 22px; height: 22px; display: block; margin: 0 auto 6px; }
.tick path { fill: none; stroke: var(--accent-text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; transition: stroke-dashoffset .7s var(--ease) .25s; }
.is-in .tick path, .hex:hover .tick path, html:not(.js) .tick path { stroke-dashoffset: 0; }
.hexgrid[data-reveal-stagger] .hex { transition-delay: calc(var(--i, 0) * 90ms); }
.verified .list li { position: relative; }
.verified .list li .tick { position: absolute; left: -4px; top: .2em; width: 18px; height: 18px; margin: 0; }
.verified .list li .tick path { stroke: var(--straw); }
.verified .list li::before { display: none; }
.verified .list li:nth-child(n) .tick path { transition-delay: calc(.15s + var(--i, 0) * .1s); }

/* --- Каталог: штамп проявляется --- */
.js .ccard[data-reveal] .ccard__badge { opacity: 0; transform: scale(.6) rotate(-8deg); transition: opacity .5s var(--ease) .35s, transform .6s var(--ease-spring) .35s; }
.js .ccard[data-reveal].is-in .ccard__badge { opacity: 1; transform: none; }

/* --- Истории: горизонтальная лента --- */
.stories { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 20px; margin: 0 -4px; scrollbar-width: none; cursor: grab; -webkit-overflow-scrolling: touch; }
.stories::-webkit-scrollbar { display: none; }
.stories.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.stories.is-dragging .story { pointer-events: none; }
.story { flex: 0 0 min(440px, 84%); scroll-snap-align: start; }
.story__n { font-family: var(--font-display); font-weight: 300; font-size: 44px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--accent-text); margin-bottom: 14px; }
.stories-progress { height: 2px; background: var(--line-2); position: relative; margin-top: 4px; max-width: 320px; }
.stories-progress i { position: absolute; left: 0; top: 0; height: 100%; width: 30%; background: var(--accent-text); transition: width .3s var(--ease), transform .2s; }
.stories-hint { font-size: 13px; color: var(--text-3); margin-top: 10px; }

/* --- FAQ: плавное раскрытие, + → × --- */
.faq details > div { overflow: hidden; }
.js .faq details > .faq__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); padding: 0; }
.js .faq details > .faq__body > div { min-height: 0; overflow: hidden; }
.js .faq details[open] > .faq__body { grid-template-rows: 1fr; }
.js .faq details > .faq__body > div > :last-child { padding-bottom: 22px; }
.faq summary::before, .faq summary::after { transition: transform .35s var(--ease-spring); }
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(-45deg); }

/* --- Финальный CTA: живой фон, магнит, пульс --- */
.final-wrap { position: relative; overflow: hidden; isolation: isolate; }
.final-wrap::before, .final-wrap::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.final-wrap::before { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; left: -10%; top: -20%; background: var(--straw); animation: blobA 18s ease-in-out infinite alternate; }
.final-wrap::after { width: 36vw; height: 36vw; max-width: 480px; max-height: 480px; right: -8%; bottom: -30%; background: var(--umber); opacity: .3; animation: blobB 22s ease-in-out infinite alternate; }
@keyframes blobA { from { transform: translate(0, 0) scale(1); } to { transform: translate(18%, 28%) scale(1.15); } }
@keyframes blobB { from { transform: translate(0, 0) scale(1); } to { transform: translate(-22%, -24%) scale(1.1); } }
[data-magnet] { transition: transform .35s var(--ease); }
.pulse { position: relative; }
.pulse::after { content: ""; position: absolute; inset: -2px; border-radius: 999px; border: 1.5px solid var(--accent-text); opacity: 0; animation: pulseRing 2.4s var(--ease) infinite; pointer-events: none; }
@keyframes pulseRing { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.25); opacity: 0; } }

/* --- Бегущая строка --- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; background: var(--bg-2); }
.marquee__track { display: flex; gap: 0; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--font-display); font-weight: 300; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; padding: 0 28px; display: inline-flex; align-items: center; gap: 28px; color: var(--text-2); }
.marquee__track span::after { content: ""; width: 10px; height: 12px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Список с крупной цифрой (вместо третьей одинаковой сетки) --- */
.numlist { list-style: none; margin: 0; padding: 0; counter-reset: nl; }
.numlist li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px 24px; padding: 24px 0; border-top: 1px solid var(--line); align-items: start; }
.numlist li:last-child { border-bottom: 1px solid var(--line); }
.numlist li::before { counter-increment: nl; content: "0" counter(nl); font-family: var(--font-display); font-weight: 300; font-size: clamp(36px, 4vw, 56px); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--accent-text); }
.numlist h3 { margin-bottom: 8px; }
.numlist p { color: var(--text-2); font-size: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.split > .box:first-child { grid-row: span 2; }

/* --- Паспорт центра липкой колонкой --- */
.passport-side { position: sticky; top: calc(var(--header-h) + 24px); background: var(--bg-2); border: 1px solid var(--line); padding: 24px; }
.passport-side .passport { grid-template-columns: 1fr; border: 0; padding: 0; gap: 12px; }
.passport-side .passport div { grid-template-columns: 1fr 1fr; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.passport-side .passport dt { align-self: center; }
.passport-side h3 { text-transform: uppercase; font-size: 14px; letter-spacing: .08em; margin-bottom: 14px; }

/* --- Распорядок: подсветка текущего времени --- */
table.schedule tr.is-now td { background: var(--accent-2); color: var(--text); }
table.schedule tr.is-now td:first-child { color: var(--accent-text); }
table.schedule tr.is-now td:first-child::after { content: "сейчас"; font-family: var(--font-text); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-left: 8px; color: var(--accent-text); }
.schedule-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- Лайтбокс: стрелки --- */
.lightbox { position: relative; }
.lightbox .lb-prev, .lightbox .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--seashell); font-size: 22px; line-height: 1; }
.lightbox .lb-prev { left: 8px; }
.lightbox .lb-next { right: 8px; }
.lightbox .lb-count { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-family: var(--font-display); font-size: 12px; color: var(--seashell); letter-spacing: .1em; }
.lightbox img { touch-action: pan-y; user-select: none; }

/* --- Микровзаимодействия --- */
.nav a { position: relative; }
@media (min-width: 901px) {
  .nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1.5px; background: var(--accent-text); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
  .nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
  .nav a:hover, .nav a[aria-current="page"] { background: transparent; }
}
.btn::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .6s var(--ease); pointer-events: none; }
.btn:hover::before { left: 120%; }
.btn > * { position: relative; }
.field { position: relative; }
.field label { transition: color .25s, transform .25s var(--ease); transform-origin: left; }
.field:focus-within label { color: var(--accent-text); transform: translateX(4px); }
.form-sent { position: relative; padding-left: 72px; }
.form-sent::before { content: ""; position: absolute; left: 22px; top: 26px; width: 30px; height: 34px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.form-sent::after { content: ""; position: absolute; left: 30px; top: 37px; width: 14px; height: 8px; border-left: 2.5px solid var(--gray-umber); border-bottom: 2.5px solid var(--gray-umber); transform: rotate(-45deg); }
.js .form.is-sent .form-sent::before { animation: pop .5s var(--ease-spring) both; }
.js .form.is-sent .form-sent::after { animation: pop .4s var(--ease-spring) .25s both; }
@keyframes pop { from { transform: scale(0) rotate(-45deg); opacity: 0; } to { transform: scale(1) rotate(-45deg); opacity: 1; } }
.js .form.is-sent .form-sent::before { animation-name: popHex; }
@keyframes popHex { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Шапка: сжатие и прогресс чтения --- */
.header__in { transition: height .3s var(--ease); }
.header.is-scrolled .header__in { height: 56px; }
.header.is-scrolled .logo { font-size: 19px; }
.header__progress { position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* --- Калькулятор: плавная смена чисел --- */
.calc__sum { transition: opacity .2s; }
.calc__sum.is-changing { opacity: .55; }

/* --- Вёрстка: защита --- */
.hero > *, .two > *, .final > *, .formats > *, .route > *, .who > *, .page-hero > *, .versus > *, .promise > *, .flags > *, .cards > *, .cols-3 > *, .entries > *, .now > *, .media > *, .stats > *, .split > *, .callback > * { min-width: 0; }
.page-hero__photo img { object-position: 50% 45%; }
.modal .quiz-card, .modal { max-height: 90vh; overflow: auto; }
.field input, .field select, .field textarea { min-height: 48px; }
.btn { min-height: 44px; }
.btn--lg { min-height: 52px; }
h1, h2, h3 { overflow-wrap: break-word; }
@media (min-width: 641px) { h1, h2, h3 { overflow-wrap: normal; } .hero__title .flip { overflow-wrap: normal; } }
@media (max-width: 900px) {
  body { padding-bottom: 84px; }
  .btn { min-height: 48px; }
  .passport-side { position: static; }
  .who__photo { margin-top: 0; }
  .section--photo > img { inset: 0; height: 100%; }
}
@media (max-width: 640px) {
  h1, .hero__title, .page-hero h1 { font-size: clamp(28px, 9.4vw, 40px); hyphens: auto; }
  h2, .section-head h2 { font-size: clamp(22px, 7vw, 30px); hyphens: auto; }
  h3 { hyphens: auto; }
  .hero__title .flip::after { bottom: -.02em; }
  .h-num { font-size: 34px; }
  .stat::before { font-size: 64px; }
  .numlist li { grid-template-columns: 48px 1fr; }
  .numlist li::before { font-size: 30px; }
  .split { grid-template-columns: 1fr; }
  .split > .box:first-child { grid-row: auto; }
  .story { flex-basis: 84%; }
  .marquee__track span { font-size: 11px; padding: 0 16px; }
  .section-head { margin-bottom: 28px; }
  .verified { padding: 22px; }
  .form-sent { padding-left: 64px; }
  .who__big { font-size: 20px; }
  .lightbox .lb-prev, .lightbox .lb-next { width: 40px; height: 40px; }
}
button.link-arrow { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* ===== Правки по замечаниям (hero, заголовки-растяжки, FAQ в две колонки, нумерация) ===== */
/* hero: заголовок не наезжает на карточку квиза, блок помещается по высоте */
.hero { align-items: start; min-height: 0; padding-block: clamp(32px, 4.5vw, 64px) clamp(36px, 5vw, 72px); }
.hero__title { font-size: clamp(40px, 5.6vw, 84px); overflow-wrap: normal; }
.hero__title .flip { white-space: normal; }
.hero__copy { max-width: 46ch; }
.hero__lead, .hero p { max-width: 46ch; }
@media (min-width: 981px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: center; } }
/* крупные заголовки секций тянутся на всю колонку и переносятся по словам */
.section-head { align-items: start; }
.section-head h2 { overflow-wrap: normal; hyphens: manual; text-wrap: balance; max-width: 22ch; }
.section-head > div:first-child { min-width: 0; }
/* FAQ: заголовок слева, аккордеон справа */
.faq-split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.faq-split__head { position: sticky; top: calc(var(--header-h) + 28px); }
.faq-split__head h2 { max-width: 14ch; }
.faq-split__head .lead { margin-top: 18px; max-width: 34ch; }
.faq-split .faq { max-width: none; }
@media (max-width: 900px) { .faq-split { grid-template-columns: 1fr; } .faq-split__head { position: static; } }
/* карточки историй: кавычка вместо номера */
.story { position: relative; }
.story::before { content: "„"; position: absolute; right: clamp(18px, 2vw, 28px); top: 4px; font-family: var(--font-display); font-weight: 300; font-size: 84px; line-height: 1; color: var(--accent); opacity: .3; pointer-events: none; }
.story__meta { padding-right: 56px; }
/* нумерованный список шагов: маркер-гексагон вместо «01» */
.numlist li { grid-template-columns: 56px minmax(0, 1fr); }
.numlist li::before { counter-increment: nl; content: ""; width: 26px; height: 30px; margin-top: 6px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); -webkit-text-stroke: 0; opacity: .85; }
.numlist li:nth-child(2)::before { opacity: .6; }
.numlist li:nth-child(3)::before { opacity: .42; }
/* маркеры вместо номеров */
.hex { position: relative; }
.hex::after { content: ""; position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: 12px; height: 14px; background: var(--accent); clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); opacity: .75; }
.step__num, .team__ava { min-width: 0; }

/* ============================================================
   РАУНД 2: правки по обратной связи клиента
   ============================================================ */

/* --- A6 / B5. Мобильное меню: плотный фон, поверх всего, фон не скроллится --- */
.nav__close { display: none; }
@media (max-width: 900px) {
  .nav {
    inset: var(--header-h) 0 0 0;
    z-index: 60;
    background: var(--bg);
    background-image: linear-gradient(var(--bg), var(--bg));
    backdrop-filter: none; -webkit-backdrop-filter: none;
    overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: 40px;
    box-shadow: 0 -1px 0 var(--line-2);
  }
  .nav a { background: transparent; }
  .nav__close {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    margin-top: 22px; padding: 12px 22px; min-height: 48px;
    border: 1.5px solid var(--line); border-radius: 999px;
    background: var(--bg); color: var(--text-2); font: inherit; font-size: 15px;
  }
  .nav__close::before { content: "\00d7"; font-size: 20px; line-height: 1; }
  body.nav-open { overflow: hidden; }
  body.nav-open .header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.nav-open .header .header__in { height: var(--header-h); }
  body.nav-open .header__progress { display: none; }
  body.nav-open .actbar, body.nav-open .compare-bar, body.nav-open .fab { display: none !important; }
}

/* --- Шапка: семь пунктов меню без переноса на 1280–1600 px --- */
@media (min-width: 901px) {
  .header__in { gap: 16px; }
  .nav { gap: 2px; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1440px) {
  .nav a { font-size: 14px; padding: 8px 9px; }
  .nav a::after { left: 9px; right: 9px; }
  .header__phone { font-size: 14px; }
  .header__cta { padding: 10px 14px; font-size: 13px; }
  .logo { font-size: 20px; }
}
@media (min-width: 901px) and (max-width: 1150px) {
  .nav a { font-size: 13px; padding: 8px 7px; }
  .header__cta { display: none; }
}

/* --- A7. Переносы: ни одно слово не рвётся по буквам --- */
h1, h2, h3, h4, .page-hero h1, .hex__title, .fmt h3, .ladder h3, .team b, .box h3, .seal__t, .svc__name,
dt, dd, .passport dd, .now__item h3, .entry__title, .story__meta, summary {
  overflow-wrap: break-word; word-break: normal; hyphens: manual;
}
@media (max-width: 640px) {
  h1, h2, h3, h4, .page-hero h1, .hex__title, .fmt h3, .ladder h3, .team b, .box h3, .svc__name,
  .now__item h3, .entry__title, summary { hyphens: auto; }
  .hero__title, .hero__title .flip { hyphens: manual; }
}

/* --- B1. Заголовок секции не налезает на текст справа --- */
.section-head { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: clamp(24px, 3.5vw, 56px); }
.section-head h2 { font-size: clamp(26px, 3.1vw, 42px); overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.section-head > * { min-width: 0; }
.section-head--stack { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
.section-head--stack h2 { max-width: 24ch; }
.section-head--stack .lead { max-width: 72ch; }

/* --- B2 / A7. Список без гексагона-аватара занимает всю ширину --- */
.team li > div:first-child:last-child { grid-column: 1 / -1; }
.team li { align-items: start; }
.team b, .team span { overflow-wrap: break-word; hyphens: auto; }
.team span { display: block; }
.two > * { min-width: 0; }

/* --- A8. «Формат — цена — описание»: цена не наезжает на текст --- */
.fmt { grid-template-columns: minmax(0, 1fr) minmax(150px, max-content); }
.fmt > *, .ladder li > *, .now__item > * { min-width: 0; }
.fmt__price, .ladder__price { white-space: normal; overflow-wrap: break-word; }
.ladder li { grid-template-columns: 56px minmax(220px, 1fr) minmax(190px, .85fr) minmax(150px, max-content); }
@media (max-width: 1100px) {
  .ladder li { grid-template-columns: 56px minmax(0, 1fr); }
  .ladder li > p, .ladder__price { grid-column: 2; text-align: left; }
}
@media (max-width: 720px) {
  .fmt { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .fmt__price { text-align: left; }
  .ladder li { grid-template-columns: minmax(0, 1fr); }
  .ladder li > p, .ladder__price { grid-column: 1; }
}
table.compare th, table.compare td, table.schedule th, table.schedule td { min-width: 0; overflow-wrap: break-word; hyphens: auto; }

/* --- A9. Лейбл всегда над полем, плейсхолдер не накладывается --- */
.field { display: grid; }
.field label { position: static; pointer-events: auto; background: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); opacity: 1; }

/* --- B3. Карточки каталога: описание и ровная высота --- */
.ccard__desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.ccard__price { margin-top: auto; padding-top: 6px; }

/* --- B5. Гексагоны учредителей не обрезаются по краям --- */
@media (max-width: 760px) {
  .seals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 460px; }
  .seals > :nth-child(3) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
  .seal__in { padding: 20% 13%; }
  .seal__t { font-size: 12px; }
  .seal__s { display: block; font-size: 10px; }
}
@media (max-width: 430px) {
  .seals { grid-template-columns: minmax(0, 1fr); max-width: 230px; margin-inline: auto; gap: 10px; }
  .seals > :nth-child(3) { grid-column: 1; width: 100%; }
  .seal__in { padding: 18% 16%; }
}

/* --- Кнопки на тёмном фоне --- */
.dark .btn--ghost, .section--photo .btn--ghost { color: var(--dark-text); border-color: rgba(248, 244, 236, .4); }
.dark .btn--ghost:hover, .section--photo .btn--ghost:hover { color: var(--gray-umber); background: var(--straw); border-color: var(--straw); }

/* ============================================================
   Новые страницы: услуги, галерея, о проекте
   ============================================================ */

/* --- Услуги: гексагональная сетка направлений --- */
.svc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.svc-nav button {
  padding: 10px 16px; min-height: 44px; border: 1.5px solid var(--line); background: transparent;
  color: var(--text-2); font: inherit; font-size: 15px; font-weight: 500;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.svc-nav button:hover { transform: translateY(-2px); }
.svc-nav button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.svc-count { margin-top: 20px; font-family: var(--font-display); font-weight: 300; font-size: clamp(15px, 1.5vw, 18px); color: var(--accent-text); }
.svc-count b { font-weight: 500; font-size: 1.5em; }

.svc-group { padding: clamp(26px, 3vw, 44px) 0; border-top: 1px solid var(--line); }
.svc-group.is-hidden { display: none; }
.svc-group__head { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 48px); align-items: start; margin-bottom: 26px; }
.svc-group__head > * { min-width: 0; }
.svc-group h2 { font-size: clamp(24px, 2.6vw, 36px); }
.svc-group__n { font-family: var(--font-display); font-weight: 300; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px; }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.svc {
  position: relative; padding: 18px 20px 18px 44px; background: var(--bg-2); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  transition: transform .28s var(--ease), border-color .25s, background .25s;
}
.svc::before { content: ""; position: absolute; left: 18px; top: 22px; width: 13px; height: 15px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.svc:hover { transform: translateY(-3px); border-color: var(--accent-text); background: var(--bg); }
.svc.is-hidden { display: none; }
.svc__name { display: block; font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.svc__name a { text-decoration: none; }
.svc__text { display: block; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.svc-empty { display: none; padding: 28px 0; color: var(--text-2); }
.svc-empty.is-on { display: block; }
.svc-note { margin-top: 18px; padding: 18px 22px; background: var(--accent-2); color: var(--accent-text); font-size: 14px; line-height: 1.5; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }

/* --- Галерея --- */
.gal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.gal-filters button {
  padding: 10px 18px; min-height: 44px; border: 1.5px solid var(--line); background: transparent; color: var(--text-2);
  font: inherit; font-size: 15px; font-weight: 500; border-radius: 999px; transition: all .2s var(--ease);
}
.gal-filters button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.gal-filters button:hover { transform: translateY(-2px); }
.gal-count { font-size: 14px; color: var(--text-3); margin-bottom: 22px; }
.ggrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.ggrid li { min-width: 0; }
.ggrid li.is-hidden { display: none; }
.ggrid a { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-3); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
.ggrid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.ggrid a:hover img { transform: scale(1.05); }
.ggrid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px;
  background: linear-gradient(to top, rgba(47, 44, 41, .82), transparent);
  color: var(--seashell); font-size: 12.5px; line-height: 1.3;
}
.ggrid figure { margin: 0; }
@media (max-width: 900px) { .ggrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .ggrid figcaption { font-size: 11px; padding: 18px 10px 8px; } }
.lightbox figcaption { color: var(--seashell); text-align: center; padding: 10px 56px 0; font-size: 14px; }

/* --- О проекте --- */
.crit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: cr; }
.crit li { position: relative; padding: 22px 22px 22px 56px; border: 1px solid var(--line); background: var(--bg-2); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
.crit li::before { content: ""; position: absolute; left: 20px; top: 26px; width: 16px; height: 18px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.crit b { display: block; margin-bottom: 6px; }
.crit span { font-size: 14px; color: var(--text-2); line-height: 1.5; }
@media (max-width: 900px) { .crit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .crit { grid-template-columns: minmax(0, 1fr); } }
.founders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 32px; }
.founder { padding: clamp(22px, 2.4vw, 30px); background: var(--bg-2); border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%); }
.founder h3 { font-size: 17px; margin-bottom: 10px; }
.founder p { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.founder__k { font-family: var(--font-display); font-weight: 300; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px; }
@media (max-width: 900px) { .founders { grid-template-columns: minmax(0, 1fr); } }
.doclist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.doclist li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, max-content); gap: 8px 20px; padding: 14px 0; border-top: 1px dashed var(--line); font-size: 15px; }
.doclist span:last-child { color: var(--text-3); font-size: 14px; }
@media (max-width: 600px) { .doclist li { grid-template-columns: minmax(0, 1fr); } }
.lightbox .lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lightbox figcaption { padding-bottom: 30px; }

/* Заголовки не рвутся по буквам: перенос только по словам, длинным словам — больше места */
h1, h2, h3, .hero__title, .section-head h2, .faq-split__head h2, .page-hero h1 {
  overflow-wrap: normal; word-break: normal; hyphens: manual; text-wrap: balance;
}
.faq-split__head h2 { max-width: 18ch; }
@media (max-width: 1100px) { .faq-split__head h2 { max-width: none; } }
@media (max-width: 640px) {
  h1, h2, h3, .hero__title, .section-head h2, .page-hero h1 { hyphens: auto; overflow-wrap: break-word; }
}

/* FAQ: заголовок в узкой липкой колонке — соразмерный кегль, без пятистрочных «лесенок» */
.faq-split__head h2 { font-size: clamp(28px, 2.5vw, 38px); line-height: 1.16; max-width: 22ch; }
@media (max-width: 1100px) { .faq-split__head h2 { max-width: none; } }

/* Сетки, заданные на уровне разметки: раскладываются по ширине экрана */
.gcol-1 { grid-template-columns: minmax(0, 1fr); }
.gcol-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gcol-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gcol-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gcol-1 > *, .gcol-2 > *, .gcol-3 > *, .gcol-gal > * { min-width: 0; }
@media (max-width: 1000px) { .gcol-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .gcol-2, .gcol-3 { grid-template-columns: minmax(0, 1fr); } }

/* Таблица сравнения: равные колонки, слова не рвутся */
table.compare { table-layout: fixed; min-width: 900px; }
table.compare thead th:first-child, table.compare tbody th { width: 200px; }
table.compare thead th:not(:first-child) { width: 175px; }
table.compare th, table.compare td { overflow-wrap: break-word; hyphens: auto; }
.compare-table-wrap { scrollbar-width: thin; }
@media (max-width: 700px) { table.compare { font-size: 14px; } table.compare th, table.compare td { padding: 12px; } }

/* ============================================================
   РАУНД 3: телефон в шапке, фото людей, крупные списки, одна кнопка
   ============================================================ */

/* Шапка: видимый номер с подписью «24/7 · бесплатно» */
.header__phone { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.15; gap: 2px; }
.header__phone small { font-family: var(--font-text); font-weight: 400; font-size: 11px; letter-spacing: .04em; color: var(--text-3); white-space: nowrap; }
@media (max-width: 900px) { .header__phone small { display: none; } }

/* Первый экран: длинный H1 целыми словами, без разрывов по буквам */
.hero__title { text-transform: none; font-size: clamp(23px, 6.4vw, 46px); line-height: 1.08; hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }
@media (min-width: 901px) { .hero__title { font-size: clamp(30px, 3.2vw, 44px); } }
.eyebrow .flip { color: var(--accent-text); white-space: nowrap; font-weight: 500; }

/* Фотографии людей: фиксированная пропорция, без растягивания */
.photo-frame { margin: 0; max-width: 560px; }
.photo-frame img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 35%;
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 0 100%);
}
.hero__aside { display: grid; gap: clamp(18px, 2vw, 26px); align-content: start; min-width: 0; }
.hero__photo { max-width: none; }
.final__photo { margin-top: clamp(24px, 3vw, 36px); max-width: 600px; }

/* Цифры: три показателя вместо шести */
.stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) {
  .stats--3 { grid-template-columns: minmax(0, 1fr); }
  .stats--3 .stat { border-right: 0; border-bottom: 1px solid var(--line-2); margin-right: 0; padding-right: 0; }
  .stats--3 .stat:last-child { border-bottom: 0; }
}

/* Почему к нам: крупные пункты и фото рядом */
.why { align-items: center; }
.why__list li {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(18px, 1.9vw, 26px); line-height: 1.25;
  padding-left: 36px; padding-bottom: clamp(16px, 1.6vw, 22px); margin-bottom: clamp(16px, 1.6vw, 22px);
  border-bottom: 1px solid var(--line-2);
}
.why__list li::before { top: .38em; width: 18px; height: 18px; }
.why__list li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* Подпись под формой обращения */
.form__note { margin: 12px 0 0; font-size: 13px; color: var(--text-3); text-align: center; }

/* Плавающая кнопка «Написать»: только на мобильном, выше нижней панели */
@media (min-width: 761px) { .fab { display: none; } }
@media (max-width: 760px) { .fab { right: 14px; bottom: 88px; padding: 12px 18px 12px 14px; font-size: 15px; } }

/* Шапка на узких экранах: логотип, номер и бургер в одну строку */
@media (max-width: 560px) {
  .header__in { gap: 12px; }
  .header__phone { font-size: 13.5px; }
}

/* Подпись срока в калькуляторе не обрезается */
.calc__range input[type="range"] { flex: 1 1 auto; width: auto; min-width: 0; }
.calc__months { flex: none; min-width: 0; white-space: nowrap; }

/* Фото людей в шапке внутренней страницы: полная сцена, без обрезки по вертикали */
.page-hero__photo--people img { aspect-ratio: 3 / 2; object-position: 50% 35%; }
@media (max-width: 900px) { .page-hero__photo--people img { aspect-ratio: 3 / 2; } }

/* Шаги «если близкий отказывается»: заголовок пункта отдельной строкой */
#otkaz ol.clean li b { display: block; margin-bottom: 6px; }

/* Заголовки внутренних страниц: без переносов по слогам, целыми словами */
.page-hero h1 { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }
@media (max-width: 700px) { .page-hero h1 { font-size: clamp(24px, 7.4vw, 30px); } }


/* ═══ Переключатель темы ═══ */
.theme-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 999px; background: transparent; color: var(--text-2);
  font-family: var(--font-text); font-size: 13px; line-height: 1;
  cursor: pointer; transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 17px; height: 17px; flex: none; }
.theme-toggle__label { white-space: nowrap; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
@media (max-width: 1240px) { .theme-toggle__label { display: none; } .theme-toggle { padding: 0 10px; } }
.nav .theme-toggle { display: none; }
@media (max-width: 900px) {
  .header__in > .theme-toggle { display: none; }
  .nav .theme-toggle { display: inline-flex; margin-top: 18px; align-self: flex-start; }
  .nav .theme-toggle__label { display: inline; }
}

/* Карточки внутри тёмных секций: поверхность и текст не должны зависеть от темы */
.dark .founder,
.section--photo .founder {
  background: rgba(248, 244, 236, .07);
  border-color: rgba(248, 244, 236, .18);
}
.dark .founder h3,
.section--photo .founder h3 { color: var(--dark-text); }
.dark .founder p,
.section--photo .founder p { color: rgba(248, 244, 236, .74); }
.dark .founder__k,
.section--photo .founder__k { color: var(--straw); }

/* Инициалы в кружке: тёмный текст на соломенном фоне, а не общий светлый цвет списка */
.team .team__ava { color: var(--gray-umber); }

/* ═══ Шапка: ничего не обрезается ни на одной ширине ═══ */
/* Номер и главная кнопка не сжимаются — место уступает меню */
.header__phone, .header__cta, .header__in > .theme-toggle, .logo { flex: none; }
.header__cta { white-space: nowrap; }
.nav { min-width: 0; }
/* Переключатель в шапке — только иконка, подпись остаётся в мобильном меню */
.header__in > .theme-toggle { width: 38px; padding: 0; justify-content: center; }
.header__in > .theme-toggle .theme-toggle__label { display: none; }
/* На широких экранах шапке нужно больше места, чем контенту страницы */
@media (min-width: 1441px) { .header .wrap { max-width: 1440px; } }

/* ============================================================
   ВЕРСИЯ 5.1 — общие правки по таблице клиента
   ============================================================ */

/* Тонкий шрифт на тёмном плохо читается, особенно во время анимации:
   подписи и надзаголовки плотнее и чуть крупнее, вторичный текст светлее */
.eyebrow, .entry__k, .route__legend, .step__time, .hex__num, .passport dt, .seal__k,
.story__meta, .media__k, .footer h4, .page-hero__photo figcaption, .verified__date,
.marquee__track span, .quiz__counter, .svc-count, .versus__big, .who__big,
.promise__note, .hexnote { font-weight: 400; }
.eyebrow, .entry__k, .seal__k, .passport dt, .footer h4, .page-hero__photo figcaption,
.story__meta, .media__k, .route__legend, .step__time { font-size: 12.5px; letter-spacing: .1em; }
:root[data-theme="dark"] { --text-2: #E4DACB; --text-3: #C2B6A5; }
.lead, .muted { font-weight: 400; }

/* Заголовки не обрезаются и не заезжают на соседнюю колонку */
h1 { font-size: clamp(30px, 5vw, 64px); }
h2 { font-size: clamp(26px, 3.3vw, 46px); }
.page-hero h1 { font-size: clamp(28px, 3.4vw, 50px); }
h1, h2, h3 { max-width: 100%; }
.page-hero > *, .page-hero__grid > *, .split > *, .two > *, .who > *, .team > * { min-width: 0; }
h1.is-fit, h2.is-fit { overflow-wrap: normal; }

/* Бегущая строка: одинаковое расстояние от текста до точки с обеих сторон */
.marquee__track span { padding: 0 28px 0 0; gap: 28px; }

/* Преимущества: без крупных цифр на фоне */
.stat::before { content: none; display: none; }

/* Калькулятор: сначала цена за месяц, итог за срок — второстепенно */
.calc__sum { font-size: clamp(26px, 2.6vw, 34px); }
.calc__total { margin: 10px 0 0; font-size: 15px; color: var(--text-2); }
.calc [data-calc-term][hidden] { display: none; }

/* ═══ Мотивационный специалист (общий блок: главная и «Родственникам») ═══ */
.motiv { background: var(--dark); color: var(--dark-text); position: relative; overflow: hidden; }
.motiv::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 100% 0%, rgba(201, 200, 104, .14), transparent 60%); pointer-events: none; }
.motiv .wrap { position: relative; }
.motiv__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.motiv__grid > * { min-width: 0; }
.motiv h2 { color: var(--dark-text); }
.motiv .eyebrow { color: var(--straw); }
.motiv .lead { color: rgba(248, 244, 236, .86); }
.motiv p { color: rgba(248, 244, 236, .8); }
.motiv__accent {
  margin: clamp(22px, 3vw, 36px) 0 0; padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.6vw, 34px);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(20px, 2.1vw, 28px); line-height: 1.3;
  color: var(--gray-umber); background: var(--straw);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.motiv__side { padding: clamp(22px, 2.6vw, 36px); background: rgba(248, 244, 236, .05); border: 1px solid rgba(248, 244, 236, .16); }
.motiv__side h3 { font-size: clamp(18px, 1.6vw, 22px); color: var(--dark-text); margin-bottom: 14px; text-transform: none; }
.motiv__k { margin-top: 18px; font-weight: 600; color: var(--dark-text) !important; }
.motiv__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.motiv__list li { position: relative; padding-left: 26px; color: rgba(248, 244, 236, .86); line-height: 1.5; }
.motiv__list li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 14px; background: var(--straw); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.motiv__note { margin: 22px 0 24px; padding: 18px 20px; border-left: 3px solid var(--straw); background: rgba(0, 0, 0, .18); }
.motiv__note b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--straw); margin-bottom: 8px; }
.motiv__note p { margin: 0 0 8px; font-size: 15px; }
.motiv__note p:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .motiv__grid { grid-template-columns: minmax(0, 1fr); } }

/* Шапка секции на телефоне и планшете — в одну колонку (позднее правило перебивало мобильное) */
@media (max-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .section-head h2 { max-width: 100%; }
}
/* Заголовки без слоговых переносов: длинное слово ужимает скрипт подгонки */
h1, h2, .hero__title, .section-head h2, .page-hero h1 { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; }

/* Выпадающий список калькулятора читается в обеих темах */
.calc .field select option { color: var(--text); background: var(--bg-2); }
/* «Услуги»: заголовок группы и описание на телефоне — друг под другом */
@media (max-width: 700px) { .svc-group__head { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

/* Подписи колонок подвала — не заголовки, оформление как было */
.footer .footer__h { font-family: var(--font-display); font-weight: 400; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--straw); margin: 0 0 14px; }
/* «Спасибо» после отправки формы — статус, оформление как у прежнего заголовка */
.form-sent .form-sent__t { margin: 0 0 8px; font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.15; color: var(--text); }

/* Окно просмотра фото: привязано к экрану, а не к началу документа.
   Раньше стояло position: relative — модальное окно уезжало в верх страницы,
   и при прокрученной галерее было видно только затемнение. */
dialog.lightbox {
  position: fixed; inset: 0; margin: auto;
  width: fit-content; height: fit-content;
  max-width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  overflow: visible;
}
dialog.lightbox:not([open]) { display: none; }
.lightbox .lb-figure { max-height: inherit; }
.lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; }
.lightbox button { color: var(--gray-umber); cursor: pointer; }
/* Пока окно открыто, страница под ним не прокручивается */
html:has(dialog.lightbox[open]) { overflow: hidden; }

/* Герой внутренних страниц: фото заметно крупнее текста */
@media (min-width: 901px) {
  .page-hero:has(.page-hero__photo) {
    grid-template-columns: minmax(280px, 38%) minmax(0, 62%);
    gap: clamp(24px, 3vw, 40px);
    align-items: center;
  }
  .page-hero__photo {
    width: 100%;
    max-width: none;
  }
  .page-hero__photo img,
  .page-hero__photo--people img,
  .page-hero .r51a-hero-wide img {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 520px;
    height: auto;
    object-fit: cover;
    object-position: 50% 30%;
  }
}
@media (max-width: 900px) {
  .page-hero__photo img { min-height: 300px; aspect-ratio: 4 / 3; }
  .page-hero__photo--people img { min-height: 0; aspect-ratio: 3 / 2; object-position: 16% 42%; }
}
