:root {
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ink: #141414;
  --muted: #6b6b6b;
  --paper: #fafafa;
  --chip: #e8e8e6;
  --tile: #e2e2e0;
  --radius: 2px;
  --pad: clamp(12px, 2.4vw, 32px);
  --gap: clamp(10px, 1.4vw, 18px);
  --top-h: 52px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ededeb;
    --muted: #9a9a97;
    --paper: #121212;
    --chip: #262626;
    --tile: #1e1e1e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 56px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 15px/1.4 var(--font);
  letter-spacing: -0.003em;
}
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Шапка */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--top-h);
  padding: env(safe-area-inset-top) max(var(--pad), env(safe-area-inset-right)) 0 max(var(--pad), env(safe-area-inset-left));
  background: var(--paper);
}
.left { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
/* Видео / Театр: текущая страница яркая, другая приглушённая */
.pages { display: flex; gap: clamp(12px, 1.6vw, 20px); }
.pages a { text-decoration: none; color: var(--muted); }
.pages a:hover, .pages a[aria-current="page"] { color: var(--ink); }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.brand { font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.links { display: flex; gap: clamp(14px, 2.4vw, 28px); }
.links a { text-decoration: none; color: var(--muted); }
.links a:hover, .links a:focus-visible { color: var(--ink); }
.links { align-items: center; }
.links .contact {
  padding: 6px 12px 7px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  transition: transform 120ms ease;
}
.links .contact:active { transform: scale(0.97); }
.lang { display: flex; gap: 2px; }
.lang button { padding: 3px 6px; border-radius: var(--radius); color: var(--muted); font-size: 13px; }
.lang button[aria-pressed="true"] { background: var(--chip); color: var(--ink); }
.lang button:hover { color: var(--ink); }

/* Главный экран */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
  align-items: end;
  padding: clamp(24px, 6vw, 88px) var(--pad) 48px;
}
.hero h1 {
  margin: 0 0 24px;
  max-width: 17ch;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.clients { margin: 0; max-width: 46ch; color: var(--muted); text-wrap: pretty; }
.clients b { font-weight: 500; color: var(--ink); }

/* Окно шоурила всегда 4:3; вертикальные ролики заполняют его целиком, без полос */
.reel {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile);
}
.reel video, .reel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 500ms ease;
}
.reel video.on, .reel img.on { opacity: 1; }

/* Фильтры */
.work { padding: 0 var(--pad) 80px; }
.filters {
  position: sticky;
  top: var(--top-h);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 10px 0 14px;
  background: var(--paper);
}
.group { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  padding: 5px 9px 6px;
  border-radius: var(--radius);
  background: var(--chip);
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.chip sup { font-size: 9px; margin-left: 2px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] sup { color: inherit; opacity: 0.7; }
.chip:hover { background: var(--ink); color: var(--paper); }
.chip:active { transform: translateY(1px); }

/* Работы: каждый проект — своя строка во всю ширину. Ролики одной высоты,
   лишние уходят вправо и листаются. */
.grid {
  --row-h: min(clamp(260px, 36vw, 540px), 68dvh);
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 88px);
  padding-top: 16px;
}
.head { margin-bottom: 12px; }
.name {
  margin: 0;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.client { margin: 2px 0 0; font-size: clamp(15px, 1.2vw, 17px); color: var(--muted); }
.note { margin: 12px 0 0; max-width: 34ch; text-wrap: pretty; }
.meta { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.rail { position: relative; }
.rail.more-right .row { mask-image: linear-gradient(to right, #000 calc(100% - 96px), transparent); }
.rail.more-left .row { mask-image: linear-gradient(to left, #000 calc(100% - 96px), transparent); }
.rail.more-left.more-right .row {
  mask-image: linear-gradient(to right, transparent, #000 96px, #000 calc(100% - 96px), transparent);
}
.arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.25);
  transition: transform 120ms ease, opacity 160ms ease;
}
.arrow.prev { left: 12px; }
.arrow.next { right: 12px; }
.arrow:hover { transform: scale(1.06); }
.arrow:active { transform: scale(0.96); }

.row {
  display: flex;
  gap: 6px;
  height: var(--row-h);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  outline: none;
}
.row::-webkit-scrollbar { display: none; }
.frame {
  position: relative;
  display: block;
  flex: none;
  height: 100%;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile);
  scroll-snap-align: start;
}
.frame img,
.frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame video { position: absolute; inset: 0; opacity: 0; transition: opacity 240ms ease; }
.frame.playing video { opacity: 1; }

/* Серии фото: небольшие карточки, стрелки листают внутри серии */
.row.sets { height: auto; gap: var(--gap); align-items: flex-start; }
.set { flex: none; }
.set-frame {
  position: relative;
  height: min(clamp(252px, 34vw, 476px), 50dvh);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile);
}
.set-open { display: block; width: 100%; height: 100%; padding: 0; }
.set-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.set-caption { margin: 8px 0 0; }
.set-count { color: var(--muted); }
.arrow.small { width: 34px; height: 34px; margin-top: -17px; font-size: 15px; background: rgb(0 0 0 / 0.55); color: #fff; box-shadow: none; }
.arrow.small:hover { background: rgb(0 0 0 / 0.8); }
.arrow.small.prev { left: 8px; }
.arrow.small.next { right: 8px; }

.empty { padding: 48px 0; color: var(--muted); }

/* Просмотр: окно поверх сайта, сзади видно страницу */
.viewer {
  --r: 1.7778;
  width: min(94vw, 1280px, calc((100dvh - 150px) * var(--r)));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 40px 0 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #ededeb;
  overflow: visible;
  overscroll-behavior: contain;
}
.viewer::backdrop { background: rgb(0 0 0 / 0.72); backdrop-filter: blur(6px); }
.window {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.viewer-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--r);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.viewer-stage video,
.viewer-stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.viewer-stage .quick { position: absolute; inset: 0; pointer-events: none; transition: opacity 250ms ease; }
.viewer-stage .quick.gone { opacity: 0; }
.viewer-stage .arrow {
  width: 36px; height: 36px; margin-top: -18px; font-size: 16px;
  background: rgb(0 0 0 / 0.28); color: rgb(255 255 255 / 0.75); box-shadow: none;
}
.viewer-stage .arrow:hover, .viewer-stage .arrow:focus-visible { background: rgb(0 0 0 / 0.6); color: #fff; }
/* Крестик над окном, вне видео: маленький и полупрозрачный, ярче при наведении */
.close {
  position: absolute;
  top: -34px;
  right: -4px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  color: rgb(255 255 255 / 0.6);
  font-size: 26px;
  line-height: 1;
  transition: color 120ms ease, background 120ms ease;
}
.close:hover, .close:focus-visible { color: #fff; background: rgb(255 255 255 / 0.12); }
.viewer-foot { display: flex; justify-content: space-between; gap: 12px; color: #ededeb; }
.viewer-title { margin: 0; }
.viewer-title span, .viewer-count { color: #9a9a97; }
.viewer-side { display: flex; align-items: baseline; gap: 16px; white-space: nowrap; }
.copy { color: #ededeb; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #5a5a58; }
.copy:hover { text-decoration-color: currentColor; }
.soon { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); margin: 0; padding: 5px 9px 6px; border-radius: var(--radius); background: #262626; }

/* Служебное */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--pad); top: -40px; z-index: 20; padding: 6px 10px; border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.skip:focus { top: 8px; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* «Написать»: на компьютере небольшое окно, на телефоне панель снизу */
.sheet {
  width: min(400px, 92vw);
  padding: 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.sheet::backdrop { background: rgb(0 0 0 / 0.55); }
.sheet[open] { display: flex; flex-direction: column; gap: 8px; }
.sheet-title { margin: 0 0 6px; color: var(--muted); }
.sheet-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--chip);
  font-size: 17px;
  text-decoration: none;
}
.sheet-link:hover { background: var(--ink); color: var(--paper); }
.sheet-link:hover .sheet-handle { color: inherit; opacity: 0.7; }
.sheet-handle { color: var(--muted); font-size: 15px; }
.sheet-cancel { min-height: 48px; margin-top: 4px; color: var(--muted); }

@media (max-width: 800px) {
  .sheet {
    width: 100vw;
    max-width: none;
    margin: auto 0 0;
    padding: 16px var(--pad) calc(16px + env(safe-area-inset-bottom));
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .sheet[open] { animation: sheet-up 220ms cubic-bezier(0.16, 1, 0.3, 1); }
}
@keyframes sheet-up { from { transform: translateY(100%); } }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 16px; align-items: start; }
  .reel { order: -1; }
  .arrow { width: 40px; height: 40px; margin-top: -20px; font-size: 17px; }
  .viewer { width: min(100vw, calc((100dvh - 120px) * var(--r))); }
  .close { top: -36px; right: 8px; }
  .viewer-foot { padding: 0 var(--pad); }

  /* Фильтры одной строкой с прокруткой вбок, чтобы не занимали пол-экрана */
  .filters {
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 calc(var(--pad) * -1);
    padding: 8px var(--pad) 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .group { flex-wrap: nowrap; }
  .group + .group { padding-left: 8px; }

  /* Ролики по ширине экрана: вертикальные почти во весь рост, следующий выглядывает справа */
  .row { height: auto; align-items: flex-start; margin-right: calc(var(--pad) * -1); padding-right: var(--pad); }
  .frame { height: auto; }
  .frame.wide { width: 86vw; }
  .frame.tall { width: 66vw; }
  .frame.square { width: 78vw; }
  .rail.more-right .row, .rail.more-left .row, .rail.more-left.more-right .row { mask-image: none; }
  .rail > .arrow { display: none; }
  .set-frame { height: min(80vw, 364px); }
}
@media (max-width: 420px) {
  .links { gap: 12px; font-size: 14px; }

  .brand { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel video, .reel img, .frame video, .chip { transition: none; }
  .sheet[open] { animation: none; }
}

/* На широком экране подписи слева, ролики справа: как на первом экране.
   Иначе у проектов с одним роликом пустует вся правая половина. */
@media (min-width: 801px) {
  .tile {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr);
    gap: var(--gap);
  }
  .tile .head { margin: 0; padding-right: 8px; }
  .tile .note { max-width: 30ch; }
}

/* Театр: создатели спектакля, ссылки, лаборатории */
/* создатели под фото, в строку: роль мелко над именем */
.credits { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 16px 0 0; font-size: 14px; line-height: 1.3; }
.credits dt { color: var(--muted); font-size: 13px; }
.credits dd { margin: 2px 0 0; }
.show-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; font-size: 14px; }
.show-links a { text-underline-offset: 3px; text-decoration-color: var(--muted); }
.show-links a:hover { text-decoration-color: var(--ink); }
.labs { padding-top: 0; }
.labs .tile { border-top: 1px solid var(--chip); padding-top: 20px; }
.lab-list { margin: 0; padding: 0; list-style: none; }
.lab-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--chip);
}
.lab-list li:first-child { padding-top: 0; }
.lab-result { color: var(--muted); white-space: nowrap; }

@media (max-width: 800px) {
  /* Театр на телефоне: название, фото с создателями, потом знаки и ссылки */
  [data-page="theatre"] .tile { display: flex; flex-direction: column; }
  [data-page="theatre"] .tile .head { display: contents; }
  [data-page="theatre"] .tile .media { order: 1; margin-top: 12px; }
  [data-page="theatre"] .show-links, [data-page="theatre"] .award { order: 2; }
  .credits { gap: 10px 24px; }
}

/* Театр: портрет на первом экране, образование отдельным блоком */
/* Первый экран зеркальный к спектаклям: портрет слева, текст справа от него.
   Так он не сливается со спектаклями (там текст слева) и справа не остаётся пустоты. */
.stage-hero { grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(24px, 4vw, 64px); align-items: end; }
.stage-hero .portrait { order: -1; }
.stage-hero h1 { font-size: clamp(36px, 5vw, 76px); }
.portrait {
  display: block;
  height: min(78dvh, 720px);
  width: auto;
  aspect-ratio: 772 / 1170;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--tile);
}
.edu { margin: 0; max-width: 40ch; padding-right: 8px; }
.edu dt { margin-top: 20px; font-size: 14px; color: var(--muted); }
.edu dt:first-child { margin-top: 0; }
.edu dd { margin: 4px 0 0; }
.edu-what { display: block; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.25; letter-spacing: -0.01em; }
.edu-where { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.stage-hero h1 { margin-bottom: clamp(28px, 4vw, 48px); }

/* Театр: фото пониже, чем ролики, чтобы в ряд влезало два-три кадра; остальные листаются */
[data-page="theatre"] .grid { --row-h: min(clamp(220px, 23vw, 340px), 56dvh); }

@media (max-width: 800px) {
  .stage-hero { grid-template-columns: 1fr; }
  .portrait { order: -1; width: 100%; height: auto; aspect-ratio: 4 / 5; object-position: 50% 30%; }
}

/* Имя крупно, «Режиссёр» той же строкой приглушённо */
.stage-name { display: flex; flex-direction: column; max-width: none; }
.stage-role { color: var(--muted); }
.pdf-link { margin: 28px 0 0; font-size: 15px; }
.pdf-link a { text-underline-offset: 3px; text-decoration-color: var(--muted); }
.pdf-link a:hover { text-decoration-color: var(--ink); }
.contacts .lab-list a { text-decoration: none; }
.contacts .lab-list a:hover { text-decoration: underline; text-underline-offset: 3px; }


/* Театр: первый экран отдельно от спектаклей — больше воздуха и видимый заголовок с линией,
   как у «Лабораторий» и «Контактов» ниже */
.stage-hero { padding-bottom: clamp(64px, 9vw, 128px); }
.section-title {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--chip);
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
[data-page="theatre"] #work .grid { padding-top: clamp(24px, 3vw, 40px); }

@media (min-width: 801px) {
  .stage-name { display: block; }
  .stage-role { display: block; }
  .stage-hero .edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; max-width: 720px; }
  .stage-hero .edu dt { grid-row: 1; margin-top: 0; }
  .stage-hero .edu dd { grid-row: 2; }
}

/* Знак фестиваля или премии: отдельный блок с отступом, знак рядом с короткой подписью */
.award {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 0;
  font-size: 14px; line-height: 1.3;
}
.award img { flex: none; height: 44px; width: auto; }
.award img.ink { height: 30px; }
.award.wide { gap: 12px; }
.award.wide img.ink { height: 26px; }
@media (prefers-color-scheme: dark) {
  .award img.ink { filter: invert(1); }
}
.media { min-width: 0; }

.credits.compact { display: block; margin: 16px 0 0; }
.credits.compact div { display: flex; flex-wrap: wrap; column-gap: 6px; margin-top: 3px; }
.credits.compact dt { font-size: 14px; }
.credits.compact dd { margin: 0; }
@media (min-width: 801px) {
  /* колонка тянется на высоту фото, знак прижат к её низу */
  [data-page="theatre"] .tile .head { display: flex; flex-direction: column; }
  [data-page="theatre"] .award { margin-top: auto; padding-top: 16px; }
}

/* Анонс второй страницы — карточка другого сайта: мягкая плашка, аватар и имя как в её шапке,
   кнопка перехода. Так видно, что это переход, а не очередной проект. */
.other { padding-bottom: clamp(48px, 6vw, 88px); }
.other-card {
  padding: clamp(20px, 3vw, 40px);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--ink) 6%, var(--paper));
}
.other-brand { display: flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(22px, 2.2vw, 32px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.other-brand .avatar { width: 40px; height: 40px; }
.other-brand a { text-decoration: none; }
.other-text { margin: 12px 0 0; color: var(--muted); max-width: 36ch; text-wrap: pretty; }
.other .clients { margin: 18px 0 0; font-size: 14px; max-width: 34ch; }
.other-go {
  display: inline-block; align-self: flex-start; margin-top: 24px; padding: 8px 14px 9px;
  border-radius: var(--radius); background: var(--ink); color: var(--paper); text-decoration: none;
  transition: transform 120ms ease;
}
.other-go:active { transform: scale(0.97); }
.other-card .head { display: flex; flex-direction: column; }
a.frame { text-decoration: none; }
/* в анонсе все четыре работы видны сразу: ровный ряд одинаковых кадров, на телефоне 2×2 */
.other .row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: auto; overflow: visible; margin: 0; padding: 0; }
.other .frame { width: auto !important; height: auto; aspect-ratio: 4 / 5 !important; }
@media (max-width: 800px) {
  .other .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-page] .other .tile { display: flex; flex-direction: column; }
  [data-page] .other .tile .head { display: flex; }
  .other .media { order: 0; margin-top: 16px; }
}

/* sever.neuro: имя крупно — главное, что запоминает клиент; ниже чем занимаюсь, потом с кем */
.hero .big-name {
  margin: 0 0 clamp(16px, 2vw, 28px);
  max-width: none;
  font-size: clamp(56px, 7.8vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.hero .lead {
  margin: 0 0 clamp(20px, 2.4vw, 32px);
  max-width: 24ch;
  font-size: clamp(20px, 1.9vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
@media (max-width: 800px) {
  /* на телефоне имя во всю ширину экрана */
  .hero .big-name { font-size: 18.4vw; }
}

/* тихая ссылка на вторую страницу в шапке: серая, как остальные ссылки */
.links .side { color: var(--muted); }
@media (max-width: 420px) {
  /* на телефоне имя крупно стоит на первом экране, в шапке хватит аватара — освобождаем место для ссылок */
  .brand span { display: none; }
}

/* Подвал: контакты и обязательная пометка про Instagram */
.foot {
  margin: 0 var(--pad);
  padding: 20px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--chip);
  font-size: 14px;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-links a { text-decoration: none; }
.foot-links a { display: inline-flex; align-items: flex-start; color: var(--muted); transition: color 120ms ease; }
.foot-links a:hover { color: var(--ink); }
.foot-links .ico { width: 20px; height: 20px; }
.foot-note { margin: 14px 0 0; max-width: 70ch; font-size: 12px; color: var(--muted); }

/* Соцсети под Credits: знак и подпись, серые, при наведении ярче.
   Знаки — Simple Icons (brand/icons), красятся цветом текста через маску */
.social { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 clamp(18px, 2vw, 26px); font-size: 14px; }
.social a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; transition: color 120ms ease; }
.social a:hover, .social a:focus-visible { color: var(--ink); }
.ico { width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.ico-tg { --icon: url("brand/icons/telegram.svg"); }
.ico-ig { --icon: url("brand/icons/instagram.svg"); }



/* Значки соцсетей в шапке, рядом с «Написать»: серые, без подписей */
.links .icon-link { display: inline-flex; align-items: flex-start; color: var(--muted); transition: color 120ms ease; }
.links .icon-link:hover, .links .icon-link:focus-visible { color: var(--ink); }
.links .icon-link .ico { width: 18px; height: 18px; }
.links .icon-link .star { font-size: 11px; line-height: 1; margin-left: 1px; }
@media (max-width: 420px) {
  /* на узком экране «Театральные работы» в две строки, чтобы в шапку влезли значки */
  .links .side { width: min-content; font-size: 13px; line-height: 1.1; text-align: right; }
  .links { gap: 10px; }
  .top { gap: 10px; }
  .lang button { padding: 3px 5px; }
}


/* Плеер на телефоне: название на всю ширину, под ним «← 1 из 2 →» и ссылка.
   Стрелки не над видео, чтобы не мешать кнопкам системного плеера. */
.viewer.touch .viewer-foot {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 16px;
  /* подпись шире вертикального видео: на всю ширину экрана */
  width: min(100vw, 560px); margin-left: calc(50% - min(50vw, 280px)); padding: 0 16px;
}
.viewer.touch .viewer-title { grid-column: 1 / -1; }
.viewer.touch .viewer-side { grid-column: 2; grid-row: 2; }
.viewer-nav { grid-column: 1; grid-row: 2; display: flex; align-items: center; gap: 12px; }
.viewer-nav .arrow {
  position: static; margin: 0; width: 40px; height: 40px; font-size: 17px;
  background: rgb(255 255 255 / 0.12); color: #ededeb; box-shadow: none;
}
.viewer-nav .arrow[hidden] { display: none; }
.viewer-nav .viewer-count { min-width: 3.5em; text-align: center; }
@media (max-width: 800px) {
  .viewer { width: min(100vw, calc((100dvh - 250px) * var(--r))); padding-top: 44px; }
  /* фильтры на телефоне не прилипают: закреплённой остаётся только шапка */
  .filters { position: static; }
}
@media (max-width: 360px) {
  /* самые узкие телефоны: значки соцсетей есть в «Написать» и внизу страницы */
  .links .icon-link { display: none; }
}

/* Своё управление плеером на телефоне: пауза по центру, внизу полоска и «на весь экран».
   Появляется от касания и через 1,5 секунды исчезает. */
.vc { position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none; transition: opacity 200ms ease;
  background: linear-gradient(to top, rgb(0 0 0 / 0.45), transparent 30%); }
.vc.on { opacity: 1; }
.vc.on > * { pointer-events: auto; }
.vc-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgb(0 0 0 / 0.45); }
/* пауза — две полоски, пуск — треугольник; рисуем рамками, без картинок */
.vc-play::before { content: ""; position: absolute; left: 24px; top: 21px; width: 5px; height: 22px;
  background: #fff; box-shadow: 11px 0 0 #fff; }
.vc-play.paused::before { left: 26px; top: 20px; width: 0; height: 0; background: none; box-shadow: none;
  border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.vc-row { position: absolute; left: 12px; right: 8px; bottom: 6px; display: flex; align-items: center; gap: 8px; }
.vc-bar { flex: 1; height: 28px; display: flex; align-items: center; touch-action: none; }
.vc-bar::before { content: ""; position: absolute; left: 0; right: 44px; height: 3px; background: rgb(255 255 255 / 0.3); border-radius: 2px; }
.vc-fill { position: relative; height: 3px; background: #fff; border-radius: 2px; width: 0; }
.vc-full { position: relative; width: 36px; height: 36px; }
/* значок «на весь экран»: два уголка по диагонали */
.vc-full::before, .vc-full::after { content: ""; position: absolute; width: 8px; height: 8px; border: 2px solid #fff; }
.vc-full::before { right: 9px; top: 9px; border-left: 0; border-bottom: 0; }
.vc-full::after { left: 9px; bottom: 9px; border-right: 0; border-top: 0; }
#viewer-video[hidden] ~ .vc { display: none; }

/* Страница 404: как первый экран, крупно «404», яркая кнопка на портфолио и живое превью справа */
.notfound { min-height: calc(100dvh - var(--top-h)); align-items: center; }
.nf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 8px 0 0; }
.nf-go {
  display: inline-block; padding: 14px 22px 15px; border-radius: var(--radius);
  background: var(--ink); color: var(--paper); font-size: clamp(16px, 1.3vw, 19px); text-decoration: none;
  transition: transform 120ms ease;
}
.nf-go:hover { transform: translateY(-1px); }
.nf-go:active { transform: scale(0.97); }
.nf-alt { color: var(--muted); text-underline-offset: 3px; }
.nf-alt:hover { color: var(--ink); }
@media (max-width: 800px) {
  .notfound { min-height: 0; }
  .notfound .big-name { font-size: 36vw; }
}
