/* From the Plan — сайт v1. Фирменный стиль: комплект A (белая бумага, графит, синька только в знаке и мелких акцентах).
   Сначала телефон, потом десктоп (от 900 px). Анимации включаются классом .motion (assets/js/motion.js),
   при prefers-reduced-motion и без JS страница статичная и целиком читается. */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin-400-600.woff") format("woff");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ================= ПАЛИТРА — все цвета сайта только здесь =================
   Смена палитры — правка строк этого блока. Синий — только знак, линии, номера, ссылки и кнопка; фоном секций не заливается. */
:root {
  /* страница */
  --bg: #ffffff;            /* фон страницы */
  --tone: #f2f3f5;          /* светлая подложка */
  --line: #e4e6e9;          /* тонкие линии */
  --line-2: #d1d4d9;        /* линии заметнее */
  --ink: #151c26;           /* графит: заголовки и текст */
  --ink-2: #3a424d;         /* меню, подзаголовки */
  --muted: #4f5661;         /* абзацы */
  --faint: #6d747e;         /* подписи */
  --accent: #1d4a8c;        /* синька: линии-разметка, номера, ссылки */
  --btn-bg: #1d4a8c;        /* кнопка */
  --btn-bg-hover: #192940;
  --btn-ink: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.96);
  --select: #d1e1f8;
  --mark-left: #1d4a8c;     /* знак: левая стена */
  --mark-right: #6887c4;    /* знак: правая стена (план и имя — цветом --ink) */
  --check-bg: #fff6ec;      /* временные пометки [ПРОВЕРИТЬ] */
  --check: #8f5a06;
  --check-line: #e59b37;

  /* витрины: первый экран, комнаты, ролик, расслоение (класс .showcase) — можно задать отдельно от страницы */
  --showcase-bg: var(--bg);
  --showcase-tone: var(--tone);
  --showcase-line: var(--line);
  --showcase-line-2: var(--line-2);
  --showcase-ink: var(--ink);
  --showcase-muted: var(--muted);
  --showcase-faint: var(--faint);
  --showcase-accent: var(--accent);
  --showcase-btn-bg: var(--btn-bg);
  --showcase-btn-bg-hover: var(--btn-bg-hover);
  --showcase-btn-ink: var(--btn-ink);

  --pad: 20px;
  --maxw: 1344px;
  --header-h: 56px;
  --gutter: 24px;
  --ease: cubic-bezier(0.16, 0.84, 0.24, 1);
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='8' viewBox='0 0 30 8'%3E%3Cpath d='M0 4h28M24.5 1 28.5 4 24.5 7' fill='none' stroke='%23000' stroke-width='1.1'/%3E%3C/svg%3E");
  --arrow-btn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='8' viewBox='0 0 22 8'%3E%3Cpath d='M0 4h20M16.5 1 20.5 4 16.5 7' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* Внутри витрин общие переменные берут значения витрин */
.showcase {
  --bg: var(--showcase-bg);
  --tone: var(--showcase-tone);
  --line: var(--showcase-line);
  --line-2: var(--showcase-line-2);
  --ink: var(--showcase-ink);
  --ink-2: var(--showcase-ink);
  --muted: var(--showcase-muted);
  --faint: var(--showcase-faint);
  --accent: var(--showcase-accent);
  --btn-bg: var(--showcase-btn-bg);
  --btn-bg-hover: var(--showcase-btn-bg-hover);
  --btn-ink: var(--showcase-btn-ink);
  background: var(--bg);
  color: var(--ink);
}

@media (min-width: 900px) {
  :root { --pad: 48px; --header-h: 68px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--select); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mk-l { fill: var(--mark-left); }
.mk-r { fill: var(--mark-right); }
.mk-p, .mk-w { fill: var(--ink); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; text-decoration: none;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
section[id] { scroll-margin-top: var(--header-h); }

/* ---------- type ---------- */
.h1, .h2, .h3, .eyebrow, .idx, .btn, .stages, .plan__name, .tag, .guarantee__label, .stamp, .others__who, .spec dt {
  font-weight: 500;
  text-transform: uppercase;
}
.h1 {
  font-size: clamp(28px, 7.9vw, 36px);
  line-height: 1.08;
  letter-spacing: 0.07em;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(24px, 6.6vw, 30px);
  line-height: 1.12;
  letter-spacing: 0.12em;
  text-wrap: balance;
}
.h3 { font-size: 14px; line-height: 1.35; letter-spacing: 0.16em; }
.lead { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 34em; }
.body { font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 36em; }
.eyebrow { font-size: 11px; letter-spacing: 0.2em; color: var(--ink-2); display: flex; align-items: center; gap: 12px; }
.sep { display: inline-block; width: 24px; height: 1px; background: var(--accent); }

@media (min-width: 900px) {
  .h1 { font-size: clamp(40px, 3.9vw, 60px); letter-spacing: 0.08em; }
  .h2 { font-size: clamp(30px, 2.7vw, 42px); }
  .lead { font-size: 19px; }
  .body { font-size: 18px; }
  .eyebrow { font-size: 12px; }
}

/* Номер раздела: «→ [ 01 ] THE FILM ———» — линия дочерчивается при появлении */
.idx {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: 0.2em; color: var(--ink);
  margin-bottom: 28px;
}
.idx::before {
  content: ""; flex: 0 0 30px; height: 8px; background: var(--accent);
  -webkit-mask: var(--arrow) no-repeat left center; mask: var(--arrow) no-repeat left center;
}
.idx::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--line-2);
  transform-origin: left center;
}
.idx__no { color: var(--accent); letter-spacing: 0.12em; }
.idx__no::before { content: "[ "; content: "[ " / ""; }
.idx__no::after { content: " ]"; content: " ]" / ""; }
@media (min-width: 900px) { .idx { font-size: 12px; margin-bottom: 36px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 0 22px;
  background: var(--btn-bg); color: var(--btn-ink); text-decoration: none;
  font-size: 13px; letter-spacing: 0.16em; line-height: 1;
  border: 0; border-radius: 0;
  transition: background-color 0.4s var(--ease);
}
.btn::after {
  content: ""; width: 22px; height: 8px; background: var(--btn-ink);
  -webkit-mask: var(--arrow-btn) no-repeat center; mask: var(--arrow-btn) no-repeat center;
  transition: transform 0.5s var(--ease);
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:hover::after { transform: translateX(4px); }
.btn--small { min-height: 38px; padding: 0 14px; font-size: 11px; letter-spacing: 0.14em; gap: 10px; }
.btn--small::after { display: none; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cta-note { font-size: 14px; color: var(--muted); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.top__in { height: 100%; display: flex; align-items: center; gap: 24px; }
.top__logo { display: block; margin-right: auto; padding: 6px 0; }
.lockup { height: 17px; width: auto; aspect-ratio: 1650 / 264; }
.top__nav { display: none; }
@media (min-width: 900px) {
  .lockup { height: 22px; }
  .top__nav { display: flex; gap: 34px; margin-right: 12px; }
  .top__nav a {
    position: relative; text-decoration: none;
    font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2);
    padding: 6px 0;
  }
  .top__nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent);
    transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
  }
  .top__nav a:hover::after { transform: scaleX(1); }
}

/* ---------- подписи к кадрам ---------- */
.fig {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  margin-top: 14px; font-size: 13px; line-height: 1.55; color: var(--faint);
  font-weight: 400; text-transform: none; letter-spacing: 0.01em;
}
.fig__no { color: var(--ink); font-size: 10.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.fig > span:not(.fig__no) { flex: 1 1 14em; }

/* ============ 1. Первый экран и сборка по прокрутке ============
   Порядок по глубине: вещи позади, огромный заголовок, макет (canvas), строка заголовка спереди, вещи впереди, текст и кнопка.
   Картинки без рамок: макет и вещи с прозрачным фоном стоят прямо на белой странице. */
.stage { position: relative; }
.stage__pin {
  position: relative; overflow: hidden;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
}
.motion .stage__pin { position: sticky; top: var(--header-h); }
.stage__type {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 30px max(var(--pad), calc((100% - var(--maxw)) / 2)) 0;
  pointer-events: none; will-change: opacity, transform;
}
.stage__type--back { z-index: 2; }
.stage__type--front { z-index: 6; }   /* заголовок поверх вещей: в полёте вещи проходят за буквами */
.giant {
  margin-top: 18px;
  font-weight: 500; text-transform: uppercase; color: var(--ink);
  font-size: clamp(26px, 8.6vw, 168px); line-height: 0.95; letter-spacing: 0.01em;
}
.giant .ln { display: block; white-space: normal; }
.stage__model { display: none; }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.stage__items { position: absolute; inset: 0; pointer-events: none; }
/* вещь — точка-центр: картинка ракурса в натуральном размере центрируется на ней, масштаб задаёт JS */
.fly { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform, opacity; }
.fly--back { z-index: 1; }
.fly--front { z-index: 4; }
.fly__in { position: absolute; left: 0; top: 0; animation: float 2.5s ease-in-out 2 alternate both; }   /* WCAG 2.2.2: движение само останавливается через ~5 с */
.fly:nth-child(2) .fly__in { animation-duration: 2.8s; }
.fly:nth-child(3) .fly__in { animation-duration: 2.3s; }
.fly:nth-child(4) .fly__in { animation-duration: 2.6s; }
.fly.is-moving .fly__in { animation: none; }
.fly img { position: absolute; left: 0; top: 0; display: block; max-width: none; transform: translate(-50%, -50%); }
@keyframes float {
  from { transform: translate3d(0, -6px, 0); }
  to { transform: translate3d(0, 6px, 0); }
}
.stage__intro {
  position: absolute; z-index: 7; left: var(--pad); right: var(--pad); bottom: 22px;
  display: grid; gap: 16px; will-change: opacity, transform;
}
.stage__intro .lead { font-size: 15px; max-width: 30em; }
.stage__legend { position: absolute; z-index: 7; left: var(--pad); right: var(--pad); bottom: 18px; background: rgba(255, 255, 255, 0.85); padding: 8px 10px; margin: -8px -10px; }
.stage__legend .stages { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stage__hint { display: none; }
/* пометка о чужом проекте: видна, пока на экране макет квартиры */
.stage__note {
  position: absolute; z-index: 7; left: var(--pad); bottom: 100px; width: max-content; max-width: calc(100% - 2 * var(--pad));
  font-size: 11px; line-height: 1.5; color: var(--faint); opacity: 0; pointer-events: none;
  padding: 3px 8px; margin-left: -8px; transition: background-color 0.4s linear, color 0.4s linear;
}
.stage__view { opacity: 0; }
/* над кадром интерьера — лёгкая светлая подложка, чтобы пометка читалась на шторах и ковре */
.stage__note.is-over { background: rgba(255, 255, 255, 0.82); color: var(--ink-2); }

.meter { position: relative; height: 1px; background: var(--line-2); margin-bottom: 12px; }
.meter__bar { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left center; will-change: transform; }
.stages { display: grid; gap: 8px; font-size: 10px; letter-spacing: 0.12em; color: var(--muted); font-weight: 500; text-transform: uppercase; }
.stages li { display: grid; gap: 2px; transition: color 0.5s var(--ease); }
.stages .num { color: var(--muted); transition: color 0.5s var(--ease); }
.stages li.is-on { color: var(--ink); }
.stages li.is-on .num { color: var(--accent); }

@media (min-width: 900px) {
  /* строки заголовка заходят вправо до поля страницы; размер ограничен шириной (вторая строка с отступом ≈ 10,4 em
     должна влезть до правого поля) и высотой окна (на низких окнах композиция уменьшается целиком) */
  .stage__type { padding-top: 6vh; padding-right: var(--pad); }
  .giant { font-size: clamp(30px, min(8.6vw, 17vh, (100vw - max(var(--pad), (100vw - var(--maxw)) / 2) - var(--pad)) / 10.6), 168px); }
  .giant .l2 { padding-left: 1.15em; }
  .giant .l3 { text-align: right; }
  .stage__intro { left: max(var(--pad), calc((100% - var(--maxw)) / 2)); right: auto; bottom: 44px; max-width: 30em; }
  .stage__intro .lead { font-size: 17px; }
  .stage__legend { left: auto; right: max(var(--pad), calc((100% - var(--maxw)) / 2)); width: min(560px, 42%); bottom: 40px; }
  .stage__note { left: max(var(--pad), calc((100% - var(--maxw)) / 2)); bottom: 44px; max-width: 46em; font-size: 12px; }
  .stages { font-size: 11px; letter-spacing: 0.16em; gap: 14px; }
  .motion .stage__hint {
    display: flex; position: absolute; z-index: 7; align-items: center; gap: 12px;
    right: max(var(--pad), calc((100% - var(--maxw)) / 2)); bottom: 48px;
    font-size: 10.5px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint);
  }
  .motion .stage__hint::before {
    content: ""; width: 1px; height: 26px; background: var(--accent);
    transform-origin: top; animation: hint 2.4s var(--ease) 2;   /* два раза и стоп: линия остаётся видна */
  }
}
@keyframes hint { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* без анимации: заголовок, макет и кнопка обычным потоком */
:root:not(.motion) .stage__pin { height: auto; min-height: 0; padding-bottom: 56px; }
:root:not(.motion) .stage__type--back { position: relative; }
:root:not(.motion) .stage__type--front,
:root:not(.motion) .stage__items,
:root:not(.motion) .stage__canvas { display: none; }
:root:not(.motion) .stage__note { position: relative; left: auto; right: auto; bottom: auto; opacity: 1; margin: 12px auto 0; width: min(100% - 2 * var(--pad), 1100px); max-width: none; }
:root:not(.motion) .stage__view { display: none; }
:root:not(.motion) .stage__model { display: block; width: min(100% - 2 * var(--pad), 1100px); height: auto; margin: 28px auto 0; }
:root:not(.motion) .stage__intro { position: relative; left: auto; right: auto; bottom: auto; margin: 28px auto 0; width: min(100% - 2 * var(--pad), var(--maxw)); }

/* ============ секции ============ */
.section { padding: 96px 0; }
@media (min-width: 900px) { .section { padding: 136px 0; } }

/* ---------- 2. Комнаты: полоса кадров во всю ширину ---------- */
.rooms { padding-top: 96px; }
.rooms__head { margin-bottom: 36px; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 82vw; gap: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip__item { scroll-snap-align: start; }
.strip__item img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.strip__item .fig { padding: 0 var(--pad); }
.rooms__note { margin-top: 26px; font-size: 13px; line-height: 1.6; color: var(--faint); }
@media (min-width: 900px) {
  .rooms { padding-top: 136px; }
  .rooms__head { margin-bottom: 48px; }
  .strip { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 6px; overflow: visible; }
  .strip__item .fig { padding: 0 18px; }
}
/* шесть комнат одной полосой во всю ширину */
@media (min-width: 1200px) { .strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- 3. Ролик ---------- */
.film__grid { display: grid; gap: 48px; }
.film__media { margin: 0 calc(-1 * var(--pad)); }
.film__video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.film__media .fig { padding: 0 var(--pad); }
/* пауза и пуск ролика (ролик без звука, крутится по кругу — WCAG 2.2.2) */
.film__btn {
  margin-left: auto; min-height: 24px; display: inline-flex; align-items: center;
  background: none; border: 0; border-bottom: 1px solid var(--line-2);
  padding: 2px 0; font: inherit; color: var(--ink); letter-spacing: 0.16em; text-transform: uppercase; font-size: 10.5px; cursor: pointer;
}
.film__btn:hover { border-color: var(--accent); }
.fig > span.film__desc { flex: 1 1 100%; margin-top: 4px; }   /* текстовое описание ролика (WCAG 1.2.1) — отдельной строкой под подписью */
.film__text .h2 { margin-bottom: 22px; }
.spec { margin-top: 40px; border-top: 1px solid var(--line-2); }
.spec__row { display: grid; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: 12px; letter-spacing: 0.16em; color: var(--ink); }
.spec dd { margin: 0; font-size: 15px; color: var(--muted); font-feature-settings: "tnum" 1; }
.topview { margin-top: 88px; }
.topview img { display: block; width: 100%; max-width: 1100px; height: auto; margin: 0 auto; }
.topview .fig { max-width: 1100px; margin-left: auto; margin-right: auto; }
@media (min-width: 900px) {
  .film__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 96px; align-items: center; }
  .film__media { margin: 0; width: min(100%, 440px); }
  .film__media .fig { padding: 0; }
  .spec__row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; padding: 20px 0; }
  .spec dd { font-size: 16px; }
  .topview { margin-top: 136px; }
}

/* ---------- 4. Как это работает ---------- */
.how .h2 { max-width: 16em; }
.dim { position: relative; height: 40px; margin: 56px 0 8px; display: none; }
.dim__line { position: absolute; left: 0; right: 0; top: 20px; height: 1px; background: var(--accent); transform-origin: left center; }
.dim__tick { position: absolute; top: 14px; width: 1px; height: 13px; background: var(--accent); }
.dim__tick::after { content: ""; position: absolute; left: -4px; top: 2px; width: 9px; height: 1px; background: var(--accent); transform: rotate(-45deg); }
.dim__tick--0 { left: 0; }
.dim__tick--1 { left: 33.333%; }
.dim__tick--2 { left: 66.666%; }
.dim__tick--3 { right: 0; }
.dim__label { position: absolute; top: -6px; font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-feature-settings: "tnum" 1; }
.dim__label--start { left: 0; }
.dim__label--end { right: 0; }

.steps { display: grid; gap: 0; margin-top: 48px; border-left: 1px solid var(--accent); }
.step { position: relative; padding: 0 0 44px 26px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: -5px; top: 10px; width: 9px; height: 1px; background: var(--accent); transform: rotate(-45deg); }
.step__no { display: block; font-size: 44px; line-height: 1; font-weight: 400; letter-spacing: 0.02em; color: var(--ink); margin-bottom: 18px; font-feature-settings: "tnum" 1; }
.step .h3 { margin-bottom: 10px; }
.step p { color: var(--muted); max-width: 26em; }

@media (min-width: 900px) {
  .dim { display: block; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: 28px; border-left: 0; }
  .step { padding: 0 40px 0 0; }
  .step::before { display: none; }
  .step__no { font-size: 64px; margin-bottom: 28px; }
  .step p { font-size: 17px; }
}

/* ============ 5. Расслоение: слои в пространстве (CSS 3D), расходятся вверх и снова складываются ============
   --s: 0 — собрано, 1 — разведено; --gap — шаг между слоями по высоте. Без анимации — статично в разведённом виде.
   overflow-x: clip — подписи слоёв в пространстве «выходят» за край и давали горизонтальную прокрутку. */
.layers { position: relative; overflow-x: clip; }
.layers__grid {
  position: relative;
  display: grid; gap: 40px;
  padding: 96px max(var(--pad), calc((100% - var(--maxw)) / 2));
}
.layers__text .h2 { margin-bottom: 22px; }
.layers__start { display: block; height: 0; }
.layers__end { display: none; }
.layers__stage { position: relative; }
.xray {
  position: relative; height: 100%; min-height: 380px;
  display: flex; align-items: center; justify-content: center;
  perspective: 2600px; perspective-origin: 50% 20%;
}
.xray__stack {
  --s: 1; --gap: 70px; --lift: 1.26;   /* --lift ≈ (число слоёв − 1) × 0.42: разведённая стопка остаётся по центру */
  position: relative; width: min(84%, 820px); aspect-ratio: 2000 / 1372;
  transform-style: preserve-3d;
  transform: translate3d(0, calc(var(--s) * var(--gap) * var(--lift)), 0) rotateX(56deg) rotateZ(-34deg);
}
.xray__layer {
  position: absolute; inset: 0; margin: 0; transform-style: preserve-3d;
  transform: translateZ(calc(var(--s) * var(--i) * var(--gap)));
}
.xray__layer img { display: block; width: 100%; height: 100%; }
.xray__layer.l1 { --i: 0; }
.xray__layer.l2 { --i: 1; }
.xray__layer.l3 { --i: 2; }
.xray__layer.l4 { --i: 3; }
.motion .xray__layer { will-change: transform; }
/* подпись слоя всегда смотрит на зрителя */
.tag {
  position: absolute; left: 95.9%; top: 51.7%;
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: baseline;
  width: max-content; padding-left: 34px;
  transform-origin: 0 0; transform: rotateZ(34deg) rotateX(-56deg);
  opacity: clamp(0, calc(var(--s) * 3 - var(--i) * 0.6), 1);
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.tag::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 26px; height: 1px; background: var(--accent); }
.tag__no { color: var(--accent); }
.xray__legend {
  display: flex; gap: 22px; padding-top: 12px; border-top: 1px solid var(--line-2);
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.xray__legend span { color: var(--accent); margin-right: 8px; }
.tag__sub { grid-column: 1 / span 2; font-weight: 400; text-transform: none; letter-spacing: 0.02em; font-size: 13px; color: var(--faint); }

.motion .layers__grid { padding-bottom: 0; }
.motion .layers__stage {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
  min-height: 520px;
}
.motion .layers__end { display: block; height: 170vh; }
.motion .xray__stack { --s: 0; }

@media (max-width: 899px) {
  .layers__grid { grid-template-columns: minmax(0, 1fr); }
  .xray__legend { flex-wrap: wrap; gap: 6px 22px; }
  .layers__stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .tag__name { display: none; }
  .tag__sub { display: none; }
  .tag { font-size: 10px; padding-left: 26px; }
  .tag::before { width: 20px; }
}
@media (min-width: 900px) {
  .layers__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 56px; padding-top: 136px; padding-bottom: 136px; }
  .layers__text { grid-column: 1; grid-row: 1; align-self: center; }
  .layers__stage { grid-column: 2; grid-row: 1; }
  .layers__start { position: absolute; top: 0; left: 0; }
  .xray { justify-content: flex-start; padding-left: 2%; }
  .xray__stack { width: min(64%, 700px); }
  .xray__legend { display: none; }
  .motion .layers__grid { height: 300vh; padding-top: 0; padding-bottom: 0; align-items: start; }
  .motion .layers__text {
    align-self: start; position: sticky; top: var(--header-h);
    height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
    display: flex; align-items: center;
  }
  .motion .layers__end { display: none; }
}

/* ---------- 6. Точность ---------- */
.accuracy__media img { display: block; width: 100%; height: auto; }
.accuracy__grid { display: grid; gap: 56px; }
.accuracy .h2 { margin-bottom: 22px; }
.guarantee { margin-top: 40px; border: 1px solid var(--ink); display: grid; }
.guarantee__label { padding: 12px 18px; border-bottom: 1px solid var(--ink); font-size: 11px; letter-spacing: 0.2em; }
.guarantee__text { padding: 18px; font-size: 17px; line-height: 1.5; color: var(--ink); }
@media (min-width: 900px) {
  .accuracy__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 96px; align-items: center; }
  .guarantee__text { padding: 22px 24px; font-size: 19px; }
  .guarantee__label { padding: 14px 24px; }
}

/* ---------- 7. Built, not generated ---------- */
.built { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.built__title { font-size: clamp(30px, 9vw, 40px); letter-spacing: 0.1em; margin-bottom: 36px; }
.built__body { display: grid; gap: 22px; }
.stamp {
  justify-self: start; margin-top: 18px;
  border: 1px solid var(--accent); color: var(--accent);
  padding: 12px 18px; font-size: 12px; letter-spacing: 0.24em;
}
@media (min-width: 900px) {
  .built__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: 96px; }
  .built__grid .idx { grid-column: 1 / -1; }
  .built__title { font-size: clamp(44px, 4.6vw, 72px); line-height: 1.04; margin: 0; }
  .built__body { padding-top: 10px; }
}

/* ---------- 8. Цены ---------- */
.plans { display: grid; margin-top: 44px; border-top: 1px solid var(--ink); }
.plan { position: relative; padding: 26px 0 30px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: baseline; }
.plan__name { font-size: 12px; letter-spacing: 0.2em; color: var(--ink); }
.plan__price { font-size: 40px; line-height: 1; font-weight: 400; letter-spacing: 0.01em; color: var(--ink); grid-row: 1 / span 2; grid-column: 2; font-feature-settings: "tnum" 1; }
.plan__text { color: var(--muted); font-size: 15px; max-width: 22em; }
.plan--first::before { content: ""; position: absolute; left: 0; top: -1px; width: 64px; height: 3px; background: var(--accent); }
.plan--first .plan__price { color: var(--accent); }
.plans__note { margin-top: 22px; color: var(--muted); font-size: 15px; }
.others { margin-top: 64px; display: grid; gap: 14px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); }
.others__who { display: block; font-size: 11px; letter-spacing: 0.2em; color: var(--ink); margin-bottom: 4px; }
.others a { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.others a:hover { color: var(--btn-bg-hover); }
.others__cta { color: var(--ink); }

@media (min-width: 900px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line-2); }
  .plan { display: block; padding: 36px 40px 44px 0; border-bottom: 0; border-right: 1px solid var(--line); margin-right: 0; }
  .plan + .plan { padding-left: 40px; }
  .plan:last-child { border-right: 0; }
  .plan + .plan.plan--first::before, .plan + .plan::before { left: 40px; }
  .plan__price { font-size: 72px; margin: 26px 0 20px; }
  .plan__text { font-size: 16px; }
  .others { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
  .others__cta { align-self: end; }
}

/* ---------- 9. Вопросы ---------- */
.faq__grid { display: grid; gap: 8px; }
.faq__list { border-top: 1px solid var(--ink); margin-top: 16px; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 22px 44px 22px 0; font-size: 17px; font-weight: 500; color: var(--ink); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 15px; height: 1px; background: var(--accent);
  transition: transform 0.45s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 44px 26px 0; color: var(--muted); max-width: 40em; }
@media (min-width: 900px) {
  .faq__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 96px; }
  .faq__list { margin-top: 0; }
  .faq summary { font-size: 19px; padding: 26px 56px 26px 0; }
  .faq details p { font-size: 17px; }
}

mark.check {
  background: var(--check-bg); color: var(--check);
  border: 1px dashed var(--check-line); padding: 1px 6px;
  font-family: system-ui, "Segoe UI", sans-serif; font-size: 0.85em; white-space: normal;
}

/* ---------- 10. Контакт ---------- */
.contact { border-top: 1px solid var(--line); }
.contact__title { margin-bottom: 36px; max-width: 14em; }
.contact__body { display: grid; gap: 26px; }
.contact__mail a {
  font-size: clamp(20px, 6vw, 28px); letter-spacing: 0.02em; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line-2); padding-bottom: 4px; transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.contact__mail a:hover { color: var(--accent); border-color: var(--accent); }
.contact__lang { font-size: 14px; color: var(--faint); }
@media (min-width: 900px) {
  .contact__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 96px; align-items: end; }
  .contact__grid .idx { grid-column: 1 / -1; }
  .contact__title { margin: 0; font-size: clamp(44px, 4.6vw, 72px); }
  .contact__mail a { font-size: 30px; }
}

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--ink); padding: 48px 0 56px; font-size: 13px; color: var(--faint); }
.foot__grid { display: grid; gap: 28px; }
.foot__brand { display: flex; align-items: center; gap: 16px; }
.foot__mark { height: 44px; width: auto; aspect-ratio: 179 / 264; }
.foot__name { font-size: 12px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink); }
.foot__slogan { font-size: 13px; }
.foot__notes { display: grid; gap: 10px; max-width: 40em; line-height: 1.6; }
.foot__stamp { color: var(--ink); font-weight: 500; }
.foot__meta { display: grid; gap: 6px; }
.foot a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.foot a:hover { color: var(--accent); border-color: var(--accent); }
@media (min-width: 900px) {
  .foot__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); column-gap: var(--gutter); align-items: start; }
  .foot__meta { justify-items: end; text-align: right; }
}

/* ============ появление при прокрутке ============ */
.motion .pre { opacity: 0; transform: translate3d(0, 28px, 0); }
.motion .pre.is-in {
  opacity: 1; transform: none;
  transition: opacity 1.1s var(--ease), transform 1.4s var(--ease);
}
.motion .pre.d1.is-in { transition-delay: 0.14s; }
.motion .pre.d2.is-in { transition-delay: 0.28s; }
.motion .pre.d3.is-in { transition-delay: 0.42s; }
.motion .idx::after { transform: scaleX(0); }
.motion .idx.is-in::after { transform: scaleX(1); transition: transform 1.8s var(--ease) 0.2s; }
.motion .dim .draw { transform: scaleX(0); }
.motion .dim.is-in .draw { transform: scaleX(1); transition: transform 2s var(--ease) 0.2s; }
.motion .dim__tick, .motion .dim__label { opacity: 0; }
.motion .dim.is-in .dim__tick, .motion .dim.is-in .dim__label { opacity: 1; transition: opacity 0.8s linear 0.9s; }
.motion .dim.is-in .dim__tick--3, .motion .dim.is-in .dim__label--end { transition-delay: 1.8s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 404 ---------- */
.nf__text { margin: 24px 0 36px; }

/* режим высокой контрастности Windows: значки FAQ, логотип и границы кнопок не пропадают */
@media (forced-colors: active) {
  .faq summary::before, .faq summary::after { background: CanvasText; }
  .mk-l, .mk-r, .mk-p, .mk-w { fill: CanvasText; }
  .btn, .film__btn { border: 1px solid ButtonText; }
  .meter__bar { background: Highlight; }
}
