@font-face{font-family:'Manrope';font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/manrope-400-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Manrope';font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/manrope-400-latin.woff2) format('woff2');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:'Unbounded';font-style:normal;font-weight:500 700;font-display:swap;src:url(fonts/unbounded-500-cyrillic.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:500 700;font-display:swap;src:url(fonts/unbounded-500-latin.woff2) format('woff2');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}
/* Токени сайту. Палітра: папір і чорнило, один акцент (кіновар) лише для головної дії. */
:root {
  --paper: #F4F1EA;
  --paper-2: #E9E4D8;
  --paper-3: #DDD6C6;
  --ink: #1C1B18;
  --ink-2: #504C43;
  --line: #D3CCBB;
  --accent: #B93A12;
  --accent-hover: #9C2F0D;
  --on-accent: #FFFFFF;
  --f-display: Unbounded, "Segoe UI", system-ui, sans-serif;
  --f-body: Manrope, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r: 4px;
  --ctl: 48px;
  --gut: 16px;
  --wrap: 1180px;
  /* схеми в розрізі й логотип */
  --sv-base: #CFC8B6; --sv-edge: #504C43; --sv-cone: #8F8B7F; --sv-cone-2: #A5A194; --sv-screw: #1C1B18; --sv-wall: #DDD6C6;
  --logo-1: #A39E90; --logo-2: #6B665A; --logo-3: #1C1B18;
  --scrim: rgba(20, 19, 17, .88);
  --scrim-soft: rgba(20, 19, 17, .6);
  color-scheme: light;
}
/* Темна тема (TG 11854): тепла майже-чорна основа, той самий кіновар, але світліший тон, щоб на темному тримав контраст.
   Текст на кнопці акценту темний (5.8:1), приглушений текст 7.2:1 на тлі. */
:root[data-theme="dark"] {
  --paper: #141311;
  --paper-2: #1C1A17;
  --paper-3: #262420;
  --ink: #ECE6DA;
  --ink-2: #A8A193;
  --line: #34302A;
  --accent: #E8693A;
  --accent-hover: #F07A48;
  --on-accent: #141311;
  --sv-base: #4A463E; --sv-edge: #8A8477; --sv-cone: #8C877B; --sv-cone-2: #6E6A60; --sv-screw: #ECE6DA; --sv-wall: #2E2B26;
  --logo-1: #6E6A60; --logo-2: #A8A193; --logo-3: #ECE6DA;
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gut: 28px; } }
@media (min-width: 1100px) { :root { --gut: 40px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--f-body); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r); z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 700; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); line-height: 1.1; }
h2 { font-size: clamp(1.45rem, 2.8vw, 2.1rem); line-height: 1.2; font-weight: 500; }
h3 { font-size: 1.05rem; line-height: 1.3; font-weight: 500; }
p { margin: 0 0 1em; }
.prose { max-width: 62ch; }
.prose > :last-child { margin-bottom: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; line-height: 1.5; }

/* Шапка */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.15rem/1 var(--f-display); text-decoration: none; letter-spacing: -0.02em; min-height: 44px; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 22px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
@media (max-width: 719px) { .nav { margin-left: 0; width: 100%; gap: 0 18px; } }

/* Кнопки: один розмір контролу */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--ctl); padding: 0 22px; border-radius: var(--r); border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 700 16px/1 var(--f-body); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-main { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-main:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Мітка «Приклад» */
.tag { display: inline-block; border: 1px solid var(--ink-2); color: var(--ink-2); border-radius: 2px; padding: 1px 8px; font-size: 13px; font-weight: 600; line-height: 1.5; }

/* Герой: текст зліва, зображення справа з «шарами» позаду */
.hero { padding: 40px 0 64px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; } .hero { padding: 64px 0 88px; } }
.hero .kicker { margin: 0 0 14px; font-weight: 600; color: var(--ink-2); }
.hero h1 { margin-bottom: 20px; }
.hero .lead { font-size: 1.15rem; line-height: 1.6; max-width: 52ch; margin-bottom: 28px; }
.hero .after { margin: 18px 0 0; }
.stackpic { margin: 0; }
.stackpic .frame { border: 1px solid var(--ink); background: var(--paper-2); box-shadow: 10px 10px 0 var(--paper-3), 20px 20px 0 var(--paper-2); }
.stackpic img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.stackpic figcaption { margin-top: 34px; font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }

/* Відео-шапка темної головної. Медіа на всю ширину; на десктопі текст лежить на нижньому краї поверх затемнення,
   на телефоні йде під медіа. Висота обмежена, щоб під шапкою було видно початок наступного блоку. */
.vhero { position: relative; }
.vhero-media { position: relative; aspect-ratio: 4 / 3; max-height: 72vh; width: 100%; overflow: hidden; background: var(--paper-2); }
@media (min-width: 600px) { .vhero-media { aspect-ratio: 16 / 9; } }
.vhero-media > svg, .vhero-media > video, .vhero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vhero-chip { position: absolute; right: var(--gut); bottom: 16px; z-index: 2; margin: 0; display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 14px; border-radius: var(--r); background: var(--scrim-soft); color: var(--ink); border: 0;
  font: 600 14px/1 var(--f-body); }
.vhero-chip svg { width: 18px; height: 18px; }
/* «Відео скоро» — підпис без рамки; кнопка паузи — з рамкою й тієї ж висоти, що кнопки поруч */
.vhero-toggle { min-height: var(--ctl); border: 1.5px solid var(--ink-2); cursor: pointer; transition: background-color .15s, border-color .15s; }
.vhero-toggle:hover { background: var(--scrim); border-color: var(--ink); }
.vhero-text { padding: 28px 0 0; }
.vhero-text .kicker { margin: 0 0 12px; font-weight: 600; color: var(--ink-2); }
.vhero-text h1 { margin-bottom: 24px; max-width: 16ch; }
.vstrip { padding: 24px 0 56px; }
.vstrip .lead { font-size: 1.15rem; line-height: 1.6; max-width: 58ch; margin-bottom: 12px; }
.vstrip p:last-child { margin: 0; }
@media (min-width: 900px) {
  .vhero-media { max-height: 78vh; }
  .vhero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, var(--scrim) 0%, var(--scrim-soft) 26%, transparent 58%); }
  /* чуже відео чи постер може бути світлим: затемнення вище й щільніше, щоб підпис над заголовком читався */
  .vhero-media[data-media]::after { background: linear-gradient(to top, var(--scrim) 0%, var(--scrim) 28%, var(--scrim-soft) 52%, transparent 78%); }
  .vhero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 0 0 48px; pointer-events: none; }
  .vhero-text .btns { pointer-events: auto; }
  .vhero-text h1 { font-size: clamp(2.4rem, 4.8vw, 4.2rem); }
  .vhero-chip { bottom: 48px; }
  .vstrip { padding: 40px 0 72px; }
}
.btn-ghost { background: var(--scrim-soft); }
[data-theme="dark"] .age { background: var(--paper-3); color: var(--ink); border-top: 1px solid var(--line); }

/* Секції */
.sec { padding: 64px 0; border-top: 1px solid var(--line); }
.sec-head { max-width: 62ch; margin-bottom: 32px; }
.sec-head h2 { margin-bottom: 12px; }
.split { display: grid; gap: 36px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; } .split.rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* Схема в розрізі */
.xs { margin: 0; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 14px; }
.xs svg { width: 100%; height: auto; overflow: visible; }
.xs .pl { transition: transform .25s ease; transform: translateY(calc(var(--ex, 0) * var(--i) * -1px)); }
@media (prefers-reduced-motion: reduce) { .xs .pl { transition: none; } }
.xs-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 10px; }
.xs-ctl label { font-weight: 600; font-size: 15px; }
.xs-ctl input[type=range] { flex: 1 1 180px; min-width: 140px; min-height: 44px; accent-color: var(--ink); }
.xs-leg { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); }
.xs-leg li { display: inline-flex; align-items: center; gap: 7px; }
.xs-leg i { width: 14px; height: 10px; display: inline-block; border-radius: 1px; }
/* Сцена складання на прокрутці. Без класу is-js (нема JS або prefers-reduced-motion) усе стоїть у кінцевому кадрі: картина на стіні. */
.story { padding-bottom: 0; }
.story-grid { display: grid; gap: 0; }
.story-stage { position: sticky; top: 0; z-index: 2; background: var(--paper); height: 46vh; padding: 8px 0; display: flex; align-items: center; }
.story-fig { width: 100%; }
.story-fig svg { max-height: calc(46vh - 136px); margin: 0 auto; }
/* Сцена (46vh) + відступи колонки кроків зверху (29vh) і знизу (25vh) = 100vh: тоді довжина прокрутки = 5 кроків,
   і центр поточного кроку стоїть на 75vh, одразу під сценою (на початку кроку 95vh, у кінці 55vh). На десктопі сцена в сусідній колонці: відступи 50vh + 50vh, центр на 50vh. */
.story-steps { list-style: none; margin: 0; padding: 29vh 0 25vh; counter-reset: st; }
.story-step { counter-increment: st; min-height: 40vh; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0 12px; align-content: center; padding: 18px 0; max-width: 52ch; }
.story-step::before { content: counter(st); font: 700 2rem/1 var(--f-display); color: var(--ink-2); letter-spacing: -0.03em; }
.story-step h3 { margin-bottom: 6px; }
.story-step p { margin: 0; color: var(--ink-2); grid-column: 2; }
.story.is-js .story-step { transition: opacity .25s; opacity: .4; }
.story.is-js .story-step[aria-current="step"] { opacity: 1; }
@media (min-width: 900px) {
  .story-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .story-stage { height: 100vh; padding: 0; background: none; }
  .story-fig svg { max-height: calc(100vh - 180px); }
  .story-steps { padding: 50vh 0; }
  .story-step { min-height: 70vh; }
}
.story svg .stk { transform-box: view-box; transform-origin: 320px 208px; transform: translate(201px, -8px) rotate(-90deg) scale(.6); }
.story.is-js svg .stk { transform: translate(calc(var(--tx, 0) * 1px), calc(var(--ty, 0) * 1px)) rotate(calc(var(--rot, 0) * 1deg)) scale(var(--sc, 1)); }
.story.is-js svg .cn { opacity: var(--d, 1); transform: translateY(calc((1 - var(--d, 1)) * -90px)); }
.story.is-js svg .ly { opacity: var(--d, 1); transform: translateY(calc((1 - var(--d, 1)) * -230px)); }
.story.is-js svg .sc { opacity: var(--d, 1); transform: translateY(calc((1 - var(--d, 1)) * 80px)); }
.story.is-js svg .wl { opacity: var(--d, 1); }

.facts { margin: 0; padding: 0; }
.facts div { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 4px 20px; align-items: baseline; }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font: 700 1.5rem/1.1 var(--f-display); letter-spacing: -0.02em; }
.facts dd { margin: 0; color: var(--ink-2); }
@media (max-width: 480px) { .facts div { grid-template-columns: 1fr; } }

/* Галерея дизайнів */
.grid { display: grid; gap: 28px 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); list-style: none; margin: 0; padding: 0; }
.card a { display: block; text-decoration: none; }
.card .ph { border: 1px solid var(--line); background: var(--paper-2); overflow: hidden; border-radius: var(--r); }
.card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.card .ph { transition: border-color .15s; }
.card a:hover .ph { border-color: var(--ink); }
.card h3 { margin: 14px 0 4px; }
.card a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--ink-2); font-size: 15px; }
.empty { border: 1px dashed var(--ink-2); padding: 28px; border-radius: var(--r); max-width: 62ch; }

/* Що в наборі */
.kit { display: grid; gap: 28px; }
@media (min-width: 900px) { .kit { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; } }
.list { margin: 0; padding-left: 1.2em; }
.list li { margin-bottom: .55em; padding-left: .2em; }
.note { background: var(--paper-2); border-radius: var(--r); padding: 20px 22px; border: 1px solid var(--line); }
.note p:last-child { margin-bottom: 0; }

/* Як замовити */
.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; max-width: 68ch; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); font: 700 2rem/1 var(--f-display); color: var(--ink-2); letter-spacing: -0.03em; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-2); }

/* Сторінка дизайну */
.crumbs { padding: 18px 0 0; font-size: 15px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.pdp { padding: 24px 0 64px; display: grid; gap: 32px; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; } .pdp .info { position: sticky; top: 24px; } }
.gal .main { margin: 0; border: 1px solid var(--line); background: var(--paper-2); border-radius: var(--r); overflow: hidden; }
.gal .main img { width: 100%; height: auto; }
.thumbs { display: flex; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; overflow-x: auto; }
.thumbs button { display: block; padding: 0; border: 2px solid transparent; background: none; border-radius: var(--r); cursor: pointer; width: 96px; flex: none; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 64px; object-fit: cover; border-radius: 2px; border: 1px solid var(--line); }
.info h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 10px 0 14px; }
.spec { margin: 22px 0; padding: 0; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.spec div:last-child { border-bottom: 1px solid var(--line); }
.spec dt { color: var(--ink-2); }
.spec dd { margin: 0; font-weight: 600; text-align: right; }
.order { margin: 24px 0 0; }
.order .btns .btn { flex: 1 1 220px; }
.order .hint { margin: 14px 0 0; }
.more { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.more h2 { margin-bottom: 24px; }

/* Текстові сторінки */
.page { padding-block: 40px 72px; }
.page h1 { margin-bottom: 24px; }
.page h2 { margin: 36px 0 12px; font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
.page .prose p, .page .prose li { max-width: 62ch; }
.kv { margin: 0 0 8px; padding: 0; max-width: 62ch; }
.kv div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 2px 18px; padding: 11px 0; border-top: 1px solid var(--line); }
.kv div:last-child { border-bottom: 1px solid var(--line); }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv div { grid-template-columns: 1fr; } }

/* Смуга 14+ і підвал */
.age { background: var(--ink); color: var(--paper); }
.age p { margin: 0; padding: 14px 0; font-weight: 600; font-size: 15px; }
.foot { padding: 40px 0 48px; font-size: 15px; background: var(--paper-2); border-top: 1px solid var(--line); }
.foot .wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .foot .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 40px; } }
.foot h2 { font: 700 1rem/1.3 var(--f-body); margin: 0 0 10px; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li a { display: inline-flex; align-items: center; min-height: 36px; }
.foot p { margin: 0 0 .6em; }
.foot .legal { color: var(--ink-2); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--r); font-size: 15px; font-weight: 600; max-width: calc(100% - 32px); z-index: 20; }
.toast[hidden] { display: none; }

/* ============================================================================
   Редизайн 10.11 (v2). Підключається після style.css лише коли config.json "redesign": true.
   Мова дизайну — «карта складання»:
   · палітра та шрифти ті самі, що в style.css (токени вище); нових кольорів теми немає;
   · «стос» (.stack): плита + два зсунуті шари позаду. Єдиний спосіб показати глибину; тіней з розмиттям немає;
   · розмірна лінія (.dim) замість підпису «ширина …»;
   · рух повторює складання: шари сідають, плити виїжджають з-під блоку. Усе вимикається з prefers-reduced-motion;
   · акцент (кіновар) — лише головна кнопка й бігунок повзунка.
   ============================================================================ */
:root {
  /* фарба шарів-прикладів (ті самі значення, що LAYER_COLS у build.py): це колір картини, не теми */
  --ly-1: #F0D2AE; --ly-2: #E4733F; --ly-3: #C58488; --ly-4: #7A5C84; --ly-5: #3C878C;
  /* стіл рендера: тло кадрів повзунка (render-lamba-0911, --ss-bg) */
  --bench: #F6ECDD;
  --shade: rgba(28, 27, 24, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --top-h: 0px;
}
:root[data-theme="dark"] { --shade: rgba(11, 10, 9, .5); }
@media (min-width: 900px) { :root { --top-h: 73px; } }

html { scroll-padding-top: calc(var(--top-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { -webkit-font-smoothing: antialiased; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h2 { font-size: clamp(1.5rem, 3.1vw, 2.5rem); line-height: 1.12; letter-spacing: -0.02em; }

/* ---------- шапка сайту: на комп'ютері липка; логотип-стос розсувається під курсором */
.top { background: var(--paper); z-index: 30; }
@media (min-width: 900px) { .top { position: sticky; top: 0; } }
.brand polygon { transition: transform .25s var(--ease); }
.brand:hover polygon:first-child { transform: translateY(-2px); }
.brand:hover polygon:last-child { transform: translateY(2px); }
.nav a { position: relative; color: var(--ink-2); transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (max-width: 719px) { .top .wrap { padding-top: 8px; padding-bottom: 6px; gap: 0 28px; } .nav a { min-height: 40px; } .nav a::after { bottom: 6px; } }

/* ---------- стос: плита з двома шарами позаду. Лице — дочірній елемент; --off множить зсув (0 = шари сховані) */
.stack { position: relative; isolation: isolate; --o: 5px; }
.stack::before, .stack::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--line); border-radius: var(--r); pointer-events: none; transition: transform .45s var(--ease); }
.stack::before { z-index: -1; background: var(--paper-2); transform: translate(calc(var(--off, 1) * var(--o)), calc(var(--off, 1) * var(--o))); }
.stack::after { z-index: -2; background: var(--paper-3); transform: translate(calc(var(--off, 1) * var(--o) * 2), calc(var(--off, 1) * var(--o) * 2)); }

/* ---------- розмірна лінія */
.dim { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 14px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dim::before, .dim::after { content: ""; flex: 1; height: 9px; background: linear-gradient(var(--ink-2), var(--ink-2)) center / 100% 1px no-repeat; opacity: .7; }
.dim::before { border-left: 1px solid var(--ink-2); }
.dim::after { border-right: 1px solid var(--ink-2); }

/* ---------- розкриття на прокрутці. Клас rv ставить ранній скрипт (є JS, нема «менше руху»); без нього все видно одразу */
.rv [data-rv] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--rv-i, 0) * 80ms); }
.rv [data-rv].in { opacity: 1; transform: none; }

/* ---------- відео-шапка. Слот: 16:9 (телефон 4:3), не вище 80 % екрана. Усе, що всередині, лежить на весь слот */
.vhero-media { aspect-ratio: 4 / 3; max-height: 70vh; }
@media (min-width: 600px) { .vhero-media { aspect-ratio: 16 / 9; max-height: 80vh; } }
@media (min-width: 900px) { .vhero-media { max-height: calc(86vh - var(--top-h)); } }
.vhero-media.is-failed > video, .vhero-media.is-failed > .vhero-toggle { display: none; }
.vhero-media[data-media] .vhero-ticks { display: none; }   /* мітки кадру лише на малюнку-заглушці */
/* мітки кадру по кутах: межа безпечної зони слота */
.vhero-ticks { position: absolute; inset: 14px; z-index: 1; pointer-events: none; opacity: .55; --c: var(--ink); --l: 16px;
  background:
    linear-gradient(var(--c), var(--c)) left top / var(--l) 1px no-repeat, linear-gradient(var(--c), var(--c)) left top / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) right top / var(--l) 1px no-repeat, linear-gradient(var(--c), var(--c)) right top / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / var(--l) 1px no-repeat, linear-gradient(var(--c), var(--c)) left bottom / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / var(--l) 1px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 1px var(--l) no-repeat; }
.vhero-chip { right: 26px; bottom: 26px; }
@media (min-width: 900px) { .vhero-ticks { inset: 22px; } .vhero-chip { bottom: 56px; right: var(--gut); } }
/* малюнок-заглушка: кожен шар їде на прокрутці зі своєю швидкістю (далекі повільніше за сторінку), а при вході лягає на місце */
.vhero-ph2 .vh-l { transform: translateY(calc(var(--sy, 0) * var(--z) * 0.07px)); }
@media (prefers-reduced-motion: no-preference) {
  .js .vhero-ph2 .vh-in { animation: vh-in .9s var(--ease) both; animation-delay: calc(var(--n) * 120ms + 80ms); }
}
@keyframes vh-in { from { opacity: 0; transform: translateY(-36px); } to { opacity: 1; transform: none; } }
.vhero-text h1 { letter-spacing: -0.02em; }
@media (min-width: 900px) {
  .vhero-text { padding-bottom: 56px; }
  .vhero-text .kicker { color: var(--ink); }
  .vhero-text h1 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); line-height: 1.04; max-width: 14ch; }
}
.vstrip { padding: 28px 0 64px; }
.vstrip-grid { display: grid; gap: 28px; }
.vstrip .lead { font-size: clamp(1.15rem, 1.75vw, 1.4rem); line-height: 1.5; max-width: 34em; }
@media (min-width: 900px) { .vstrip { padding: 56px 0 96px; } .vstrip-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; align-items: start; } }

/* ---------- секції */
.sec { padding: 72px 0; overflow-x: clip; }
@media (min-width: 900px) { .sec { padding: 104px 0; } .split, .kit { gap: 72px; } }
.sec-head { margin-bottom: 28px; }
.xs figcaption { margin-top: 10px; }


/* ---------- повзунок розбирання. Сцена 4:3 на світлому «столі»; шари позаду сцени роз'їжджаються разом із повзунком (--xp 0..1) */
.xp { display: grid; gap: 20px; }
.xp-head h2 { margin-bottom: 12px; }
.xp-head p { margin: 0; max-width: 46ch; }
.xp-stage { aspect-ratio: 4 / 3; --o: 2.5px; --off: calc(1 + var(--xp, 0) * 1.6); }
.rv .xp-stage[data-rv]:not(.in) { --off: 0; }
.xp-stage::before { background: var(--ly-5); border-color: transparent; transition-duration: .2s; }
.xp-stage::after { background: var(--ly-4); border-color: transparent; transition-duration: .2s; }
.xp-stage canvas, .xp-poster { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: var(--r); }
.xp-poster { object-fit: cover; background: var(--bench); }
.js .xp-stage[data-xp-stage] { cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.xp-empty { display: grid; place-items: center; padding: 24px; text-align: center; color: var(--ink-2); border: 1px dashed var(--ink-2); border-radius: var(--r); }
.xp-empty p { margin: 0; max-width: 30ch; }
.xp-ctl { display: none; }
.js .xp-ctl { display: grid; gap: 4px; }
.xp-ctl label { font-weight: 700; font-size: 15px; }
.xp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; font-size: 14px; color: var(--ink-2); }
.xp-row input { width: 100%; margin: 0; height: var(--ctl); background: transparent; -webkit-appearance: none; appearance: none; cursor: grab; touch-action: pan-y; }
.xp-row input:active { cursor: grabbing; }
.xp-row input::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--ink) var(--p, 0%), var(--line) var(--p, 0%)); }
.xp-row input::-moz-range-track { height: 2px; background: var(--line); }
.xp-row input::-moz-range-progress { height: 2px; background: var(--ink); }
.xp-row input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 30px; margin-top: -14px; border-radius: 2px; background: var(--accent); border: 0; }
.xp-row input::-moz-range-thumb { width: 16px; height: 30px; border-radius: 2px; background: var(--accent); border: 0; }
.xp-row input:hover::-webkit-slider-thumb { background: var(--accent-hover); }
.xp-row input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r); }
.xp-out { display: block; font: 700 clamp(2.2rem, 4.4vw, 3.4rem)/1 var(--f-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.xp-notes p { max-width: 46ch; }
.xp-notes p:last-child { margin: 0; }
@media (min-width: 900px) {
  .xp { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 88px; row-gap: 28px; align-items: start;
    grid-template-areas: "stage head" "stage ctl" "stage notes" "stage ."; grid-template-rows: auto auto auto 1fr; }
  .xp-head { grid-area: head; padding-top: 8px; }
  .xp-stage { grid-area: stage; --o: 7px; }
  .xp-ctl { grid-area: ctl; }
  .xp-notes { grid-area: notes; }
}

/* ---------- схема в розрізі: шари опускаються на ступені, поки блок в'їжджає в екран (--ex пише скрипт) */
.xs-scroll { padding: 24px 22px 18px; }
.xs-scroll .pl { transition: transform .3s var(--ease); }

/* ---------- дизайни: дві широкі картки; три в ряд лише коли дизайнів п'ять і більше */
.grid { grid-template-columns: minmax(0, 1fr); gap: 44px 36px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid:has(> :nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card .ph { border: 0; background: none; overflow: visible; border-radius: 0; --off: 0; }
.card .ph img { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper-2); transition: border-color .15s; }
.card a:hover .ph, .card a:focus-visible .ph { --off: 1; }
.card a:hover .ph img { border-color: var(--ink-2); }
.card .dim { margin-top: 16px; }
.card h3 { margin: 10px 0 4px; font-size: 1.15rem; }
.card a:hover h3 { text-decoration: none; }
.card .meta { min-height: 24px; }

/* ---------- що в наборі: рядки з малюнками деталей */
.kit-list { list-style: none; margin: 0; padding: 0; }
.kit-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 20px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.kit-list li:last-child { border-bottom: 1px solid var(--line); }
.kit-list svg { width: 40px; height: 40px; fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.kit .note { margin: 0; }
@media (min-width: 900px) {
  .kit { grid-template-areas: "head list" "note list"; grid-template-rows: auto 1fr; row-gap: 28px; align-items: start; }
  .kit h2 { grid-area: head; } .kit-list { grid-area: list; } .kit .note { grid-area: note; max-width: 44ch; }
  .ask { position: sticky; top: calc(var(--top-h) + 24px); }
}

/* ---------- картина за вашим фото: плити роз'їжджаються віялом (--p 0..1 пише скрипт; без нього — наполовину) */
.fan { margin: 0; }
.fan svg { width: 100%; height: auto; overflow: visible; }
.fan figcaption { margin-top: 12px; }
.fan-p { transform: translate(calc(var(--p, .5) * var(--i) * 44px), calc(var(--p, .5) * var(--i) * -24px)); transition: transform .25s var(--ease); }
#sviy .btns { margin-top: 24px; }

/* ---------- як замовити: картка зв'язку поруч */
.ask { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; background: var(--paper-2); }
.ask h3 { margin-bottom: 6px; }
.ask > p { margin: 0; }
.ask .btns { margin: 18px 0; }
.ask .btn { flex: 1 1 200px; }

/* ---------- лічильник шарів збоку (лише широкий екран): кожна секція кладе свою плиту на стос */
.gauge { display: none; }
@media (min-width: 1360px) {
  .js .gauge { display: flex; flex-direction: column-reverse; gap: 3px; position: fixed; left: 28px; bottom: 28px; z-index: 5; pointer-events: none; }
  .gauge i { display: block; width: 32px; height: 6px; clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); background: var(--c, var(--ink-2)); opacity: 0; transform: translateY(-16px); transition: transform .45s var(--ease), opacity .3s; }
  .gauge i.on { opacity: 1; transform: none; }
}

/* ---------- перевірка слотів: /?slots=1 обводить місця під відео й кадри та підписує розміри */
.show-slots [data-slot] { outline: 2px dashed var(--accent); outline-offset: -2px; }
.slot-label { position: absolute; left: 12px; top: 12px; z-index: 6; margin: 0; background: var(--accent); color: var(--on-accent); font: 700 13px/1.4 var(--f-body); padding: 4px 8px; border-radius: 2px; max-width: calc(100% - 24px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
}

/* сцена складання (story_enabled=true) під липкою шапкою сайту */
@media (min-width: 900px) {
  .story-stage { top: var(--top-h); height: calc(100vh - var(--top-h)); }
  .story-fig svg { max-height: calc(100vh - var(--top-h) - 180px); }
}
