/* =============================================================================
   НАЧИСТО — ремонт и отделка, Барнаул
   Дизайн-система лендинга. Montserrat, оранжевый на тёмном / тёмный на белом,
   блочная («кирпичная») геометрия логотипа, сдержанная «инженерная» моторика.
   ========================================================================== */

@import url('../vendor/montserrat.css');

/* -------------------------------------------------------------- 1. Tokens -- */
:root {
  --orange:      #FF4A00;
  --orange-deep: #E64400;   /* для текста на светлом, где нужен контраст AA */
  --orange-lift: #FF7A45;   /* кикеры/акценты на тёмном фоне */
  --ink:         #333333;
  --ink-900:     #1c1c1c;
  --ink-700:     #2b2b2b;
  --paper:       #ffffff;
  --paper-2:     #f5f3f0;
  --hairline:    #eceae7;
  --ink-muted:   #8a847c;
  --on-dark:     #f3f1ee;
  --on-dark-muted:#c5bfb6;
  --bg-dark:     #181614;   /* единый тёплый графит главной (секции, шапка, подвал) */
  --bg-raised:   #221f1c;   /* карточки на тёмном */
  --line-dark:   rgba(255,255,255,.1);

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);

  --e-out: cubic-bezier(.22, .61, .36, 1);
  --e-inout: cubic-bezier(.65, .05, .36, 1);
  --dur: .55s;
  --stagger: 90ms;

  --header-h: 92px;
  --header-h-min: 68px;

  --shadow-card: 0 18px 40px -18px rgba(20, 16, 12, .28);
}

/* --------------------------------------------------------------- 2. Reset -- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.js { scroll-behavior: auto; }           /* Lenis управляет скроллом */

/* якорные переходы не должны прятать заголовок под фикс-шапкой */
[id] { scroll-margin-top: 96px; }

body {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--orange); color: #fff; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.section--dark :focus-visible,
.section--orange :focus-visible { outline-color: #fff; }

/* SVG-фильтр дуотона держим за кадром */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.btn:disabled { cursor: not-allowed; }

/* ----------------------------------------------------------- 3. Typography -- */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-wrap: balance;
}
.h-hero  { font-weight: 900; font-size: clamp(2.2rem, 5.1vw, 3.65rem); letter-spacing: -.025em; }
.h-1     { font-weight: 900; font-size: clamp(2rem, 5vw, 3.4rem); }
.h-2     { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.lead    { font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.5; font-weight: 500; }

.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--orange-deep);
}
.kicker::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: var(--orange);
}
.section--dark .kicker,
.section--orange .kicker { color: var(--orange-lift); }
.section--orange .kicker { color: #fff; }
.section--dark .kicker::before,
.section--orange .kicker::before { background: var(--orange); }
.section--orange .kicker::before { background: #fff; }

.muted { color: var(--ink-muted); }
.section--dark .muted { color: var(--on-dark-muted); }

/* «плашка-кирпич» под ключевым словом заголовка */
.brick {
  position: relative;
  display: inline-block;
  color: #fff;
  padding: 0 .22em .06em;
  white-space: nowrap;
  isolation: isolate;
}
.brick::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--e-out);
}
.brick--ink::before { background: var(--ink); }
.is-in .brick::before,
.no-js .brick::before,
.reveal.is-in .brick::before { transform: scaleX(1); }
.brick.brick--lit::before { transform: scaleX(1); }

/* -------------------------------------------------------------- 4. Layout -- */
.container {
  width: min(100% - (var(--gut) * 2), var(--maxw));
  margin-inline: auto;
}
.section {
  position: relative;
  padding-block: clamp(72px, 11vh, 150px);
}
.section--dark   { background: var(--ink); color: var(--on-dark); }
.section--paper2 { background: var(--paper-2); }
.section--orange { background: var(--orange); color: #fff; }
.section__head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 64px); }
.section__head .h-1 { margin-top: .5rem; }
.section__head .lead { margin-top: 1.1rem; }
.section--dark .section__head .lead { color: var(--on-dark); }

.stack > * + * { margin-top: 1rem; }

/* ---------------------------------------------------- 5. Brand components -- */

/* официальный знак (файл logo short) на экранах «спасибо» */
.done-mark { display: block; width: 48px; height: 48px; margin: 0 auto 18px; }

/* кнопка: оранжевая заливка «наезжает» слева направо */
.btn {
  --btn-fg: #fff;
  --btn-bg: var(--orange);
  --btn-wipe: var(--ink-900);
  position: relative;
  display: inline-flex; align-items: center; gap: .7em;
  padding: 1.05em 1.7em;
  font-weight: 700; font-size: .95rem; letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 2px solid var(--btn-bg);
  overflow: hidden;
  isolation: isolate;
  transition: color .3s var(--e-out), border-color .3s var(--e-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-wipe);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--e-out);
}
.btn:hover, .btn:focus-visible { color: #fff; }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }

.btn--outline {
  --btn-fg: var(--orange-deep);
  background: transparent;
  --btn-wipe: var(--orange);
}
.btn--ondark.btn--outline { --btn-fg: #fff; border-color: #fff; --btn-wipe: var(--orange); }
.btn--onorange {
  --btn-bg: var(--ink-900); --btn-wipe: #fff;
}
.btn--onorange:hover, .btn--onorange:focus-visible { color: var(--ink-900); }
/* белая кнопка на оранжевом: при наведении заливается графитом */
.btn--white { --btn-fg: var(--ink-900); --btn-bg: #fff; --btn-wipe: var(--ink-900); }
.btn--lg { padding: 1.25em 2.1em; font-size: 1.05rem; }

.btn__arrow { transition: transform .3s var(--e-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--idle .btn__arrow { animation: nudge 2s var(--e-inout) infinite; }
@keyframes nudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(2px); } }

.btn--breathe { animation: breathe 2.4s var(--e-inout) infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

.btn-note { margin-top: .9rem; font-size: .85rem; color: var(--ink-muted); }
.section--dark .btn-note { color: var(--on-dark-muted); }
.section--orange .btn-note { color: #1a1a1a; }

/* карточка «кирпич» */
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: clamp(24px, 2.6vw, 38px);
  transition: transform .35s var(--e-out), box-shadow .35s var(--e-out);
}
.card::after {
  content: ""; position: absolute; top: 0; right: 0;
  width: 16px; height: 16px; background: var(--orange);
  transition: transform .35s var(--e-out);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.card:hover::after { transform: translate(3px, -3px); }

/* scroll-reveal */
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--e-out), transform .6s var(--e-out);
  transition-delay: var(--reveal-delay, 0ms);
}

/* маска слов заголовков (сплит из js/main.js → initSplitHeadings) */
.js .rw { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em 0; }
/* без will-change: иначе каждое слово — постоянный GPU-слой (сотни слоёв, на телефоне — рывки) */
.js .rw > span { display: inline-block; transform: translateY(112%); }
.js .is-in .rw > span { transform: none; transition: transform .72s var(--e-out); }

/* clip-вайп у картинок (initClipReveals) — переход задаёт GSAP */
.js .clip-hidden { clip-path: inset(0 100% 0 0); }
.js .clip-hidden img { transform: scale(1.12); }

/* «щелчок» квадрата кикера при появлении секции */
.js .reveal .kicker::before { transform: scale(0); transition: transform .4s var(--e-out) .1s; }
.js .reveal.is-in .kicker::before { transform: scale(1); }

/* квадратные точки-индикаторы для мобильных каруселей */
.dots { display: none; gap: 8px; margin-top: 22px; justify-content: center; }
.dots button {
  width: 9px; height: 9px; background: var(--hairline); padding: 0; border: 0;
  transition: background .25s, transform .25s;
}
.dots button[aria-current="true"] { background: var(--orange); transform: scale(1.25); }
.section--dark .dots button { background: rgba(255,255,255,.22); }
.section--dark .dots button[aria-current="true"] { background: var(--orange); }

/* обёртка изображений: карточка-фото + лёгкий скролл-параллакс */
.duo { position: relative; overflow: hidden; background: var(--ink); }
.duo img { width: 100%; height: 100%; object-fit: cover; }
/* запас по высоте под мягкий параллакс (двигается из initParallax) */
.js .duo img.media-parallax { position: absolute; inset: -9% 0; height: 118%; }
.duo::after { /* полутоновый растр */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(0,0,0,.55) 1px, transparent 1.4px);
  background-size: 5px 5px;
  opacity: .12;   /* без mix-blend-mode: чёрные точки выглядят так же, а отрисовка дешевле */
}
@media (prefers-reduced-motion: no-preference) {
  .duo img { transition: transform .5s var(--e-out); }
  .duo-hover:hover img,
  .duo-hover:focus-within img { transform: scale(1.06); }
}

/* --------------------------------------------------------------- 6. Header -- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: height .3s var(--e-out), background .3s var(--e-out), border-color .3s var(--e-out);
  transform: translateZ(0);
  will-change: height;
}
.header.is-scrolled {
  height: var(--header-h-min);
  border-bottom-color: var(--hairline);
  background: rgba(255,255,255,.97);
}
.header__inner {
  width: min(100% - (var(--gut) * 2), var(--maxw));
  margin-inline: auto;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 40px);
}

/* логотип — официальный лок «НАЧИСТО · РЕМОНТ» (файлы logo full/main/short) */
.logo { display: flex; align-items: center; flex: none; }
.logo__img {
  display: block; width: auto; height: clamp(26px, 3vw, 34px);
  transition: height .3s var(--e-out);
  backface-visibility: hidden;
}
.header.is-scrolled .logo__img { height: clamp(22px, 2.5vw, 28px); }

/* навигация */
.nav { position: relative; display: flex; flex-wrap: nowrap; gap: clamp(14px, 2.4vw, 34px); margin-inline: auto; }
.nav a {
  position: relative; flex: none; padding: 8px 2px;
  font-weight: 600; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-700);
  transition: color .2s;
}
.nav a:hover { color: var(--orange-deep); }
.nav a[aria-current="true"] { color: var(--ink-900); }
.nav a[aria-current="page"] { color: var(--ink-900); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--orange);
}
.nav__ink {
  position: absolute; bottom: 2px; left: 0; height: 2px; width: 0;
  background: var(--orange);
  transition: transform .3s var(--e-out), width .3s var(--e-out);
  pointer-events: none;
}

.header__actions { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 20px); flex: none; }
.header__phone { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.header__phone:hover { color: var(--orange-deep); }
.header__msgr { display: flex; gap: 8px; }
.header__msgr a {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--hairline);
  transition: background .2s, border-color .2s, color .2s;
}
.header__msgr a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.header__msgr svg { width: 17px; height: 17px; }
.header .btn { padding: .85em 1.35em; font-size: .8rem; }

/* бургер из трёх блоков */
.burger {
  display: none; width: 40px; height: 40px; padding: 8px; flex: none;
  flex-direction: column; justify-content: space-between;
}
.burger span { display: block; height: 4px; background: var(--ink-900); transition: transform .3s var(--e-out), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* мобильная панель */
.mobile-nav {
  position: fixed; inset: 0 0 0 auto; z-index: 99;
  width: min(86vw, 380px);
  background: var(--ink); color: #fff;
  padding: calc(var(--header-h) + 20px) 32px 40px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%);
  transition: transform .4s var(--e-out);
  visibility: hidden;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; }
.mobile-nav a {
  font-weight: 800; font-size: 1.5rem; text-transform: uppercase; letter-spacing: -.01em;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12);
  opacity: 0; transform: translateX(24px);
}
.mobile-nav.open a { opacity: 1; transform: none; transition: opacity .4s var(--e-out), transform .4s var(--e-out); }
.mobile-nav.open a:nth-child(1) { transition-delay: .08s; }
.mobile-nav.open a:nth-child(2) { transition-delay: .14s; }
.mobile-nav.open a:nth-child(3) { transition-delay: .20s; }
.mobile-nav.open a:nth-child(4) { transition-delay: .26s; }
.mobile-nav .btn { margin-top: 18px; opacity: 0; transform: translateX(24px); }
.mobile-nav.open .btn { opacity: 1; transform: none; transition: opacity .4s var(--e-out) .32s, transform .4s var(--e-out) .32s; }
.mobile-nav__contact { margin-top: auto; font-size: .9rem; color: var(--on-dark-muted); }
.scrim {
  position: fixed; inset: 0; z-index: 98; background: rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: opacity .35s;
}
.scrim.show { opacity: 1; visibility: visible; }

/* ----------------------------------------------------------- 7. Preloader -- */
/* Фаза 1: по центру оранжевого экрана проявляется только знак (увеличенный, клип прячет
   надпись). Фаза 2 (~1.5с): знак уменьшается, вправо выезжает надпись + плашка — собирается
   полный официальный лок «знак + НАЧИСТО» (вариант «на оранжевом»). Фаза 3: экран уезжает.
   Один ассет lockup-nachisto-onorange.png (2400×345); знак = левые ~14.8%, центр знака ≈ 7.4%. */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: var(--orange);
}
.preloader__stage { width: min(90vw, 520px); }
.preloader__logo {
  display: block; width: 100%; height: auto;
  transform-origin: 7.4% 50%;
  opacity: 0;
  /* фаза 1 — виден только знак, увеличен и по центру экрана */
  clip-path: inset(0 85% 0 0);
  transform: translateX(42.6%) scale(2.2);
  will-change: clip-path, transform, opacity;
}
.js .preloader.ready .preloader__logo {
  opacity: 1;
  transition: opacity .45s var(--e-out);
}
.js .preloader.unfurl .preloader__logo {
  clip-path: inset(0 0% 0 0);
  transform: translateX(0) scale(1);
  transition: clip-path .7s var(--e-out), transform .7s var(--e-out);
}
.no-js .preloader { display: none; }
.no-js .preloader__logo { opacity: 1; clip-path: none; transform: none; transition: none; }
.preloader.done { transition: transform .6s var(--e-inout), opacity .5s ease .15s; transform: translateY(-102%); opacity: 0; pointer-events: none; }

/* переход-шторка между страницами (initPageTransitions, создаётся в рантайме) */
.page-out {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--orange);
  display: grid; place-items: center;
  transform: translateY(100%);
  transition: transform .5s var(--e-inout);
  pointer-events: none;
}
.page-out.is-leaving { transform: translateY(0); }
.page-out img { width: min(60vw, 120px); opacity: 0; transition: opacity .3s ease .15s; }
.page-out.is-leaving img { opacity: 1; }

/* курсор-спотлайт на тёмных блоках (initSpotlight, создаётся в рантайме) */
.spotlight {
  position: fixed; top: 0; left: 0; width: 560px; height: 560px;
  border-radius: 50%; pointer-events: none; z-index: 40; opacity: 0;
  background: radial-gradient(circle, rgba(255,122,69,.32), rgba(255,122,69,0) 70%);
  mix-blend-mode: soft-light;
}

/* --------------------------------------------------------------- 8. Hero -- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--header-h);
  background: var(--ink-900); color: #fff;
  overflow: hidden;
}
.hero__media { position: absolute; inset: -8% 0 -8% 0; z-index: 0; will-change: transform; }
/* натуральный цвет фото (без оранжевого дуотона) — только затемнение под белый текст */
.hero__media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(1.04) contrast(1.02); }
/* фото «оседает» из лёгкого зума на загрузке (масштаб на img, чтобы не спорить с GSAP-параллаксом .hero__media) */
.js .hero__media img { transform: scale(1.06); }
.hero.is-in .hero__media img { transform: none; transition: transform 1.1s var(--e-out); }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(125% 95% at 50% 42%, rgba(12,9,7,.22) 0%, rgba(12,9,7,.42) 52%, rgba(12,9,7,.80) 100%),
    linear-gradient(180deg, rgba(12,9,7,.56) 0%, rgba(12,9,7,.34) 30%, rgba(12,9,7,.42) 62%, rgba(12,9,7,.82) 100%),
    rgba(12,9,7,.30);
}
/* «ставни» — тёмные блоки, раскрываются вниз и показывают фото (продолжение блоков прелоадера) */
.hero__blinds { position: absolute; inset: 0; z-index: 1; display: flex; pointer-events: none; }
.hero__blinds i { flex: 1 1 20%; background: var(--ink-900); transform-origin: top; }
.js .hero__blinds i { transform: scaleY(1); }
.hero.is-in .hero__blinds i { transform: scaleY(0); transition: transform .7s var(--e-inout); }
.hero.is-in .hero__blinds i:nth-child(2) { transition-delay: .06s; }
.hero.is-in .hero__blinds i:nth-child(3) { transition-delay: .12s; }
.hero.is-in .hero__blinds i:nth-child(4) { transition-delay: .18s; }
.hero.is-in .hero__blinds i:nth-child(5) { transition-delay: .24s; }
.no-js .hero__blinds { display: none; }
.hero__inner { position: relative; z-index: 2; width: 100%; padding-block: clamp(40px, 9vh, 120px); }
.hero__content { max-width: min(94vw, 1000px); margin-inline: auto; text-align: center; }
.hero h1 { margin-bottom: 1.5rem; }
.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: block; }
.js .hero__line > span { transform: translateY(110%); }
.hero.is-in .hero__line > span { transform: none; transition: transform .8s var(--e-out); }
.hero.is-in .hero__line:nth-child(2) > span { transition-delay: .09s; }
.hero.is-in .hero__line:nth-child(3) > span { transition-delay: .18s; }
.hero.is-in .hero__line:nth-child(4) > span { transition-delay: .27s; }
/* плашка «краснеть» наезжает последней, уже после третьей строки */
.hero.is-in .brick::before { transition-delay: .5s; }
.hero__sub { max-width: 52ch; margin: 0 auto 2.2rem; color: rgba(255,255,255,.88); font-size: clamp(1rem, 1.35vw, 1.18rem); line-height: 1.6; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; }
.hero__cta .btn-note { color: rgba(255,255,255,.82); flex-basis: 100%; text-align: center; margin-top: 0; }
/* продлённый вступительный стаггер: подзаголовок → кнопка → подсказка */
.js .hero__sub,
.js .hero__cta { opacity: 0; transform: translateY(14px); }
.hero.is-in .hero__sub,
.hero.is-in .hero__cta {
  opacity: 1; transform: none;
  transition: opacity .6s var(--e-out), transform .6s var(--e-out);
}
.hero.is-in .hero__sub { transition-delay: .42s; }
.hero.is-in .hero__cta { transition-delay: .52s; }
/* подсказка скролла центрируется через translateX(-50%) — трогаем только opacity */
.js .hero__scrolltip { opacity: 0; }
.hero.is-in .hero__scrolltip { opacity: 1; transition: opacity .6s var(--e-out) .7s; }
.hero__scrolltip {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.6);
}
.hero__scrolltip i { width: 34px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
.hero__scrolltip i::after { content: ""; position: absolute; inset: 0; background: var(--orange); animation: track 1.8s var(--e-inout) infinite; }
@keyframes track { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* --------------------------------------------- 12. Как работаем (блок 2) --- */
/* overflow-x: clip — шаги въезжают сбоку (--from), без него страница на телефоне шире экрана */
.timeline { position: relative; margin-top: 6px; padding-left: clamp(44px, 6vw, 88px); overflow-x: clip; }
.timeline__rail { position: absolute; left: clamp(14px, 2vw, 28px); top: 6px; bottom: 6px; width: 2px; background: rgba(255,255,255,.16); }
.timeline__fill { position: absolute; inset: 0; background: var(--orange); transform: scaleY(0); transform-origin: top; }
.step { position: relative; padding: clamp(14px, 2vw, 24px) 0; opacity: 1; transition: opacity .35s var(--e-out); }
.timeline.focusing .step:not(.is-active) { opacity: .4; }
.step + .step { border-top: 1px solid rgba(255,255,255,.1); }
.step__no {
  position: absolute; top: clamp(16px, 2.1vw, 26px);
  left: calc(-1 * clamp(44px, 6vw, 88px));
  width: clamp(44px, 6vw, 88px);
  font-weight: 900; font-size: 1rem; color: var(--orange-lift);
}
.step.is-active .step__no { color: var(--orange); }
.step h3 { font-size: clamp(1.05rem, 1.8vw, 1.4rem); margin-bottom: .35rem; transition: transform .35s var(--e-out); }
.step.is-active h3 { transform: translateX(4px); }
.step p { color: var(--on-dark-muted); max-width: 64ch; font-size: .94rem; line-height: 1.55; }
#process, #turnkey { padding-block: clamp(56px, 8vh, 100px); }
#process .section__head, #turnkey .section__head { margin-bottom: clamp(20px, 3vw, 36px); }

/* десктоп: слева закреплённая панель с текущим шагом, справа — сами шаги */
.process__now, .process__cta { display: none; }
@media (min-width: 1081px) {
  .process {
    display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    column-gap: clamp(40px, 6vw, 96px); align-items: start;
  }
  .process > .section__head { grid-column: 1 / -1; max-width: 62ch; }
  .process__aside { position: sticky; top: calc(var(--header-h-min) + 48px); }
  .process .timeline { margin-top: 0; }
  .process__now { display: grid; gap: 10px; margin-top: 8px; }
  .process__cta { display: inline-flex; margin-top: 34px; }
}
.process__big {
  font-weight: 900; font-size: clamp(6rem, 10vw, 9.5rem); line-height: .9; letter-spacing: -.04em;
  color: var(--orange);   /* сплошной: контур у Montserrat даёт артефакты на пересечениях (4, 7) */
}
.process__label {
  font-weight: 800; font-size: 1.35rem; line-height: 1.15; text-transform: uppercase; color: #fff;
  min-height: 2.3em;
}
.process__bar { display: block; height: 3px; background: var(--line-dark, rgba(255,255,255,.12)); margin-top: 6px; }
.process__bar i {
  display: block; height: 100%; width: 12.5%; background: var(--orange);
  transition: width .5s var(--e-out);
}
.process__count { font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-muted); }
/* смена шага: номер и название «въезжают» снизу */
.process__big.is-swap, .process__label.is-swap { animation: now-swap .5s var(--e-out); }
@keyframes now-swap { from { opacity: 0; transform: translateY(28%); } to { opacity: 1; transform: none; } }

/* шаги с фото-акцентом (0.2 / 0.5 / 0.7) — текст + кадр рядом */
.step--media { display: flex; gap: clamp(20px, 3vw, 40px); align-items: flex-start; flex-wrap: wrap; }
.step--media .step__body { flex: 1 1 320px; min-width: 0; }
.step__media { flex: 0 0 clamp(130px, 16vw, 190px); aspect-ratio: 4 / 3; margin-top: 4px; }
@media (max-width: 760px) {
  .step--media { flex-direction: column; gap: 12px; }
  .step--media .step__body { flex: none; }   /* иначе flex-basis 320px становится высотой колонки */
  .step__media { flex: none; width: 100%; aspect-ratio: 16 / 9; }
}

.js .step.reveal { opacity: 0; transform: translateX(var(--from, -26px)); }
.js .step.reveal:nth-child(even) { --from: 26px; }
.js .step.reveal.is-in { opacity: 1; transform: none; transition: opacity .5s var(--e-out), transform .5s var(--e-out); }

/* --------------------------------------- 13. Что входит под ключ (блок 3) -- */
.turnkey__lead { margin-bottom: 22px; }
.turnkey__shock { margin: 0; }
.turnkey__num { font-weight: 900; font-size: clamp(2.6rem, 8vw, 5.5rem); color: var(--orange); line-height: 1; letter-spacing: -.04em; }
.turnkey__num-suf { display: block; margin-top: .5em; font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.7rem); text-transform: uppercase; }
.turnkey__intro { max-width: 66ch; margin: 14px 0 0; font-weight: 500; }
.turnkey__intro b { color: var(--ink-900); }
.bricks { display: flex; flex-wrap: wrap; gap: 8px; }
.brick-item {
  background: var(--ink); color: #fff;
  padding: 16px 20px;
  flex: 1 1 auto;
}
.brick-item:nth-child(1) { flex-basis: 58%; }
.brick-item:nth-child(2) { flex-basis: 38%; }
.brick-item:nth-child(3) { flex-basis: 34%; }
.brick-item:nth-child(4) { flex-basis: 62%; }
.brick-item:nth-child(5) { flex-basis: 100%; }
.brick-item h3 { font-size: 1rem; margin-bottom: 4px; color: var(--orange-lift); }
.brick-item p { font-size: .9rem; line-height: 1.5; color: var(--on-dark-muted); }
.turnkey__note { margin-top: 16px; font-size: .9rem; color: var(--ink-muted); max-width: 74ch; }

/* фирменная графика — прямая кладка (running bond), «прочерчивается» из js/main.js */
.has-bricks { overflow: hidden; }
.has-bricks > .container { position: relative; z-index: 1; }
.brickfield {
  position: absolute; inset: 0; z-index: 0;
  color: #b9b4ad;                  /* stroke «кирпичей» — светло-серый */
  opacity: .35; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 84%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 14%, #000 84%, transparent);
}
.brickfield svg { display: block; width: 100%; height: 122%; }

/* -------------------------------------------------- 14. Пакеты (блок 4) --- */
.packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.pkg {
  position: relative; background: var(--paper); border: 1px solid var(--hairline);
  padding: 34px 30px 30px;
  display: flex; flex-direction: column;
  transition: transform .35s var(--e-out), box-shadow .35s var(--e-out), opacity .35s var(--e-out);
}
.pkg::after {
  content: ""; position: absolute; top: 0; right: 0; width: 18px; height: 18px;
  background: var(--orange); transition: transform .35s var(--e-out);
}
/* подъём — через top, чтобы transform оставался свободным для анимаций (initPackages) */
.pkg--featured {
  top: -18px;
  border-color: var(--ink-900);
  box-shadow: var(--shadow-card);
}
.pkg:hover { transform: translateY(-8px); box-shadow: var(--shadow-card); }
.pkg:hover::after { transform: translate(3px, -3px); }
/* сцена из js/main.js: на время входа transition выключен, наклон к курсору ведёт GSAP */
.pkg--fx { transition: none; }
.pkg--fx.is-ready { transition: transform .35s var(--e-out), box-shadow .35s var(--e-out), opacity .35s var(--e-out); }
.pkg--fx.pkg--tilt.is-ready { transition: box-shadow .35s var(--e-out), opacity .35s var(--e-out); }
@media (hover: hover) {
  .packages:has(.pkg:hover) .pkg:not(:hover) { opacity: .55; }
}
/* «Комфорт»: по рамке бежит огонёк */
@property --pkg-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.pkg--featured::before {
  content: ""; position: absolute; inset: -1px; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--pkg-angle), transparent 0 62%, var(--orange) 84%, var(--orange-lift) 93%, #fff 96%, transparent 97%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: pkg-orbit 6s linear infinite;
  animation-play-state: paused;   /* крутится, только пока карточка на экране (.is-visible из initPackages) */
}
.pkg--featured.is-visible::before { animation-play-state: running; }
@keyframes pkg-orbit { to { --pkg-angle: 360deg; } }

.pkg__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pkg__tag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; background: var(--orange); color: #fff; padding: 4px 9px;
}
/* шкала уровня — мини-кладка из 3 рядов (снизу вверх), закрашено = уровень пакета */
.pkg__level { display: flex; flex-direction: column-reverse; gap: 3px; width: 34px; flex: none; }
.pkg__level i { display: block; width: 28px; height: 7px; border: 1.5px solid var(--hairline); }
.pkg__level i:nth-child(2) { margin-left: 6px; }   /* перевязка: средний ряд сдвинут */
.pkg__level i.on { background: var(--orange); border-color: var(--orange); }
.pkg h3 { font-size: 1.5rem; margin-bottom: 10px; }
/* цена: ориентир «от … ₽/м²», только работа */
.pkg__price {
  font-weight: 900; font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.02em;
  color: var(--orange-deep); white-space: nowrap;
}
.pkg__price small { font-size: .5em; font-weight: 700; letter-spacing: 0; }
.pkg__num { font-variant-numeric: tabular-nums; }   /* цифры не «прыгают» при счёте */
.pkg__price-note {
  margin: 4px 0 16px; font-size: .7rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-muted);
}
.pkg__desc { font-size: .93rem; color: var(--ink-700); }
/* состав работ — виден сразу, растягивается, чтобы низ карточек совпадал */
.pkg__works { flex: 1 0 auto; margin-top: 18px; border-top: 1px solid var(--hairline); padding-top: 14px; }
.pkg__works-title { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.pkg__works li { font-size: .88rem; line-height: 1.45; padding: 5px 0 5px 20px; position: relative; color: var(--ink-700); }
.pkg__works li::before {
  content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 9px; background: var(--orange);
  transform: scale(var(--sq, 1));   /* --sq анимирует initPackages */
}

.packages__notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 40px; margin-top: 40px; }
.packages__notes p { font-size: .9rem; color: var(--ink-muted); }
.packages__notes b { color: var(--ink-900); }
/* «Что входит в любой пакет» */
.packages__all { margin-top: 56px; }
.packages__all-title { font-size: clamp(1.15rem, 2vw, 1.45rem); margin-bottom: 22px; }
.packages__all-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.packages__all-list li { position: relative; padding-top: 15px; font-size: .88rem; line-height: 1.5; color: var(--ink-700); }
.packages__all-list li::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--orange); transform-origin: left;
}
/* линии прочерчиваются по очереди, когда блок появился */
.js .packages__all.reveal li::before { transform: scaleX(0); transition: transform .7s var(--e-out); }
.js .packages__all.reveal.is-in li::before { transform: scaleX(1); }
.js .packages__all.is-in li:nth-child(1)::before { transition-delay: .2s; }
.js .packages__all.is-in li:nth-child(2)::before { transition-delay: .32s; }
.js .packages__all.is-in li:nth-child(3)::before { transition-delay: .44s; }
.js .packages__all.is-in li:nth-child(4)::before { transition-delay: .56s; }
.js .packages__all.is-in li:nth-child(5)::before { transition-delay: .68s; }
.packages__all-list b { display: block; margin-bottom: 4px; font-size: .95rem; line-height: 1.3; color: var(--ink-900); }
.packages__cta { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.packages__cta p { max-width: 52ch; font-weight: 500; }

/* ------------------------------------------------ 16. Истории (блок 5) ---- */
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.story {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--hairline);
  transition: transform .35s var(--e-out), box-shadow .35s var(--e-out);
}
.story:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.story__cover { aspect-ratio: 4 / 3; }
.story__body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.story__rubric {
  align-self: flex-start; font-size: .66rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; background: var(--orange); color: #fff; padding: 4px 8px;
}
.story__title { font-size: 1.05rem; line-height: 1.28; letter-spacing: -.01em; text-transform: none; font-weight: 800; }
.story__meta { margin-top: auto; font-size: .78rem; color: var(--ink-muted); }
.stories__cta { margin-top: 28px; }

/* -------------------------------------------------- 17. Отзывы (блок 6) -- */
.reviews { text-align: center; }
.reviews__quote {
  font-style: italic; font-weight: 500; text-transform: none; letter-spacing: -.01em;
  font-size: clamp(1.3rem, 3vw, 2.05rem); line-height: 1.42;
  max-width: 32ch; margin: 14px auto 10px; text-wrap: balance;
}
.reviews__by { color: var(--on-dark-muted); font-size: .9rem; margin-bottom: 40px; }
.reviews__slots { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.slot {
  min-width: 150px; padding: 18px 22px;
  border: 1px dashed rgba(255,255,255,.3); color: rgba(255,255,255,.55);
  font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
}
.reviews__note { margin-top: 26px; font-size: .86rem; color: var(--on-dark-muted); max-width: 60ch; margin-inline: auto; }

/* ---------------------------------------------------- 18. Квиз (блок 7) -- */
.quiz-wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.quiz-copy .lead { margin: 14px 0 20px; }
.quiz {
  position: relative; background: var(--paper); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card); padding: clamp(24px, 3vw, 40px);
  overflow: hidden;
}
.quiz__progress { display: flex; gap: 6px; margin-bottom: 26px; }
.quiz__progress span {
  flex: 1; height: 8px; background: var(--hairline);
}
.quiz__progress span.done { background: var(--orange); animation: pop .3s var(--e-out); }
@keyframes pop { 0% { transform: scale(1); } 55% { transform: scale(1.15); } 100% { transform: scale(1); } }
.quiz__viewport { position: relative; overflow: hidden; }
.quiz__track { display: flex; transition: transform .3s var(--e-inout); }
.quiz__slide { flex: 0 0 100%; min-width: 0; }
.quiz__q { font-size: 1.15rem; font-weight: 800; text-transform: none; letter-spacing: -.01em; margin-bottom: 16px; }
.quiz__q b { color: var(--ink-muted); font-weight: 700; font-size: .8rem; display: block; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.quiz__opts { display: grid; gap: 8px; }
.quiz__opt {
  text-align: left; padding: 14px 16px; border: 1px solid var(--hairline);
  font-size: .95rem; transition: border-color .2s, background .2s, transform .2s;
}
.quiz__opt:hover { border-color: var(--ink-900); transform: translateX(3px); }
.quiz__opt:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.quiz__opt.sel { border-color: var(--orange); background: rgba(255,74,0,.07); font-weight: 600; }
.quiz__field { display: grid; gap: 10px; }
.quiz__field input {
  padding: 13px 15px; border: 1px solid var(--hairline); background: var(--paper-2);
}
.quiz__field input:focus { border-color: var(--orange); background: #fff; outline: none; }
.quiz__consent { margin-top: 12px; font-size: .76rem; line-height: 1.5; color: var(--ink-muted); }
.quiz__consent a { text-decoration: underline; text-underline-offset: 2px; }
.quiz__consent a:hover { color: var(--orange-lift); }
.quiz__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; }
.quiz__back { font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.quiz__back:hover { color: var(--ink-900); }
.quiz__back[hidden] { visibility: hidden; }
.quiz__done { text-align: center; padding: 20px 0; }
.quiz__done .done-mark { width: 48px; height: 48px; margin: 0 auto 18px; }
.quiz__done h3 { font-size: 1.4rem; margin-bottom: 10px; }
.quiz__done p { color: var(--ink-700); max-width: 40ch; margin: 0 auto 18px; }

/* --------------------------- анкеты (Вакансии / Стать поставщиком) -------- */
.appform-wrap { display: grid; grid-template-columns: 1fr minmax(0, 560px); gap: clamp(28px, 5vw, 72px); align-items: start; }
.appform-copy .lead { margin: 14px 0 0; }
.appform-copy__note { margin-top: 18px; font-size: .9rem; color: var(--ink-muted); border-left: 4px solid var(--orange); padding-left: 14px; }
.appform {
  position: relative; background: var(--paper); border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card); padding: clamp(24px, 3vw, 40px);
}
.appform::after {
  content: ""; position: absolute; top: 0; right: 0; width: 16px; height: 16px; background: var(--orange);
}
.appform__row { display: grid; gap: 6px; margin-bottom: 16px; }
.appform__row > label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.appform__row.req > label::after { content: " *"; color: var(--orange-deep); }
.appform input, .appform select, .appform textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--hairline); background: var(--paper-2);
  font-family: inherit;
}
.appform textarea { min-height: 96px; resize: vertical; }
.appform input:focus, .appform select:focus, .appform textarea:focus { border-color: var(--orange); background: #fff; outline: none; }
.appform .invalid { border-color: var(--orange-deep); background: rgba(255,74,0,.06); }
.appform__consent { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 18px; font-size: .82rem; color: var(--ink-700); }
.appform__consent input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--orange); }
.appform__consent a { text-decoration: underline; text-underline-offset: 2px; }
.appform__submit { width: 100%; justify-content: center; }
.appform__done { text-align: center; padding: 16px 0; }
.appform__done .done-mark { width: 48px; height: 48px; margin: 0 auto 18px; }
.appform__done h3 { font-size: 1.4rem; margin-bottom: 10px; }
.appform__done p { color: var(--ink-700); max-width: 42ch; margin: 0 auto; }
/* ошибка отправки (формы и квиз) — цвет текста наследуется: годится и для светлой, и для тёмной карточки */
.appform__error {
  margin: 14px 0 0; padding: 10px 14px; border-left: 4px solid var(--orange);
  background: rgba(255,74,0,.08); font-size: .86rem; line-height: 1.5;
}
.appform__error a { text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
@media (max-width: 900px) {
  .appform-wrap { grid-template-columns: 1fr; }
}

/* ------------------------------------------------- Exit-intent попап ---- */
.exit-popup {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  padding: var(--gut);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s var(--e-out), visibility .35s;
}
.exit-popup.show { opacity: 1; visibility: visible; pointer-events: auto; }
.exit-popup__scrim {
  position: absolute; inset: 0;
  background: rgba(20,16,12,.6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.exit-popup__card {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0,300px) minmax(0,420px);
  width: 100%; max-width: 760px; max-height: 88vh; overflow: auto;
  background: var(--paper); box-shadow: 0 40px 90px -30px rgba(20,16,12,.55);
  transform: scale(.94) translateY(12px);
  transition: transform .4s var(--e-out);
}
.exit-popup.show .exit-popup__card { transform: none; }
.exit-popup__media { position: relative; background: var(--ink); min-height: 320px; }
.exit-popup__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.exit-popup__body { padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.exit-popup__title { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.exit-popup__subtitle { margin: 10px 0 22px; color: var(--ink-muted); }
.exit-popup__close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--hairline);
  font-size: 1.3rem; line-height: 1; color: var(--ink-900);
  transition: background .2s, transform .2s;
}
.exit-popup__close:hover { background: var(--paper-2); transform: rotate(90deg); }
.exit-popup__form { border: 0; box-shadow: none; padding: 0; background: transparent; }
.exit-popup__form::after { content: none; }
@media (max-width: 1080px) {
  .exit-popup__card { grid-template-columns: 1fr; max-width: min(92vw, 440px); }
  .exit-popup__media { min-height: 200px; max-height: 32vh; }
}
@media (max-width: 600px) {
  .exit-popup--quick .exit-popup__media { display: none; }   /* на телефоне форма важнее фото */
}

/* ------------------------------------- уведомление о cookie (js/cookie-notice.js) */
.cookie-notice {
  position: fixed; left: 50%; bottom: 16px; z-index: 400;   /* над шапкой (100), под попапами (500) */
  display: flex; align-items: center; gap: 14px 22px;
  width: min(calc(100% - 32px), 760px);
  padding: 16px 18px 16px 22px;
  background: var(--ink); color: var(--on-dark);
  border-left: 4px solid var(--orange);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
  font-size: .86rem; line-height: 1.5;
  transform: translate(-50%, 0);
  transition: opacity .35s var(--e-out), transform .35s var(--e-out);
}
.cookie-notice.is-hidden { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
.cookie-notice p { margin: 0; }
.cookie-notice a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.cookie-notice a:hover { color: var(--orange-lift); }
.cookie-notice .btn { flex: none; padding: .8em 1.4em; font-size: .8rem; }
@media (max-width: 600px) {   /* компактно, чтобы не закрывать кнопки первого экрана */
  .cookie-notice { bottom: 10px; gap: 12px; padding: 10px 10px 10px 14px; font-size: .74rem; line-height: 1.4; }
  .cookie-notice .btn { padding: .75em 1em; font-size: .72rem; }
}

/* ---------------------------------------------------- 19. FAQ (блок 8) -- */
.faq { border-top: 1px solid var(--hairline); max-width: 960px; }
.faq__item { border-bottom: 1px solid var(--hairline); }
.faq__q {
  display: flex; align-items: center; gap: 18px; width: 100%; text-align: left;
  padding: clamp(18px, 2.4vw, 26px) 0;
  font-weight: 800; font-size: clamp(1rem, 1.7vw, 1.2rem); text-transform: none; letter-spacing: -.01em;
}
.faq__icon {
  position: relative; width: 22px; height: 22px; flex: none;
  background: var(--orange);
}
.faq__icon::before,
.faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 11px; height: 2.5px; background: #fff;
  transform: translate(-50%, -50%);
  transition: transform .2s var(--e-out), opacity .2s;
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item.open .faq__icon::after { opacity: 0; transform: translate(-50%, -50%) rotate(0deg); }
.faq__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s var(--e-out); }
.faq__item.open .faq__panel { grid-template-rows: 1fr; }
.faq__panel > div { overflow: hidden; }
.faq__a { padding: 0 40px 26px; max-width: 70ch; color: var(--ink-700); }

/* ------------------------------------------- 20. Финальный призыв (13) --- */
.final { text-align: center; }
.final .h-1 { font-size: clamp(2rem, 5.5vw, 3.8rem); margin-bottom: 18px; }
.final p { color: #1a1a1a; font-weight: 500; max-width: 52ch; margin: 0 auto 34px; }
.final__cta { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.final__alt { font-size: .9rem; color: #1a1a1a; }
.final__alt a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------- сквозные CTA-полосы (разные формулировки) */
.cta-band {
  background: var(--ink); color: #fff;
  padding-block: clamp(40px, 6vw, 72px);
}
.cta-band--orange { background: var(--orange); }
.cta-band__in {
  width: min(100% - (var(--gut) * 2), var(--maxw));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px 40px;
  flex-wrap: wrap;
}
.cta-band__title {
  font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.05;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  max-width: 20ch;
}
.cta-band--orange .cta-band__title { color: #fff; }
.cta-band .btn { flex: none; }
@media (max-width: 640px) {
  .cta-band__in { flex-direction: column; align-items: flex-start; }
  .cta-band .btn { width: 100%; justify-content: center; }
}

/* ------------------------------ фото-карточки с текстом (лента «Почему мы» и баннеры) */
.photo-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  aspect-ratio: 4 / 5;
  padding: clamp(22px, 3vw, 40px);
  background: var(--ink-900); color: #fff;
  isolation: isolate;
}
.photo-card__img { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.photo-card__img img { width: 100%; height: 100%; object-fit: cover; }
.js .photo-card__img img.media-parallax { position: absolute; inset: -9% 0; height: 118%; }
.photo-card::after { /* затемнение: сильнее со стороны текста */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--shade-dir, 180deg), rgba(18,15,12,.72) 0%, rgba(18,15,12,.38) 45%, rgba(18,15,12,.5) 100%);
}
.photo-card__mark { width: 30px; height: 30px; flex: none; }

.photo-card__text { margin-top: auto; max-width: 30ch; }
.photo-card__title {
  font-weight: 500; font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.02; letter-spacing: .01em; text-transform: uppercase;
  text-wrap: balance;
}
.photo-card__sub {
  margin-top: .25em;
  font-weight: 400; font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.2;
  color: var(--orange-lift);
}
.photo-card__rule {
  position: relative; display: block; height: 1px; margin: 18px 0 14px;
  background: rgba(255,255,255,.75);
  transform-origin: left;
}
.photo-card__rule::after { /* точка на конце линии */
  content: ""; position: absolute; top: -2px; right: -2px;
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
}
.photo-card__note {
  font-style: italic; font-weight: 300; font-size: .95rem; line-height: 1.45;
  color: var(--on-dark);
}

/* позиции текста */
.photo-card--tr { --shade-dir: 180deg; }
.photo-card--tr .photo-card__text { margin-top: 0; margin-left: auto; text-align: right; padding-top: 12px; }
.photo-card--tr .photo-card__rule { transform-origin: right; }
.photo-card--tr .photo-card__rule::after { right: auto; left: -2px; }
.photo-card--bl { --shade-dir: 0deg; }
.photo-card--center { --shade-dir: 0deg; justify-content: flex-start; }
.photo-card--center::after { background: rgba(18,15,12,.55); }
.photo-card--center .photo-card__text { margin: auto; text-align: center; }
.photo-card--dim::after { /* темнее для светлых фото */
  background: linear-gradient(var(--shade-dir, 180deg), rgba(18,15,12,.84) 0%, rgba(18,15,12,.6) 45%, rgba(18,15,12,.7) 100%);
}
.photo-card--center.photo-card--dim::after { background: rgba(18,15,12,.72); }
.photo-card--center .photo-card__title { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: .02em; }
.photo-card--center .photo-card__sub { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.photo-card--center .photo-card__rule { width: 72px; margin-inline: auto; }
.photo-card__cta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 22px; }
.photo-card__phone { font-weight: 500; letter-spacing: .04em; text-decoration: underline; text-underline-offset: 4px; }

/* поочерёдное появление текста, когда карточка въехала в экран */
.js .photo-card .photo-card__text > * { opacity: 0; transform: translateY(22px); }
.js .photo-card .photo-card__rule { opacity: 1; transform: scaleX(0); }
.js .photo-card.is-in .photo-card__text > *,
.js .is-in .photo-card .photo-card__text > * {
  opacity: 1; transform: none;
  transition: opacity .85s var(--e-out), transform .95s var(--e-out);
}
.js .photo-card.is-in .photo-card__sub,  .js .is-in .photo-card .photo-card__sub  { transition-delay: .18s; }
.js .photo-card.is-in .photo-card__rule, .js .is-in .photo-card .photo-card__rule { transition-delay: .36s; transition-duration: 1.1s; }
.js .photo-card.is-in .photo-card__note, .js .is-in .photo-card .photo-card__note { transition-delay: .75s; }
.js .photo-card.is-in .photo-card__cta,  .js .is-in .photo-card .photo-card__cta  { transition-delay: .85s; }

@media (prefers-reduced-motion: no-preference) {
  .photo-card__img img { transition: scale .9s var(--e-out); }
  .photo-card:hover .photo-card__img img { scale: 1.04; }
}

/* лента «Почему мы» */
.why { overflow: hidden; }
.why__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.why__head .section__head { margin-bottom: 0; flex: 1 1 auto; max-width: 900px; }
.why__track {
  display: flex; gap: clamp(14px, 1.6vw, 22px);
  margin-top: clamp(36px, 5vw, 64px);
  padding-inline: max(var(--gut), (100% - var(--maxw)) / 2);
  scroll-padding-inline: max(var(--gut), (100% - var(--maxw)) / 2);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.why__track::-webkit-scrollbar { display: none; }
.why__track > .photo-card { flex: 0 0 clamp(290px, 30vw, 400px); scroll-snap-align: start; }
.why__track .photo-card__title { font-size: clamp(1.7rem, 2.4vw, 2.2rem); }
.why__track .photo-card--center .photo-card__title { font-size: clamp(2.2rem, 3.6vw, 3.1rem); }
/* телефон и планшет: без горизонтального движения — карточки столбиком
   (initWhyScroll на узких экранах пин не включает) */
@media (max-width: 900px) {
  .why:not(.why--pinned) .why__track { flex-direction: column; overflow: visible; scroll-snap-type: none; }
  .why:not(.why--pinned) .why__track > .photo-card { flex: none; aspect-ratio: auto; min-height: clamp(280px, 70vw, 420px); }
}
/* пин-режим (initWhyScroll): лента едет влево, пока страницу листают вниз */
.why--pinned { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--header-h-min) + 16px) 24px; }
.why--pinned .why__track { overflow: visible; scroll-snap-type: none; will-change: transform; margin-top: clamp(20px, 3vh, 40px); }
.why--pinned .why__track .photo-card--center .photo-card__title { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
.why--pinned .why__track > .photo-card { aspect-ratio: auto; height: min(62vh, 520px); flex-basis: min(82vw, calc(min(62vh, 520px) * .8)); }

/* широкий баннер между блоками */
.photo-banner.photo-card {
  aspect-ratio: auto; min-height: clamp(460px, 78vh, 760px);
  padding: clamp(28px, 6vw, 96px) max(var(--gut), (100% - var(--maxw)) / 2);
}
.photo-banner .photo-card__text { max-width: 36ch; }
.photo-banner .photo-card__title { font-size: clamp(2.2rem, 5.2vw, 4.4rem); }
.photo-banner .photo-card__sub { font-size: clamp(1.2rem, 2.2vw, 1.8rem); }
.photo-banner .photo-card__note { font-size: clamp(.95rem, 1.2vw, 1.1rem); }
.photo-banner.photo-card--center .photo-card__title { font-size: clamp(2.4rem, 6vw, 5rem); }
.photo-banner.photo-card--center .photo-card__text { max-width: none; }
@media (max-width: 640px) {
  .photo-banner.photo-card { min-height: 88vh; }
  .photo-banner.photo-card--tr .photo-card__text { margin-left: 0; text-align: left; }
  .photo-banner.photo-card--tr .photo-card__rule { transform-origin: left; }
  .photo-banner.photo-card--tr .photo-card__rule::after { left: auto; right: -2px; }
}

/* --------------------------------------------- бегущая строка (между блоками) */
.marquee { overflow: hidden; border-block: 1px solid var(--hairline); background: var(--paper); }
.marquee__row {
  display: flex; width: max-content; white-space: nowrap;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee__row { animation-play-state: paused; }
.marquee__row span {
  display: inline-flex; align-items: center; gap: 1em;
  padding: 14px clamp(18px, 3vw, 44px);
  font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-700);
}
.marquee__row span::before { content: ""; width: 8px; height: 8px; background: var(--orange); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------- 21. Подвал ---- */
.footer { background: var(--ink); color: var(--on-dark); padding-block: clamp(48px, 8vh, 90px); }
.footer__top { display: flex; flex-wrap: wrap; gap: 30px 60px; justify-content: space-between; align-items: flex-start; }
.footer__brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__logo { display: block; width: auto; height: clamp(30px, 3.4vw, 40px); }
.footer__city { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-muted); }
.footer__cols { display: flex; flex-wrap: wrap; gap: 40px 70px; }
.footer__col h4 { font-size: .72rem; letter-spacing: .16em; color: var(--on-dark-muted); margin-bottom: 12px; }
.footer__col a, .footer__col p { display: block; font-size: .92rem; padding: 3px 0; }
.footer__col a:hover { color: var(--orange-lift); }
.footer__legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; color: var(--on-dark-muted); display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ================================================= ИСТОРИИ — контент-хаб = */
.hub-hero { padding-top: calc(var(--header-h) + clamp(50px, 9vh, 120px)); padding-bottom: clamp(40px, 6vh, 80px); }
.hub-hero .h-1 { max-width: 16ch; }
.hub-hero p { max-width: 60ch; margin-top: 18px; font-weight: 500; }
.hub-hero .voice { margin-top: 14px; font-size: .9rem; color: var(--ink-muted); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filters button {
  padding: 9px 16px; border: 1px solid var(--hairline);
  font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.filters button:hover { border-color: var(--ink-900); }
.filters button[aria-pressed="true"] { background: var(--orange); color: #fff; border-color: var(--orange); }
.filters__hint { width: 100%; font-size: .84rem; color: var(--ink-muted); margin-top: 4px; }

.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hub-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--hairline); background: var(--paper);
  transition: transform .35s var(--e-out), box-shadow .35s var(--e-out), opacity .3s, filter .3s;
}
.hub-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.hub-card__cover { display: block; aspect-ratio: 3 / 2; position: relative; }
.story__cover { display: block; }
.hub-card__rubric {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--orange); color: #fff; padding: 4px 8px;
}
.hub-card__body { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hub-card__title { font-size: 1.08rem; font-weight: 800; line-height: 1.3; text-transform: none; letter-spacing: -.01em; }
.hub-card__meta { margin-top: auto; font-size: .76rem; color: var(--ink-muted); }
.hub-card.is-hidden { display: none; }

.rubric-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 70px; }
.rubric-legend div { border-top: 3px solid var(--orange); padding-top: 12px; }
.rubric-legend h4 { font-size: .95rem; margin-bottom: 6px; text-transform: none; }
.rubric-legend p { font-size: .85rem; color: var(--ink-muted); }

/* ========================================== ИСТОРИИ — страница статьи ==== */
.article__head { padding-top: calc(var(--header-h) + clamp(40px, 7vh, 96px)); }
.article__back {
  display: block; width: fit-content; margin-bottom: 26px;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted);
  transition: color .2s;
}
.article__back:hover { color: var(--orange-deep); }
.article__title {
  max-width: 24ch; margin-top: .6rem;
  font-size: clamp(1.75rem, 3.8vw, 2.9rem); line-height: 1.12; text-transform: none; letter-spacing: -.025em;
}
.article__meta { margin-top: 18px; font-size: .86rem; color: var(--ink-muted); }
.article__cover { margin-block: clamp(32px, 5vw, 56px); aspect-ratio: 21 / 9; }
.article__body { max-width: 68ch; }
.article__body > * + * { margin-top: 1.05em; }
.article__body p, .article__body li { font-size: 1.04rem; line-height: 1.72; color: var(--ink-700); }
.article__body .article__lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.6; font-weight: 500; color: var(--ink-900); }
.article__body h2 {
  margin-top: 2.2em; margin-bottom: -.1em;
  font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.2;
}
.article__body b { color: var(--ink-900); }
.article__list { display: grid; gap: 14px; }
.article__list li { position: relative; padding-left: 26px; }
.article__list li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; background: var(--orange);
}
/* нумерованные шаги/пункты: номер в оранжевом квадрате */
ol.article__list { list-style: none; padding: 0; counter-reset: art; }
ol.article__list li { counter-increment: art; padding-left: 44px; }
ol.article__list li::before {
  content: counter(art, decimal-leading-zero); top: .15em; width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 800; color: #fff; line-height: 1;
}
.article__body .article__note { font-size: .9rem; color: var(--ink-muted); }
.article__cta {
  position: relative; margin-top: 2.6em; padding: clamp(24px, 3vw, 36px);
  background: var(--orange); color: #fff;
}
.article__cta p { color: #fff; font-weight: 600; font-size: 1.08rem; line-height: 1.55; }
.article__cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 20px; }
.article__cta-alt { font-size: .9rem; color: #1a1a1a; }
.article__cta-alt a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.article__cta :focus-visible { outline-color: #fff; }
.article-more { padding-top: clamp(64px, 9vh, 120px); }
.article-more .h-2 { margin: .5rem 0 28px; }
.article-more .hub-grid { grid-template-columns: repeat(2, 1fr); max-width: 860px; }

/* ================================================ ДОКУМЕНТЫ (politika) == */
.hub-hero--doc .h-1 { max-width: 22ch; font-size: clamp(1.7rem, 4.2vw, 3rem); }
.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.doc-nav a {
  padding: 9px 16px; border: 1px solid var(--hairline);
  font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.doc-nav a:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

.legal { max-width: 80ch; }
.legal + .legal { margin-top: clamp(64px, 9vw, 110px); padding-top: clamp(48px, 6vw, 72px); border-top: 1px solid var(--hairline); }
.legal > * + * { margin-top: .85em; }
.legal p, .legal li { font-size: .96rem; line-height: 1.7; color: var(--ink-700); }
.legal b { color: var(--ink-900); }
.legal a { color: var(--orange-deep); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.legal h2 { margin-top: 2.4em; font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.2; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin-top: 1.9em; font-size: 1rem; line-height: 1.35; text-transform: none; letter-spacing: -.01em; }
.legal .legal__title { margin-top: .5rem; margin-bottom: .4em; }
.legal ul { display: grid; gap: 4px; }
.legal ul li { position: relative; padding-left: 22px; }
.legal ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; background: var(--orange); }
.legal ul.legal__abc li { padding-left: 1.4em; }
.legal ul.legal__abc li::before { display: none; }
.legal__purpose { border-left: 4px solid var(--orange); padding: 2px 0 2px 18px; margin-top: 1.4em; }
.legal__purpose h3 { margin-top: 0; margin-bottom: .5em; }
.legal__purpose p + p { margin-top: .35em; }
.legal__card {
  position: relative; background: var(--paper-2); border: 1px solid var(--hairline);
  padding: clamp(20px, 2.6vw, 30px); margin-top: 1.1em;
}
.legal__card::after { content: ""; position: absolute; top: 0; right: 0; width: 16px; height: 16px; background: var(--orange); }
.legal__card p + p { margin-top: .25em; }
.legal .legal__date { margin-top: 2em; font-size: .9rem; color: var(--ink-muted); }

/* =========================================================== АДАПТИВ ==== */
@media (max-width: 1080px) {
  .packages { grid-template-columns: 1fr; max-width: 520px; }
  .pkg--featured { top: 0; }
  .pkg:hover { transform: translateY(-5px); }
  .packages__all-list { grid-template-columns: repeat(3, 1fr); }
  .quiz-wrap { grid-template-columns: 1fr; }
  /* таймлайн в одну колонку: линия у самого края, номер шага правее неё — не пересекаются */
  .timeline { padding-left: 60px; }
  .timeline__rail { left: 8px; }
  .step__no { left: -42px; width: 42px; }
}

@media (max-width: 900px) {
  /* наверху страницы: логотип, под ним разделы строкой.
     начали листать (.is-scrolled): компактная шапка с бургером и боковым меню */
  :root { --header-h: 60px; --header-h-min: 60px; }
  [id] { scroll-margin-top: 72px; }
  .header, .header.is-scrolled {
    display: block !important;
    height: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .header__inner { display: block; width: 0; margin: 0; }
  .header .logo, .header .nav, .header__phone, .header__msgr, .header__inner .btn { display: none !important; }
  .header__actions { display: block; }
  .burger {
    display: flex;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 101;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.16);
  }
  .page-dark .burger { background: var(--bg-dark); }
  .mobile-nav {
    width: min(78vw, 320px);
    transform: translateX(100%);
    visibility: hidden;
  }
  .mobile-nav.open {
    transform: translateX(0);
    visibility: visible;
  }
  .hero__content { max-width: 100%; }
  /* размытие под фиксированной шапкой пересчитывается в каждом кадре прокрутки — на телефоне без него */
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) {
  .nav a { font-size: .62rem; letter-spacing: .02em; }
}

@media (max-width: 760px) {
  .stories, .hub-grid, .rubric-legend { grid-template-columns: 1fr; }
  .packages__notes, .packages__all-list, .article-more .hub-grid { grid-template-columns: 1fr; }
  .article__cover { aspect-ratio: 4 / 3; }

  /* карусели с квадратными точками */
  .carousel {
    display: flex; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut);
    scrollbar-width: none;
  }
  .carousel::-webkit-scrollbar { display: none; }
  .carousel > * { flex: 0 0 82%; scroll-snap-align: start; }
  .dots.dots--on { display: flex; }

  .turnkey__num { font-size: clamp(2.4rem, 13vw, 3.6rem); }
  .bricks .brick-item { flex-basis: 100% !important; }
  /* линия у самого края (3px), номер правее неё (12…~32px), текст с 44px */
  .timeline { padding-left: 44px; }
  .timeline__rail { left: 3px; }
  .step__no { left: -32px; width: 32px; font-size: .82rem; }
  .footer__top { flex-direction: column; }
  .footer__cols { gap: 26px 40px; }
  .quiz-copy .h-1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
}

@media (max-width: 460px) {
  .reviews__slots .slot { min-width: 0; flex: 1 1 100%; }
}

/* ================================================= REDUCED MOTION ======= */
/* ============ Главная: тёмная премиальная основа (body.page-dark) ============
   Один графит для тёмных глав, один тёплый светлый (--paper-2) для «рабочих»
   блоков (пакеты, квиз, FAQ), оранжевый — акцент и финальный призыв. */
.page-dark { background: var(--bg-dark); }
.page-dark .section--dark,
.page-dark .cta-band--dark,
.page-dark .footer { background: var(--bg-dark); }
/* соседние тёмные секции разделяем тонкой линией, а не сменой тона */
.page-dark .section--dark + .section--dark,
.page-dark .section--dark + .cta-band--dark { border-top: 1px solid var(--line-dark); }

/* шапка */
.page-dark .header { background: rgba(24,22,20,.88); }
.page-dark .header.is-scrolled { background: rgba(24,22,20,.95); border-bottom-color: var(--line-dark); }
.page-dark .nav a { color: var(--on-dark-muted); }
.page-dark .nav a:hover,
.page-dark .nav a[aria-current="true"] { color: #fff; }
.page-dark .header__phone { color: #fff; }
.page-dark .header__phone:hover { color: var(--orange-lift); }
.page-dark .header__msgr a { border-color: var(--line-dark); color: #fff; }
.page-dark .header__msgr a:hover { background: var(--orange); border-color: var(--orange); }
.page-dark .burger span { background: #fff; }
.page-dark .mobile-nav { background: var(--bg-dark); border-left: 1px solid var(--line-dark); }

/* бегущая строка — белая полоса-разделитель между оранжевым и графитом */
.page-dark .marquee { background: #fff; border-color: #fff; }
.page-dark .marquee__row span { color: var(--ink-900); }

/* «Под ключ» на тёмном */
.page-dark .brickfield { opacity: .2; }   /* на графите серые швы заметнее — приглушаем */
.page-dark #calc .brickfield { opacity: .06; }   /* в расчёте стена тише — не спорит с квизом */
.page-dark #turnkey .turnkey__intro { color: var(--on-dark); }
.page-dark #turnkey .turnkey__intro b { color: #fff; }
.page-dark #turnkey .turnkey__note { color: var(--on-dark-muted); }
.page-dark .brick-item { background: var(--bg-raised); border: 1px solid var(--line-dark); }

/* истории на тёмном */
.page-dark .section--dark .story { background: var(--bg-raised); border-color: var(--line-dark); color: var(--on-dark); }
.page-dark .section--dark .story:hover { box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); }
.page-dark .section--dark .story__meta { color: var(--on-dark-muted); }
.page-dark .section--dark .duo { background: var(--bg-raised); }

/* пакеты, квиз и FAQ — тоже на графите: карточки --bg-raised, рамки --line-dark */
.page-dark .section--dark .pkg,
.page-dark .section--dark .quiz { background: var(--bg-raised); border-color: var(--line-dark); color: var(--on-dark); }
.page-dark .section--dark .pkg--featured { border-color: rgba(255,74,0,.35); }   /* яркость даёт бегущий огонёк */
.page-dark .section--dark .pkg__level i:not(.on) { border-color: rgba(255,255,255,.2); }
.page-dark .section--dark .pkg:hover,
.page-dark .section--dark .pkg--featured,
.page-dark .section--dark .quiz { box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); }
.page-dark .section--dark .pkg__desc,
.page-dark .section--dark .pkg__works li,
.page-dark .section--dark .pkg__price-note,
.page-dark .section--dark .pkg__works-title,
.page-dark .section--dark .packages__notes p,
.page-dark .section--dark .packages__all-list li,
.page-dark .section--dark .quiz__done p,
.page-dark .section--dark .quiz__consent,
.page-dark .section--dark .faq__a { color: var(--on-dark-muted); }
.page-dark .section--dark .pkg__price { color: var(--orange); }
.page-dark .section--dark .pkg__works { border-color: var(--line-dark); }
.page-dark .section--dark .packages__notes b,
.page-dark .section--dark .packages__all-list b { color: #fff; }
.page-dark .section--dark .packages__cta p { color: var(--on-dark); }
.page-dark .section--dark .quiz__progress span:not(.done) { background: rgba(255,255,255,.12); }
.page-dark .section--dark .quiz__q b,
.page-dark .section--dark .quiz__back { color: var(--on-dark-muted); }
.page-dark .section--dark .quiz__back:hover { color: #fff; }
.page-dark .section--dark .quiz__opt { border-color: var(--line-dark); }
.page-dark .section--dark .quiz__opt:hover { border-color: rgba(255,255,255,.5); }
.page-dark .section--dark .quiz__opt.sel { border-color: var(--orange); background: rgba(255,74,0,.14); }
.page-dark .section--dark .quiz__field input { background: var(--bg-dark); border-color: var(--line-dark); color: #fff; }
.page-dark .section--dark .quiz__field input:focus { background: var(--bg-dark); border-color: var(--orange); }
.page-dark .section--dark .quiz__field input::placeholder { color: rgba(255,255,255,.4); }
.page-dark .section--dark .faq,
.page-dark .section--dark .faq__item { border-color: var(--line-dark); }
.page-dark #calc + #faq { padding-top: 0; border-top: 0; } /* квиз и FAQ — одно полотно */
.page-dark #calc + #stories { border-top: 0; }   /* расчёт и истории — без стыка */

/* сенсорные экраны: «огонёк» на рамке «Комфорта» перерисовывается каждый кадр — вместо него сплошная рамка */
@media (hover: none) {
  .pkg--featured::before { display: none; }
  .page-dark .section--dark .pkg--featured { border-color: var(--orange); }
}
/* телефон (после правил .page-dark и базовых анимаций, чтобы перекрыть их) */
@media (max-width: 900px) {
  /* На телефоне прорисовка кирпичиков в блоке расчёта должна оставаться заметной. */
  .page-dark #calc .brickfield { opacity: .15; }
  /* тёмная шапка — сплошная: без размытия сквозь полупрозрачный фон просвечивал контент */
  .page-dark .header,
  .page-dark .header.is-scrolled { background: var(--bg-dark); }

  /* спокойные появления: короче сдвиг, без въезда сбоку */
  .js .reveal { transform: translateY(12px); }
  .js .step.reveal { transform: translateY(12px); }
  .js .photo-card .photo-card__text > * { transform: translateY(10px); }
  /* таймлайн без «мигания» шагов при скролле: не приглушаем неактивные и не сдвигаем заголовок */
  .timeline.focusing .step:not(.is-active) { opacity: 1; }
  .step.is-active h3 { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal,
  .js .hero__line > span,
  .js .hero__sub,
  .js .hero__cta,
  .js .hero__scrolltip,
  .js .hero__media img,
  .js .rw > span,
  .js .step.reveal,
  .js .photo-card .photo-card__text > * { opacity: 1 !important; transform: none !important; }
  .hero__blinds { display: none !important; }
  .brick::before,
  .timeline__fill,
  .js .reveal .kicker::before,
  .js .packages__all.reveal li::before { transform: none !important; }
  .pkg--featured::before { display: none; }
  .page-dark .section--dark .pkg--featured { border-color: var(--orange); }
  .js .clip-hidden { clip-path: none !important; }
  .js .clip-hidden img { transform: none !important; }
  .marquee__row { animation: none !important; }
  .brickfield { opacity: .35; }
  .preloader { display: none !important; }
  .exit-popup__card { transform: none !important; }
  .exit-popup__close:hover { transform: none !important; }
}

@media print {
  .header, .preloader, .mobile-nav, .scrim, .hero__scrolltip, .exit-popup, .cookie-notice { display: none !important; }
  * { color: #000 !important; background: #fff !important; }
}


.article__cover picture { display:block; }
.article__cover img { display:block; width:100%; max-height: min(74vh, 820px); object-fit:cover; border-radius: 18px; }
.history-photo { margin: 2.5rem 0; }
.history-photo picture { display:block; }
.history-photo img { display:block; width:100%; max-height:680px; object-fit:cover; border-radius:16px; }
.history-photo figcaption { margin-top:.65rem; color:#777; font-size:.9rem; }
.history-gallery, .history-videos { margin:3rem 0; }
.history-gallery__grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.history-gallery__grid a { display:block; overflow:hidden; border-radius:14px; background:#eee; }
.history-gallery__grid picture { display:block; width:100%; }
.history-gallery__grid img { display:block; width:100%; aspect-ratio:4/5; object-fit:cover; transition:transform .35s ease; }
.history-gallery__grid a:hover img { transform:scale(1.035); }
.history-videos__header { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; }
.history-videos__header h2 { margin:0; }
.history-videos__controls { display:flex; gap:8px; flex:none; }
.history-videos__arrow {
  display:grid; place-items:center; width:42px; height:42px; padding:0;
  border:1px solid var(--hairline); background:var(--paper); color:var(--ink-900);
  font-size:1.3rem; line-height:1; cursor:pointer;
  transition:background .2s ease, color .2s ease, opacity .2s ease;
}
.history-videos__arrow:hover:not(:disabled) { background:var(--orange); color:#fff; }
.history-videos__arrow:disabled { opacity:.35; cursor:default; }
.history-videos__arrow:focus-visible,
.history-video-card__preview:focus-visible,
.history-videos__grid:focus-visible { outline:3px solid var(--orange); outline-offset:3px; }
.history-videos__grid {
  display:flex; gap:18px; overflow-x:auto; overscroll-behavior-inline:contain;
  scroll-snap-type:x mandatory; scroll-padding-inline:2px; scrollbar-width:thin;
  padding:2px 2px 12px;
}
@media (min-width:701px) {
  .history-videos__grid { scrollbar-width:none; }
  .history-videos__grid::-webkit-scrollbar { display:none; }
}
.history-video-card { flex:0 0 clamp(300px, 42vw, 500px); min-width:0; scroll-snap-align:start; }
.history-video-card__preview {
  position:relative; display:block; width:100%; aspect-ratio:16/9; overflow:hidden;
  padding:0; border:0; border-radius:14px; background:#111; color:#fff; cursor:pointer;
}
.history-video-card__preview picture { display:block; width:100%; height:100%; }
.history-video-card__preview img {
  display:block; width:100%; height:100%; object-fit:contain; background:#111;
  transition:transform .4s ease;
}
.history-video-card__preview:hover img { transform:scale(1.025); }
.history-video-card__play {
  position:absolute; left:50%; top:50%; display:grid; place-items:center;
  width:64px; height:64px; border:1px solid rgba(255,255,255,.85); border-radius:50%;
  background:rgba(255,74,0,.94); box-shadow:0 8px 28px rgba(0,0,0,.35);
  transform:translate(-50%,-50%); transition:transform .2s ease, background .2s ease;
}
.history-video-card__preview:hover .history-video-card__play { background:var(--orange); transform:translate(-50%,-50%) scale(1.08); }
.history-video-card__play svg { width:29px; height:29px; fill:currentColor; margin-left:3px; }
.history-video-card__label { margin:10px 0 0; color:var(--ink-muted); font-size:.9rem; }
.history-video-card__player { display:block; width:100%; aspect-ratio:16/9; border:0; border-radius:14px; background:#111; object-fit:contain; }
@media(max-width:700px) {
  .history-gallery__grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .history-videos__grid { gap:12px; scroll-snap-type:x mandatory; }
  .history-video-card { flex-basis:84%; }
  .history-videos__arrow { width:38px; height:38px; }
  .history-video-card__play { width:56px; height:56px; }
}
@media(prefers-reduced-motion:reduce) {
  .history-videos__grid { scroll-behavior:auto; }
  .history-video-card__preview img,
  .history-video-card__play,
  .history-videos__arrow { transition:none; }
}
