/* ADD Space — стили шаблонных страниц и библиотека компонентов для блоков.
   Два нейтральных цвета (чернила и бумага) + один акцент.
   Тема страницы (dark | light | accent) задаётся на <body> и меняется при
   прокрутке по секциям с data-theme — см. site.js.
   Шапка и подвал стилизуются отдельно (src/lib/shell.js, Shadow DOM). */

@property --fill { syntax: "<percentage>"; inherits: false; initial-value: 0%; }

:root {
  --ink: #0E0E0D;
  --paper: #EDECE7;
  --accent: #D4FF3F;
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gut: clamp(16px, 2.6vw, 44px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body[data-theme="dark"], .static [data-theme="dark"]   { --c-bg: var(--ink);    --c-fg: var(--paper); --c-line: rgba(237,236,231,.2); --c-muted: rgba(237,236,231,.62); --c-pop: var(--accent); --c-pop-fg: var(--ink); --c-soft: rgba(237,236,231,.07); --c-em: var(--accent); color-scheme: dark; }
body[data-theme="light"], .static [data-theme="light"]  { --c-bg: var(--paper);  --c-fg: var(--ink);   --c-line: rgba(14,14,13,.2);    --c-muted: rgba(14,14,13,.62);    --c-pop: var(--ink);    --c-pop-fg: var(--accent); --c-soft: rgba(14,14,13,.06); --c-em: rgba(14,14,13,.38); color-scheme: light; }
body[data-theme="accent"], .static [data-theme="accent"] { --c-bg: var(--accent); --c-fg: var(--ink);   --c-line: rgba(14,14,13,.28);   --c-muted: rgba(14,14,13,.7);     --c-pop: var(--ink);    --c-pop-fg: var(--accent); --c-soft: rgba(14,14,13,.08); --c-em: rgba(14,14,13,.45); color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--c-bg); color: var(--c-fg);
  font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  transition: background-color .7s var(--ease), color .7s var(--ease);
  overflow-x: clip;
}
/* Зерно поверх всего — как на плотной бумаге */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--c-fg); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { padding-left: var(--gut); padding-right: var(--gut); }
.mono { font: 400 12px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.art { width: 100%; height: auto; overflow: visible; }

/* ── Типографика ── */
.display {
  font: 900 clamp(46px, 7.4vw, 132px)/.9 var(--display); text-transform: uppercase; letter-spacing: -.005em;
  text-wrap: balance; max-width: 16ch;
}
.display--xl { font-size: clamp(64px, 13.5vw, 250px); line-height: .84; max-width: none; }
.display em { font-style: normal; color: var(--c-em); }
.eyebrow { font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; display: flex; gap: 10px; margin-bottom: 22px; }
.eyebrow span { opacity: .5; }
.lead { font-size: clamp(19px, 1.75vw, 26px); line-height: 1.4; letter-spacing: -.012em; max-width: 34ch; text-wrap: pretty; }
.note { font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }

.btn {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--c-pop); color: var(--c-pop-fg); font-weight: 500; font-size: 16px;
  padding: 15px 22px 15px 26px; border-radius: 999px; transition: gap .3s var(--ease), padding .3s var(--ease);
}
.btn i { font-style: normal; transition: transform .3s var(--ease); }
.btn:hover { gap: 22px; padding-right: 18px; }
.btn--ghost { background: none; color: var(--c-fg); box-shadow: inset 0 0 0 1px var(--c-line); }

/* ── Секции ── */
.sec { padding: clamp(72px, 10vw, 168px) 0; border-top: 1px solid var(--c-line); }
.sec--top { padding-top: clamp(120px, 14vw, 200px); border-top: 0; }
.sec__head { margin-bottom: clamp(36px, 5vw, 72px); }

/* ── Первый экран ── */
.hero { min-height: 100svh; display: flex; }
.hero__in { flex: 1; display: flex; flex-direction: column; padding-top: clamp(120px, 22vh, 240px); padding-bottom: 20px; }
.hero__lead { font-size: clamp(17px, 1.45vw, 22px); line-height: 1.35; max-width: 31ch; letter-spacing: -.01em; margin-bottom: clamp(14px, 2vw, 28px); }
.hero__title { font: 900 min(12.7vw, 250px)/.86 var(--display); text-transform: uppercase; letter-spacing: -.012em; margin-left: -.03em; white-space: nowrap; }
.hero__static { display: block; }
.rot { display: block; height: 1.06em; overflow: hidden; margin-top: -.04em; }
.rot__track { display: block; transform: translateY(calc(var(--i, 0) * -1.06em)); transition: transform .95s cubic-bezier(.3, 1.42, .44, 1); will-change: transform; }
.rot__w {
  display: block; height: 1.06em; line-height: 1;
  background: linear-gradient(to top, var(--accent) var(--fill), var(--c-fg) var(--fill));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: --fill 1.25s cubic-bezier(.65, 0, .3, 1);
}
.rot__w.is-filled { --fill: 100%; }
.hero__meta { margin-top: auto; padding-top: 32px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--c-line); }
.hero__meta > * { padding: 14px 0 0; }
.hero__meta a { text-align: right; text-decoration: none; }
.hero__meta a:hover { color: var(--accent); }

/* ── Панели-направления ── */
.dirs { border-top: 1px solid var(--c-line); }
.dirs__head { padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(36px, 5vw, 72px); }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); border-top: 1px solid var(--c-line); }
.panel {
  position: relative; display: flex; flex-direction: column; min-height: min(78vh, 720px); padding: var(--gut);
  text-decoration: none; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
.panel:last-child { border-right: 0; }
.panel .art { width: min(64%, 320px); margin: auto; transition: transform .8s var(--ease); }
.panel h3 { font: 500 clamp(26px, 2.5vw, 38px)/1.05 var(--sans); letter-spacing: -.025em; margin-bottom: 12px; }
.panel p { max-width: 36ch; opacity: .75; }
.panel__n { opacity: .55; }
.panel:hover, .panel:focus-visible { background: var(--c-pop); color: var(--c-pop-fg); }
.panel:hover .art { transform: rotate(-6deg) scale(1.06); }

/* ── Разворот: текст + макет ── */
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--top { align-items: start; }
.split > * > .lead { margin-top: 28px; }
.split > * > .btn, .split > * > .steps + .btn { margin-top: 40px; }

.steps { margin-top: 36px; border-top: 1px solid var(--c-line); counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; gap: 4px 0; padding: 18px 0; border-bottom: 1px solid var(--c-line); }
.steps li::before { content: "0" counter(s); font: 400 12px/1.9 var(--mono); opacity: .55; grid-row: span 2; }
.steps b { font-weight: 500; font-size: 19px; letter-spacing: -.012em; }
.steps span { color: var(--c-muted); font-size: 15.5px; }

/* Макет интерфейса-плейсхолдер */
.mock { position: relative; border: 1px solid var(--c-line); border-radius: 22px; padding: clamp(20px, 2.4vw, 34px); background: var(--c-soft); }
.mock__bar { display: flex; justify-content: space-between; margin-bottom: 28px; }
.mock h4 { font: 500 clamp(24px, 2.4vw, 34px)/1.1 var(--sans); letter-spacing: -.025em; margin-bottom: 22px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale span { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--c-line); border-radius: 14px; font: 900 clamp(26px, 3vw, 44px)/1 var(--display); transition: background .3s, color .3s, transform .3s var(--ease); }
.scale span.on, .scale span:hover { background: var(--c-pop); color: var(--c-pop-fg); border-color: transparent; transform: translateY(-4px); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; margin-top: 30px; }
.week i { display: block; background: var(--c-fg); border-radius: 5px 5px 0 0; opacity: .22; height: var(--h); transform-origin: bottom; }
.week i.on { opacity: 1; background: var(--c-pop); }
.mock__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--c-line); font-size: 16px; }

/* Рамка для крупной иллюстрации */
.frame { border: 1px solid var(--c-line); border-radius: 22px; padding: clamp(20px, 4vw, 56px); position: relative; }
.frame .note { position: absolute; left: 20px; top: 16px; }

/* ── Крупные цифры ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--c-line); margin-top: clamp(40px, 6vw, 88px); }
.stat { padding: 22px 20px 26px 0; border-bottom: 1px solid var(--c-line); }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--c-line); }
.stat b { display: block; font: 900 clamp(88px, 15vw, 270px)/.8 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 16px; font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }

/* ── Столкновение взглядов ── */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; border: 1px solid var(--c-line); border-radius: 22px; overflow: hidden; margin-top: clamp(40px, 6vw, 80px); }
.versus__side { padding: clamp(20px, 2.6vw, 40px); display: flex; flex-direction: column; gap: 22px; transition: background-color .45s var(--ease), color .45s var(--ease); }
.versus__side:hover { background: var(--c-pop); color: var(--c-pop-fg); }
.versus__mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 18px; border-left: 1px solid var(--c-line); border-right: 1px solid var(--c-line); width: clamp(120px, 22vw, 340px); text-align: center; }
.versus__mid b { font: 900 clamp(48px, 7vw, 120px)/.8 var(--display); }
.portrait {
  aspect-ratio: 4 / 5; border-radius: 14px; display: flex; align-items: flex-end; padding: 16px; overflow: hidden; position: relative;
  background: repeating-linear-gradient(135deg, transparent 0 9px, var(--c-line) 9px 10px); border: 1px solid var(--c-line);
}
.portrait b { font: 900 clamp(56px, 8vw, 150px)/.8 var(--display); text-transform: uppercase; position: relative; }
.portrait i { position: absolute; right: 14px; top: 12px; font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; font-style: normal; opacity: .6; }
.versus blockquote { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.3; letter-spacing: -.012em; }
.versus cite { display: block; margin-top: 10px; font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; font-style: normal; opacity: .65; }

/* ── Бегущая лента карточек ── */
.marquee { overflow: hidden; margin: clamp(40px, 6vw, 80px) calc(var(--gut) * -1) 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.marquee__track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.fcard { width: clamp(220px, 22vw, 320px); flex: none; padding: 20px; border-right: 1px solid var(--c-line); display: flex; flex-direction: column; gap: 14px; min-height: 250px; transition: background-color .3s, color .3s; }
.fcard:hover { background: var(--c-pop); color: var(--c-pop-fg); }
.fcard b { font: 900 clamp(60px, 6vw, 96px)/.8 var(--display); }
.fcard h4 { font: 500 21px/1.15 var(--sans); letter-spacing: -.02em; margin-top: auto; }

/* Сетка карточек (на страницах проектов) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-top: 1px solid var(--c-line); border-left: 1px solid var(--c-line); margin-top: clamp(32px, 5vw, 64px); }
.cards .fcard { width: auto; border-bottom: 1px solid var(--c-line); }

/* ── Строки-ссылки ── */
.rows { border-top: 1px solid var(--c-line); }
.row {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1.4fr) clamp(96px, 11vw, 168px) 40px; align-items: center; gap: 16px;
  padding: clamp(18px, 2.2vw, 30px) clamp(12px, 1.4vw, 22px); text-decoration: none; border-bottom: 1px solid var(--c-line);
  transition: background-color .35s var(--ease), color .35s var(--ease), padding .35s var(--ease), border-radius .35s;
}
.row__n, .row i { font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; font-style: normal; opacity: .6; }
.row i { text-align: right; }
.row b { font: 500 clamp(22px, 2.5vw, 38px)/1.05 var(--sans); letter-spacing: -.025em; }
.row__t { color: var(--c-muted); font-size: 16px; max-width: 38ch; transition: color .35s; }
.row__a { justify-self: end; transition: transform .35s var(--ease); }
.row__art { position: absolute; right: clamp(150px, 15vw, 230px); top: 50%; width: clamp(140px, 12vw, 190px); pointer-events: none; opacity: 0; transform: translateY(-40%) rotate(4deg); transition: opacity .3s, transform .5s var(--ease); z-index: 2; }
.row:hover, .row:focus-visible { background: var(--c-pop); color: var(--c-pop-fg); border-radius: 14px; border-color: transparent; }
.row:hover .row__t { color: inherit; opacity: .75; }
.row:hover .row__a { transform: translateX(6px); }
.row:hover .row__art { opacity: 1; transform: translateY(-50%) rotate(-3deg); }

/* ── Цитата ── */
.quote { font: 500 clamp(28px, 4.2vw, 68px)/1.08 var(--sans); letter-spacing: -.035em; max-width: 22ch; text-wrap: balance; }
.quote + .note { margin-top: 28px; }

/* ── План работ ── */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: clamp(32px, 5vw, 64px); }
.timeline li { padding: 20px 20px 28px 0; border-top: 1px solid var(--c-line); position: relative; }
.timeline li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--c-bg); box-shadow: inset 0 0 0 1px var(--c-fg); }
.timeline li.done::before { background: var(--c-fg); }
.timeline li.now::before { background: var(--accent); box-shadow: 0 0 0 1px var(--c-fg), 0 0 0 6px var(--c-soft); }
.timeline b { display: block; font-weight: 500; font-size: 20px; letter-spacing: -.015em; margin: 10px 0 6px; }
.timeline b + span { color: var(--c-muted); font-size: 15.5px; }

/* ── Призыв в конце ── */
.outro__link { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; text-decoration: none; font: 900 clamp(64px, 13.5vw, 250px)/.84 var(--display); text-transform: uppercase; }
.outro__link span { background: linear-gradient(to top, var(--accent) var(--fill), var(--c-fg) var(--fill)); -webkit-background-clip: text; background-clip: text; color: transparent; transition: --fill .7s cubic-bezier(.65, 0, .3, 1); }
.outro__link i { font-style: normal; font-family: var(--sans); font-weight: 400; font-size: .5em; line-height: 1.2; transition: transform .5s var(--ease); }
.outro__link:hover span { --fill: 100%; }
.outro__link:hover i { transform: translateX(.2em); color: var(--accent); }

/* ── Каталог ── */
.filters { display: grid; gap: 10px; margin: clamp(28px, 4vw, 56px) 0 clamp(36px, 5vw, 64px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--c-line); border-radius: 999px; padding: 8px 16px; font-size: 15px; text-decoration: none; transition: background .2s, color .2s; }
@media (hover: hover) { a.chip:hover { border-color: var(--c-fg); } }
span.chip { background: var(--c-soft); border-color: transparent; }
.chip--on { background: var(--c-fg); color: var(--c-bg); border-color: var(--c-fg); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); border-top: 1px solid var(--c-line); }
.tile { display: flex; flex-direction: column; padding: var(--gut); min-height: 480px; text-decoration: none; border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); transition: background-color .45s var(--ease), color .45s var(--ease); }
.tile__top { display: flex; justify-content: space-between; opacity: .7; }
.tile .art { width: min(62%, 260px); margin: auto; transition: transform .8s var(--ease); }
.tile h2 { font: 500 clamp(26px, 2.4vw, 36px)/1.05 var(--sans); letter-spacing: -.025em; margin-bottom: 10px; }
.tile p { color: var(--c-muted); font-size: 16px; max-width: 40ch; transition: color .45s; }
.tile:hover, .tile:focus-visible { background: var(--c-pop); color: var(--c-pop-fg); }
.tile:hover p { color: inherit; opacity: .75; }
.tile:hover .art { transform: rotate(-6deg) scale(1.06); }

/* ── Страница проекта ── */
.phero { padding-top: clamp(110px, 12vw, 170px); overflow: hidden; }
.back { display: inline-block; text-decoration: none; margin-bottom: clamp(28px, 5vw, 72px); opacity: .7; }
@media (hover: hover) { .back:hover { opacity: 1; } }
.phero__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); margin-top: clamp(28px, 4vw, 56px); align-items: start; }
.phero__row .btn { margin-top: 32px; }
.meta > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--c-line); }
.meta > div:last-child { border-bottom: 1px solid var(--c-line); }
.meta dt { opacity: .55; }
.phero__art { margin-top: clamp(40px, 6vw, 88px); border-top: 1px solid var(--c-line); padding: clamp(24px, 4vw, 64px) var(--gut); }
.phero__art .art { width: min(100%, 880px); margin: 0 auto; }
.phero__art img.art { border-radius: 18px; }

.prose { max-width: 66ch; font-size: 19px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font: 500 clamp(28px, 3vw, 44px)/1.08 var(--sans); letter-spacing: -.03em; margin-top: 1.6em; }
.prose h3 { font: 500 24px/1.15 var(--sans); letter-spacing: -.02em; margin-top: 1.4em; }
.prose ul { list-style: none; }
.prose li { padding: 10px 0 10px 26px; border-top: 1px solid var(--c-line); position: relative; }
.prose li::before { content: "/"; position: absolute; left: 0; opacity: .5; font-family: var(--mono); font-size: .8em; top: 14px; }

/* ── Карточки работ (портфолио) ──
   Размеры текста — от ширины самой карточки (cqi), а не экрана: на любой сетке заголовок
   занимает одну и ту же долю карточки и оставляет место иллюстрации. */
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.work { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--paper); background: var(--ink); isolation: isolate; container-type: inline-size; }
.work__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform 1.2s var(--ease); }
svg.work__img { padding: 16%; opacity: .6; }
/* Нижний градиент под заголовком — в цвет фона карточки (--tint из src/modules/cards), по умолчанию чернила */
.work::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, color-mix(in srgb, var(--tint, #0E0E0D) 94%, transparent), color-mix(in srgb, var(--tint, #0E0E0D) 0%, transparent) 62%); transition: opacity .5s var(--ease); }
.work__t { position: absolute; inset: 0; padding: clamp(18px, 6.6cqi, 32px); display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.work__t b { font: 900 clamp(32px, 11.5cqi, 80px)/.88 var(--display); text-transform: uppercase; transition: color .3s; }
.work__d { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .6s var(--ease), opacity .45s var(--ease); }
.work__d > span { min-height: 0; overflow: hidden; font-size: clamp(14px, 3.5cqi, 16.5px); line-height: 1.45; max-width: 46ch; opacity: .85; }
.work__tags { position: absolute; top: clamp(14px, 4.6cqi, 22px); left: clamp(14px, 4.6cqi, 22px); max-width: 72%; display: flex; flex-wrap: wrap; gap: 6px; }
.work__tags span { padding: 5px 11px; border-radius: 999px; font-size: 13px; line-height: 1.3; color: var(--paper); background: rgba(14, 14, 13, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color .45s var(--ease); }
.work:hover .work__img { transform: scale(1.06); }
/* Слой при наведении (src/modules/cards): пластины Salym или ролик колонн поверх обложки */
.work__fx { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s var(--ease); pointer-events: none; }
.work.is-fx .work__fx { opacity: 1; }
.work__fx.td { margin: 0; max-width: none; }
.work__fx--stand { background: #31268B; } /* фиолетовый из верха градиента «Salym preview» */
.work .work__fx--stand svg { position: absolute; right: 2%; top: -6%; width: 70%; height: auto; overflow: visible; }
.work__fx--stand .tdh__p { transition: transform .8s var(--ease), opacity .5s var(--ease); }
.work__fx--video { width: 100%; height: 100%; object-fit: cover; }
.work.is-fx .work__img { transform: scale(1.06); }
.work:hover b { color: var(--accent); }

/* Телефон: раскрыта одна карточка — та, что дошла до середины экрана (site.js, «Карточки
   портфолио»; класс .is-acc ставит скрипт, без него карточки обычные). Свёрнутая — картинка
   с заголовком и тегами поверх; раскрытая — картинка без градиента, под ней текст и теги на
   тёмном. Картинка всегда 4:3 сверху, текст стоит под ней и в свёрнутой сдвинут вверх на себя. */
@media (max-width: 700px) {
  .works.is-acc .work { aspect-ratio: auto; height: var(--h-closed); transition: height .6s var(--ease); }
  .works.is-acc .work.is-open { height: var(--h-open); }
  /* Нижние углы картинки скругляем clip-path: border-radius у <video> браузер при аппаратном выводе
     не всегда применяет — оставались прямые углы и полоска обложки под роликом. */
  .works.is-acc .work__img, .works.is-acc .work__fx, .works.is-acc .work::after { inset: 0 0 auto 0; height: auto; aspect-ratio: 4 / 3; border-radius: 22px; clip-path: inset(0 round 22px); }
  .works.is-acc .work__fx--stand { overflow: hidden; }
  .works.is-acc .work__t { position: relative; inset: auto; margin-top: 75%; padding: 16px 18px 14px; gap: 0; justify-content: flex-start; transform: translateY(-100%); transition: transform .6s var(--ease), padding .6s var(--ease); }
  .works.is-acc .work__d > span { padding-top: 10px; }
  .works.is-acc .work__tags { position: static; max-width: none; margin-top: 8px; }
  .works.is-acc .work:not(.is-open) .work__d { grid-template-rows: 0fr; opacity: 0; }
  .works.is-acc .work.is-open::after { opacity: 0; }
  .works.is-acc .work.is-open .work__t { transform: none; padding: 14px 18px 26px; }
  .works.is-acc .work.is-open .work__d > span { font-size: 16.5px; }
  .works.is-acc .work.is-open .work__tags { margin-top: 12px; }
  .works.is-acc .work.is-open .work__tags span { background: rgba(75, 75, 75, .55); }
  .works.is-acc .work:hover b { color: inherit; }
  .works.is-acc .work .work__img { transform: none; }
  /* копия текста для замера высоты раскрытой карточки — в раскрытом виде, невидимая */
  .works.is-acc .work__t--m { position: absolute; top: 0; left: 0; right: 0; visibility: hidden; transform: none; margin: 0; padding: 14px 18px 26px; transition: none; }
  .works.is-acc .work .work__t--m .work__d { grid-template-rows: 1fr; opacity: 1; transition: none; }
  .works.is-acc .work__t--m .work__d > span { font-size: 16.5px; }
  .works.is-acc .work__t--m .work__tags { margin-top: 12px; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .works.is-acc .work, .works.is-acc .work__t, .works.is-acc .work__d { transition: none; }
}

/* ── Галерея с подписями ── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: clamp(32px, 5vw, 64px); }
.gallery figure { display: flex; flex-direction: column; gap: 14px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; background: var(--c-soft); transition: transform .8s var(--ease); }
.gallery figure:hover img { transform: scale(1.02); }
.gallery figcaption { font-size: 16px; line-height: 1.4; color: var(--c-muted); max-width: 40ch; padding-bottom: 12px; }
.gallery figcaption b { display: block; font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--c-fg); opacity: .55; margin-bottom: 6px; }

/* ── Карточка с постером (лента на главной) ── */
.pcard { width: clamp(180px, 16vw, 240px); flex: none; padding: 16px; border-right: 1px solid var(--c-line); display: flex; flex-direction: column; gap: 12px; text-decoration: none; transition: background-color .3s, color .3s; }
.pcard img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; filter: grayscale(1) contrast(1.05); transition: filter .4s; background: var(--c-soft); }
.pcard b { font: 900 clamp(24px, 2.2vw, 34px)/.92 var(--display); text-transform: uppercase; }
.pcard:hover { background: var(--c-pop); color: var(--c-pop-fg); }
.pcard:hover img { filter: none; }

/* ── Портрет из набора «Орбиты» (спрайт 3×3) ── */
.portrait--img { background: url("/lab/philo-atlas/assets/philosophers.png") var(--pos, 0 0) / 300% 300% #1a231d; }
.portrait--img b { color: var(--paper); z-index: 1; }
.portrait--img i { color: var(--paper); opacity: .85; z-index: 1; }
.portrait--img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,14,13,.8), transparent 55%); }

/* ── Мелочи ── */
.panel--off { opacity: .45; }
.panel--off:hover { background: none; color: inherit; }
.row--static:hover { background: none; color: inherit; border-radius: 0; border-color: var(--c-line); }

/* Разворот «подпись слева — текст справа» (страницы разборов и «Обо мне») */
.fsec { display: grid; grid-template-columns: minmax(180px, .34fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.ftext { max-width: 62ch; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; }
.ftext p + p { margin-top: 1em; }
@media (max-width: 700px) { .fsec { grid-template-columns: 1fr; } }

/* ── Шапка страницы проекта: теги плашками и смартфон, выглядывающий снизу ── */
.phero__tags { margin-top: 24px; }
.phero__tags .chip { font-size: 14px; padding: 6px 14px; }
.phero--phone { position: relative; overflow: hidden; padding-bottom: clamp(56px, 8vw, 120px); }
.phero--phone .wrap { position: relative; z-index: 1; }
.phero--phone .display--xl, .phero--phone .phero__row { max-width: min(100%, 62vw); }
.phero--phone .phero__row { grid-template-columns: 1fr; row-gap: 40px; }
.phero--phone .meta { max-width: 560px; }
.phero__phone {
  position: absolute; right: clamp(24px, 8vw, 160px); bottom: clamp(-280px, -15vw, -120px); width: clamp(240px, 23vw, 380px);
  border-radius: clamp(24px, 2.4vw, 40px); transform: rotate(7deg); transform-origin: 50% 100%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 40px 80px -30px rgba(0,0,0,.45);
}
/* #hero — предмет на прозрачном фоне в правой половине шапки (3D-рендер упаковки) */
.phero--obj { padding-bottom: clamp(56px, 6vw, 96px); }
.phero__obj {
  position: absolute; right: clamp(8px, 3vw, 72px); top: clamp(160px, 20vw, 330px); width: clamp(320px, 44vw, 780px); height: auto;
  pointer-events: none;
}
/* #fill:RRGGBB — шапка в цвет картинки, картинка (на том же сплошном фоне) стоит справа снизу.
   Высота — от шапки за вычетом места под меню, но не шире трети экрана. */
.phero--fill { background: var(--hero-fill); }
.phero__fill {
  position: absolute; right: clamp(16px, 2.6vw, 56px); bottom: 0; height: min(calc(100% - 140px), 49vw); width: auto;
  pointer-events: none;
}
@media (max-width: 1024px) {
  .phero--fill { padding-bottom: 0; }
  .phero__fill { position: static; display: block; height: auto; width: min(64%, 340px); margin: 40px 0 0 auto; }
  .phero--phone { padding-bottom: 0; }
  .phero--phone .display--xl, .phero--phone .phero__row { max-width: none; }
  .phero__phone { position: static; display: block; width: min(68%, 300px); margin: 44px auto -34%; transform: rotate(4deg); }
  .phero--obj { padding-bottom: 24px; }
  .phero__obj { position: static; display: block; width: min(86%, 460px); margin: 28px auto 0; }
}

/* ── Пошаговая схема (.path): соединённые пункты вместо нумерованного списка ── */
.path { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; margin-top: clamp(44px, 6vw, 96px); }
.path li { position: relative; padding: 52px clamp(16px, 2.4vw, 40px) 0 0; }
.path li::before { content: ""; position: absolute; top: 12px; left: 0; right: 0; height: 2px; background: currentColor; opacity: .25; }
.path li:last-child::before { right: auto; width: 26px; }
.path li::after { content: ""; position: absolute; top: 0; left: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--c-bg); box-shadow: inset 0 0 0 2px var(--c-fg); }
.path li:last-child::after { content: "✓"; display: grid; place-items: center; font: 700 14px/1 var(--sans); background: var(--accent); color: var(--ink); box-shadow: none; }
.path b { display: block; font: 900 clamp(30px, 3.1vw, 54px)/.95 var(--display); text-transform: uppercase; }
.path span { display: block; margin-top: 14px; color: var(--c-muted); font-size: clamp(15px, 1.15vw, 17px); line-height: 1.45; max-width: 30ch; }
@media (max-width: 900px) {
  .path { grid-auto-flow: row; grid-template-columns: 1fr; }
  .path li { padding: 0 0 40px 48px; }
  .path li::before { top: 0; bottom: 0; left: 12px; right: auto; width: 2px; height: auto; }
  .path li:last-child { padding-bottom: 0; }
  .path li:last-child::before { width: 2px; height: 26px; bottom: auto; }
}

/* ── Блок-схема (.flow): узлы со стрелками; на телефоне — столбиком ── */
.flow { margin-top: clamp(36px, 5vw, 72px); }
.flow > .note { margin-bottom: 16px; }
.flow__row { display: flex; align-items: stretch; }
.flow__n { flex: 1 1 0; min-width: 0; position: relative; margin-right: 38px; padding: 18px 18px 20px; border: 1px solid var(--c-line); border-radius: 18px; }
.flow__n:last-child { margin-right: 0; }
.flow__n:not(:last-child)::after { content: "→"; position: absolute; right: -29px; top: 50%; transform: translateY(-50%); font: 400 18px/1 var(--mono); opacity: .55; }
.flow__n i { display: block; font: 400 12px/1.4 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .06em; opacity: .55; margin-bottom: 10px; }
.flow__n b { display: block; font-weight: 600; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.2; letter-spacing: -.01em; }
.flow__n span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.4; color: var(--c-muted); }
.flow__n--pop { background: var(--c-fg); color: var(--c-bg); border-color: var(--c-fg); }
.flow__n--pop span { color: inherit; opacity: .7; }
.flow__n--pop::after { color: var(--c-fg); }
.flow__side .chip { border-radius: 14px; }
.flow__side { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 1100px) {
  .flow__row { flex-direction: column; }
  .flow__n { margin: 0 0 34px; }
  .flow__n:last-child { margin-bottom: 0; }
  .flow__n:not(:last-child)::after { content: "↓"; right: auto; left: 22px; top: auto; bottom: -27px; transform: none; }
}

/* ── Плитка маленьких превью (.minis): блоки CMS и т.п. ── */
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: clamp(32px, 5vw, 64px); }
.minis figure { display: flex; flex-direction: column; gap: 8px; }
.minis img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--c-soft); }
.minis figcaption { font: 400 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; opacity: .7; }

/* ── Разобранная схема (.td): слои-пластины в изометрии, разъезжаются по вертикали.
   Разметка — seed/teardown.mjs, поведение — site.js. Без JS схема сразу разобрана. ── */
.td { margin: clamp(40px, 6vw, 88px) auto 0; max-width: 1000px; }
.td__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.td__toggle { border: 1px solid var(--c-line); border-radius: 999px; background: none; color: inherit; padding: 8px 14px; cursor: pointer; transition: background .2s, color .2s; }
@media (hover: hover) { .td__toggle:hover { background: var(--c-fg); color: var(--c-bg); } }
.td svg { width: 100%; height: auto; overflow: visible; }
.td__p { transform: translate(0, var(--e)); transition: transform 1s var(--ease) calc(var(--i) * 60ms); }
.td.is-shut .td__p { transform: translate(0, var(--a)); transition-delay: calc((5 - var(--i)) * 40ms); }
.td__face { fill: var(--c-bg); stroke: var(--c-fg); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.td__edge { fill: var(--c-fg); fill-opacity: .14; stroke: var(--c-fg); stroke-width: 1.2; stroke-linejoin: round; }
.td__lab, .td__num { transition: opacity .5s var(--ease) .5s; }
.td.is-shut .td__lab, .td.is-shut .td__num { opacity: 0; transition-delay: 0s; }
.td__lead { stroke: var(--c-fg); stroke-width: 1; opacity: .6; }
.td__name { fill: var(--c-fg); font: 500 15px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.td__detail { fill: var(--c-muted); font: 400 15px var(--sans); }
.td__num circle { fill: var(--c-fg); }
.td__num text { fill: var(--c-bg); font: 600 17px var(--mono); }
.td .ln { fill: none; stroke: var(--c-fg); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.td .ln--thin { stroke-opacity: .4; }
.td .ln--dash { stroke-dasharray: 5 4; }
.td .td-fill { fill: var(--c-fg); fill-opacity: .06; }
.td .tx { fill: var(--c-fg); font-family: var(--sans); }
.td .tx--m { font-family: var(--mono); fill: var(--c-muted); }
.td .tx--h { font-family: var(--display); font-weight: 800; }
.td .tx--b { font-family: var(--display); font-weight: 700; }
.td .td-pad { fill: #4C8DFF; fill-opacity: .2; }
.td .td-gap { fill: #F24ED8; fill-opacity: .22; }
.td .td-chip rect { fill: #F24ED8; }
.td .td-chip text { fill: #fff; font-family: var(--mono); }
.td .td-comp { fill: #9747FF; fill-opacity: .08; stroke: #9747FF; stroke-width: 1.4; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.td .td-comp--card { fill: none; }
.td .td-comp__t { fill: #9747FF; font-family: var(--mono); }
body[data-theme="dark"] .td .td-comp__t { fill: #B98CFF; }
.td .td-btn { fill: var(--c-fg); }
.td .td-btn__t { fill: var(--c-bg); }
.td .td-pop { fill: var(--accent); fill-opacity: .55; }
.td .td-arrow { fill: var(--c-fg); }
.td__legend { display: none; }
@media (max-width: 700px) {
  .td__lab { display: none; }
  .td__legend { display: grid; gap: 12px; margin-top: 20px; }
  .td__legend li { display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; }
  .td__legend i { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--c-fg); color: var(--c-bg); font: 600 12px/24px var(--mono); font-style: normal; text-align: center; }
  .td__legend b { font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
  .td__legend span { font-size: 14px; line-height: 1.4; color: var(--c-muted); }
}
@media (prefers-reduced-motion: reduce) { .td__p, .td__lab, .td__num { transition: none; } }

/* ── Стоячие пластины в ряд (.tdh): листаются прокруткой — сцена прилипает к экрану,
   пока секция проматывается, — или кнопками и тапом по схеме. ── */
.tdh { max-width: 1200px; }
.tdh__stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: clamp(24px, 4vw, 64px); align-items: center; }
.tdh.is-live .tdh__track { height: 150svh; } /* запас, в котором сцена прилипает и ловит жесты */
.tdh.is-live .tdh__stage { position: sticky; top: 72px; min-height: calc(100svh - 96px); }
.tdh svg { width: 100%; max-height: calc(100svh - 150px); cursor: pointer; }
.tdh__p { transform: translate(var(--x), var(--y)); opacity: var(--o); transition: transform .8s var(--ease), opacity .55s var(--ease); }
.tdh__count { font-size: 13px; color: var(--c-muted); }
.tdh__count b { color: var(--c-fg); font-weight: 500; }
.tdh__cap { display: grid; gap: 22px; margin-top: 18px; }
.tdh__cap li { display: grid; gap: 8px; }
.tdh__cap i { font: 400 12px/1.4 var(--mono); font-style: normal; color: var(--c-muted); }
.tdh__cap b { font: 800 clamp(30px, 3vw, 44px)/.95 var(--display); text-transform: uppercase; letter-spacing: .005em; }
.tdh__cap span { font-size: 16px; line-height: 1.45; color: var(--c-muted); max-width: 30ch; }
.tdh.is-live .tdh__cap li { display: none; }
.tdh.is-live .tdh__cap li.is-on { display: grid; animation: tdh-in .5s var(--ease); }
.tdh.is-live .tdh__cap i { display: none; }
@keyframes tdh-in { from { opacity: 0; transform: translateY(8px); } }
.tdh__nav { display: none; align-items: center; gap: 8px; margin-top: 26px; }
.tdh.is-live .tdh__nav { display: flex; }
.tdh__nav .note { margin-left: 8px; }
.tdh__nav button:disabled { opacity: .3; cursor: default; }
@media (max-width: 760px) {
  .tdh__stage { grid-template-columns: 1fr; gap: 14px; align-content: center; }
  .tdh svg { max-height: 52svh; }
  .tdh.is-live .tdh__stage { top: 56px; min-height: calc(100svh - 64px); }
  .tdh__cap b { font-size: 30px; }
  .tdh__nav { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) { .tdh__p { transition: none; } .tdh.is-live .tdh__cap li.is-on { animation: none; } }

/* ── Упаковка в 3D (.pk): сцена прилипает к экрану, прокрутка листает шаги и двигает детали.
   Движок — /assets/pack.js, разметка — src/modules/teardown/vozhd.js. ── */
.pk { margin: clamp(40px, 6vw, 88px) auto 0; max-width: 1280px; }
.pk-ref { margin: 0; }
.pk-ref img { display: block; width: 100%; max-width: 420px; height: auto; margin-inline: auto; }
.pk-logo { display: block; width: 240px; height: auto; margin-top: 40px; }
/* «Образ»: вытянутый тотем слева, текст справа; на телефоне — текст, потом тотем */
.pk-idea { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
.pk-totem img { width: auto; max-width: 100%; max-height: min(82svh, 760px); }
.pk__stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: clamp(24px, 4vw, 64px); align-items: center; }
.pk.is-live .pk__track { height: 150svh; } /* запас, в котором сцена прилипает и ловит жесты (как .tdh) */
.pk.is-live .pk__stage { position: sticky; top: 72px; min-height: calc(100svh - 96px); }
.pk__svg { display: block; width: 100%; height: min(calc(100svh - 150px), 760px); cursor: pointer; overflow: visible; }
.pk:not(.is-live) .pk__svg { display: none; }
.pk:not(.is-live) .pk__stage { grid-template-columns: 1fr; }
.pk__ln { fill: none; stroke: #4A1C10; stroke-opacity: .55; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
/* размеры — как на исходной развёртке: тонкие синие линии со стрелками, число вдоль линии */
.pk__dl { fill: none; stroke: #3F63B8; stroke-width: .8; vector-effect: non-scaling-stroke; }
.pk__da { fill: #3F63B8; }
.pk__dim text { fill: #3F63B8; font: 500 11px var(--mono); }
.pk__tag line { stroke: var(--c-fg); stroke-width: .8; }
.pk__tag circle { fill: var(--c-fg); }
.pk__tag text { fill: var(--c-fg); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.pk__cap { display: grid; gap: 22px; margin-top: 18px; }
.pk__cap li { display: grid; gap: 8px; }
.pk__cap i { font: 400 12px/1.4 var(--mono); font-style: normal; color: var(--c-muted); }
.pk__cap b { font: 800 clamp(30px, 3vw, 44px)/.95 var(--display); text-transform: uppercase; letter-spacing: .005em; }
.pk__cap span { font-size: 16px; line-height: 1.45; color: var(--c-muted); max-width: 32ch; }
.pk.is-live .pk__cap li { display: none; }
.pk.is-live .pk__cap li.is-on { display: grid; animation: tdh-in .5s var(--ease); }
.pk.is-live .pk__cap i { display: none; }
.pk__nav { display: none; align-items: center; gap: 8px; margin-top: 26px; }
.pk.is-live .pk__nav { display: flex; }
.pk__nav button:disabled { opacity: .3; cursor: default; }
@media (max-width: 760px) {
  .pk__stage { grid-template-columns: 1fr; gap: 10px; align-content: center; }
  .pk__svg { height: 50svh; }
  .pk.is-live .pk__stage { top: 56px; min-height: calc(100svh - 64px); }
  .pk__cap b { font-size: 28px; }
  .pk__cap span { font-size: 15px; }
  .pk__nav { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .pk.is-live .pk__cap li.is-on { animation: none; } }

/* ── Сцены 3D-колонн на странице кейса (.cscene): движок — /lab/columns/columns.js,
   разметка — cscene() в seed/build.mjs. Колонна прилипает к экрану и проигрывает пресет. ── */
/* Холст колонны — внутри её блока (columns.js копирует туда кадр), поэтому едет вместе с ним.
   overflow-anchor: none — пока печатается подпись, браузер не «якорит» прокрутку по меняющемуся
   тексту: иначе на телефоне страница подёргивается вместе с прилипшей колонной. */
.col-view__cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cscene { height: 165svh; margin-top: clamp(32px, 5vw, 64px); overflow-anchor: none; }
.cscene__pin { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--gut); }
.cscene--flip .col-view { order: 2; }
.col-view { position: relative; height: min(84svh, 800px); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.col-view.is-dragging { cursor: grabbing; }
.cscene__copy { position: relative; z-index: 3; max-width: 560px; }
.cscene__type { margin-top: 18px; min-height: 6.6em; font: 500 clamp(20px, 2.2vw, 32px)/1.32 var(--mono); letter-spacing: -.01em; }
.cscene__hint { margin-top: 24px; max-width: 34ch; font-size: 15px; color: var(--c-muted); }
.tw-rest { visibility: hidden; }
.tw-done { border-right: .5em solid currentColor; margin-right: -.5em; animation: tw-blink 1s steps(1) infinite; }
.is-typing .tw-done { animation: none; }
@keyframes tw-blink { 50% { border-right-color: transparent; } }
@media (max-width: 760px) {
  .cscene__pin { grid-template-columns: 1fr; grid-template-rows: 56svh auto; align-content: center; gap: 12px; }
  .cscene--flip .col-view { order: 0; }
  .col-view { height: 100%; }
  .cscene__type { min-height: 7.9em; font-size: 18px; }
  .cscene__hint { margin-top: 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .tw-done { animation: none; border-right-color: transparent; } }

/* ── Экраны проекта: ряд снимков телефона (.shots) и широкий снимок (.wideshot) ── */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: clamp(14px, 2vw, 28px); margin-top: clamp(32px, 5vw, 64px); }
.shots figure { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.shots img { width: 100%; aspect-ratio: 750 / 1624; object-fit: cover; object-position: top; border-radius: clamp(18px, 2vw, 28px); background: var(--c-soft); box-shadow: 0 0 0 1px var(--c-line), 0 24px 48px -28px rgba(0,0,0,.5); }
.shots figcaption { font-size: 15px; line-height: 1.4; color: var(--c-muted); }
.shots figcaption b { display: block; font-weight: 600; color: var(--c-fg); margin-bottom: 4px; }
.split > .shots { margin-top: 0; }
.shots--solo { grid-template-columns: minmax(0, 340px); justify-content: center; }
.wideshot { margin-top: clamp(40px, 6vw, 88px); }
.wideshot img { width: 100%; border-radius: clamp(12px, 1.4vw, 20px); box-shadow: 0 0 0 1px var(--c-line); }
.wideshot figcaption { margin-top: 14px; }
.wideshot--sm { max-width: 620px; }
/* Снимки сайтов: без скругления и обводки — иначе срезается шапка сайта. */
.shots--flat img { border-radius: 0; box-shadow: 0 24px 48px -30px rgba(0,0,0,.45); }
.shots--pair { grid-template-columns: repeat(2, minmax(0, 250px)); justify-content: center; }
.rows--facts { margin-top: clamp(36px, 5vw, 72px); }
.rows--facts .row { grid-template-columns: clamp(104px, 10vw, 150px) minmax(0, 1fr) minmax(0, 1.2fr); }
.rows--facts .row b { text-wrap: balance; }
@media (max-width: 900px) {
  .rows--facts .row { grid-template-columns: 1fr; gap: 6px; }
  .rows--facts .row > * { grid-column: 1; grid-row: auto; }
  .rows--facts .row i, .rows--facts .row__a { display: none; }
}
@media (max-width: 700px) {
  .shots:not(.shots--solo) { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gut, 16px) * -1); padding-inline: var(--gut, 16px); scrollbar-width: none; }
  .shots:not(.shots--solo) { justify-content: flex-start; }
  .shots:not(.shots--solo) figure { flex: 0 0 62%; scroll-snap-align: center; }
  .shots--solo { grid-template-columns: minmax(0, 260px); }
}

/* ── Соавторы проекта и лист ожидания ── */
.credits { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.credits .note { flex-basis: 100%; }
.credit { display: inline-flex; align-items: center; gap: 12px; padding: 8px 20px 8px 8px; border: 1px solid var(--c-line); border-radius: 999px; text-decoration: none; transition: background .25s, color .25s, border-color .25s; }
.credit img, .credit__ini { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: var(--c-soft); }
.credit__ini { display: grid; place-items: center; font: 900 20px/1 var(--display); }
.credit b { display: block; font-weight: 600; line-height: 1.2; }
.credit i { display: block; font-style: normal; font-size: 14px; opacity: .65; line-height: 1.3; }
a.credit:hover { background: var(--c-fg); color: var(--c-bg); border-color: var(--c-fg); }
.wl { max-width: 640px; scroll-margin-top: 120px; }
.wl__row { display: flex; flex-wrap: wrap; gap: 10px; }
.wl__in { flex: 1 1 240px; min-width: 0; font: inherit; color: var(--c-fg); background: none; border: 1px solid var(--c-fg); border-radius: 999px; padding: 15px 24px; }
.wl__in::placeholder { color: var(--c-muted); }
.wl__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl__msg { margin-top: 14px; }
.wl__ok { font: 900 clamp(28px, 3vw, 44px)/1 var(--display); text-transform: uppercase; }
.wl.is-busy { opacity: .6; pointer-events: none; }

/* ── Стопка карточек (.deck): картинки ложатся одна на другую и сами пролистываются ──
   Разметку собирает deck() в src/routes/public.js, поведение — в конце site.js. */
.deck { --tilt: 1; min-width: 0; }
.sec:has(.deck) { overflow-x: clip; }
.deck--wide { --tilt: .45; }
.deck--tall { --tilt: .7; }
.deck__stage { position: relative; aspect-ratio: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.deck--wide .deck__stage { aspect-ratio: 16 / 9; }
.deck--tall .deck__stage { aspect-ratio: 848 / 1200; }
.deck__card {
  position: absolute; inset: 5%; width: 90%; height: 90%; object-fit: cover; border-radius: clamp(10px, 1.4vw, 20px);
  background: var(--c-soft); box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 18px 40px -18px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translate(var(--dx, 0), var(--dy, 0)) rotate(calc(var(--r, 0deg) * var(--tilt)));
  transition: opacity .5s var(--ease), visibility 0s .5s;
}
.deck--wide .deck__card { inset: 3% 2.5%; width: 95%; height: 94%; }
.deck__card.is-on { opacity: 1; visibility: visible; transition: opacity .3s; }
.deck__card.is-in { animation: deck-in .55s var(--ease) both; }
@keyframes deck-in {
  from { opacity: 0; transform: translate(5%, -9%) rotate(calc(var(--r, 0deg) * var(--tilt) + 7deg)) scale(1.07); }
  to { opacity: 1; transform: translate(var(--dx, 0), var(--dy, 0)) rotate(calc(var(--r, 0deg) * var(--tilt))); }
}
.deck__bar { display: none; align-items: center; gap: 6px; margin-top: 14px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.js .deck__bar { display: flex; }
.deck__count { min-width: 76px; text-align: center; }
.deck__count b { color: var(--c-fg); font-weight: 400; }
.deck__nav, .deck__play { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--c-fg); background: none; border: 1px solid var(--c-line); border-radius: 999px; height: 36px; min-width: 36px; padding: 0 12px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
@media (hover: hover) { .deck__nav:hover, .deck__play:hover { background: var(--c-fg); color: var(--c-bg); border-color: var(--c-fg); } }
.deck__play { margin-left: auto; }
/* Стопка снимков сайта: уже, без скругления и обводки. */
.deck--site { --tilt: .3; max-width: 920px; margin-inline: auto; }
.deck--site .deck__card { border-radius: 0; box-shadow: 0 22px 44px -26px rgba(0,0,0,.5); }

/* Запись архива: подпись слева, стопка справа; на телефоне — заголовок, стопка, подпись. */
.arc { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); grid-template-areas: "head deck" "note deck"; grid-template-rows: auto 1fr; gap: 20px clamp(28px, 5vw, 88px); align-items: start; }
.arc + .arc { margin-top: clamp(72px, 10vw, 160px); }
.arc--square { grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); }
.arc--tall { grid-template-columns: minmax(0, 1fr) minmax(0, .62fr); }
.arc__head { grid-area: head; }
.arc__head .eyebrow { margin-bottom: 14px; }
.arc__title { font: 900 clamp(44px, 5.6vw, 96px)/.92 var(--display); text-transform: uppercase; letter-spacing: -.005em; }
.arc > .deck { grid-area: deck; }
.arc__note { grid-area: note; max-width: 54ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; }
.arc__note p + p { margin-top: 1em; }
.arc__note .btn { margin-top: 12px; }
@media (max-width: 860px) {
  .arc, .arc--square, .arc--tall { grid-template-columns: 1fr; grid-template-areas: "head" "deck" "note"; grid-template-rows: auto; }
  .arc--tall > .deck { max-width: 420px; }
  .deck__card { inset: 4% 3%; width: 94%; height: 92%; }
}

/* ── Появление при прокрутке (только когда работает JS) ── */
.js [data-rv] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-rv].in { opacity: 1; transform: none; }
.js .week i { transform: scaleY(0); transition: transform .9s var(--ease); transition-delay: calc(var(--n, 0) * 60ms + .2s); }
.js .in .week i, .js .week.in i { transform: none; }

/* ── Узкие экраны ── */
@media (max-width: 900px) {
  .split, .phero__row { grid-template-columns: 1fr; }
  .pk-idea > .pk-totem { order: 2; }
  .pk-totem img { max-height: 62svh; }
  .versus { grid-template-columns: 1fr 1fr; }
  .versus__mid { grid-column: 1 / -1; grid-row: 1; width: auto; flex-direction: row; justify-content: space-between; border: 0; border-bottom: 1px solid var(--c-line); text-align: left; }
  .versus__mid .art { width: 120px; flex: none; }
  .versus__side + .versus__side { border-left: 1px solid var(--c-line); }
  .row { grid-template-columns: 34px minmax(0, 1fr) 24px; gap: 6px 10px; }
  .row__t { grid-column: 2; grid-row: 2; font-size: 15px; }
  .row i { grid-column: 2; grid-row: 3; margin-top: 6px; text-align: left; }
  .row__a { grid-column: 3; grid-row: 1; }
  .row__art { display: none; }
  .panel { min-height: 420px; border-right: 0; }
  .tile { min-height: 400px; border-right: 0; }
  .hero__meta { grid-template-columns: 1fr 1fr; margin-top: 44px; }
  .hero__lead { margin-top: auto; }
  .hero__title { font-size: 13.4vw; }
  .hero__meta a { text-align: left; }
  .stat + .stat { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .versus { grid-template-columns: 1fr; }
  .versus__side + .versus__side { border-left: 0; border-top: 1px solid var(--c-line); }
  .portrait { aspect-ratio: 16 / 10; }
  .meta > div { grid-template-columns: 110px 1fr; }
  .steps li { grid-template-columns: 40px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .js [data-rv] { opacity: 1; transform: none; }
  .js .week i { transform: none; }
}

/* ── Статичный режим (?static=1): каждая секция сама несёт свой фон.
   Нужен для выгрузки макетов в Figma и для печати — без анимаций и смены темы. ── */
.static main [data-theme] { background: var(--c-bg); color: var(--c-fg); }
.static body::after { display: none; }
.static .rot__w:first-child { --fill: 100%; }
.static .marquee__track, .static .reel__track { animation: none; }
