/* ==========================================================================
   «Ровный угол» — демо-сайт бригады по ремонту квартир. Студия Босса.
   Mobile-first: базовые стили — телефон, дальше 720px (планшет) и 1080px (десктоп).
   ========================================================================== */

:root {
  /* Палитра «архитектурный минимализм».
     Фон — тёплый бетон/гипс: спокойный, «строительный», не стерильно-белый.
     Текст и тёмные блоки — глубокий графит (как чертёжный грифель).
     Акцент — сигнальный оранжевый #ff5a1f: цвет строительной разметки,
     касок и лазерного уровня. Единственный яркий цвет на странице —
     поэтому кнопки и цены «бьют» в глаз сразу. На оранжевом пишем графитом
     (контраст ≈ 5.6:1), белый текст на нём не используем. */
  --bg: #ecebe7;
  --bg-2: #e2e0da;
  --surface: #f7f6f3;
  --ink: #18191b;
  --ink-2: #232427;
  --ink-3: #2e3034;
  --muted: #5d5c58;
  --muted-light: #a9a8a3;
  --line: rgba(24, 25, 27, .12);
  --line-light: rgba(236, 235, 231, .14);
  --accent: #ff5a1f;
  --accent-hover: #ff7440;
  --accent-ink: #18191b;
  --accent-soft: #ffe3d6;

  /* Шрифты: Inter Tight — плотный современный гротеск для крупных заголовков
     и текста; JetBrains Mono — «чертёжные» подписи, номера, размеры. */
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-s: 14px;
  --radius: 24px;
  --radius-l: 32px;
  --container: 1360px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 20px 40px -24px rgba(24,25,27,.25);
}

/* ---------- База ---------- */
*, *::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: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--ink); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

.only-wide { display: none; }
.only-narrow { display: inline; }

/* иконки-линии в общем стиле */
.btn svg, .demo-bar__btn svg, .header__phone svg, .round-arrow svg, .card__icon svg, .why__icon svg,
.float-cta svg, .modal__close svg, .tg, .hero-art__chip svg, .ba-slider__grip svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Чипы ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.chip--demo { background: var(--accent); color: var(--accent-ink); }
.chip--demo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--sm { font-size: 10px; padding: 4px 9px; }

/* ---------- Кнопки ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--h); padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 16px; line-height: 1.1; letter-spacing: -.01em; text-decoration: none; text-align: center;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn--sm { --h: 42px; padding: 0 18px; font-size: 15px; }
.btn--lg { --h: 60px; padding: 0 10px 0 28px; font-size: 17px; }
.btn--lg:not(:has(.btn__icon)) { padding: 0 28px; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px rgba(255, 90, 31, .7); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: var(--ink-3); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,.35); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--bg); }
.btn__icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--bg); flex: none;
  transition: transform .35s var(--ease);
}
.btn--dark .btn__icon { background: var(--accent); color: var(--ink); }
.btn:hover .btn__icon { transform: translateX(3px) rotate(-45deg); }

.link-btn {
  background: none; border: 0; padding: 0; font-weight: 600; text-align: left;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--accent);
}
.link-btn:hover { color: var(--accent); }

/* ---------- Демо-плашка ---------- */
.demo-bar { background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.4; }
.demo-bar__inner { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-block: 6px; }
.demo-bar__text { flex: 1; min-width: 0; color: rgba(236,235,231,.82); }
.demo-bar__text a { color: var(--accent); font-weight: 600; text-decoration: none; }
.demo-bar__btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-light);
  color: var(--bg); font-weight: 600; font-size: 12.5px; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.demo-bar__btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.demo-bar .chip { display: none; }

/* ---------- Шапка (стекло) ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(236, 235, 231, .72);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.header.is-scrolled { border-bottom-color: var(--line); background: rgba(236, 235, 231, .8); }
.header__inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo__mark { flex: none; width: 36px; height: 36px; }
.logo__text { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; line-height: 1; letter-spacing: -.02em; }
.logo__text small { font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.nav { display: none; }
.header__actions { display: flex; align-items: center; gap: 8px; }
.header__phone {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--line); background: rgba(255,255,255,.4); padding: 0;
  transition: border-color .2s, background-color .2s;
}
.header__phone:hover { border-color: var(--ink); }
.header__phone span { display: none; }

/* ---------- Типографика секций ---------- */
.section { padding-block: 72px; }
.section--tint { background: var(--bg-2); }
.section--dark { background: var(--ink); color: var(--bg); }

.kicker, .sec-head__idx {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.kicker__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255,90,31,.18); }
.sec-head__idx span {
  display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 8px;
  border: 1px solid currentColor; border-radius: 999px; font-size: 11px; color: var(--ink);
}
.sec-head { display: grid; gap: 16px; margin-bottom: 36px; }
.sec-head__title {
  font-size: clamp(36px, 9.4vw, 88px); font-weight: 700; line-height: .98; letter-spacing: -.035em;
  text-wrap: balance;
}
.sec-head__lead { max-width: 46ch; color: var(--muted); font-size: 17px; }
.sec-head--light .sec-head__idx, .sec-head__idx--light { color: var(--muted-light); }
.sec-head--light .sec-head__idx span, .sec-head__idx--light span { color: var(--bg); }
.sec-head--light .sec-head__lead { color: var(--muted-light); }
.section__cta { margin-top: 36px; display: flex; }
.sec-head__title:last-child { grid-column: 1 / -1; }

/* ---------- Первый экран ---------- */
.hero { padding: 28px 0 40px; }
.hero__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hero__meta { display: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero__title {
  margin-top: 0;
  font-size: clamp(40px, 11vw, 96px); font-weight: 700; line-height: .96; letter-spacing: -.038em;
  text-wrap: balance;
}
.hero__accent { position: relative; white-space: nowrap; color: var(--ink); }
.hero__accent::after {
  content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .02em; height: .2em; z-index: -1;
  background: var(--accent); border-radius: 4px;
}
.hero__title { position: relative; z-index: 0; }
.hero__grid { display: grid; gap: 32px; margin-top: 18px; }
.hero__content > .hero__lead { margin-top: 22px; }
.hero__lead { font-size: 18px; line-height: 1.5; color: var(--ink-3); max-width: 52ch; }
.hero__cta { display: grid; gap: 10px; margin-top: 24px; }
.hero__cta .btn { width: 100%; justify-content: space-between; }
.hero__cta .btn--ghost { justify-content: center; }
.hero__note { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 46ch; }

.hero-art {
  position: relative; border-radius: var(--radius-l); overflow: hidden;
  background:
    radial-gradient(120% 80% at 70% 0%, rgba(255,255,255,.75), transparent 60%),
    linear-gradient(180deg, #e4e2dc, #d9d6cf);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
}
.hero-art::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px; opacity: .45;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
}
.hero-art__svg { position: relative; width: 92%; height: auto; margin-top: 4%; }
.hero-art__chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 8px; border-radius: 999px;
  background: rgba(247,246,243,.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.8); box-shadow: 0 12px 30px -14px rgba(24,25,27,.35);
  font-size: 13px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
}
.hero-art__chip span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.hero-art__check { background: var(--accent); color: var(--ink); }
.hero-art__cam { background: var(--ink); color: var(--bg); }
.hero-art__chip--a { left: 14px; top: 14px; }
.hero-art__chip--b { right: 14px; bottom: 14px; }

.hero__facts { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
.hero__facts li {
  display: flex; gap: 14px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 500; letter-spacing: -.01em;
}
.hero__num { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 500; flex: none; }

/* ---------- Бегущая строка ---------- */
.marquee { background: var(--ink); color: var(--bg); overflow: hidden; padding-block: 18px; }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee__list { display: flex; flex: none; }
.marquee__list li {
  display: inline-flex; align-items: center; gap: 28px; padding-right: 28px;
  font-size: clamp(20px, 4.4vw, 34px); font-weight: 600; letter-spacing: -.03em; white-space: nowrap;
}
.marquee__list li::after {
  content: ""; width: 14px; height: 14px; flex: none;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Bento: общие карточки ---------- */
.bento { display: grid; gap: 12px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid transparent;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.card--light { background: var(--surface); border-color: rgba(255,255,255,.8); box-shadow: var(--shadow); }
.card--concrete { background: #d9d6cf; }
.card--dark { background: var(--ink-2); color: var(--bg); }
.card--accent { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(24,25,27,.45); }
  .card:hover .card__icon { transform: rotate(-8deg) scale(1.06); background: var(--accent); }
  .card:hover .layers-art { transform: translateY(-6px) scale(1.02); }
  .card:hover .round-arrow { transform: rotate(45deg); }
}
.card__title { font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.card__text { font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.card--dark .card__text { color: var(--muted-light); }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card__icon {
  display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 18px;
  background: var(--bg); color: var(--ink);
  transition: transform .45s var(--ease), background-color .3s;
}
.card__icon svg { width: 30px; height: 30px; stroke-width: 2.2; }
.card__tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.card__top { display: grid; gap: 10px; }
.card--capital .card__title { font-size: clamp(28px, 7vw, 44px); line-height: 1; }
.card__art--layers { margin: 4px -8px; }
.layers-art { width: 100%; height: auto; transition: transform .6s var(--ease); }
.card__bottom { display: grid; gap: 10px; margin-top: auto; }

/* Цена — акцентное число */
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-top: auto; line-height: 1; }
.price__from { font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.price__num { font-size: clamp(46px, 13vw, 76px); font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.price__unit { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.card--light .price__num, .card--concrete .price__num { color: var(--ink); }
.card--light .price__unit, .card--concrete .price__unit { color: var(--accent); }
.card--dark .price__num { color: var(--accent); }
.card--dark .price__from { color: var(--muted-light); }

/* CTA-карточка */
.card--cta {
  text-align: left; border: 0; justify-content: space-between; min-height: 200px; font: inherit;
}
.card__cta-text { font-size: clamp(26px, 6.6vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1; max-width: 14ch; }
.card__cta-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.card__cta-note { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; max-width: 22ch; }
.round-arrow {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; flex: none;
  background: var(--ink); color: var(--accent); transition: transform .45s var(--ease);
}
.card--cta:hover { background: var(--accent-hover); }

/* ---------- До / после ---------- */
.section--dark .sec-head__title { color: var(--bg); }
.ba__tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
  background: var(--ink-3); border-radius: 999px; margin-bottom: 14px;
}
.ba__tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px; border: 0; border-radius: 999px; background: transparent; color: var(--muted-light);
  font-weight: 600; font-size: 15px; letter-spacing: -.01em; line-height: 1.1;
  transition: background-color .3s var(--ease), color .3s;
}
.ba__tab-num { display: none; font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--accent); }
.ba__tab-area { font-family: var(--font-mono); font-size: 11px; font-weight: 400; opacity: .7; }
.ba__tab:hover { color: var(--bg); }
.ba__tab[aria-selected="true"] { background: var(--bg); color: var(--ink); }

.ba-slider {
  --pos: 50%;
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 4 / 3.3; user-select: none; -webkit-user-select: none; touch-action: pan-y;
  cursor: ew-resize; background: #2a2c2f;
}
.ba-slider { margin-inline: calc(8px - var(--gutter)); }
.ba-slider__layer { position: absolute; inset: 0; }
.ba-slider__layer svg { width: 100%; height: 100%; }
.ba-slider__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-slider__line {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px;
  background: var(--bg); box-shadow: 0 0 0 1px rgba(24,25,27,.3), 0 0 18px rgba(24,25,27,.35); pointer-events: none;
}
.ba-slider__handle {
  position: absolute; top: 50%; left: var(--pos); width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center; border-radius: 50%; outline-offset: 4px;
}
.ba-slider__grip {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: var(--ink); box-shadow: 0 0 0 6px rgba(236,235,231,.35), 0 10px 30px -6px rgba(0,0,0,.5);
  transition: transform .25s var(--ease);
}
.ba-slider.is-dragging .ba-slider__grip, .ba-slider__handle:hover .ba-slider__grip { transform: scale(1.08); }
.ba-slider__tag {
  position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(24,25,27,.6); color: var(--bg); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: none;
}
.ba-slider__tag--before { left: 14px; }
.ba-slider__tag--after { right: 14px; background: var(--accent); color: var(--ink); }

.ba__caption { display: grid; gap: 14px; margin-top: 20px; }
.ba__case-title { font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.ba__col { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-light); color: var(--muted-light); font-size: 15.5px; }
.ba__col--after { color: var(--bg); }
.ba__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); }
.ba__col--after .ba__label { color: var(--accent); }

.ba-cta { display: grid; gap: 16px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-light); }
.ba-cta__text { font-size: clamp(30px, 8vw, 64px); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.ba-cta .btn { justify-content: space-between; }

/* ---------- Этапы ---------- */
.steps { display: grid; }
.step {
  position: relative; display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; row-gap: 6px;
  padding: 0 0 30px; align-content: start;
}
.step::before { /* тонкая вертикальная линия */
  content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 1px; background: var(--line);
}
.step:last-child::before { display: none; }
.step__num {
  grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--ink); font-family: var(--font-mono); font-size: 12px; background: var(--bg);
}
.step--final .step__num { background: var(--accent); border-color: var(--accent); }
.step__title { font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; padding-top: 4px; }
.step__text { color: var(--muted); font-size: 15.5px; max-width: 40ch; }

/* ---------- Почему мы ---------- */
.why__title { font-size: 21px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.why__title--xl { font-size: clamp(34px, 9vw, 60px); line-height: .98; letter-spacing: -.035em; }
.bento--why .card p { font-size: 15.5px; color: var(--muted); }
.bento--why .card--accent p { color: rgba(24,25,27,.82); font-size: 17px; max-width: 34ch; }
.bento--why .card--dark p { color: var(--muted-light); }
.why__body { display: grid; gap: 10px; margin-top: auto; }
.why--estimate { min-height: 380px; }
.why__doc { align-self: flex-end; margin: -6px -10px 0 0; transition: transform .6s var(--ease); }
.why__doc svg { width: 200px; height: auto; }
.card:hover .why__doc { transform: rotate(-4deg) translateY(-4px); }
.why__icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; flex: none;
  background: var(--ink); color: var(--accent); transition: transform .45s var(--ease);
}
.card:hover .why__icon { transform: rotate(-8deg); }
.why--materials, .why--clean { flex-direction: row; align-items: center; gap: 18px; }
.why--materials > div, .why--clean > div { display: grid; gap: 6px; }

.why__phone {
  display: grid; gap: 8px; padding: 14px; border-radius: 22px; background: var(--ink-3);
  border: 1px solid var(--line-light); max-width: 320px;
}
.msg { font-size: 13.5px; line-height: 1.35; padding: 10px 12px; border-radius: 16px; max-width: 88%; }
.msg--in { background: #3a3c41; color: var(--bg); border-bottom-left-radius: 6px; }
.msg--out { justify-self: end; background: var(--accent); color: var(--ink); border-bottom-right-radius: 6px; font-weight: 600; }
.msg__pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 8px; }
.msg__pics i { display: block; aspect-ratio: 1; border-radius: 8px; background: linear-gradient(135deg, #d9c39c, #efe3cf); }
.msg__pics i:nth-child(2) { background: linear-gradient(135deg, #cfd4d6, #f7f6f3); }
.msg__pics i:nth-child(3) { background: linear-gradient(135deg, #8a8d93, #cfccc5); }

.stages-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 4px; }
.stages-bar i { height: 8px; border-radius: 4px; background: var(--bg-2); }
.stages-bar i.on { background: var(--accent); }
.card:hover .stages-bar i:nth-child(4) { background: var(--accent); transition: background-color .3s .1s; }

/* ---------- Отзывы ---------- */
.reviews { display: grid; gap: 12px; }
.review {
  display: flex; flex-direction: column; gap: 20px; padding: 26px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.8);
}
.review .chip { align-self: flex-start; background: var(--accent-soft); }
.review__text { font-size: 19px; line-height: 1.45; letter-spacing: -.015em; font-weight: 500; }
.review__who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.review__who strong { display: block; color: var(--ink); font-size: 16px; }
.review__ava { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--accent); font-weight: 700; flex: none; }
.review--dark { background: var(--ink-2); color: var(--bg); border-color: transparent; }
.review--dark .review__who { border-color: var(--line-light); color: var(--muted-light); }
.review--dark .review__who strong { color: var(--bg); }
.review--dark .review__ava { background: var(--accent); color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 28px; }
.faq__side { display: contents; }
.faq__side .sec-head { margin-bottom: 0; order: 1; }
.faq__list { order: 2; }
.faq__more { order: 3; padding: 22px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.faq__more p { font-size: 20px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 14px; }
.faq__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.faq__list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25;
}
.qa summary::-webkit-details-marker { display: none; }
.qa__icon {
  position: relative; width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line); transition: background-color .3s var(--ease), border-color .3s, transform .4s var(--ease);
}
.qa__icon::before, .qa__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px;
  background: currentColor; border-radius: 2px; transition: transform .4s var(--ease);
}
.qa__icon::after { transform: rotate(90deg); }
.qa[open] .qa__icon { background: var(--accent); border-color: var(--accent); transform: rotate(180deg); }
.qa[open] .qa__icon::after { transform: rotate(0deg); }
.qa summary:hover .qa__icon { border-color: var(--ink); }
.qa__body { padding: 0 52px 24px 0; color: var(--muted); font-size: 16.5px; max-width: 62ch; }
.qa[open] .qa__body { animation: qa-in .45s var(--ease); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Контакты ---------- */
.contact {
  display: grid; border-radius: var(--radius-l); overflow: hidden; background: var(--ink); color: var(--bg);
}
.contact__info { display: grid; gap: 18px; padding: 28px 22px 30px; align-content: start; }
.contact__title { font-size: clamp(34px, 9vw, 64px); font-weight: 700; letter-spacing: -.035em; line-height: .98; text-wrap: balance; }
.contact__lead { color: var(--muted-light); font-size: 17px; max-width: 44ch; }
.contact__list { display: grid; margin: 6px 0 8px; border-top: 1px solid var(--line-light); }
.contact__list > div { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line-light); }
.contact__list dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); }
.contact__list dd { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.contact .link-btn { color: var(--bg); font-size: 19px; letter-spacing: -.02em; }
.contact .link-btn:hover { color: var(--accent); }
.contact .btn { justify-content: space-between; }
.contact__map { min-height: 260px; position: relative; }
.contact__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: var(--bg); padding: 56px 0 120px; margin-top: 0; }
.footer__demo {
  display: grid; gap: 16px; justify-items: start; padding: 24px; border-radius: var(--radius);
  background: var(--ink-3); border: 1px solid var(--line-light);
}
.footer__demo p { color: rgba(236,235,231,.82); font-size: 15px; max-width: 70ch; }
.footer__demo p a { color: var(--accent); font-weight: 600; }
.footer__word {
  margin: 48px 0 0; font-size: clamp(52px, 14.6vw, 220px); font-weight: 800; letter-spacing: -.05em; line-height: .9;
  white-space: nowrap; color: var(--bg); overflow: hidden; padding: 0 .05em .1em 0;
}
.footer__word span { color: var(--accent); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--line-light); font-size: 14px; color: var(--muted-light);
}
.footer__up { color: var(--bg); text-decoration: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.footer__up:hover { color: var(--accent); }

/* ---------- Плавающая кнопка (слева: справа внизу плашка хостинга) ---------- */
.float-cta {
  position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  max-width: calc(100% - 120px);
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 22px 0 18px;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  box-shadow: 0 16px 34px -12px rgba(24,25,27,.6), 0 0 0 1px rgba(255,255,255,.08) inset;
  transition: transform .4s var(--ease), opacity .3s;
}
.float-cta svg { color: var(--accent); flex: none; }
.float-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }

/* ---------- Модальное окно ---------- */
.modal {
  padding: 16px; border: 0; background: transparent; max-width: 460px; width: 100%;
  color: var(--ink); overflow: visible;
}
.modal::backdrop { background: rgba(24,25,27,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] .modal__card { animation: modal-in .45s var(--ease); }
.modal[open]::backdrop { animation: fade-in .3s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }
.modal__card {
  position: relative; display: grid; gap: 14px; justify-items: start;
  padding: 32px 24px 24px; border-radius: var(--radius-l); background: var(--surface);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.5);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px;
}
.modal__card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(247,246,243,.4), var(--surface) 55%); pointer-events: none; }
.modal__card > * { position: relative; }
.modal__card > form { position: static; }
.modal__close {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--surface); z-index: 1;
  transition: background-color .2s, transform .3s var(--ease);
}
.modal__close:hover { background: var(--ink); color: var(--bg); transform: rotate(90deg); }
.modal__mark { margin-bottom: 6px; }
.modal__title { font-size: 30px; font-weight: 700; letter-spacing: -.04em; line-height: 1.02; }
.modal__text { color: var(--muted); font-size: 16.5px; }
.modal__text a { color: var(--ink); font-weight: 700; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.modal .btn { margin-top: 6px; padding: 0 22px; }

/* ---------- Появление при прокрутке ----------
   Скрываем только когда JS включён И пользователь не просил меньше движения.
   Без JS или с prefers-reduced-motion — всё видно сразу. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ==========================================================================
   Планшет
   ========================================================================== */
@media (min-width: 720px) {
  :root { --header-h: 72px; }
  .only-wide { display: inline; }
  .only-narrow { display: none; }
  .demo-bar .chip { display: inline-flex; }
  .demo-bar__inner { gap: 14px; }

  .header__phone { width: auto; height: 42px; padding: 0 16px; gap: 8px; display: inline-flex; border-radius: 999px; font-weight: 600; font-size: 15px; }
  .header__phone span { display: inline; }

  .section { padding-block: 104px; }
  .sec-head { margin-bottom: 52px; }
  .hero { padding: 44px 0 56px; }
  .hero__meta { display: block; }
  .hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
  .hero__cta .btn { width: auto; }
  .hero-art { aspect-ratio: 16 / 11; }
  .hero-art__svg { width: 70%; }
  .hero-art__chip { font-size: 14px; }
  .hero-art__chip--a { left: 24px; top: 24px; }
  .hero-art__chip--b { right: 24px; bottom: 24px; }
  .hero__facts { grid-template-columns: repeat(3, 1fr); border-top: 0; gap: 12px; margin-top: 40px; }
  .hero__facts li { flex-direction: column; gap: 12px; padding: 20px 0 0; border-top: 1px solid var(--ink); border-bottom: 0; }

  .bento--prices { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .card { padding: 30px; }
  .card--capital { grid-column: span 2; }
  .card--cta { grid-column: span 2; min-height: 220px; }

  .ba-slider { aspect-ratio: 16 / 10; border-radius: var(--radius-l); margin-inline: 0; }
  .ba__tabs { display: inline-grid; grid-template-columns: repeat(3, auto); margin-bottom: 20px; }
  .ba__tab { flex-direction: row; gap: 10px; padding: 12px 22px; font-size: 16px; }
  .ba__tab-num { display: inline; }
  .ba__caption { grid-template-columns: 1.1fr 1fr 1fr; gap: 28px; margin-top: 28px; }
  .ba__case-title { font-size: 26px; }
  .ba-cta { grid-template-columns: 1fr auto; align-items: center; }

  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 32px; }

  .bento--why { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .why--estimate { grid-column: span 2; flex-direction: row-reverse; justify-content: space-between; align-items: flex-end; min-height: 340px; }
  .why--estimate .why__doc { align-self: flex-start; }
  .why__doc svg { width: 240px; }
  .why--photo { grid-column: span 2; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 24px; }
  .why--photo .why__phone { order: 2; flex: 0 1 320px; }

  .reviews { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .review:last-child { grid-column: span 2; }

  .faq__btns { display: flex; flex-wrap: wrap; }

  .contact__info { padding: 48px; gap: 22px; }
  .contact__map { min-height: 340px; }

  .footer__demo { grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 22px 26px; }
  .float-cta { display: none; }
}

/* ==========================================================================
   Десктоп
   ========================================================================== */
@media (min-width: 1080px) {
  .nav { display: flex; gap: 4px; margin-right: 8px; }
  .nav a {
    padding: 9px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-3);
    transition: background-color .2s, color .2s;
  }
  .nav a:hover { background: rgba(24,25,27,.06); color: var(--ink); }
  .logo { margin-right: auto; }

  .section { padding-block: 136px; }
  .sec-head { grid-template-columns: 1fr minmax(280px, 380px); align-items: end; column-gap: 48px; margin-bottom: 64px; }
  .sec-head__idx { grid-column: 1 / -1; }
  .sec-head__lead { justify-self: end; }

  .hero { padding: 36px 0 72px; }
  .hero__grid { grid-template-columns: 8fr 5fr; gap: 40px; margin-top: 24px; align-items: stretch; }
  .hero__content { display: flex; flex-direction: column; justify-content: center; }
  .hero__title { font-size: clamp(58px, 5.6vw, 84px); text-wrap: pretty; }
  .hero__content { padding-bottom: 8px; }
  .hero__lead { font-size: 20px; }
  .hero-art { aspect-ratio: auto; min-height: 520px; }
  .hero-art__svg { width: 96%; }

  .bento--prices { grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(250px, auto); gap: 16px; }
  .card--capital { grid-column: 1 / 8; grid-row: 1 / 3; padding: 36px; }
  .card--cosmetic { grid-column: 8 / 13; grid-row: 1; }
  .card--bath { grid-column: 8 / 13; grid-row: 2; }
  .card--electric { grid-column: 1 / 6; grid-row: 3; }
  .card--cta { grid-column: 6 / 13; grid-row: 3; padding: 36px; }
  .card--capital .card__art--layers { max-width: 520px; margin: 10px auto; }

  .ba-slider { aspect-ratio: 16 / 9; max-height: calc(100vh - 140px); min-height: 520px; width: min(100vw - 32px, 1600px); margin-left: calc((100% - min(100vw - 32px, 1600px)) / 2); }
  .ba__tabs { margin-bottom: 24px; }

  .steps { grid-template-columns: repeat(5, 1fr); column-gap: 0; }
  .step { grid-template-columns: 1fr; row-gap: 14px; padding: 0 24px 0 0; }
  .step::before { left: 44px; right: 0; top: 18px; bottom: auto; width: auto; height: 1px; }
  .step:last-child::before { display: block; right: 24px; background: linear-gradient(90deg, var(--line), transparent); }
  .step__num { grid-row: auto; }
  .step__title { padding-top: 18px; font-size: 26px; }

  .bento--why { grid-template-columns: repeat(4, 1fr); grid-template-rows: minmax(240px, auto) minmax(240px, auto) auto; }
  .why--estimate { grid-column: 1 / 3; grid-row: 1 / 3; flex-direction: column; align-items: stretch; padding: 36px; }
  .why--estimate .why__doc { align-self: flex-end; }
  .why__doc svg { width: 280px; }
  .why--photo { grid-column: 3 / 5; grid-row: 1; }
  .why--contact { grid-column: 3; grid-row: 2; }
  .why--stages { grid-column: 4; grid-row: 2; }
  .why--materials { grid-column: 1 / 3; grid-row: 3; }
  .why--clean { grid-column: 3 / 5; grid-row: 3; }
  .why--contact, .why--stages { justify-content: flex-end; }
  .why--contact .why__icon { margin-bottom: auto; }
  .why--stages .stages-bar { margin-bottom: auto; }

  .reviews { grid-template-columns: repeat(3, 1fr); }
  .review:last-child { grid-column: auto; }
  .review { padding: 32px; min-height: 360px; }
  .review__text { font-size: 20px; }

  .faq { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .faq__side { display: block; position: sticky; top: calc(var(--header-h) + 32px); }
  .faq__side .sec-head { grid-template-columns: 1fr; }
  .faq__more { margin-top: 36px; background: transparent; box-shadow: none; padding: 0; }
  .faq__side .sec-head__title { font-size: clamp(48px, 6vw, 88px); }
  .qa summary { font-size: 22px; padding: 28px 0; }

  .contact { grid-template-columns: 1.15fr 1fr; }
  .contact__info { padding: 64px; }
  .contact__map { min-height: 100%; }
  .contact .btn { justify-self: start; }

  .footer { padding: 72px 0 40px; }
}

