/* Шрифт лежит в папке сайта. Казахские буквы дорисованы, см. fonts/LICENSE.txt */
@font-face {
  font-family: "basis33";
  src: url("fonts/basis33.woff2") format("woff2"),
       url("fonts/basis33.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Светлая тема «Бумага», открывается по умолчанию */
:root {
  color-scheme: light;
  --bg: #b9b9b0;
  --bg-rgb: 185, 185, 176;
  --ink: #0c0c0d;
  --ink-90: rgba(12, 12, 13, .94);
  --ink-70: rgba(12, 12, 13, .86);
  --ink-60: rgba(12, 12, 13, .82);
  --ink-50: rgba(12, 12, 13, .76);
  --line: rgba(12, 12, 13, .3);
  --raised: #d6d6cd;
  --accent: #8a1c00;
  --accent-hover: #6e1600;
  --btn-line: rgba(12, 12, 13, .55);
  --btn-fill: rgba(12, 12, 13, .05);
  --btn-hover: rgba(12, 12, 13, .12);
  --page-shade: linear-gradient(transparent, transparent);
  --noise: .21;
  --bg-tile: url("media/bg-shutter-soft.webp");
  --cover-wash: rgba(226, 226, 222, .68);
  --hands-strength: .13;
  --hands-glow: 0;
  --gutter: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
  --pixel: "basis33", Consolas, monospace;
}
/* Тёмная тема «Ночь» */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111110;
  --bg-rgb: 17, 17, 16;
  --page-shade: linear-gradient(rgba(0, 0, 0, .8), rgba(0, 0, 0, .8));
  --noise: .14;
  --bg-tile: url("media/bg-shutter.webp");
  --cover-wash: rgba(14, 14, 14, .68);
  --hands-strength: .9;
  --hands-glow: .1;
  --ink: #fff;
  --ink-90: rgba(255, 255, 255, .9);
  --ink-70: rgba(255, 255, 255, .7);
  --ink-60: rgba(255, 255, 255, .6);
  --ink-50: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .18);
  --raised: #1c1c1b;
  --accent: #ef4444;
  --accent-hover: #f87171;
  --btn-line: rgba(255, 255, 255, .3);
  --btn-fill: rgba(255, 255, 255, .05);
  --btn-hover: rgba(255, 255, 255, .1);
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 768px) { :root { --gutter: 40px; } }
@media (min-width: 1024px) { :root { --gutter: 56px; } }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Фон: рольставни из шоурила и слой плёночного шума. Оба прокручиваются вместе со страницей.
   Картинка собрана с зеркальной копией, поэтому повторяется без стыков.
   Силу шума меняет --noise, видимость рольставней меняет opacity у body::before */
body::before, body::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  background: var(--page-shade), var(--bg-tile) center top / max(100%, 1400px) auto repeat-y;
  opacity: .5;
}
body::after {
  z-index: -1;
  background: url("media/bg-noise.png") repeat;
  background-size: 320px 320px;
  opacity: var(--noise);
}

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
h1, h2, h3, p, ul { margin: 0; padding: 0; font-weight: 400; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.pixel { font-family: var(--pixel); }

/* Первый экран */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
/* Края и низ ролика становятся прозрачными, и он растворяется в фоне страницы */
.hero__media {
  /* Левый отступ сдвигает человека вправо: плечо не попадает под заголовок */
  position: absolute; inset: 0 0 0 12%;
  --edge: radial-gradient(ellipse 50% 90% at 50% 44%, #000 30%, rgba(0, 0, 0, .8) 46%, rgba(0, 0, 0, .5) 62%, rgba(0, 0, 0, .22) 78%, rgba(0, 0, 0, .06) 92%, transparent 100%);
  --floor: linear-gradient(to top, transparent 0, rgba(0, 0, 0, .35) 5%, #000 13%);
  /* На низких экранах (ноутбуки) голова поднимается к колонкам текста сверху, поэтому видео опускается.
     Макушка стоит на 21,4% высоты экрана, а текст колонок кончается около 214px.
     На экранах выше примерно 1000px сдвига нет. Верх видео при сдвиге плавно растворяется */
  --shift: max(0px, calc(214px - 21.4svh));
  --top: linear-gradient(to bottom, transparent var(--shift), #000 calc(var(--shift) * 2.5));
  -webkit-mask-image: var(--top), var(--floor), var(--edge);
  -webkit-mask-composite: source-in;
  mask-image: var(--top), var(--floor), var(--edge);
  mask-composite: intersect;
}
.hero__media video {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transform: translateY(var(--shift));
}
/* Человек после ролика неподвижен, дышит только свет. Свет дышит через прозрачность затемнения: это не перерисовывает видео и не даёт рывков */
.hero__media::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: #000;
  opacity: 0;
  will-change: opacity;
  animation: hero-light 7s ease-in-out infinite alternate;
}
@keyframes hero-light {
  from { opacity: 0; }
  to { opacity: .07; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__media::before { animation: none; }
}

/* Руки на фоне. Сближение задаёт --hands-p от 0 до 1 из main.js, слой лежит под всем содержимым */
.hands {
  --hands-p: 0;
  position: fixed; inset: 0; z-index: -1;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
.hands__frame {
  position: relative; flex: none;
  /* Наклон задаёт rotate. Рамка шире экрана, чтобы концы рук не показывались в углах */
  width: max(118vw, 1000px);
  aspect-ratio: 1360 / 768;
  transform: rotate(-17deg);
  transform-origin: 50.4% 48.2%;
}
.hands__hand {
  position: absolute; top: 0; height: 100%; width: auto;
  opacity: var(--hands-strength);
  will-change: transform;
}
.hands__hand--human { left: 0; transform: translate3d(calc((1 - var(--hands-p)) * -26%), 0, 0); }
.hands__hand--robot { right: 0; transform: translate3d(calc((1 - var(--hands-p)) * 26%), 0, 0); }
.hands__glow {
  position: absolute; inset: -30% -10%;
  /* Ровная подсветка без яркой точки в центре: на ней виден силуэт рук в тёмной теме */
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 255, 255, .6) 0, rgba(255, 255, 255, .6) 42%, rgba(255, 255, 255, .24) 72%, transparent 100%);
  opacity: var(--hands-glow);
}
/* На вертикальном экране голова занимает всю ширину, поэтому края не трогаем и текст стоит ниже подбородка */
@media (max-aspect-ratio: 1/1) {
  .hero__media {
    inset: 0;
    -webkit-mask-image: linear-gradient(to top, transparent 0, transparent 32%, #000 46%);
    -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to top, transparent 0, transparent 32%, #000 46%);
    mask-composite: add;
    container-type: size;
  }
  /* В ролике голова стоит на 49% ширины кадра. На телефоне кадр сильно увеличен,
     поэтому сдвигаем его вправо на 0,95% ширины видео (ширина видео = высота × 1,78) */
  .hero__media video { object-position: calc(50% + 1.69cqh) 50%; transform: none; }
}
/* Тёмная тема: ролик светлый, поэтому края затемняем, вокруг головы остаётся ореол */
:root[data-theme="dark"] .hero__media::after {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .82) 0, rgba(0, 0, 0, .55) 16%, rgba(0, 0, 0, 0) 34%),
    linear-gradient(to top, #000 0, rgba(0, 0, 0, .9) 26%, rgba(0, 0, 0, 0) 58%),
    radial-gradient(ellipse 48% 74% at 50% 44%, rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, .12) 38%, rgba(0, 0, 0, .34) 52%, rgba(0, 0, 0, .6) 66%, rgba(0, 0, 0, .82) 80%, rgba(0, 0, 0, .95) 92%, #000 100%);
}
/* На широком экране ореол в тёмной теме шире и выше */
@media (min-aspect-ratio: 1/1) {
  :root[data-theme="dark"] .hero__media {
    --edge: radial-gradient(ellipse 50% 110% at 50% 44%, #000 42%, rgba(0, 0, 0, .78) 58%, rgba(0, 0, 0, .44) 74%, rgba(0, 0, 0, .14) 90%, transparent 100%);
  }
  :root[data-theme="dark"] .hero__media::after {
    background:
      linear-gradient(to bottom, rgba(0, 0, 0, .72) 0, rgba(0, 0, 0, .5) 12%, rgba(0, 0, 0, .24) 22%, rgba(0, 0, 0, .08) 30%, rgba(0, 0, 0, 0) 38%),
      linear-gradient(to top, #000 0, rgba(0, 0, 0, .92) 14%, rgba(0, 0, 0, .72) 26%, rgba(0, 0, 0, .45) 36%, rgba(0, 0, 0, .2) 46%, rgba(0, 0, 0, .06) 54%, rgba(0, 0, 0, 0) 62%),
      radial-gradient(ellipse 66% 100% at 50% 44%, rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, .12) 38%, rgba(0, 0, 0, .34) 52%, rgba(0, 0, 0, .6) 66%, rgba(0, 0, 0, .82) 80%, rgba(0, 0, 0, .95) 92%, #000 100%);
  }
}
.hero__content {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
  padding: 0 var(--gutter);
}
.hero__spacer { flex: 1; min-height: 0; }

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 0;
}
.nav__right { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 18px; font-weight: 600; letter-spacing: .08em; line-height: 28px; }
.nav__links { display: none; gap: 32px; font-size: 14px; letter-spacing: .025em; }
.nav__links a { transition: opacity .2s; }
.nav__links a:hover { opacity: .7; }
.icon-btn { display: flex; padding: 8px; margin-right: -8px; background: none; border: 0; transition: opacity .2s; }
.icon-btn:hover { opacity: .7; }
/* Переключатель темы: луна в светлой теме, солнце в тёмной */
.theme-toggle { margin-right: 0; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (max-width: 767px) { .nav__right { gap: 4px; } }
@media (min-width: 768px) {
  .nav__right { gap: 32px; }
  .nav__links { display: flex; }
  .nav__burger { display: none; }
  .theme-toggle { margin: 0 -8px 0 -16px; }
}

/* Переключатель языка */
.lang { display: flex; font-size: 13px; letter-spacing: .03em; }
.lang button {
  min-width: 30px; min-height: 32px; padding: 0 4px;
  background: none; border: 0;
  color: var(--ink-50);
  transition: color .2s;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }

/* Колонки сверху */
.meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.meta__col--flip { text-align: right; }
.meta__title { font-size: 18px; line-height: 1.25; letter-spacing: .025em; }
.meta__title .px { font-family: var(--pixel); font-size: 24px; }
.meta__star { margin-top: 12px; font-size: 10px; line-height: 1; color: var(--ink-50); }
.meta__blurb { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--ink-70); }
.meta__label {
  margin-bottom: 12px;
  font-size: 16px; line-height: 1.2; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-50);
}
.meta__text { max-width: 220px; font-size: 14px; line-height: 1.6; color: var(--ink-90); }
.meta__col--flip .meta__text { margin-left: auto; }
.meta__list { font-size: 14px; line-height: 1.6; color: var(--ink-90); }
.meta__list li + li { margin-top: 2px; }
.meta--phone { margin-top: 0; padding: 32px var(--gutter) 0; }
/* На телефоне эти колонки закрывали бы глаза */
@media (max-width: 767px) { .meta__col--wide, .meta__star, .meta__blurb { display: none; } }
@media (min-width: 640px) { .meta { gap: 24px; } }
@media (min-width: 768px) {
  .meta--phone { display: none; }
  .meta__title { font-size: 20px; }
  .meta__title .px { font-size: 30px; }
}
@media (min-width: 1024px) {
  .meta { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .meta__col--flip { text-align: left; }
}

/* Низ первого экрана */
.hero__bottom { padding-bottom: 16px; }
.hero__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: end; }
/* Размер зависит и от высоты экрана, чтобы всё помещалось на первом экране */
.headline {
  font-size: min(30px, 6.4vh);
  letter-spacing: .025em;
  text-transform: uppercase;
}
.headline > span { display: block; line-height: .96; }
/* Нулевая высота строки: пиксельное слово не раздвигает строки заголовка */
.headline .px, .title .px {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 1.25em;
  line-height: 0;
  vertical-align: baseline;
}
.hero__actions { display: flex; flex-direction: column; gap: 16px; justify-content: flex-end; }
.play {
  align-self: flex-start;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  border: 1px solid var(--btn-line);
  background: var(--btn-fill);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 14px; letter-spacing: .05em;
  transition: background-color .2s;
}
.play:hover { background: var(--btn-hover); }
@media (min-width: 640px) {
  .headline { font-size: min(36px, 7vh); }
  .hero__row { gap: 24px; }
}
@media (min-width: 768px) { .headline { font-size: min(48px, 7.5vh); } }
@media (min-width: 1024px) {
  .headline { font-size: min(60px, 7.5vh); }
  .hero__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__actions .play { align-self: flex-end; }
}
@media (min-width: 1280px) { .headline { font-size: min(68px, 7.5vh); } }

/* Мобильное меню */
.menu {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  background: rgba(var(--bg-rgb), .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease);
}
.menu.is-open { opacity: 1; pointer-events: auto; }
.menu__head { display: flex; align-items: center; justify-content: space-between; padding: 24px var(--gutter); }
.menu__links {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
  font-size: 24px; letter-spacing: .1em;
}
.menu__links a {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.menu.is-open .menu__links a {
  opacity: 1; transform: none;
  transition-delay: calc(100ms + var(--i) * 60ms);
}

/* Секции ниже */
.section { padding: clamp(72px, 10vw, 140px) var(--gutter) 0; }
.section__head { margin-bottom: clamp(24px, 3vw, 40px); }
.label {
  font-size: 16px; line-height: 1.2; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-50);
}
.title {
  margin-top: 16px;
  font-size: clamp(30px, 4.7vw, 68px);
  line-height: 1.12;
  letter-spacing: .025em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.title--big { font-size: clamp(32px, 7vw, 104px); }

/* Работы */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); }
.work { min-width: 0; }
/* Карточка при наведении не меняется, только курсор показывает, что по ней можно кликнуть */
.work__link { display: block; width: 100%; padding: 0; background: none; border: 0; text-align: left; }
button.work__link { cursor: pointer; }
.work__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--raised); container-type: inline-size; }
.work__fill {
  position: absolute; inset: 0;
  background: radial-gradient(90% 120% at var(--x) var(--y), var(--btn-hover), transparent 62%), var(--raised);
}
/* Единый стиль обложек: кадр чёрно-белый и размытый, поверх дымка, номер и короткое название.
   Силу дымки задаёт --cover-wash в теме, размер названия задаёт font-size у .work__label */
.work__fill img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(1) blur(3px);
  transform: scale(1.03);
}
.work__fill::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--cover-wash);
}
.work__cover {
  position: absolute; inset: 0; z-index: 1;
  padding: 3.6cqw 4cqw;
  color: var(--ink);
  pointer-events: none;
}
.work__number { display: block; font-size: max(11px, 2cqw); line-height: 1; }
.work__label {
  display: block;
  margin-top: 2.6cqw;
  font-size: max(17px, 5.2cqw); font-weight: 800; line-height: 1.02; letter-spacing: -.015em;
}
.work__label span { display: block; }
.work__info {
  position: absolute; right: 4cqw; bottom: 3.2cqw;
  max-width: 82cqw;
  font-size: max(11px, 1.75cqw); line-height: 1.35; text-align: right;
  color: var(--ink-90);
}
.work__stub {
  position: absolute; left: 14px; bottom: 12px;
  font: 400 14px/1.2 var(--pixel); color: var(--ink-50);
}

/* Шоурил перед кейсами: превью без звука, по клику открывается плеер со звуком */
.reel {
  position: relative; display: block;
  width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: 0; overflow: hidden;
  background: #000;
  cursor: pointer;
}
.reel__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel__play {
  position: absolute; left: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}

/* Кто нам доверяет. Логотипы чёрные на прозрачном фоне, в тёмной теме становятся белыми.
   --size у каждого логотипа выравнивает видимый размер, общий размер меняет --logo-unit */
.clients {
  --logo-unit: clamp(42px, 5.4vw, 80px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px) clamp(16px, 2.5vw, 40px);
  align-items: center;
  margin-top: clamp(32px, 4vw, 56px);
}
.clients img {
  display: block;
  width: calc(var(--logo-unit) * var(--size));
  max-width: 100%;
  height: auto;
}
:root[data-theme="dark"] .clients img { filter: invert(1); }
@media (max-width: 760px) {
  .clients { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Пост */
.post { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 80px); }
/* Заголовок стоит в половине ширины, поэтому он чуть мельче остальных: длинное «ПОСТ-ПРОДАКШН» помещается целиком */
.post .title { font-size: clamp(26px, 3.6vw, 58px); }
.post__lead { margin-top: 20px; max-width: 42ch; font-size: 14px; line-height: 1.6; color: var(--ink-60); }
.stages { align-self: start; border-top: 1px solid var(--line); }
.stages li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.stages h3 { font-size: 15px; }
.stages p { font-size: 14px; line-height: 1.6; color: var(--ink-60); }

/* Контакты */
.contact { padding-bottom: clamp(48px, 5vw, 72px); }
.contact__title { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.2; letter-spacing: .01em; }
.contact__title span[data-i18n] { display: block; }
.contact__title-strong { font-weight: 700; }
.contact__title-light { font-weight: 300; }
.contact__title .px { font-family: var(--pixel); font-size: 1.2em; line-height: 0; font-weight: 400; }
.contact__sub { margin-top: 20px; font-size: 16px; line-height: 1.5; color: var(--ink-90); }

.form { max-width: 394px; margin-top: 32px; }
.field { margin-bottom: 24px; }
.field__input {
  display: block; width: 100%; min-height: 44px; padding: 8px 0;
  background: none; border: 0; border-radius: 0;
  color: var(--ink);
  font: 500 16px/1.4 var(--sans);
}
.field__input::placeholder { color: var(--ink-50); opacity: 1; }
.field__input:focus { outline: none; }
.field > .field__input, .phone { border-bottom: 2px solid var(--ink); }
.field > .field__input:focus-visible, .phone:focus-within { border-bottom-color: var(--accent-hover); }
.field__error { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--accent-hover); }
.field__error:empty { display: none; }
.field.is-invalid > .field__input, .field.is-invalid .phone { border-bottom-color: var(--accent); }

.phone { display: flex; align-items: center; gap: 8px; }
.phone .field__input { flex: 1; min-width: 0; }
.phone__country { position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px; }
.phone__country select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
  background: #fff; color: #000; font-size: 16px;
}
.phone__country:focus-within .flag { outline: 2px solid var(--ink); outline-offset: 2px; }
.phone__caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--ink-60); }
.phone__code { font-size: 16px; font-weight: 500; }
.flag { display: block; width: 20px; height: 14px; }
.flag--kz { background: radial-gradient(circle at 50% 50%, #ffc61e 0 3.5px, transparent 4px), #00afca; }
.flag--ru { background: linear-gradient(#fff 0 33.3%, #0039a6 33.3% 66.6%, #d52b1e 66.6%); }
.flag--de { background: linear-gradient(#000 0 33.3%, #d00 33.3% 66.6%, #ffce00 66.6%); }
.flag--us { background: linear-gradient(#3c3b6e, #3c3b6e) 0 0 / 9px 8px no-repeat, repeating-linear-gradient(#b22234 0 2px, #fff 2px 4px); }

.form__submit {
  min-height: 56px; padding: 12px 20px; margin-top: 4px;
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 999px;
  font-size: 16px; font-weight: 700; letter-spacing: .01em;
  transition: opacity .2s;
}
.form__submit:hover { opacity: .82; }
.form__submit[disabled] { opacity: .6; cursor: progress; }
.form__status { margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--ink-90); }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--accent-hover); }

.footer { padding: 0 var(--gutter) 32px; font-size: 14px; }
.footer__contacts { display: flex; flex-wrap: wrap; gap: 12px 40px; font-weight: 500; }
.footer__contacts a { transition: opacity .2s; }
.footer__contacts a:hover { opacity: .7; }
.footer__rights { margin-top: 24px; color: var(--ink-50); }

/* Плеер */
/* Ширина считается и от высоты экрана, чтобы видео любой формы помещалось целиком */
.player {
  width: min(1200px, calc(100vw - 32px), calc((100vh - 48px) * var(--video-ratio, 1.7778)));
  width: min(1200px, calc(100vw - 32px), calc((100svh - 48px) * var(--video-ratio, 1.7778)));
  max-width: none; padding: 0; overflow: hidden; background: #000; border: 0;
  /* Плеер всегда тёмный, в любой теме */
  color-scheme: dark;
  --ink: #fff;
  --ink-90: rgba(255, 255, 255, .9);
  color: var(--ink);
}
.player::backdrop { background: rgba(0, 0, 0, .88); }
/* Кнопка лежит прямо на видео, поэтому над кадром нет чёрной полосы */
.player__close {
  position: absolute; top: 0; right: 0; z-index: 2;
  min-height: 44px; padding: 0 16px;
  background: none; border: 0;
  font-size: 13px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
  transition: opacity .25s;
}
.player:has(.is-idle) .player__close { opacity: 0; }
.player__stage { position: relative; background: #000; }
.player__stage.is-idle { cursor: none; }
.player__frame { aspect-ratio: var(--video-ratio, 1.7778); }
.player__frame video, .player__frame iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.player__stage:fullscreen { display: flex; align-items: center; }
.player__stage:fullscreen .player__frame { width: 100%; height: 100%; aspect-ratio: auto; }
.player__status {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  font: 400 18px/1.3 var(--pixel); text-align: center;
  pointer-events: none;
}
.player__status:empty { display: none; }
.player__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 16px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
  transition: opacity .25s;
}
.player__stage.is-idle .player__bar { opacity: 0; pointer-events: none; }
.player__controls { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.player__spacer { flex: 1; }
.player__btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: none; border: 0; color: var(--ink);
  transition: opacity .2s;
}
.player__btn:hover { opacity: .7; }
.player__btn:first-child { margin-left: -10px; }
.player__btn:last-child { margin-right: -10px; }
#player-play .icon-pause, #player-play.is-playing .icon-play { display: none; }
#player-play.is-playing .icon-pause { display: block; }
#player-mute .icon-muted, #player-mute.is-muted .icon-sound { display: none; }
#player-mute.is-muted .icon-muted { display: block; }
.player__time { font: 400 16px/1 var(--pixel); color: var(--ink-90); white-space: nowrap; }
.player__range {
  -webkit-appearance: none; appearance: none;
  display: block; height: 24px; margin: 0; padding: 0;
  background: none; cursor: pointer;
}
.player__seek { width: 100%; }
.player__volume { width: 80px; }
.player__range::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(to right, var(--ink) var(--fill, 0%), rgba(255, 255, 255, .5) var(--fill, 0%), rgba(255, 255, 255, .5) var(--loaded, 0%), rgba(255, 255, 255, .22) var(--loaded, 0%));
}
.player__range::-moz-range-track {
  height: 3px;
  background: linear-gradient(to right, var(--ink) var(--fill, 0%), rgba(255, 255, 255, .5) var(--fill, 0%), rgba(255, 255, 255, .5) var(--loaded, 0%), rgba(255, 255, 255, .22) var(--loaded, 0%));
}
.player__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px; margin-top: -4.5px;
  background: var(--ink); border: 0; border-radius: 0;
}
.player__range::-moz-range-thumb { width: 12px; height: 12px; background: var(--ink); border: 0; border-radius: 0; }
/* На телефонах громкость меняют кнопками устройства */
@media (hover: none), (max-width: 639px) { .player__volume { display: none; } }

/* Появление при скролле */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 767px) {
  .works, .post { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .work__fill, .menu, .menu__links a { transition: none; }
  .menu.is-open .menu__links a { transition-delay: 0ms; }
}
