/* Сюжет главной «ЄС → Київ». Перенос образца _preview/style.css.
   Базовые правила = статичная вёрстка (телефон, prefers-reduced-motion, без JS): ничего не закреплено, всё видно.
   Полный сюжет — только на компьютере без reduce: правила под @media ниже с префиксом `.js .story`
   (story.js снимает класс `story` с <main>, если GSAP не загрузился).
   Анимируются только transform и opacity; маски — обёртка overflow:hidden + сдвиг transform. */

:root {
  --fs-mega: clamp(96px, 19vw, 320px);
  --rig-w: min(94vw, 880px);            /* трал = 20 м: от него считается масштаб техники */
  --m: calc(var(--rig-w) / 20);
  --ground: var(--ink-800);
  --mega: var(--sage-200);
}
:root[data-theme="dark"] {
  --ground: var(--sage-600);
  --mega: var(--ink-700);
}

/* ---------- Общее для сцен ---------- */
.story .lead { font-size: clamp(17px, 1.35vw, 20px); color: var(--muted); max-width: 46ch; margin: 18px 0 0; }
.s-hero h1, .s-route h2, .s-cargo h2, .s-price h2, .s-new h2, .s-finish h2 { margin: 0; max-width: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.scene { position: relative; }
.ground { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ground); }
.rig { position: absolute; bottom: 2px; width: var(--rig-w); aspect-ratio: 1800 / 472; }
.rig-truck { position: absolute; inset: 0; width: 100%; height: 100%; }
/* площадка трала: верх на 75.4% высоты, центр на 28% ширины */
.cargo { position: absolute; bottom: 24.6%; }
.cargo img { width: 100%; height: auto; }
/* кадры аппарелей: шире трала, влево на длину опущенных аппарелей */
.frames { position: absolute; left: -31.207%; bottom: 0; width: 131.207%; aspect-ratio: 2361 / 471; }
.frames img { position: absolute; inset: 0; width: 100%; height: 100%; }
.frames img + img { opacity: 0; display: none; }   /* кадры аппарелей нужны только сюжету на компьютере */
/* ремни: обёртка обрезает картинку, натяжение снизу вверх — встречный сдвиг обёртки и картинки */
.straps { position: absolute; left: 0; bottom: 0; width: 100%; display: block; overflow: hidden; pointer-events: none; }
.straps img { display: block; width: 100%; height: auto; }
.board { position: absolute; width: 1.6%; height: 9%; bottom: 25%; background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, var(--paper-2) 6px 12px); border-radius: 1px; }
.board-r { left: 1.2%; bottom: 21%; }   /* на заднем брусе площадки (верх бруса — y 372 кадра) */
.board-f { left: 50.5%; }

/* ---------- Нижний угол: «нагору» и одометр ---------- */
.dock { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 10px; }
.to-top {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; padding: 0; opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.odometer {
  display: none; font: 500 var(--fs-label)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 8px 12px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line);
}
.odometer b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- 1. Погрузка ---------- */
/* шапка липкая и стоит в потоке: первый экран заезжает под неё, как в образце с фиксированной шапкой */
.s-hero { position: relative; margin-top: calc(-1 * var(--header)); padding: var(--header) 0 24px; overflow: hidden; }
.mega {
  position: absolute; left: 0; right: 0; bottom: calc(30px + var(--rig-w) * .28);
  display: flex; align-items: center; justify-content: center; gap: .18em;
  font: 800 min(17vw, 200px)/.8 var(--display); letter-spacing: -.05em; color: var(--mega);
  white-space: nowrap; pointer-events: none; user-select: none;
}
.mega-arrow { width: .82em; height: .5em; flex: none; fill: none; stroke: var(--mega); stroke-width: 15; stroke-linecap: square; stroke-linejoin: miter; overflow: visible; }
.hero-copy { position: relative; z-index: 2; width: min(var(--wrap), 100% - 48px); margin: clamp(32px, 7vh, 88px) auto 0; }
.hero-copy h1 { font-size: var(--fs-display); max-width: 11ch; }
.hero-cat { display: inline-block; margin-top: 18px; }
.scene-hero { margin-top: 40px; height: calc(var(--rig-w) * .2622 * 1.4); }
.scene-hero .rig { left: max(3vw, calc(50% - var(--rig-w) * .344)); }
.cargo-exc { width: calc(var(--m) * 9.5); left: calc(28% - var(--m) * 4.75); }
.scroll-hint { display: none; position: absolute; right: clamp(16px, 3vw, 40px); bottom: 18px; margin: 0; font: 500 var(--fs-label)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- 2. Маршрут: графитовая полоса ---------- */
.band { background: var(--band) url(story/tex-graphite.webp) center / cover; color: var(--on-band); }
:root[data-theme="dark"] .band { background-image: linear-gradient(rgba(10, 8, 7, .45), rgba(10, 8, 7, .45)), url(story/tex-graphite.webp); }
.s-route { position: relative; padding: 72px 0 56px; }
.route-lead p { margin: 12px 0 0; max-width: 44ch; color: var(--sage-300); font-size: 17px; }
.route-info { display: none; }
.road-viewport { margin-top: 32px; }
.road, .border-line, .top-rig { display: none; }
.stops {
  list-style: none; counter-reset: s; width: min(var(--wrap), 100% - 48px); margin: 0 auto; padding: 8px 0 0 62px;
  display: grid; gap: 26px; background: linear-gradient(var(--ink-600), var(--ink-600)) 21px 0 / 2px 100% no-repeat;
}
.stops li { position: relative; counter-increment: s; }
.stops li::before {
  content: counter(s); position: absolute; left: -62px; top: -8px; width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 4px var(--ink-900);
  display: grid; place-items: center; font: 600 15px/1 var(--mono); background: var(--ink-700); color: var(--accent);
}
.stops li b { display: block; font: 800 clamp(22px, 2.2vw, 30px)/1.05 var(--display); letter-spacing: -.02em; color: var(--sage-100); }
.stops li span { display: block; margin-top: 6px; color: var(--sage-300); font-size: 15px; max-width: 52ch; }

.tracker { display: none; }

/* «Живой» маршрут (класс route-live ставит story.js; телефон и компьютер без reduce): дорога с этапами, машина, трекер.
   Блок не закреплён; лента дороги и машина двигаются только transform. */
.route-live .story .s-route { --road-top: 64px; --road-h: clamp(92px, 13vh, 128px); --truck-w: min(30vw, 440px); overflow: hidden; padding-bottom: 40px; }
.route-live .story .road-viewport { position: relative; height: calc(var(--road-top) + var(--road-h) + 150px); margin-top: 36px; overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.route-live .story .road-viewport:active { cursor: grabbing; }
.route-live .story .road-track { position: absolute; top: 0; left: 0; height: 100%; will-change: transform; }
.route-live .story .road { display: block; position: absolute; left: 0; right: 0; top: var(--road-top); height: var(--road-h); background: var(--ink-900); border-block: 2px solid var(--ink-700); }
.route-live .story .road::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, var(--sage-300) 0 48px, transparent 48px 104px); opacity: .55; }
.route-live .story .border-line { display: block; position: absolute; top: calc(var(--road-top) - 14px); height: calc(var(--road-h) + 28px); width: 4px; }
.border-line::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, var(--accent) 0 14px, var(--paper-2) 14px 28px); }
.border-line span { position: absolute; top: -4px; transform: translateY(-100%); display: flex; flex-direction: column; align-items: center; gap: 6px; white-space: nowrap; }
.border-line svg { display: block; width: 30px; height: 20px; border-radius: 2px; flex: none; }
.border-line i { font: 600 12px/1 var(--mono); font-style: normal; letter-spacing: .08em; color: var(--sage-100); }
.border-line .flag-l { right: 16px; }
.border-line .flag-r { left: 16px; }
.route-live .story .stops { display: block; width: auto; margin: 0; padding: 0; background: none; }
.route-live .story .stops li { position: absolute; top: calc(var(--road-top) + var(--road-h) + 26px); width: 300px; opacity: .45; cursor: pointer; transition: opacity .4s var(--ease-out); }
.route-live .story .stops li::before { left: -9px; top: calc(var(--road-h) / -2 - 26px - 22px); transition: background-color .3s var(--ease-out), color .3s var(--ease-out); }
.route-live .story .stops li::after { content: ""; position: absolute; left: 12px; top: -24px; width: 2px; height: 18px; background: var(--ink-600); }
.route-live .story .stops li span { margin-top: 8px; font-size: 15px; line-height: 1.45; opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.route-live .story .stops li.on { opacity: 1; }
.route-live .story .stops li.on span { opacity: 1; transform: none; }
.route-live .story .stops li.on::before { background: var(--accent); color: var(--ink-900); }
.route-live .story .stops li.done { opacity: .8; }
.route-live .story .top-rig { display: block; position: absolute; left: 0; top: calc(var(--road-top) + var(--road-h) / 2); width: var(--truck-w); margin-top: calc(var(--truck-w) * -.1083);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); will-change: transform; pointer-events: none; }
/* Трекер «ЄС ●─●─●─●─●─● Київ»: во всю ширину экрана; зона попадания — 44 px по высоте */
.route-live .story .tracker { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(14px, 2vw, 24px);
  margin: 4px clamp(16px, 3vw, 40px) 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tr-end { font: 600 var(--fs-label)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--sage-300); }
.tr-line { position: relative; height: 44px; margin-inline: 16px; cursor: pointer; }
.tr-line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--ink-600); }
.tr-fill { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.tr-dot { position: absolute; top: 50%; left: calc(var(--i) * 20%); width: 36px; height: 36px; margin: -18px 0 0 -18px; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.tr-dot::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-800); box-shadow: 0 0 0 2px var(--ink-600);
  transition: transform .35s var(--ease-out), background-color .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.tr-dot.done::before { background: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tr-dot.on::before { background: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px color-mix(in srgb, var(--accent) 28%, transparent); transform: scale(1.25); }
.tr-dot:hover::before { transform: scale(1.35); }
.tr-dot:focus-visible { outline: 2px solid var(--sage-100); outline-offset: 0; }
.tr-thumb { position: absolute; left: 0; top: 50%; width: 4px; height: 24px; margin: -12px 0 0 -2px; border-radius: 2px; background: var(--sage-100); pointer-events: none; }
@media (max-width: 900px) {
  .route-live .story .s-route { --road-top: 58px; --road-h: 84px; --truck-w: min(58vw, 340px); }
  .route-live .story .road-viewport { height: calc(var(--road-top) + var(--road-h) + 170px); margin-top: 24px; }
  /* узкий экран: подпись слева от точки этапа, под машиной (справа от неё на телефоне места нет) */
  .route-live .story .stops li { width: min(300px, 62vw); transform: translateX(-100%); text-align: right; }
  .route-live .story .stops li::before { left: auto; right: -35px; }
  .route-live .story .stops li::after { left: auto; right: -14px; }
  .route-live .story .stops li span { margin-left: auto; }
  .route-live .story .stops li b { font-size: 22px; }
  .route-live .story .road::after { background: repeating-linear-gradient(90deg, var(--sage-300) 0 30px, transparent 30px 64px); }
  .route-live .story .tracker { margin-inline: 16px; }
  .route-live .story .tr-line { margin-inline: 10px; }
}

/* ---------- 3. Що возимо ---------- */
.s-cargo { position: relative; padding: 72px 0 32px; overflow: hidden; }
.cargo-copy { position: relative; z-index: 2; width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.cat-roll { position: relative; margin-top: 20px; display: grid; gap: 6px; font: 800 clamp(24px, 3vw, 40px)/1.1 var(--display); letter-spacing: -.035em; }
.cat-roll a { text-decoration: none; color: var(--accent-text); width: fit-content; }
.cat-roll a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.cargo-note { max-width: 44ch; color: var(--muted); margin: 18px 0 20px; }
.scene-cargo { margin-top: 32px; height: calc(var(--rig-w) * .32); }
.scene-cargo .rig { left: 50%; margin-left: calc(var(--rig-w) / -2); }
/* груз с цепями: картинка шириной с трал, низ совпадает с низом трала, выше трала на 48 px из 520 */
.load { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; pointer-events: none; }
.scene-cargo .load + .load, .drive { display: none; }
.drive { position: absolute; bottom: 2px; left: 50%; height: auto; }
.garbage { width: calc(var(--m) * 10); margin-left: calc(var(--m) * -5); }
.crane { width: calc(var(--m) * 14.5); margin-left: calc(var(--m) * -7.25); }
/* Живой режим (story.js → html.cargo-live, любая ширина): образцы в разметке скрыты, на сцене их копии .veh.
   Перечень: все пункты видны; выбранный (.sel) ярче, оранжевая черта (.on) — когда груз встал */
.cargo-live .scene-cargo > [data-rig2], .cargo-live .scene-cargo > [data-drive] { visibility: hidden; }
.cargo-live .scene-cargo > .veh { display: block; visibility: visible; }
.cargo-live .scene-cargo .veh .load { display: block; opacity: 0; }
.cargo-live .scene-cargo .veh .load.down { opacity: 1; }
.cargo-live .cat-roll { gap: 2px; }
.cargo-live .cat-roll a { position: relative; color: var(--ink); opacity: .55; padding: .12em 0 .16em; -webkit-tap-highlight-color: transparent; }
.cargo-live .cat-roll a:hover, .cargo-live .cat-roll a.sel, .cargo-live .cat-roll a:focus-visible { opacity: 1; text-decoration: none; }
.cargo-live .cat-roll a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: 3px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%; }
.cargo-live .cat-roll a.on::after { transform: scaleX(1); }
@media (prefers-reduced-motion: no-preference) {
  .cargo-live .cat-roll a { transition: opacity .35s var(--ease-out); }
  .cargo-live .cat-roll a::after { transition: transform .5s var(--ease-out); }
}

/* ---------- 4. Ціна на профнастиле ---------- */
/* Профнастил: размер картинки постоянный (не от высоты блока), поэтому смена языка его не масштабирует */
.s-price { position: relative; padding: 72px 0; color: var(--ink-900);
  background: linear-gradient(rgba(187, 209, 191, .62), rgba(187, 209, 191, .62)), var(--sage-300) url(story/tex-sage.webp?v=34) center / auto 480px repeat; }
.s-price .lead { color: var(--ink-800); }
:root[data-theme="dark"] .s-price { background-image: linear-gradient(rgba(21, 16, 15, .84), rgba(21, 16, 15, .84)), url(story/tex-sage.webp?v=34); background-color: var(--ink-900); color: var(--ink); }
:root[data-theme="dark"] .s-price .lead { color: var(--muted); }
:root[data-theme="dark"] .price-lists { --accent-text: color-mix(in srgb, var(--signal-500) 70%, var(--paper-2)); }
.price-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
.price-lists { position: relative; display: grid; grid-template-columns: 1fr; gap: 32px; background: var(--surface); padding: 28px; border-radius: var(--r-card); box-shadow: 0 18px 40px -18px rgba(21, 16, 15, .45); }
.price-lists h3 { font: 500 var(--fs-label)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.price-lists ul { list-style: none; margin: 18px 0 0; padding: 0; }
.price-lists ul.in > li { font: 800 clamp(24px, 2.4vw, 34px)/1.25 var(--display); letter-spacing: -.02em; display: flex; gap: 12px; align-items: center; }
.price-lists ul.in > li::before { content: ""; width: 22px; height: 22px; flex: none; background: var(--accent-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.out li { color: var(--muted); max-width: 30ch; }
.stamp {
  /* штамп «ОДНА / ЗАГАЛЬНА ЦІНА»: повёрнут на -12° (на компьютере угол задаёт анимация в story.js), заходит на угол карточки; вторая строка делится по 
 из словаря */
  position: absolute; right: -6px; top: -24px; width: 128px; height: 128px; border-radius: 50%; rotate: -12deg;
  border: 3px solid var(--accent-text); color: var(--accent-text); display: grid; place-content: center; text-align: center;
  font: 800 17px/1 var(--display); letter-spacing: -.01em; text-transform: uppercase; white-space: pre;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--surface) 82%, transparent), inset 0 0 0 5.5px var(--accent-text);
}
.stamp span, .stamp b { display: block; font: inherit; }
/* Текст карточки обтекает штамп по кругу (невидимый float с shape-outside в углу верхней колонки):
   ни на одном языке и ширине строки не заходят под штамп. Круг = штамп + 8–10 px воздуха, в координатах колонки. */
.price-lists > div:first-of-type::before { content: ""; float: right; width: 104px; height: 86px; shape-outside: circle(72px at calc(100% - 30px) 12px); }
.stamp b { margin-top: .12em; }

/* ---------- 5. Нові надходження ---------- */
.s-new { padding: 72px 0; }
.new-head { margin-bottom: 36px; }
.new-head .link { display: inline-block; margin-top: 10px; }
.cards { display: grid; grid-template-columns: 1fr; gap: 28px; }
.card { text-decoration: none; display: block; min-width: 0; }
.card > img, .card-ico { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-card); background: var(--tint); transition: transform .5s var(--ease-out); }
.card-ico { display: grid; place-items: center; }
.card-ico .ico { width: 60%; }
.card:hover > img, .card:hover .card-ico { transform: scale(1.02); }
.card h3 { font-size: var(--fs-h2); letter-spacing: -.02em; margin-top: 16px; }
.card dl { display: flex; gap: 22px; margin: 10px 0 0; }
.card dt { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card dd { margin: 4px 0 0; font: 500 15px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.card .price { display: block; width: fit-content; margin: 14px 0 0; }
.card .price:not(.ask) { font: 800 30px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card .stock { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 6. Финиш, Київ ---------- */
.s-finish { position: relative; padding: 72px 0 0; overflow: hidden; }
.finish-copy { position: relative; z-index: 2; }
.finish-copy h2 { font-size: var(--fs-display); max-width: 13ch; }
.finish-copy .link { display: inline-block; margin-top: 18px; }
.scene-finish { height: calc(var(--rig-w) * .5); margin-top: 40px; }
.kyiv { position: absolute; left: 0; right: 0; bottom: 2px; width: 100%; opacity: .26; }
:root[data-theme="dark"] .kyiv { filter: invert(1); opacity: .14; }
.rig-final { position: absolute; bottom: 2px; left: 50%; width: var(--rig-w); margin-left: calc(var(--rig-w) / -2); }

/* ---------- Ширина: раскладка блоков (не зависит от движения) ---------- */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .new-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
  .new-head .link { margin-top: 0; }
}
@media (min-width: 901px) {
  /* высота с запасом под самый длинный язык (en): блок и всё ниже не прыгают при смене языка */
  .s-price { padding: 120px 0; min-height: 600px; display: flex; align-items: center; }
  .price-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; }
  .price-lists { grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px; }
  .stamp { right: -16px; top: -52px; width: 152px; height: 152px; font-size: 20px; }
  /* обтекание штампа — в правой колонке («Доставка»); на узкой карточке заголовок колонки может уйти под штамп */
  .price-lists > div:first-of-type::before { content: none; }
  .price-lists > div:nth-of-type(2)::before { content: ""; float: right; width: 108px; height: 72px; shape-outside: circle(86px at calc(100% - 20px) -16px); }

  .s-new { padding: 120px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .s-finish { padding-top: 120px; }
  .s-route, .s-cargo { padding-top: 96px; }
}
/* на широком экране штамп выходит за угол карточки дальше — поля страницы это позволяют */
@media (min-width: 1340px) {
  .stamp { right: -48px; }
  /* широкая карточка: обтекает только текст под заголовком, заголовки колонок на одной линии */
  .price-lists > div:nth-of-type(2)::before { content: none; }
  .price-lists .out::before { content: ""; float: right; width: 74px; height: 40px; shape-outside: circle(86px at calc(100% + 12px) -46px); }
}

/* ---------- Полный сюжет: компьютер без reduce ---------- */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  :root { --rig-w: min(64vw, 1040px); }
  .dock { right: auto; left: clamp(16px, 3vw, 40px); bottom: 20px; }
  .story-desktop .odometer { display: block; }

  .js .story .s-hero { height: 100vh; min-height: 640px; padding-bottom: 0; }
  /* заголовок в две строки; описание и кнопки выше трала: высота строк от высоты экрана, ссылка на каталог — в ряд с кнопками */
  .js .story .hero-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; align-items: center; margin-top: clamp(24px, 5vh, 64px); }
  .js .story .hero-copy h1, .js .story .hero-copy .lead { grid-column: 1 / -1; }
  .js .story .hero-copy h1 { max-width: 11em; font-size: clamp(40px, min(6.4vw, 10.4vh), 92px); }
  .js .story .hero-copy .lead { max-width: 58ch; margin-top: clamp(10px, 2vh, 18px); font-size: clamp(16px, min(1.35vw, 2.3vh), 20px); }
  .js .story .hero-copy .actions { margin-top: clamp(16px, 3vh, 28px); }
  .js .story .hero-cat { justify-self: start; margin-top: clamp(16px, 3vh, 28px); }
  .js .story .mega { bottom: calc(9vh + var(--rig-w) * .04); font-size: var(--fs-mega); }
  .js .story .scene-hero { position: absolute; left: 0; right: 0; bottom: 9vh; margin: 0; }
  .js .story .scene-hero .rig { left: auto; right: 6vw; }
  .js .story .cargo { will-change: transform; }
  .js .story .scroll-hint { display: block; }

  /* «Як ми працюємо»: справа крупная цифра и название текущего этапа; описание — на дороге (route-live ниже) */
  .js .story .route-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
  .js .story .route-lead p { margin-top: 18px; }
  .route-live .story .route-info { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; justify-self: end; width: min(560px, 100%); }
  .ri-digit { position: relative; width: .64em; height: .82em; font: 800 clamp(96px, 9vw, 150px)/.82 var(--display); letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
  .ri-n { position: absolute; left: 0; top: 0; display: block; overflow: hidden; }
  .ri-n > span { display: block; }
  .ri-t { display: block; font: 800 clamp(26px, 2.6vw, 36px)/1.05 var(--display); letter-spacing: -.02em; color: var(--sage-100); }
  .ri-d { display: none; }

  .js .story .s-cargo { height: 100vh; min-height: 640px; padding: calc(var(--header) + 40px) 0 0; }
  /* «Що возимо?» без закрепления: под заголовком весь перечень; справа пояснение и кнопка; техника внизу экрана */
  .js .story .cargo-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: clamp(48px, 7vw, 120px); }
  .js .story .cargo-copy h2 { grid-column: 1 / -1; }
  .js .story .cat-roll { grid-row: 2 / span 2; margin-top: 22px; gap: 4px; font-size: clamp(26px, 2.35vw, 34px); }
  .js .story .cargo-note { grid-column: 2; grid-row: 2; align-self: start; margin: 30px 0 20px; }
  .js .story .cargo-copy > .btn { grid-column: 2; grid-row: 3; justify-self: start; align-self: start; }
  .js .story .scene-cargo { position: absolute; left: 0; right: 0; bottom: 10vh; margin: 0; height: calc(var(--rig-w) * .45); }

  .js .story .s-finish { min-height: 100vh; }
}

/* Компьютерные кадры аппарелей — только в режиме сюжета (на телефоне не грузятся: display:none + loading=lazy) */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .js .story .frames img + img { display: block; }
}

/* ---------- Появление (только без reduce) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* заголовок первого экрана по словам; поля, чтобы маска не срезала з, й при плотном трекинге */
  .intro .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .08em .08em; margin: 0 -.08em; }
  .intro .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s cubic-bezier(.19, 1, .22, 1); transition-delay: calc(.1s + var(--i, 0) * 70ms); }
  .intro .hero-copy .lead, .intro .hero-copy .actions, .intro .hero-cat { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.19, 1, .22, 1), transform .9s cubic-bezier(.19, 1, .22, 1); }
  .intro .hero-copy .lead { transition-delay: .35s; }
  .intro .hero-copy .actions { transition-delay: .43s; }
  .intro .hero-cat { transition-delay: .51s; }
  .intro-go .w > span, .intro-go .hero-copy .lead, .intro-go .hero-copy .actions, .intro-go .hero-cat { opacity: 1; transform: none; }
}
/* Телефон: этапы, техника, карточки появляются при прокрутке */
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .js .story .appear { transition: opacity .8s cubic-bezier(.19, 1, .22, 1), transform .8s cubic-bezier(.19, 1, .22, 1); }
  .js .story .appear:not(.is-in) { opacity: 0; transform: translateY(28px); }
}
/* Телефон: трал медленно въезжает слева на середину (уезжает вправо при прокрутке — story.js, свойство translate) */
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .js .story .scene-hero .rig { animation: rig-in 2.6s cubic-bezier(.22, .9, .3, 1) .2s both; }
}
@keyframes rig-in { from { transform: translateX(-100vw); } }
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; }
}

/* Телефон: первый экран на всю высоту, техника прижата к низу — её место не зависит от текста.
   Поэтому картинку с тралом можно показать сразу, ещё до шрифтов и текстов (страница скрыта классом wait):
   первый экран появляется раньше, ничего не сдвигается. */
@media (max-width: 900px) {
  /* грузовик первого экрана не на всю ширину, по центру */
  .s-hero { --rig-w: min(72vw, 600px); }
  .s-hero .scene-hero .rig { left: calc(50% - var(--rig-w) / 2); }
  .s-hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
  .s-hero .hero-copy { margin-bottom: 40px; }
  .s-hero .scene-hero { margin-top: auto; flex: none; }
  .wait .s-hero .scene-hero { visibility: visible; }
}
