/* Cliché Club – швейцарская сетка: 12 колонок, один шрифт (Medeo Sans, латиница и кириллица), чёрный, серый, белый и синий логотипа. */
/* Шрифт лежит у нас (fonts/): без запросов к Google Fonts, GDPR. */
@font-face { font-family: "Medeo Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/MedeoSansVariable.woff2) format("woff2"); }

:root {
  --paper: #ffffff;
  --ink: #000000;
  --blue: #0b1e8c;       /* синий логотипа Cliché */
  --text: #4e5b69;       /* текстовые блоки */
  --grey: #5d6976;       /* вторичный текст, AA на белом */
  --rule: #d4d4d4;
  --wash: #f1f1f1;       /* фон карточки без медиа */
  --s: 1; /* на больших мониторах кегль и отступы растут (см. ниже) */
  --gutter: clamp(calc(16px * var(--s)), 2.2vw, calc(32px * var(--s)));
  --font: "Medeo Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* полоса прокрутки скрыта: появляясь в картотеке, она отнимала ширину и макет дёргался; прокрутка работает как обычно */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 calc(16px * var(--s))/1.45 var(--font);
  font-optical-sizing: auto;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }

/* ---------- Верхняя строка ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  height: calc(52px * var(--s)); padding: 0 var(--gutter);
  color: var(--text);
  font-size: calc(16px * var(--s)); line-height: 1.5;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: transform .26s cubic-bezier(.16, 1, .3, 1);
}
@media (hover: hover) {
  /* жидкое стекло: преломление фона + лёгкая «пескоструйная» зернистость; надписи остаются тёмными на светлой подложке */
  .bar { background: rgba(255, 255, 255, .42); border-bottom-color: rgba(255, 255, 255, .55); box-shadow: 0 1px 0 rgba(0, 0, 0, .04), inset 0 1px 0 rgba(255, 255, 255, .7); }
  .bar::before, .bar::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
  .bar::before { -webkit-backdrop-filter: blur(14px) saturate(1.8) brightness(1.06); backdrop-filter: blur(14px) saturate(1.8) brightness(1.06); }
  @supports (backdrop-filter: url(#x)) and (not (-webkit-hyphens: none)) { .bar::before { backdrop-filter: url(#club-glass) blur(10px) saturate(1.8) brightness(1.06); } }
  .bar::after { opacity: .22; mix-blend-mode: soft-light; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
  .bar.is-curtain { transition: transform .8s cubic-bezier(.65, 0, .2, 1); }
}
.bar.is-hidden { transform: translateY(-100%); } /* без transform в покое: иначе меню на весь экран крепится к шапке */
.mark { font-weight: 700; font-size: calc(21px * var(--s)); line-height: 1; }  /* строчные в рост прописных меню: x-высота 21 px ≈ высота заглавных 16 px */
.bar-nav { font-weight: 300; text-transform: uppercase; }
.items { display: flex; gap: calc(40px * var(--s)); }
.menu-bg { display: none; }
.lang { min-width: 1.8em; text-align: right; font-weight: 300; }
.bar a, .lang { transition: color .2s; }
.bar a:focus-visible, .lang:focus-visible, .bar-nav a[aria-current="page"] { color: var(--blue); }
@media (hover: hover) { .bar a:hover, .bar-nav a:hover, .lang:hover { color: var(--blue); } }
.burger { display: none; }

/* ---------- Заставка: белый лист, имя прорисовывается окнами в живой фон, потом шторка вверх (как у lopardina.com) ---------- */
.pre { position: fixed; inset: 0; z-index: 999; overflow: hidden; display: flex; align-items: center; justify-content: center; pointer-events: none;
  animation: preUp .8s cubic-bezier(.7, 0, .25, 1) 1.95s forwards; }
.pre-s { width: min(820px, 82vw); height: auto; overflow: visible; }
.pre-s mask g[clip-path] path { fill: none; stroke: #000; stroke-width: 260; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1.001;
  animation: preD .55s cubic-bezier(.45, 0, .2, 1) calc(.2s + var(--k) * .05s) forwards; }
.pre-s > rect { fill: var(--paper); }
@keyframes preD { to { stroke-dashoffset: 0; } }
.pre-full { fill: #000; opacity: 0; animation: preFull .3s linear 1.4s forwards; }
@keyframes preFull { to { opacity: 1; } }
@keyframes preUp { to { transform: translate3d(0, -100%, 0); visibility: hidden; } }
/* та же шторка при переходе с витрины в картотеку: лист проявляется, имя пишется, лист уезжает вверх */
.pre.is-go { animation: preIn .25s ease both, preUp .8s cubic-bezier(.7, 0, .25, 1) 1.95s forwards; }
@keyframes preIn { from { opacity: 0; } }
/* пока лист на экране, в прорезях букв только фон: весь текст скрыт, потом проявляется волной (app.js) */
html.curtain :is(.drums, .stage-foot, .index, .project) { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .pre { display: none; } }

/* ---------- Первая страница: барабан слов ---------- */
.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  /* барабан стоит между шапкой и подписью с запасом не меньше 24 px; --foot – высота подписи с отступом снизу */
  --foot: calc(60px * var(--s));
  --top: calc(52px * var(--s));
  padding: calc(var(--top) + 24px) var(--gutter) calc(var(--foot) + 24px);
  overflow: hidden;
}
/* Фон: холст шейдера (bg.js). Без WebGL – неподвижный градиент тех же цветов */
.stage-bg { position: absolute; inset: 0; overflow: hidden; background: var(--wash); }
.stage-bg canvas { display: block; width: 100%; height: 100%; }
.stage { user-select: none; -webkit-user-select: none; } /* частые клики по шарам не выделяют слова */
.stage-bg.backdrop { position: fixed; height: 100lvh; z-index: -1; background: var(--paper); pointer-events: none; }
.stage-bg.backdrop.is-still::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .66); }
.stage-bg.under { position: fixed; height: 100lvh; z-index: 998; pointer-events: none; } /* под листом перехода (999) */
html.soft { --text: #333d47; --grey: #414c57; --rule: rgba(51, 61, 71, .22); }
.stage-bg.is-still {
  background:
    linear-gradient(to top, rgba(255, 255, 255, .8), transparent 30%),
    radial-gradient(60% 55% at 75% 35%, var(--c1), transparent 70%),
    radial-gradient(55% 60% at 20% 20%, var(--c3), transparent 70%),
    radial-gradient(60% 60% at 45% 75%, var(--c4), transparent 70%),
    var(--c0);
}

.drums {
  position: relative; /* без z-index: иначе режим наложения слов не увидит фон */
  color: #fff;
  grid-column: 1 / -1;
  align-self: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.drum {
  display: block;
  perspective: 1200px;
  height: 0.92em;
  /* кегль – меньший из «по ширине» и «по высоте экрана»: три строки + выносные ≈ 3,1 em */
  --fit: calc((100svh - var(--top) - var(--foot) - 48px) / 3.1);
  font-size: min(clamp(calc(64px * var(--s)), 15.5vw, calc(236px * var(--s))), var(--fit));
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 0.92;
  overflow: visible;
}
.drum a { display: block; position: relative; height: 100%; width: max-content; max-width: 100%; }
/* слова – белые в режиме Exclusion (как слой в After Effects): цвет рождается из фона. Выбранное слово – чёрное */
.drum { mix-blend-mode: exclusion; }
.drum:has(a:focus-visible) { mix-blend-mode: normal; color: var(--ink); }
@media (hover: hover) { .drum:has(a:hover) { mix-blend-mode: normal; color: var(--ink); } }
.word {
  position: absolute; left: 0; top: 0;
  white-space: nowrap;
  transform-origin: 50% 50% -0.4em;
  backface-visibility: hidden;
  transition: transform 720ms cubic-bezier(.7, 0, .2, 1), opacity 720ms ease;
  will-change: transform, opacity; /* слой готов заранее: первый переворот без рывка */
}
.word.is-in   { transform: rotateX(0deg);   opacity: 1; }
.word.is-up   { transform: rotateX(90deg);  opacity: 0; }
.word.is-down { transform: rotateX(-90deg); opacity: 0; transition: none; }

.stage-foot {
  position: absolute; z-index: 2;
  left: var(--gutter); right: var(--gutter); bottom: calc(16px * var(--s));
  display: flex; justify-content: space-between; gap: 24px;
  font-size: calc(15px * var(--s));
}
.stage-foot p { margin: 0; }
.stage.is-balls .stage-foot { color: var(--ink); }
/* подпись в одну строку; где не помещается – по предложению в строку */
@media (max-width: 767px) { .hint span { display: block; text-wrap: balance; } }
.stage-foot a { border-bottom: 1px solid currentColor; }
.stage-foot a:hover { color: var(--blue); }

/* ---------- Картотека ---------- */
.index {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  padding: calc(96px * var(--s)) var(--gutter) calc(80px * var(--s));
}
.filters {
  grid-column: 1 / span 3;
  position: sticky; top: calc(72px * var(--s)); align-self: start;
  font-size: calc(15px * var(--s));
}
/* Task и Craft – названия групп: крупнее, жирные, с чертой; разделы под ними обычные */
.filters h2 {
  font-size: calc(21px * var(--s)); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em;
  margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--ink);
}
.filters ul { list-style: none; margin: 0 0 28px; padding: 0; }
.filters li { padding: 3px 0; }
.filters a:hover { color: var(--blue); }
.filters a[aria-current="true"] { color: var(--blue); font-weight: 600; }
.filters .ru { color: var(--grey); }

.listing { grid-column: 4 / -1; min-width: 0; }
.listing-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 36px;
}
/* высоту задаёт app.js (alignLine): заголовок и описание прижаты к черте и встают между чертой Task и чертой Craft.
   Пустая строка описания держит заголовок на одном месте во всех разделах */
.listing-head.is-level { align-items: end; grid-template-rows: 100%; margin-bottom: 0; padding-bottom: calc(16px * var(--s)); }
.listing-head.is-level p { margin-top: calc(4px * var(--s)); }
.listing-head.is-level > div:first-child { grid-area: 1 / 1 / 2 / -1; min-width: 0; } /* заголовку – вся ширина, переключатель вида в том же ряду справа внизу */
.listing-head.is-level .views { grid-area: 1 / 2; }
.listing-head h1 {
  margin: 0;
  font-size: clamp(calc(48px * var(--s)), 8vw, calc(120px * var(--s)));
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.listing-head p { margin: 14px 0 0; color: var(--grey); text-wrap: balance; }
@media (min-width: 901px) { .listing-head p { white-space: nowrap; } } /* описание раздела – одной строкой, чтобы всё стояло на своих местах */
.views { display: flex; gap: 16px; font-size: calc(15px * var(--s)); }
.views button[aria-pressed="true"] { color: var(--blue); font-weight: 600; }
.views button:hover { color: var(--blue); }

/* Список: строки картотеки */
.rows { list-style: none; margin: 0; padding: 0; }
.rows::before { content: ""; display: block; height: 1px; background: var(--ink); transform-origin: left; } /* верхняя линия: после шторки прочерчивается (app.js) */
.row a {
  display: block;
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--rule);
}
.row a:hover, .row a:focus-visible { color: var(--blue); }
.row .year { color: var(--grey); }
.row a:hover .year { color: var(--blue); }
.row .title { display: block; font-size: clamp(calc(20px * var(--s)), 2.1vw, calc(28px * var(--s))); font-weight: 560; letter-spacing: -0.015em; line-height: 1.15; }
.row .sub { display: block; font-size: calc(15px * var(--s)); font-weight: 400; color: var(--grey); letter-spacing: 0; margin-top: 2px; }
.row .year { text-align: right; }

/* Сетка */
.tiles {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px var(--gutter);
}
.tile a { display: block; }
.tile .pic { aspect-ratio: 4 / 3; background: var(--wash); overflow: hidden; }
.tile .pic img, .tile .pic video { width: 100%; height: 100%; object-fit: cover; }
.tile .pic.is-empty { display: flex; align-items: flex-end; padding: 14px; color: var(--grey); font-size: calc(15px * var(--s)); }
.is-empty { border: 1px solid var(--ink); }
.tile .cap { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; }
.tile .cap b { font-weight: 560; }
.tile .cap span { color: var(--grey); }
.tile a:hover .cap b { color: var(--blue); }

/* ---------- Карточка проекта ---------- */
.project { padding: calc(96px * var(--s)) var(--gutter) calc(80px * var(--s)); touch-action: pan-y pinch-zoom; } /* вбок – свайп между проектами */
.project-main {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
}
.project-text { grid-column: 1 / span 4; position: sticky; top: calc(72px * var(--s)); align-self: start; container-type: inline-size; }
.project-media { grid-column: 5 / -1; display: flex; flex-direction: column; gap: var(--gutter); min-width: 0; }
/* каждый кадр целиком помещается в экран: высокие и квадратные сужаются, широкие не меняются */
@media (min-width: 901px) {
  .project-media { --media-h: calc(100svh - 170px * var(--s)); }
  .project-media .player-box { max-width: calc(var(--media-h) * var(--r, 16 / 9)); }
  .project-media .bento { max-width: calc(var(--media-h) * var(--ba)); }
  .project-media .plan { width: auto; max-width: 100%; max-height: var(--media-h); }
  .project-media .grow { max-width: calc(var(--media-h) * var(--rs, 99) + (var(--n, 1) - 1) * var(--gutter)); }
}
/* Бенто-витрина (ONEST): ровный внешний контур; на телефоне – одна колонка, каждая картинка на всю ширину */
.project-media .showcase { display: flex; flex-direction: column; gap: var(--gutter); }
.project-media .brow { display: flex; gap: var(--gutter); }
.project-media .brow img { flex: var(--r) 1 0; min-width: 0; aspect-ratio: var(--r); object-fit: cover; display: block; }
.project-media .bento { display: grid; gap: var(--gutter); grid-template-columns: var(--bc); grid-template-rows: var(--br); aspect-ratio: var(--ba); }
.project-media .bento img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-media .bento img:nth-child(1) { grid-column: 1; grid-row: 1; }
.project-media .bento img:nth-child(2) { grid-column: 2; grid-row: 1 / 3; }
.project-media .bento img:nth-child(3) { grid-column: 1; grid-row: 2; }
.project-media .bento img:nth-child(4) { grid-column: 3; grid-row: 1 / 3; }
@media (max-width: 600px) { .project-media .bento, .project-media .brow { display: flex; flex-direction: column; aspect-ratio: auto; } .project-media .bento img { height: auto; } .project-media .brow img { flex: none; width: 100%; height: auto; } }
.project-media .gallery { display: flex; flex-direction: column; gap: var(--gutter); }
/* Плееры Кинескопа над галереей (поле kinescope в projects.js: id или список { id, caption }) */
.project-media .plan { display: block; width: 100%; height: auto; }
.project-media .plan.clear { background: none; } /* PNG/WebP с прозрачностью лежит прямо на фоне сайта */
.project-media .player-box { margin: 0; }
.project-media .player-box figcaption { padding-top: 8px; font-size: calc(15px * var(--s)); color: var(--grey); }
.project-media .player { position: relative; aspect-ratio: var(--r, 16 / 9); background: rgba(51, 61, 71, .08) center / cover no-repeat; }
/* наша кнопка поверх обложки; клик проходит сквозь неё в прозрачный плеер */
.project-media .player:not(.is-playing)::after { content: ''; position: absolute; inset: 0; margin: auto; height: min(64px, 60%); aspect-ratio: 1; border-radius: 50%; pointer-events: none; background: #00188c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 62% no-repeat; }
.project-media .player-row { display: flex; gap: var(--gutter); align-items: flex-start; }
.project-media .player-row > * { flex: calc(var(--r) * 100) 1 0; min-width: 0; margin: 0; } /* ряд всегда на всю ширину */
.project-media .player-row .player { aspect-ratio: var(--r); }
.project-media .player:has(> video) { background: #0b0e12; }
.project-media .player video { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.project-media .player video.is-on { opacity: 1; }
.project-media .player iframe { display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .7s ease; }
.project-media .player iframe.is-on { opacity: 1; }

/* Свой плеер Bunny: кадр + строка управления под ним (вариант «Линия»). Внутри кадра – только кнопка пуска. */
.project-media .vp .frame { position: relative; aspect-ratio: var(--r, 16 / 9); background: #0b0e12; overflow: hidden; cursor: pointer; }
.project-media .vp video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0b0e12; }
/* Надпись «Смотри / Watch»: по центру кадра, без рамки и плашки; на компьютере по наведению, на телефоне пока кадр в зоне видимости; один размер на оба языка */
.project-media .vp .watch { display: none; text-shadow: none; position: absolute; inset: 0; z-index: 1; align-items: center; justify-content: center; padding-left: .14em; color: #fff; font-size: 48px; font-weight: 700; line-height: 1; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; opacity: 0; transition: opacity .8s ease-in, letter-spacing .9s ease-in, padding-left .9s ease-in, transform .9s ease-in; }
.project-media .vp:not(.is-playing):not(.has-played) .watch { display: flex; }
@media (hover: hover) { .project-media .vp:not(.is-playing) .frame:hover .watch { opacity: 1; letter-spacing: var(--ls-end, .5em); padding-left: var(--ls-end, .5em); transform: scale(1.06); animation: watchSpread 3s cubic-bezier(.37,0,.63,1) both, watchBreath 7s cubic-bezier(.37,0,.63,1) 3s infinite, watchFade 1.1s ease-out both; } }
@media (hover: none) { .project-media .vp.in-view:not(.is-playing) .watch { opacity: 1; letter-spacing: var(--ls-end, .5em); padding-left: var(--ls-end, .5em); transform: scale(1.06); animation: watchSpread 3s cubic-bezier(.37,0,.63,1) both, watchBreath 7s cubic-bezier(.37,0,.63,1) 3s infinite, watchFade 1.1s ease-out both; } }
/* затемнение кадра, пока надпись разъезжается */
.project-media .vp .frame::after { content: ""; position: absolute; inset: 0; z-index: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity 1.6s ease; }
@media (hover: hover) { .project-media .vp:not(.is-playing):not(.has-played) .frame:hover::after { opacity: .38; } }
@media (hover: none) { .project-media .vp.in-view:not(.is-playing):not(.has-played) .frame::after { opacity: .3; } }
@keyframes watchSpread { from { letter-spacing: -.1em; padding-left: 0; transform: scale(var(--sc-start, 3)); } to { letter-spacing: var(--ls-end, .5em); padding-left: var(--ls-end, .5em); transform: scale(1.06); } }
@keyframes watchFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes watchBreath { 0%, 100% { letter-spacing: var(--ls-end, .5em); padding-left: var(--ls-end, .5em); transform: scale(1.06); } 50% { letter-spacing: -.1em; padding-left: 0; transform: scale(var(--sc-start, 3)); } }
@media (prefers-reduced-motion: reduce) { .project-media .vp .watch { animation: none !important; } }
@media (max-width: 600px) { .project-media .vp .watch { font-size: 32px; } }
.vp .ctl { display: flex; align-items: center; gap: 10px; min-height: 32px; margin-top: 8px; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.vp.is-started .ctl { opacity: 1; visibility: visible; }
.vp.is-started.is-playing.is-idle:not(.is-vol) .ctl:not(:focus-within) { opacity: 0; transition-duration: .9s; }
.vp .ctlw { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.2,.7,.2,1); }
.vp .ctlc { overflow: hidden; min-height: 0; }
.vp.is-started .ctlw, .vp:fullscreen .ctlw { grid-template-rows: 1fr; }
.vp:fullscreen .ctl { opacity: 1; visibility: visible; }
.vp .ctl button { box-sizing: border-box; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, opacity .35s, transform .35s; }
.vp .ctl button:focus-visible { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (hover: hover) { .vp .ctl button:hover { background: var(--blue); border-color: var(--blue); color: #fff; } }
.vp .ctl svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: square; stroke-linejoin: miter; }
.vp .ctl svg * { vector-effect: non-scaling-stroke; }
.vp .ctl { position: relative; }
.vp .ctl > * { transition: opacity .35s, transform .35s; }
.vp .ctl [data-a=mute] { transition: opacity .35s, transform .35s, background-color .2s, border-color .2s, color .2s; }
.vp.is-vol .ctl .vbar:not(.vvol) { pointer-events: none; -webkit-mask-image: linear-gradient(to right, #000 var(--cut, 0px), transparent var(--cut, 0px)); mask-image: linear-gradient(to right, #000 var(--cut, 0px), transparent var(--cut, 0px)); }
.vp .ctl button, .vp .vbar.vvol { position: relative; z-index: 1; }
.vp.is-vol .ctl [data-a=mute] { transform: translateX(var(--mx, 0)); }
.vp .vbar.vvol { position: absolute !important; top: 0; flex: none; opacity: 0; pointer-events: none; transform: scaleX(.96); transform-origin: left; }
.vp.is-vol .vbar.vvol { opacity: 1; pointer-events: auto; transform: none; }
.vp .i-pause, .vp .i-mute { display: none; }
.vp.is-playing .i-pause, .vp.is-muted .i-mute { display: block; }
.vp.is-playing .i-play, .vp.is-muted .i-sound { display: none; }
.vp .ctl button.time, .vp .ctl button.time:hover, .vp .ctl button.time:focus-visible { width: auto; min-width: 3.4em; height: 32px; padding: 0 2px; border: 0; background: none; color: var(--grey); font: inherit; font-size: calc(12px * var(--s)); font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; text-align: left; }
.vp .vbar { position: relative; flex: 1; min-width: 40px; height: 32px; cursor: pointer; touch-action: none; }
.vp .vbar::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: #cfd3d8; }
.vp .vbar i { position: absolute; left: 0; top: 50%; height: 2px; margin-top: -1px; width: 0; background: #00188c; pointer-events: none; }
.vp .vbar b { position: absolute; top: 50%; left: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: #00188c; transform: scale(0); transition: transform .15s; pointer-events: none; }
.vp .vbar:hover b, .vp .vbar.is-drag b, .vp .vbar:focus-visible b { transform: scale(1); }
.vp .vbar:focus-visible { outline: 2px solid #00188c; outline-offset: -2px; }
.vp:fullscreen::backdrop { background: #000; }
.vp:fullscreen .ctl button.time { color: #bbb; }
.vp:fullscreen .vbar::before { background: #444; }
.vp:fullscreen .vbar i, .vp:fullscreen .vbar b { background: #fff; }
.vp:fullscreen { background: #000 !important; color: #fff; display: flex; flex-direction: column; margin: 0; }
.vp:fullscreen .frame { flex: 1; aspect-ratio: auto; }
.vp:fullscreen .frame, .vp:fullscreen video, .project-media .vp:fullscreen video { background: #000; object-fit: contain; }
.vp:fullscreen .ctl { padding: 0 20px; color: #fff; }
.vp:fullscreen .ctl button { color: #fff; border-color: #fff; }
.vp:fullscreen figcaption { display: none; }
.project-media .grow { display: flex; gap: var(--gutter); }
.project-media img, .project-media video { display: block; width: 100%; height: auto; background: var(--wash); }
.project-media .grow > * { flex: calc(var(--r, 1) * 100) 1 0; width: 0; min-width: 0; aspect-ratio: var(--r, 1.5); object-fit: cover; }
/* листалка (strip: true): все картинки одной высоты – как у главного макета (1,663) во всю колонку */
.project-media { container-type: inline-size; }
.project-media .gallery.strip { --strip: min(calc(100cqi / 1.663), 80svh); position: relative; flex-direction: row; align-items: center; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; user-select: none; }
.strip:active { cursor: grabbing; }
.strip::-webkit-scrollbar { display: none; }
.project-media .strip img { flex: none; width: auto; height: var(--strip); object-fit: cover; background: none; scroll-snap-align: start; }
.show-nav button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--ink); cursor: pointer; }
.show-nav svg { width: 24px; height: 24px; }
.show-nav button:focus-visible { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (hover: hover) { .show-nav button:hover { background: var(--blue); border-color: var(--blue); color: #fff; } }
.project-media .is-empty {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  background: var(--wash);
  display: flex; align-items: flex-end; padding: 18px;
  color: var(--grey);
}
.back { display: inline-block; font-size: calc(15px * var(--s)); margin-bottom: 40px; }
.back:hover { color: var(--blue); }
.project h1 {
  margin: 0;
  /* Один кегль на все названия: по ширине колонки и самому длинному слову базы (8,3 em: «Криптоартефакты») – название всегда помещается в свою колонку. */
  font-size: min(calc(76px * var(--s)), calc(100cqi / 8.4), max(40px, 5vw));
  overflow-wrap: break-word;
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.project .lede { margin: 12px 0 0; font-size: calc(19px * var(--s)); line-height: 1.35; }
.project .about { margin: 22px 0 0; max-width: 42ch; }
.about + .about { margin-top: 12px; }
.open-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 8em; margin: 26px 0 0; padding: 12px 18px; border: 1px solid var(--ink); font-size: calc(17px * var(--s)); line-height: 1; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.btns .open-btn { margin: 0; min-width: 8.5em; } /* пара кнопок одного размера на обоих языках */
button.open-btn { background: none; color: inherit; font-family: inherit; font-weight: inherit; letter-spacing: inherit; border-radius: 0; cursor: pointer; }
.show { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--text); }
html:has(.show[open]) { overflow: hidden; }
.show-box { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--gutter); width: 100%; height: 100%; padding: var(--gutter) var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom)); background: var(--paper); }
.show img { flex: 1; width: 100%; min-height: 0; object-fit: contain; }
.show-nav { display: flex; justify-content: center; gap: 8px; }
.open-btn:focus-visible { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (hover: hover) { .open-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 22px 0 0; font-size: calc(15px * var(--s)); }
.tags a { border-bottom: 1px solid var(--rule); }
.tags a:hover { color: var(--blue); border-color: var(--blue); }

.credits { margin: 40px 0 0; }
.credits h2 { font-size: calc(15px * var(--s)); font-weight: 600; margin: 0 0 6px; }
.credits dl { margin: 0 0 26px; border-top: 1px solid var(--ink); }
.credits .line {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px; padding: 7px 0 8px;
  border-bottom: 1px solid var(--rule);
  font-size: calc(15px * var(--s));
}
.credits dt { color: var(--grey); min-width: 0; overflow-wrap: anywhere; }
.credits dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.credits .unknown { color: var(--grey); }
.credits a { border-bottom: 1px solid currentColor; }
.credits a:hover { color: var(--blue); }

.pager {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  margin-top: 72px; padding-top: 22px;
  border-top: 1px solid var(--ink);
  font-size: calc(15px * var(--s));
}
.pg { display: flex; padding: 0 12px; margin: 0 -12px; } /* поле касания шире самой стрелки */
.pg svg { flex: none; width: clamp(calc(22px * var(--s)), 2.4vw, calc(34px * var(--s))); height: clamp(calc(66px * var(--s)), 7vw, calc(100px * var(--s))); }
@media (hover: hover) { .pg:hover { color: var(--blue); } .pg-prev:hover svg { transform: translateX(-4px); } .pg-next:hover svg { transform: translateX(4px); } .pg svg { transition: transform .2s; } }
.pg:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }
/* смена проекта: уезжающая копия поверх, без горизонтальной прокрутки */
.ghost { position: fixed; top: 0; left: 0; width: 100%; margin: 0; z-index: 5; pointer-events: none; }
.stage.is-dropping { z-index: 6; } /* витрина накрывает прежнюю страницу сверху */
html.sliding, html.sliding body { overflow-x: hidden; }
.ghost-list { position: fixed; z-index: 5; overflow: hidden; pointer-events: none; }
html.sliding #app { overflow-x: clip; } /* въезжающая карточка не расширяет страницу */

/* ---------- Большие мониторы (2K, 4K без масштабирования) ---------- */
@media (min-width: 2200px) and (min-height: 1100px) { :root { --s: 1.3; } }
@media (min-width: 3000px) and (min-height: 1600px) { :root { --s: 1.8; } }

/* ---------- Узкие экраны ---------- */
@media (max-width: 900px) {
  .listing-head p.is-blank { display: none; }
  .filters { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); }
  .listing { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-text { grid-column: 1 / -1; position: static; margin-bottom: 40px; }
  .project-media { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .project-media .player-row { flex-direction: column; align-items: stretch; }
  .project-media .player-row > * { flex: none; width: 100%; }
  /* как у Нади: бургер слева, имя по центру, меню на весь экран */
  .bar { display: grid; grid-template-columns: 44px 1fr 44px; }
  .burger { grid-column: 1; grid-row: 1; display: inline-flex; align-items: center; width: 44px; height: 44px; position: relative; z-index: 1; }
  .burger svg { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: square; overflow: visible; }
  .burger path { vector-effect: non-scaling-stroke; }
  .burger .i-c, .bar.is-open .i-o { display: none; }
  .bar.is-open .i-c { display: block; }
  .mark { grid-column: 2; grid-row: 1; justify-self: center; position: relative; z-index: 1; }
  /* меню – белая шторка сверху: слова кеглем витрины прорезаны в белом, в прорезях живой фон */
  .bar-nav {
    position: fixed; inset: 0; height: 100lvh; text-transform: none;
    transform: translate3d(0, -100%, 0); visibility: hidden;
    transition: transform .6s cubic-bezier(.7, 0, .25, 1), visibility 0s .6s;
  }
  .bar.is-open .bar-nav { transform: none; visibility: visible; transition: transform .6s cubic-bezier(.7, 0, .25, 1); }
  .bar.is-open.is-exit .bar-nav { transform: translate3d(0, 100%, 0); } /* переход в картотеку: шторка уходит вниз */
  .bar.is-instant .bar-nav { transition: none; }
  .menu-bg { display: block; }
  /* screen: белое остаётся белым, чёрные буквы становятся окнами в фон под ними */
  .items {
    position: absolute; inset: 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0; padding: 52px var(--gutter);
    background: #fff; mix-blend-mode: screen;
    font-size: min(clamp(48px, 16vw, 120px), calc((100svh - 140px) / 3.6)); font-weight: 640; letter-spacing: -0.04em; line-height: .92;
  }
  .bar .items a, .bar .items .lang { color: #000; }
  .lang { margin: .5em 0 0; padding: 0; min-width: 0; text-align: left; font-size: 1em; font-weight: 640; line-height: .92; }
  .bar.is-open .items > * { animation: write .7s cubic-bezier(.45, 0, .2, 1) both; animation-delay: calc(.35s + var(--k, 0) * .18s); }
  .items > :nth-child(2) { --k: 1; }
  .items > :nth-child(3) { --k: 2; }
  html.lock { overflow: hidden; }
  .tiles { grid-template-columns: 1fr; }
  .listing-head { grid-template-columns: 1fr; }
  .stage-foot { flex-direction: column; gap: 8px; }
  .stage { --foot: 90px; }
  .drum { font-size: min(clamp(48px, 16vw, 120px), var(--fit)); }
}
@keyframes write { from { clip-path: inset(-.2em 100% -.2em -.1em); } to { clip-path: inset(-.2em -.1em -.2em -.1em); } }
@media (prefers-reduced-motion: reduce) {
  .bar { transition: none; }
  .word { transition: opacity 300ms ease; }
  .word.is-up, .word.is-down { transform: none; }
}

.vp:-webkit-full-screen { background: #000 !important; }
.vp:-webkit-full-screen .frame, .vp:-webkit-full-screen video { background: #000; }

/* короткая анимированная заставка вместо статичного кадра: растягивается по кадру, пока видео не запущено */
.project-media .vp .reel { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; pointer-events: none; }
.project-media .vp.has-played .reel, .project-media .vp.is-started .reel { display: none; }
