/* ---------- hero ---------- */
.hero { padding: 38px 0 76px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--orange-dark); background: #fff0e8; padding: 6px 14px; border-radius: 100px; margin-bottom: 22px; }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.12; margin-bottom: 20px; }
.hero h1 span { color: var(--orange); }
.hero-sub { font-size: 16.5px; color: var(--muted); max-width: 440px; margin-bottom: 32px; }
.hero-ctas { margin-bottom: 36px; }
.hero-meta { display: flex; gap: 28px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; }
.hero-meta b { color: var(--ink); font-weight: 700; display: block; font-size: 15px; }

/* Hero-сцена: реальное фото комнаты (hero-room-alt, повёрнуто на 90° против
   часовой ещё в ассете) с прозрачным фоном — лежит прямо на --paper, без
   декоративной карточки/рамки от прежней чертёжной версии. */
.blueprint { position: relative; aspect-ratio: 842/846; user-select: none; -webkit-user-select: none; }
.room-outline { position: absolute; inset: 0; background: url('../../media/hero/hero-scene.webp') center / contain no-repeat; }
.wall-v { top: 0; bottom: 0; left: 45%; width: 2px; }
.furniture { position: absolute; background: none; border: none; animation: drop-snap 1.6s cubic-bezier(.2,.9,.3,1.4) both; animation-delay: .3s; transition: left .28s cubic-bezier(.2,.9,.3,1.3), top .28s cubic-bezier(.2,.9,.3,1.3); }
@keyframes drop-snap { 0%{opacity:0; transform:translateY(-40px);} 55%{opacity:1; transform:translateY(4px);} 75%{transform:translateY(-3px);} 100%{opacity:1; transform:translateY(0);} }
.snap-point { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); opacity: 0; pointer-events: none; }
.snap-point.fire { animation: pulse .5s ease-out 1; opacity: 1; }
.snap-point.fire::after { content:''; position:absolute; inset:-8px; border:1.5px solid var(--orange); border-radius:50%; opacity:0; animation: ring .6s ease-out 1; }
@keyframes pulse { 0%{transform:scale(.6);} 50%{transform:scale(1.3);} 100%{transform:scale(1);} }
@keyframes ring { 0%{opacity:.8; transform:scale(.6);} 100%{opacity:0; transform:scale(2.4);} }
.blueprint-label { position: absolute; bottom: 14px; left: 14px; font-size: 11px; color: var(--muted); letter-spacing: .03em; background: rgba(250,249,246,.85); padding: 3px 10px; border-radius: 100px; }
.drag-hint { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
/* Кнопка "Расслабиться" — вернуть диван в старт и повторить снап заново, без
   перезагрузки страницы. Компактная, второстепенная — не btn-accent. */
.relax-btn { background: none; border: 1px solid var(--card-line); border-radius: 100px; padding: 5px 14px; font-size: 11.5px; font-weight: 600; color: var(--ink); transition: transform .15s cubic-bezier(.3,1.4,.4,1); }
.relax-btn:hover { border-color: var(--muted); }
.relax-btn:active { transform: scale(.94); }
/* Рамка-цель повторяет РЕАЛЬНЫЙ размер и пропорции дивана: hero-sofa.webp —
   контент 403×280 (≈1.439), бокс дивана 22% ширины, значит высота по той же
   пропорции = 22/1.439 × (842/846) ≈ 15.2% высоты. Раньше рамка была 26×18%,
   заметно крупнее самого дивана. */
.slot-target { position: absolute; left: 30%; top: 60%; width: 22%; height: 15.2%; border: 2px dashed rgba(23,24,28,.35); border-radius: 6px; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.slot-target.active { border-style: solid; border-color: var(--orange); background: rgba(255,240,232,.55); box-shadow: 0 0 0 6px rgba(255,91,30,.14); }
.slot-target.filled { border-style: solid; border-color: var(--orange); }
/* Стартовая позиция — на СВОБОДНОМ полу слева, подтверждено наложением
   реального PNG дивана на фото сцены (не «на глаз»): центр фото занят зелёной
   мебелью того же цвета, что и сам диван, поэтому там он сливался и читался как
   «пропал». Слева (15%/43%) — чистый серый пол, диван стоит отдельным объектом,
   рамка-цель ниже (30%/60%) без пересечения. История промахов: right:22%/top:4%
   — тёмные рейки потолка; 30%/29% и 43%/29% — упирался в зелёную мебель сцены.
   Высота 15.2% = точная пропорция hero-sofa.webp, чтобы картинка заполняла бокс
   без полей.
   Светлый контур по силуэту + усиленная тень отделяют диван от живого фото,
   чтобы он читался как отдельный перетаскиваемый объект. */
.f-sofa-drag { left: 15%; top: 43%; width: 22%; height: 15.2%; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; z-index: 5; animation-delay: .6s; filter: drop-shadow(0 0 1.5px rgba(250,249,246,.95)) drop-shadow(0 10px 18px rgba(23,24,28,.45)); }
.f-sofa-drag.dragging { cursor: grabbing; transition: none !important; animation: none !important; filter: drop-shadow(0 0 1.5px rgba(250,249,246,.95)) drop-shadow(0 16px 26px rgba(23,24,28,.5)); }
.f-sofa-drag.placed { filter: drop-shadow(0 2px 5px rgba(23,24,28,.4)); }
/* Диван на фото снят с лёгким завалом: верхняя грань подушки уходит вверх-вправо
   примерно на 1° (измерено по картинке). Доворачиваем сам <img> (не draggable-
   коробку — иначе поехала бы математика снапа) ровно на +1°, чтобы грань стала
   горизонтальной и параллельной квадрату-цели. (Было ошибочно 4° — перекрут.) */
.f-sofa-drag img { transform: rotate(1deg); }

/* ---------- rooms ---------- */
.section { padding-top: 62px; padding-bottom: 62px; }
.section-head { text-align: center; max-width: 480px; margin: 0 auto 44px; }
.section-head h2 { font-size: 30px; font-weight: 600; margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 15px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; overflow: hidden; transition: transform .1s ease, border-color .25s ease, box-shadow .2s ease; display: flex; flex-direction: column; text-align: left; width: 100%; will-change: transform; }
.cat-card:hover { box-shadow: 0 12px 24px rgba(23,24,28,0.08); }
.cat-card:active { transform: scale(.97); }
.cat-card.in-focus { transform: scale(1.02); border-color: var(--orange); }
.cat-thumb { aspect-ratio: 4/3; position: relative; display: flex; align-items: center; justify-content: center; background: var(--paper); border-bottom: 1px solid var(--card-line); border: none; width: 100%; }
.cat-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat-body h3 { font-size: 16px; font-weight: 600; }
.cat-tag { font-size: 11.5px; color: var(--muted); }
.cat-price { font-size: 13px; color: var(--muted); }
.cat-price b { color: var(--ink); font-weight: 700; }
.cat-card-actions { margin-top: auto; }
.cat-link { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--ink); padding: 0; }
.cat-link::after { content: '→'; transition: transform .15s ease; }
.cat-card:hover .cat-link::after { transform: translateX(3px); }

/* ---------- custom banner ---------- */
.builder-banner { background: var(--ink); color: var(--paper); border-radius: 20px; padding: 56px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 40px; }
.builder-banner h2 { font-size: 28px; font-weight: 600; margin-bottom: 14px; }
.builder-banner p { color: #b8b6b0; font-size: 15px; max-width: 420px; margin-bottom: 26px; }
.budget-row { display: flex; justify-content: space-between; font-size: 13px; color: #b8b6b0; margin-bottom: 8px; }
.budget-row b { color: var(--paper); font-weight: 600; }
.budget-track { height: 8px; border-radius: 100px; background: #2c2d31; overflow: hidden; margin-bottom: 16px; }
.budget-fill { height: 100%; width: 0%; background: var(--orange); transition: width .25s ease, background .25s ease; }
.rate-line { font-size: 13px; color: #b8b6b0; margin-bottom: 18px; }
.rate-line b { color: var(--paper); }
.peek-card { position: relative; background: #202126; border: 1px solid #313236; border-radius: 16px; padding: 26px 24px; text-align: center; }
.peek-photo { display: flex; align-items: center; justify-content: center; height: 100px; margin-bottom: 14px; transition: opacity .22s ease, transform .22s ease; }
.peek-name { font-weight: 600; font-size: 15px; margin-bottom: 2px; color: var(--paper); }
.peek-price { font-size: 13px; color: #b8b6b0; margin-bottom: 18px; }
.peek-skip { display: block; margin: 12px auto 0; background: none; border: none; font-size: 12px; color: #7d7c78; text-decoration: underline; }
.peek-note { font-size: 11.5px; color: #7d7c78; margin-top: 14px; transition: color .2s ease; }
.peek-note.milestone { color: var(--orange); font-weight: 600; }

/* ---------- telegram ---------- */
/* Нейтральная карточка, как .detail-card/.related-card (var(--card) +
   var(--card-line)) — раньше была залита сплошным оранжевым и читалась как
   отдельный рекламный баннер, чужеродный на фоне остальных блоков страницы.
   Акцент — только маленький бейдж и кнопка, тем же приёмом, что .eyebrow/.rc-badge. */
.tg-block { background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 18px 52px 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
/* display:flex + fit-content, а НЕ inline-flex: inline-flex сидит в строчном
   боксе и добавляет ~4px полулидинга СВЕРХ бейджа (а снизу абзаца — нет), из-за
   чего верхний и нижний отступ плашки были разные (22 vs 19). Блочный бейдж
   такого лидинга не создаёт — текст центрируется симметрично. */
/* Равные внутренние отступы бейдж→заголовок→текст (было 8/3 — читалось
   несимметрично). Теперь одинаковый ритм. */
.tg-badge { display: flex; width: fit-content; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--orange-dark); background: #fff0e8; padding: 4px 10px; border-radius: 100px; margin-bottom: 6px; }
.tg-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.tg-block h2 { font-size: 16px; margin-bottom: 6px; color: var(--ink); font-weight: 600; }
.tg-block p { color: var(--muted); font-size: 12.5px; line-height: 1.4; max-width: 480px; }

/* ---------- delivery line ---------- */
.delivery-line { text-align: center; font-size: 13px; color: var(--muted); padding-top: 8px; padding-bottom: 48px; }
.delivery-line b { color: var(--ink); }

footer { padding: 40px 0 90px; }

/* Telegram-плашка едет с пользователем (sticky bottom) и «садится» на своё
   натуральное место в потоке, когда долистали до конца контента — поверх
   пустоты за футером не зависает. Класс snap-section с секции снят намеренно,
   чтобы soft-snap не прилипал к плавающему элементу. */
/* margin-top отрицательный подтягивает плашку ближе к блоку CUSTOM выше —
   иначе между ними зияет полный отступ секции. */
.tg-sticky { position: sticky; bottom: 14px; z-index: 55; padding-bottom: 0; margin-top: -26px; }
.tg-sticky .tg-block { position: relative; box-shadow: 0 14px 40px rgba(23,24,28,.12); }
.tg-close { position: absolute; top: 10px; right: 14px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--card-line); background: var(--paper); color: var(--muted); font-size: 11px; line-height: 1; }
.tg-close:hover { color: var(--ink); border-color: var(--muted); }
/* Тап-цель растим до ~44px НЕВИДИМО (mobile-instructions/02 п.5, 03) — сама
   кнопка визуально остаётся компактной 24px, не раздувая плашку. */
.tg-close::before { content: ''; position: absolute; inset: -10px; }

/* ---------- sticky mobile cta ---------- */
.sticky-cta { display: none; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2,1fr); }
  .builder-banner { grid-template-columns: 1fr; padding: 34px; }
  .tg-block { padding: 16px 48px 16px 20px; }
}

/* mobile-instructions: карточки комнат (h3+тег+цена) слишком узкие в 2
   колонки на телефоне — текст рвётся. Схлопываем в одну, как .details-grid. */
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: 1fr; }
  /* h1 держался на 48px и на телефоне — самое длинное слово («Антистресс»)
     ~430px, шире экрана 390px, и обрезалось из-за .hero overflow:hidden.
     Уменьшаем под мобильный, чтобы заголовок помещался целиком. */
  .hero h1 { font-size: 33px; line-height: 1.1; margin-bottom: 16px; }
  .hero-sub { font-size: 15px; margin-bottom: 26px; }
}
@media (max-width: 680px) {
  body { padding-bottom: 78px; }
  .sticky-cta { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: var(--paper); border-top: 1px solid var(--line); padding: 12px 16px; align-items: center; justify-content: space-between; gap: 12px; }
  .sticky-cta .price-hint { font-size: 12.5px; color: var(--muted); }
  .sticky-cta .price-hint b { color: var(--ink); display: block; font-size: 15px; }
  .sticky-cta .btn { flex: 1; padding: 13px 18px; }
  .tg-sticky { bottom: 90px; } /* над мобильным sticky-cta */

  /* mobile-instructions/02 п.5: плашка компактнее по высоте — меньше
     отступов и размеров текста, кнопка не на всю ширину (экономит строку). */
  .tg-block { padding: 12px 40px 12px 14px; gap: 8px 12px; border-radius: 12px; }
  .tg-badge { font-size: 10px; padding: 3px 8px; margin-bottom: 4px; }
  .tg-block h2 { font-size: 13.5px; margin-bottom: 4px; }
  .tg-block p { font-size: 11px; max-width: none; }
  .tg-block .btn { padding: 8px 14px; font-size: 12px; }
  .tg-close { top: 8px; right: 8px; }
}
