/* Лендинг «Соседи». Самодостаточная страница: без сборки, без внешних ресурсов.
   Экран — сцена 1600 × 900, вписывается в окно масштабом (--k); внутри — шаги-«биты».
   Слева текст, справа карта: вид сверху, как в навигаторе. Показ включается адресом ?deck. */

:root {
  --paper: #f5f1e8; --map: #faf7f0; --card: #fffdf8; --ink: #1e2a25; --ink-2: #4a5a52; --mute: #7c877f; --line: #ddd6c6; --line-2: #c9c0ac;
  --green: #2e6b4e; --green-l: #6fa585; --clay: #c4623a; --olive: #8a9a5b; --grey: #9a968c;
  --mono: 'PT Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --k: 1;
}
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(./fonts/manrope-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(./fonts/manrope-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PT Mono'; font-style: normal; font-display: swap; font-weight: 400; src: url(./fonts/pt-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'PT Mono'; font-style: normal; font-display: swap; font-weight: 400; src: url(./fonts/pt-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--paper); scroll-behavior: smooth; }
html.present { overflow: hidden; }
body {
  background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased;
  font-family: 'Manrope Variable', Manrope, Inter, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;
  font-feature-settings: 'tnum';
}
::selection { background: rgba(46, 107, 78, 0.2); }
button { font: inherit; color: inherit; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ───────── каркас ───────── */
.slide { position: relative; z-index: 1; height: 100vh; overflow: clip; }
/* сцена «приклеена» к окну, пока прокрутка переключает шаги экрана */
.pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
html.present .pin { position: absolute; inset: 0; height: auto; }
html.present .slide { position: fixed; inset: 0; opacity: 0; visibility: hidden; background: var(--paper); transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
html.present .slide.active { opacity: 1; visibility: visible; transition: opacity 0.5s ease, visibility 0s; }
.stage { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; margin: -450px 0 0 -800px; transform: scale(var(--k)); transform-origin: center center; }
.abs { position: absolute; }

.navbtn { position: fixed; bottom: 18px; right: 24px; z-index: 35; display: flex; gap: 8px; }
.navbtn button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-size: 18px; color: var(--ink-2); }
html.explore .navbtn, html.export .navbtn, html.export .noexp { display: none !important; }
kbd { display: inline-block; border-radius: 6px; border: 1px solid var(--line-2); padding: 1px 6px; font: 600 10px/1.5 inherit; color: var(--ink-2); }

/* ───────── текст слева, карта справа ───────── */
.txt { position: absolute; left: 70px; top: 150px; width: 540px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); }
.txt h1, .txt h2 { margin: 22px 0 0; font-size: 48px; font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); }
.txt > p { margin: 26px 0 0; font-size: 20px; line-height: 1.55; color: var(--ink-2); }
.txt > p + p { margin-top: 16px; }
.panel { position: absolute; left: 670px; top: 130px; width: 870px; height: 680px; margin: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--map); overflow: hidden; }
.panel canvas, .wide canvas { display: block; width: 100%; height: 100%; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 10px 20px; font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); text-decoration: none; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.btn:hover { border-color: var(--green); color: var(--green); }
.btn.primary { border-color: var(--green); background: var(--green); color: var(--card); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--card); }
.btn.sm { padding: 4px 12px; font-size: 12px; }
.cap { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }

/* шаги экрана прирастают: пройденные остаются, следующий дописывается под ними */
.steps { margin-top: 30px; display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line-2); }
/* пункт шага — выбор: нажатием переключает карту справа; выбранный слегка подсвечен */
.st { display: grid; grid-template-columns: 50px 1fr; margin: 0 -18px; padding: 16px 18px 18px; border-radius: 14px; cursor: pointer; outline: none; transition: opacity 0.3s ease-out, transform 0.3s ease-out, background-color 0.25s, box-shadow 0.25s; }
.st i { font-style: normal; font-family: var(--mono); font-size: 13px; padding-top: 5px; color: var(--mute); transition: color 0.25s; }
.st b { display: block; font-size: 22px; font-weight: 600; line-height: 1.22; letter-spacing: -0.015em; color: var(--ink-2); transition: color 0.25s; }
.st p { margin: 8px 0 0; font-size: 17px; line-height: 1.5; color: var(--mute); transition: color 0.25s; }
.st:hover { background: rgba(46, 107, 78, 0.04); }
.st:focus-visible { box-shadow: 0 0 0 2px var(--green); }
.st.on { background: rgba(46, 107, 78, 0.08); box-shadow: inset 3px 0 0 var(--green); }
.st.on i { color: var(--green); }
.st.on b { color: var(--ink); }
.st.on p { color: var(--ink-2); }
.st.dim { opacity: 0; transform: translateY(10px); pointer-events: none; }
.st { position: relative; }
.st.dim.next { opacity: 1; transform: none; pointer-events: auto; background: none; box-shadow: none; }
.st.next > * { visibility: hidden; }
.st.next::before { content: ''; position: absolute; left: 12px; top: 10px; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--card); transition: border-color 0.2s; }
.st.next::after { content: '↓'; position: absolute; left: 12px; top: 10px; width: 38px; height: 38px; display: grid; place-items: center; font-size: 18px; color: var(--green); animation: nudge 1.8s ease-in-out infinite; }
.st.next:hover::before { border-color: var(--green); }
@keyframes nudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.slide.seen .stagger > * { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(0.1s + var(--i, 0) * 0.07s); }
.slide:not(.seen) .stagger > * { opacity: 0; }
.slide.seen .txt > * { animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.slide.seen .txt > :nth-child(2) { animation-delay: 0.08s; } .slide.seen .txt > :nth-child(3) { animation-delay: 0.16s; } .slide.seen .txt > :nth-child(4) { animation-delay: 0.24s; }
.slide:not(.seen) .txt > * { opacity: 0; }
@keyframes open { from { opacity: 0; transform: translateY(24px) scale(0.985); } }
.slide.seen .panel { animation: open 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both; }
.slide:not(.seen) .panel { opacity: 0; }

/* ───────── 1 · первый экран: карта во всю сцену, текст слева ───────── */
#hero .wide { position: absolute; inset: 0; transform: translateY(calc(var(--sy, 0) * 0.22px)); -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 52%); mask-image: linear-gradient(90deg, transparent 30%, #000 52%); }
#hero .plate { width: 260px; color: var(--green); }
#hero .plate svg { display: block; width: 100%; height: auto; }
#hero .txt { top: 44px; width: 640px; transform: translateY(calc(var(--sy, 0) * -0.12px)); }
#hero .txt h1 { font-size: 66px; line-height: 1.04; margin-top: 184px; }
#hero .txt > p { font-size: 22px; max-width: 580px; }
#hero .go { margin-top: 36px; }
#hero .go .btn { padding: 14px 28px; font-size: 17px; }
#hero .legend { display: none; }
#hero .down { left: 70px; bottom: 44px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--mute); }

/* ───────── 2 · что можно заказать ───────── */
#what .txt { top: 130px; width: 500px; }
#what .goods { position: absolute; left: 670px; top: 130px; width: 860px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
#what .g { display: flex; align-items: center; gap: 18px; height: 122px; padding-right: 16px; border-bottom: 1px solid var(--line-2); }
#what .g svg { flex: none; width: 50px; height: 50px; fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
/* значок рисуется линией, держится и стирается, потом рисуется снова */
#what .g path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sketch 9s ease-in-out infinite; animation-delay: calc(var(--i) * 0.45s); }
@keyframes sketch { 0% { stroke-dashoffset: 1; } 26%, 82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
#what .g i { display: block; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--mute); }
#what .g b { display: block; margin-top: 8px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
#what .cards { position: absolute; left: 70px; top: 590px; width: 1460px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
#what .card { position: relative; padding: 26px 30px 30px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--card); overflow: hidden; }
#what .card i { display: flex; align-items: center; gap: 14px; font-style: normal; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); }
#what .card i::after { content: ''; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--green) 0 10px, transparent 10px 20px); background-size: 20px 2px; opacity: 0.55; animation: run 1.1s linear infinite; }
@keyframes run { to { background-position: 20px 0; } }
#what .card b { display: block; margin-top: 20px; font-size: 27px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
#what .card p { margin: 10px 0 0; font-size: 18px; line-height: 1.5; color: var(--ink-2); }

/* ───────── финал ───────── */
#final .txt { top: 210px; width: 1100px; }
#final .txt h2 { font-size: 96px; line-height: 1.02; letter-spacing: -0.04em; }
#final .txt > p { max-width: 720px; font-size: 22px; }
#final .go { margin-top: 40px; display: flex; gap: 12px; }
#final .go .btn { padding: 14px 28px; font-size: 17px; }
#final .plate { right: 70px; bottom: 70px; width: 320px; color: var(--green); }
#final .plate svg { display: block; width: 100%; height: auto; }

/* ───────── карта экранов ───────── */
.overlay { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(30, 42, 37, 0.3); backdrop-filter: blur(6px); }
.overlay.open { display: flex; }
.overlay .box { width: 100%; max-width: 980px; max-height: 92vh; overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.overlay .top { display: flex; align-items: center; justify-content: space-between; color: var(--green); }
.overlay .top .btn { color: var(--ink-2); }
.overlay .grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.overlay .row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; cursor: pointer; }
.overlay .row:hover, .overlay .row.cur { background: var(--paper); }
.overlay .row.cur { box-shadow: 0 0 0 1px var(--green); }
.overlay .row .k { width: 24px; font-family: var(--mono); font-size: 15px; color: var(--green); }
.overlay .row .tt { display: block; font-size: 14px; font-weight: 600; }
.overlay .pills { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.overlay .pill { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: none; font-size: 11px; font-weight: 600; color: var(--mute); cursor: pointer; }
.overlay .keys { margin-top: 16px; font-size: 11px; line-height: 2; color: var(--mute); }

/* ───────── заявка ───────── */
.form { max-width: 640px !important; padding: 28px 32px 30px !important; }
.form h3 { margin: 18px 0 0; font-size: 32px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.form .note { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.form .fields { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form label { display: grid; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.form .wide2 { grid-column: 1 / -1; }
.form input:not([type='checkbox']), .form select, .form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--map); font: 500 16px/1.3 'Manrope Variable', Manrope, system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: var(--ink); outline: none; transition: border-color 0.2s; }
.form textarea { resize: vertical; }
.form ::placeholder { color: var(--mute); opacity: 0.7; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--green); }
.form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .check { display: flex; align-items: flex-start; gap: 10px; font-family: inherit; font-size: 14px; line-height: 1.45; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.form .check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--green); }
.form .foot { margin-top: 22px; display: flex; align-items: center; gap: 16px; min-height: 46px; }
.form .foot .btn { padding: 12px 24px; font-size: 16px; }
.form .btn:disabled { opacity: 0.5; cursor: default; }
.form .msg { font-size: 14px; line-height: 1.4; color: var(--green); }
.form .msg.bad { color: var(--clay); }
@media (max-width: 560px) { .form .fields { grid-template-columns: 1fr; } }

/* ───────── без анимаций ───────── */
html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; }
html.still .slide .stagger > *, html.still .slide .txt > *, html.still .slide .panel { opacity: 1; }
html.still #what .g path { stroke-dashoffset: 0; }
@media print { .st.next::before, .st.next::after { display: none; } }

@media (max-width: 767px) {
  .overlay .grid { grid-template-columns: 1fr; }
}

/* ───────── телефон и узкое окно (класс m ставит landing.js при ширине меньше 900) ─────────
   Сцена 1600 × 900 отключена: экран — обычный блок страницы в одну колонку.
   Порядок в колонке: надзаголовок, заголовок, текст, карта, пункты шагов. Карта экранов с шагами
   приклеена сверху, пункты едут под ней и переключают её по ходу прокрутки и по нажатию. */
html.m body { overflow-x: hidden; }
html.m #deck .slide { height: auto; overflow: visible; border-top: 1px solid var(--line); }
html.m #deck .slide:first-child { border-top: 0; }
html.m #deck .pin { position: static; height: auto; overflow: visible; }
html.m #deck .stage { position: static; width: auto; height: auto; margin: 0; transform: none; padding: 48px 20px 52px; display: flex; flex-direction: column; }
html.m #deck .abs { position: static; }
html.m #deck .txt { display: contents; }
html.m #deck .slide .txt > *, html.m #deck .slide .stagger > *, html.m #deck .slide .panel { opacity: 1; animation: none; transform: none; }
html.m #deck .eyebrow { order: 1; font-size: 12px; }
html.m #deck .txt h1, html.m #deck .txt h2 { order: 2; margin-top: 14px; font-size: 31px; line-height: 1.12; letter-spacing: -0.025em; }
html.m #deck .txt > p { order: 3; margin-top: 16px; max-width: none; font-size: 17px; line-height: 1.55; }
html.m #deck .txt > p + p { margin-top: 12px; }
html.m #deck .go { order: 4; margin-top: 26px; flex-wrap: wrap; }
html.m #deck .go .btn { padding: 14px 24px; font-size: 16px; }
html.m #deck .panel { order: 5; position: relative; left: auto; top: auto; width: 100%; height: auto; aspect-ratio: 870 / 680; margin-top: 24px; border-radius: 16px; }
/* приклеенная карта уже колонки и стоит по центру: на телефоне она занимает около трети экрана, пунктам под ней просторно */
html.m #deck #price .panel, html.m #deck #route .panel, html.m #deck #ku .panel { position: sticky; top: 8px; z-index: 3; width: 78%; align-self: center; box-shadow: 0 10px 30px -18px rgba(30, 42, 37, 0.45); }
html.m #deck .steps { order: 6; margin-top: 16px; padding-top: 8px; border-top: 0; }
html.m #deck .st { grid-template-columns: 38px 1fr; margin: 0; padding: 14px 14px 16px; }
html.m #deck .st b { font-size: 19px; }
html.m #deck .st p { font-size: 16px; }

html.m #deck #hero .stage { padding-top: 28px; padding-bottom: 0; }
html.m #deck #hero .plate { order: 0; width: 168px; }
html.m #deck #hero .txt h1 { margin-top: 40px; font-size: 36px; line-height: 1.08; }
html.m #deck #hero .txt > p { font-size: 18px; }
html.m #deck #hero .down { display: none; }
html.m #deck #hero .legend { order: 8; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 -20px; padding: 14px 20px 26px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
html.m #deck #hero .legend span { display: inline-flex; align-items: center; gap: 9px; }
html.m #deck #hero .legend i { width: 9px; height: 9px; }
html.m #deck #hero .legend .box { background: var(--green); }
html.m #deck #hero .legend .ring { border: 2px solid var(--clay); border-radius: 50%; }
/* карта первого экрана: на телефоне показана её правая часть с городом и сёлами */
html.m #deck #hero .wide { order: 7; position: relative; inset: auto; margin: 30px -20px 0; aspect-ratio: 1040 / 900; overflow: hidden; transform: none; -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%); mask-image: linear-gradient(180deg, transparent, #000 12%); }
html.m #deck #hero .wide canvas { width: 153.85%; height: 100%; margin-left: -53.85%; }

html.m #deck #what .goods { order: 5; position: static; width: auto; margin-top: 26px; grid-template-columns: 1fr 1fr; column-gap: 14px; }
html.m #deck #what .g { height: auto; min-height: 76px; gap: 12px; padding: 12px 0; }
html.m #deck #what .g svg { width: 34px; height: 34px; }
html.m #deck #what .g b { margin-top: 4px; font-size: 16px; }
html.m #deck #what .cards { order: 6; position: static; width: auto; margin-top: 28px; grid-template-columns: 1fr; gap: 12px; }
html.m #deck #what .card { padding: 20px 20px 22px; border-radius: 16px; }
html.m #deck #what .card b { margin-top: 14px; font-size: 21px; }
html.m #deck #what .card p { font-size: 16px; }

html.m #deck #final .stage { padding-bottom: 64px; }
html.m #deck #final .txt h2 { font-size: 40px; line-height: 1.06; letter-spacing: -0.03em; }
html.m #deck #final .txt > p { font-size: 18px; }
html.m #deck #final .go .btn { flex: 1 1 100%; justify-content: center; }
html.m #deck #final .plate { order: 9; width: 190px; margin-top: 48px; }

@media (max-width: 560px) {
  .overlay { padding: 10px; align-items: flex-end; }
  .form { padding: 20px 18px 22px !important; max-height: 94vh; }
  .form h3 { font-size: 26px; }
  .form .foot { flex-wrap: wrap; }
  .form .foot .btn { flex: 1 1 100%; justify-content: center; }
}

/* ───────── печать → PDF: страница на экран, все шаги раскрыты ───────── */
@page { size: 1600px 900px; margin: 0; }
@media print {
  html, body { background: var(--paper) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; overflow: visible !important; }
  .navbtn, .overlay, .noexp { display: none !important; }
  .pin { position: relative !important; height: 900px !important; }
  .slide, html.present .slide { position: relative !important; inset: auto; width: 1600px; height: 900px !important; opacity: 1 !important; visibility: visible !important; break-after: page; page-break-after: always; break-inside: avoid; }
  /* в печать всё в конечном виде: без появления, без параллакса, значки дорисованы */
  .slide .stagger > *, .slide .txt > *, .slide .panel { opacity: 1 !important; animation: none !important; transform: none !important; }
  #hero .wide, #hero .txt { transform: none !important; }
  #what .g path { animation: none !important; stroke-dashoffset: 0 !important; }
  #what .card i::after { animation: none !important; }
  .stage { left: 0; top: 0; margin: 0; transform: none; }
  * { transition: none !important; }
}
