/* =========================================================
   ПотолокПро — натяжные потолки в Ижевске
   Дизайн-система «Свет сверху»

   Принципы:
   · тёмный оникс-холст чередуется с тёплой бумагой
   · ОДИН акцент — янтарный свет лампы
   · плоские поверхности, разделение значением, без теней
   · крупная типографика с тугим отрицательным трекингом
   · все интерактивные элементы — пилюли
   ========================================================= */

/* ---------- Токены ---------- */
:root {
  /* Поверхности */
  --ink:        #07080c;   /* холст */
  --ink-2:      #0e1017;   /* карточка на тёмном */
  --ink-3:      #171a24;   /* второй уровень */
  --paper:      #f2eee6;   /* тёплая бумага */
  --paper-2:    #e7e1d5;   /* бумага на тон глубже */

  /* Текст */
  --ivory:      #edeef2;   /* основной на тёмном */
  --ash:        #9195a3;   /* приглушённый на тёмном */
  --graphite:   #0a0b10;   /* основной на бумаге */
  --stone:      #6d6a62;   /* приглушённый на бумаге */

  /* Акцент — единственный цвет в системе */
  --amber:      #e9a13b;
  --amber-deep: #c8811d;  /* заливка: ховер акцентной кнопки */
  --amber-ink:  #955c0a;  /* текст янтарём на бумаге — контраст 4.76:1 */
  --on-amber:   #1a1205;

  /* Границы */
  --line-dark:  rgba(237,238,242,.14);
  --line-light: #d7d0c2;

  --err:        #e5604d;
  --ok:         #4ea87a;

  /* Типографика */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --t-hero:    clamp(42px, 11vw, 168px);
  --t-display: clamp(34px, 7vw, 96px);
  --t-h2:      clamp(30px, 5.2vw, 68px);
  --t-h3:      clamp(20px, 2.2vw, 26px);
  --t-body:    17px;

  /* Ритм */
  --shell:     1280px;
  --band:      clamp(72px, 9vw, 136px);
  --gutter:    clamp(20px, 4vw, 40px);

  --r-pill:    999px;
  --r-card:    14px;

  --header-h:  72px;
  --ease:      cubic-bezier(.22,.61,.36,1);
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ivory);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--amber); color: var(--on-amber); }

/* ---------- Раскладка ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.band { padding-block: var(--band); }
.band--ink   { background: var(--ink);   color: var(--ivory); }
.band--paper { background: var(--paper); color: var(--graphite); }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 18px;
}
.eyebrow--ink { color: var(--stone); }

.h2 {
  font-size: var(--t-h2);
  letter-spacing: -.04em;
}
.h2 .slash { color: var(--amber); padding-inline: .06em; }

.sec__head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 420px);
  gap: 40px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-dark);
}
.sec__head--ink { border-bottom-color: var(--line-light); }
.sec__sub { color: var(--ash); font-size: 16px; }
.sec__head--ink .sec__sub { color: var(--stone); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: background .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--accent  { background: var(--amber); color: var(--on-amber); }
.btn--accent:hover { background: var(--amber-deep); }

.btn--dark    { background: var(--graphite); color: var(--paper); }
.btn--dark:hover { background: #24262f; }

.btn--ghost   { background: transparent; color: var(--ivory); border-color: var(--line-dark); }
.btn--ghost:hover { border-color: var(--ivory); }

.btn--outline { background: transparent; color: var(--ivory); border-color: var(--line-dark); }
.btn--outline:hover { background: rgba(237,238,242,.07); border-color: var(--ivory); }

.btn--sm  { min-height: 40px; padding: 9px 20px; font-size: 14px; }
.btn--lg  { min-height: 56px; padding: 16px 34px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 20px;
  border: 1px solid var(--line-light);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  transition: background .22s var(--ease), color .22s var(--ease);
}
.pill:hover { background: var(--graphite); color: var(--paper); }

/* ---------- Индикатор прокрутки ---------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 90;
  background: transparent;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--amber);
  transition: width .1s linear;
}

/* ---------- Шапка ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(7,8,12,.86);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-dark);
}
/* На светлых полосах шапка инвертируется */
.header.is-light.is-stuck {
  background: rgba(242,238,230,.9);
  border-bottom-color: var(--line-light);
  color: var(--graphite);
}
.header.is-light.is-stuck .logo__text,
.header.is-light.is-stuck .nav__link,
.header.is-light.is-stuck .header__phone { color: var(--graphite); }
.header.is-light.is-stuck .burger span { background: var(--graphite); }

.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(233,161,59,.18);
}
.logo__text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ivory);
}
.logo__text em { font-style: normal; color: var(--amber); }

.nav { margin-inline: auto; }
.nav__list { display: flex; gap: 6px; }
.nav__link {
  display: block;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--ivory);
  opacity: .72;
  transition: opacity .2s, background .2s;
}
.nav__link:hover, .nav__link.is-active { opacity: 1; background: rgba(237,238,242,.08); }
.header.is-light.is-stuck .nav__link:hover,
.header.is-light.is-stuck .nav__link.is-active { background: rgba(10,11,16,.07); }

.nav__footer { display: none; }

.header__phone {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ivory);
  white-space: nowrap;
}

.burger {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-pill);
  background: transparent;
  position: relative;
}
.burger span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: var(--ivory);
  transition: transform .25s var(--ease), opacity .2s;
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 24px; }
.burger.is-open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* ---------- Главный экран ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  overflow: hidden;
  background: var(--ink);
}

/* Свет лампы, следующий за курсором — главный «вау»-приём */
.hero__lamp {
  position: absolute;
  top: 0; left: 0;
  width: 1100px; height: 1100px;
  margin: -550px 0 0 -550px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
              rgba(233,161,59,.30) 0%,
              rgba(233,161,59,.13) 38%,
              rgba(233,161,59,.04) 62%,
              transparent 78%);
  transform: translate3d(50vw, 42vh, 0);
  transition: transform .9s var(--ease);
  pointer-events: none;
  will-change: transform;
}

/* Сетка «плит перекрытия» */
.hero__grid {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(120% 90% at 50% 20%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 20%, #000 20%, transparent 78%);
  opacity: .55;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 56px;
}

.hero__eyebrow { margin-bottom: 26px; }

.hero__title {
  font-size: var(--t-hero);
  line-height: .87;
  letter-spacing: -.055em;
  margin-bottom: clamp(32px, 5vw, 64px);
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .word {
  display: block;
  transform: translateY(105%);
  animation: rise .95s var(--ease) forwards;
}
.hero__title .line:nth-child(2) .word { animation-delay: .1s; }
.hero__title .line:nth-child(3) .word { animation-delay: .2s; }
.hero__title .line--accent { color: var(--amber); }

@keyframes rise { to { transform: translateY(0); } }

.hero__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: end;
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
}
.hero__lead { max-width: 460px; color: var(--ash); font-size: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Манифест ---------- */
.manifest { max-width: 1000px; }
.manifest__text {
  font-size: clamp(26px, 3.7vw, 54px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.04em;
  color: var(--graphite);
  margin-bottom: 32px;
}
.manifest__text em { font-style: normal; color: var(--amber-ink); }
.manifest__note {
  max-width: 560px;
  color: var(--stone);
  font-size: 17px;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.manifest__facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line-light);
}
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact__num {
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
}
.fact__label { font-size: 14px; color: var(--stone); }

/* ---------- Лента видов потолков ---------- */
.rail { position: relative; background: var(--ink); }
.rail__pin {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(48px, 5vw, 72px);
  overflow: hidden;
}

.rail__head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 380px);
  gap: 40px;
  align-items: end;
  margin-bottom: 32px;
}
.rail__head .h2 { line-height: .95; }
.rail__hint { color: var(--ash); font-size: 15px; }

.rail__viewport { overflow: hidden; }
.rail__track {
  display: flex;
  gap: 24px;
  padding-inline: max(var(--gutter), calc((100vw - var(--shell)) / 2 + var(--gutter)));
  will-change: transform;
}

.tile {
  flex: 0 0 380px;
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-card);
  overflow: hidden;
}
.tile--featured { border-color: var(--amber); }

.tile__art { height: 128px; position: relative; }
.tile__art::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: repeating-linear-gradient(118deg, rgba(255,255,255,.10) 0 1px, transparent 1px 46px);
}
.tile__art--matte  { background: linear-gradient(145deg, #3a3f49, #737b88); }
.tile__art--gloss  { background: linear-gradient(145deg, #12243f, #4d86c8 55%, #b9d8f7); }
.tile__art--satin  { background: linear-gradient(145deg, #3c3546, #8d82a3); }
.tile__art--fabric { background: linear-gradient(145deg, #4a4335, #a3937a); }
.tile__art--multi  { background: linear-gradient(145deg, #101b31, #2f5f9e 60%, var(--amber)); }
.tile__art--print  { background: linear-gradient(145deg, #060b1a, #24356b 45%, #6b52a8); }

.tile__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.tile__idx {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--ash);
  margin-bottom: 14px;
}
.tile__title { font-size: var(--t-h3); margin-bottom: 6px; }
.tile__price {
  font-size: 15px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 14px;
}
.tile__price span { color: var(--ash); font-weight: 500; }
.tile__text { font-size: 15px; color: var(--ash); margin-bottom: 18px; }

.tile__list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; flex: 1; }
.tile__list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ivory);
}
.tile__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 1px;
  background: var(--amber);
}

.rail__foot {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
.rail__bar {
  flex: 1;
  height: 2px;
  background: var(--line-dark);
  border-radius: 2px;
  overflow: hidden;
}
.rail__bar span {
  display: block;
  height: 100%;
  width: 16%;
  background: var(--amber);
  transition: width .15s linear, transform .15s linear;
}
.rail__count { font-size: 13px; color: var(--ash); font-variant-numeric: tabular-nums; }
.rail__count b { color: var(--ivory); }

/* Лента без привязки к прокрутке: мобильные, короткие экраны,
   отключённая анимация. Задаётся классом is-flat из скрипта. */
.rail.is-flat .rail__pin { position: static; min-height: 0; }
.rail.is-flat .rail__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
}
.rail.is-flat .rail__viewport::-webkit-scrollbar { display: none; }
.rail.is-flat .rail__track { transform: none !important; padding-inline: var(--gutter); }
.rail.is-flat .tile { scroll-snap-align: center; }
.rail.is-flat .rail__foot { display: none; }

/* ---------- Было / стало ---------- */
.ba { position: relative; }
.ba__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--line-dark);
  touch-action: pan-y;
}
.ba__layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }

/* Слои одинакового размера, левый обрезается clip-path — поэтому фон
   не деформируется и половины совпадают пиксель в пиксель.
   (width: 50% пересчитывал бы background под новую ширину, и кадры разъезжались.)

   Блок сейчас отключён в index.html — ждёт реальную пару снимков.
   Положите assets/img/before.jpg и after.jpg, снятые со штатива с одной точки. */
.ba__layer--after,
.ba__layer--before {
  background-size: cover;
  background-position: center;
}
.ba__layer--after  { background-image: url('../assets/img/after.jpg'); }
.ba__layer--before {
  background-image: url('../assets/img/before.jpg');
  clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
}

.ba__tag {
  position: absolute;
  top: 18px;
  z-index: 3;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ba__tag--before { left: 18px; background: rgba(10,11,16,.72); color: var(--ivory); }
.ba__tag--after  { right: 18px; background: var(--amber); color: var(--on-amber); }

.ba__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--ivory);
  transform: translateX(-1px);
  z-index: 4;
  pointer-events: none;
}
.ba__grip {
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: var(--ivory);
  display: grid;
  place-items: center;
}
.ba__grip::before, .ba__grip::after {
  content: '';
  position: absolute;
  width: 0; height: 0;
  border-block: 6px solid transparent;
}
.ba__grip::before { border-right: 8px solid var(--graphite); left: 14px; }
.ba__grip::after  { border-left: 8px solid var(--graphite); right: 14px; }

/* Ползунок — невидимый, но полностью доступный с клавиатуры */
.ba__range {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  z-index: 5;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.ba__range:focus-visible + .ba__handle,
.ba__range:focus-visible ~ .ba__handle { outline: 2px solid var(--amber); outline-offset: 4px; }

/* ---------- Калькулятор ---------- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 24px;
  align-items: start;
}
.calc__form {
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: var(--r-card);
  padding: clamp(22px, 3vw, 36px);
}
.calc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.calc__out {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background: var(--ink);
  color: var(--ivory);
  border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 36px);
}
.calc__total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--amber);
  margin-bottom: 26px;
  font-variant-numeric: tabular-nums;
}
.calc__total i { font-style: normal; font-size: .45em; color: var(--ash); }

.calc__rows { display: flex; flex-direction: column; margin-bottom: 20px; }
.calc__rows li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 11px;
  border-bottom: 1px solid var(--line-dark);
  font-size: 14px;
  color: var(--ash);
}
.calc__rows li span:last-child { color: var(--ivory); font-weight: 600; white-space: nowrap; }

.calc__area {
  font-size: 14px;
  color: var(--ash);
  padding: 12px 16px;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-pill);
  margin-bottom: 20px;
  text-align: center;
}
.calc__area b { color: var(--ivory); }
.calc__note { font-size: 12px; color: var(--ash); margin-top: 14px; text-align: center; }

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; margin-bottom: 18px; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
  color: inherit;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--line-light);
  border-radius: var(--r-pill);
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { border-radius: 20px; resize: vertical; min-height: 88px; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d6a62' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px;
  padding-right: 46px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(233,161,59,.18);
}
.field input.is-invalid, .field textarea.is-invalid { border-color: var(--err); }

.field__hint { font-size: 12px; color: var(--stone); margin-top: 7px; padding-left: 18px; }
.field__error { font-size: 12px; color: var(--err); margin-top: 7px; padding-left: 18px; }

/* Формы на тёмном фоне */
.modal .field input, .modal .field textarea { border-color: var(--line-dark); }
.modal .field__hint { color: var(--ash); }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 12px;
  color: var(--stone);
  cursor: pointer;
}
.modal .consent { color: var(--ash); }
.consent input { margin-top: 2px; accent-color: var(--amber); width: 16px; height: 16px; }

.field--check { margin-bottom: 0; padding-top: 14px; border-top: 1px solid var(--line-light); }
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-block: 9px;
  font-size: 14px;
  cursor: pointer;
}
.check input { margin-top: 3px; accent-color: var(--amber); width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Работы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip {
  min-height: 42px;
  padding: 9px 20px;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--ash);
  transition: all .22s var(--ease);
}
.chip:hover { color: var(--ivory); border-color: var(--ivory); }
.chip.is-active { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }

.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.work {
  position: relative;
  min-height: 300px;
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  transition: transform .35s var(--ease);
}
.work:hover { transform: translateY(-5px); }
.work.is-hidden { display: none; }
.work--tall { grid-row: span 2; min-height: 620px; }

.work__img {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.work:hover .work__img { transform: scale(1.05); }

.work::after {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(to top, rgba(4,5,8,.92) 0%, rgba(4,5,8,.34) 52%, rgba(4,5,8,.08) 100%);
}
.work__cap { position: relative; z-index: 2; padding: 24px; }
.work__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}
.work__cap h3 { font-size: 19px; letter-spacing: -.02em; margin-bottom: 5px; color: #fff; }
.work__cap p { font-size: 13px; color: rgba(237,238,242,.7); }

/* ---------- Этапы ---------- */
.steps { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); }

.steps__aside { position: sticky; top: calc(var(--header-h) + 48px); align-self: start; }
.steps__big {
  font-size: clamp(90px, 13vw, 180px);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.06em;
  color: var(--amber-ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}
.steps__now {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--graphite);
  margin-bottom: 14px;
  min-height: 2em;
}
.steps__hint { font-size: 15px; color: var(--stone); max-width: 300px; }

.steps__list { display: flex; flex-direction: column; }
.step {
  padding-block: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line-light);
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 16px;
  align-items: start;
  opacity: .42;
  transition: opacity .4s var(--ease);
}
.step:last-child { border-bottom: 1px solid var(--line-light); }
.step.is-active { opacity: 1; }
.step__n {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--stone);
  padding-top: 5px;
}
.step.is-active .step__n { color: var(--amber-ink); }
/* Обе текстовые строки держим во второй колонке — иначе автораскладка
   грида уронит абзац под номер, в 62-пиксельную колонку. */
.step h3, .step p { grid-column: 2; }
.step h3 { font-size: var(--t-h3); color: var(--graphite); margin-bottom: 8px; }
.step p { font-size: 16px; color: var(--stone); max-width: 560px; }

/* ---------- Призыв ---------- */
.cta { background: var(--amber); color: var(--on-amber); padding-block: var(--band); }
.cta__inner {
  display: grid;
  grid-template-columns: 1fr minmax(0, 420px);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}
.cta__title {
  font-size: var(--t-display);
  line-height: .86;
  letter-spacing: -.055em;
}
.cta__text { font-size: 17px; margin-bottom: 26px; color: rgba(26,18,5,.78); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line-dark); }
.faq__item { border-bottom: 1px solid var(--line-dark); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
  background: none;
  border: 0;
  text-align: left;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ivory);
  transition: color .2s;
}
.faq__q:hover { color: var(--amber); }
.faq__icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq__icon::before, .faq__icon::after {
  content: '';
  position: absolute;
  background: var(--amber);
  transition: transform .3s var(--ease), opacity .3s;
}
.faq__icon::before { top: 7.5px; left: 0; width: 16px; height: 1.5px; }
.faq__icon::after  { left: 7.5px; top: 0; width: 1.5px; height: 16px; }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: rotate(90deg); opacity: 0; }

.faq__a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq__a p { padding-bottom: 26px; max-width: 700px; color: var(--ash); font-size: 16px; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 24px; align-items: start; }

.row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
  padding-block: 18px;
  border-bottom: 1px solid var(--line-light);
}
.row:first-child { border-top: 1px solid var(--line-light); }
.row__k { font-size: 13px; color: var(--stone); }
.row__v { font-size: clamp(16px, 1.8vw, 20px); font-weight: 600; letter-spacing: -.02em; }
.row__v--link:hover { color: var(--amber-ink); }

.contacts__soc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.map {
  margin-top: 26px;
  min-height: 260px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: var(--r-card);
  border: 1px dashed var(--line-light);
  background: repeating-linear-gradient(45deg, var(--paper) 0 14px, var(--paper-2) 14px 28px);
  color: var(--stone);
  padding: 24px;
}
.map p { font-weight: 700; color: var(--graphite); margin-bottom: 4px; }
.map span { font-size: 14px; }

.contacts__form {
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 36px);
}
.contacts__title { font-size: var(--t-h3); margin-bottom: 22px; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: var(--ash); padding-top: clamp(56px, 7vw, 96px); overflow: hidden; }

.footer__top {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 56px;
}
.footer__col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 18px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 15px; color: var(--ivory); opacity: .8; transition: opacity .2s, color .2s; }
.footer__col a:hover { opacity: 1; color: var(--amber); }
.footer__col--wide { display: flex; flex-direction: column; align-items: flex-start; }
.footer__phone {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--ivory);
  opacity: 1;
  margin-bottom: 8px;
}
.footer__hours { font-size: 14px; margin-bottom: 20px; }

/* Огромный вордмарк — «терминал» страницы */
.footer__mark {
  font-size: clamp(48px, 15.5vw, 260px);
  font-weight: 800;
  line-height: .78;
  letter-spacing: -.055em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-dark);
  white-space: nowrap;
  user-select: none;
  margin-bottom: 24px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-block: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 13px;
}
.footer__bottom a:hover { color: var(--amber); }

/* ---------- Плавающие кнопки ---------- */
.fab {
  position: fixed;
  right: 20px;
  z-index: 70;
  width: 52px; height: 52px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 14px;
  transition: transform .2s var(--ease), opacity .25s, visibility .25s;
}
.fab:hover { transform: scale(1.07); }
.fab--call { bottom: 20px; background: var(--amber); color: var(--on-amber); }
.fab--call svg { fill: currentColor; }
.fab--top {
  bottom: 84px;
  background: var(--ink-3);
  color: var(--ivory);
  border: 1px solid var(--line-dark);
  opacity: 0;
  visibility: hidden;
}
.fab--top.is-visible { opacity: 1; visibility: visible; }

/* ---------- Модальное окно ---------- */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(4,5,8,.78);
  backdrop-filter: blur(6px);
  animation: fade .25s var(--ease);
}
.modal__box {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 40px);
  animation: pop .35s var(--ease);
}
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  padding: 11px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  background: transparent;
  color: var(--ash);
  transition: color .2s, border-color .2s;
}
.modal__close:hover { color: var(--ivory); border-color: var(--ivory); }
.modal__title { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.045em; margin-bottom: 8px; }
.modal__sub { font-size: 15px; color: var(--ash); margin-bottom: 26px; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ---------- Уведомление ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 160%);
  z-index: 120;
  max-width: calc(100% - 32px);
  padding: 15px 26px;
  border-radius: var(--r-pill);
  background: var(--ivory);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: transform .4s var(--ease);
}
.toast.is-visible { transform: translate(-50%, 0); }
.toast.is-error { background: var(--err); color: #fff; }

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

/* =========================================================
   Адаптив
   ========================================================= */

@media (max-width: 1100px) {
  .header__phone { display: none; }
  .nav__list { gap: 2px; }
  .nav__link { padding: 8px 12px; font-size: 13px; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .work--tall { grid-row: span 1; min-height: 300px; }
}

@media (max-width: 980px) {
  :root { --header-h: 64px; }

  .burger { display: block; }
  .header__cta { display: none; }
  .header.is-stuck { background: rgba(7,8,12,.94); backdrop-filter: none; }
  .header.is-light.is-stuck { background: var(--paper); }

  /* backdrop-filter создаёт containing block для position: fixed внутри шапки —
     из-за этого выпадающее меню схлопывается. На мобильных фильтр не нужен. */
  .nav {
    position: fixed;
    top: var(--header-h); right: 0; bottom: 0; left: 0;
    margin: 0;
    padding: 28px var(--gutter) 40px;
    background: var(--ink);
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .nav.is-open { transform: none; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link {
    padding: 18px 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.035em;
    border-radius: 0;
    border-bottom: 1px solid var(--line-dark);
    opacity: 1;
    color: var(--ivory);
  }
  .nav__link:hover, .nav__link.is-active { background: none; color: var(--amber); }

  .nav__footer { display: block; margin-top: auto; padding-top: 32px; }
  .nav__phone { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.04em; color: var(--ivory); }
  .nav__hours { display: block; font-size: 14px; color: var(--ash); margin-bottom: 20px; }

  .sec__head, .rail__head, .hero__bottom, .cta__inner { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .manifest__facts { grid-template-columns: repeat(2, 1fr); gap: 28px; }

  /* Лента превращается в обычную ленту со свайпом — без привязки к прокрутке */
  .rail__pin { position: static; min-height: 0; }
  .rail__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
  }
  .rail__viewport::-webkit-scrollbar { display: none; }
  .rail__track { transform: none !important; padding-inline: var(--gutter); }
  .tile { flex-basis: min(330px, 78vw); scroll-snap-align: center; }
  .rail__foot { display: none; }

  .calc, .contacts { grid-template-columns: 1fr; }
  .calc__out { position: static; }

  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps__aside { position: static; }
  .steps__big { font-size: clamp(64px, 18vw, 110px); }
  .steps__now { min-height: 0; }
  .step { opacity: 1; }

  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__col--wide { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero { min-height: 92svh; }
  .hero__actions .btn { width: 100%; }
  .hero__title { letter-spacing: -.04em; }

  .works { grid-template-columns: 1fr; }
  .calc__row { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 4px; }

  .ba__frame { aspect-ratio: 4 / 3; }
  .ba__grip { width: 46px; height: 46px; margin: -23px 0 0 -23px; }

  .cta__inner .btn { width: 100%; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; }

  .fab { right: 14px; width: 48px; height: 48px; }
  .fab--call { bottom: 14px; }
  .fab--top { bottom: 72px; }
}

/* ---------- Уважение к настройкам движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__title .word { transform: none; }
  .hero__lamp { display: none; }
  .step { opacity: 1; }
}
