/* ===========================================================
   Видео проекта: сетка клипов внутри раздела и финальный ролик.
   Подключается после editorial-fullbleed.css.
   Палитра — из брендбука «Тайга приключений».
   =========================================================== */

:root {
  --clip-green: #015152;
  --clip-blue: #012852;
  --clip-orange: #ee5120;
  --clip-ink: #181818;
  --clip-line: rgba(24, 24, 24, 0.12);
}

/* --- Слот раздела: переопределяем полноэкранную заготовку --- */

.video-slot[data-video-key] {
  display: block;
  min-height: 0;
  margin: clamp(48px, 6vw, 96px) 0 0;
  padding: clamp(28px, 3.5vw, 56px) clamp(20px, 4vw, 64px) clamp(36px, 4.5vw, 72px);
  border-top: 1px solid var(--clip-line);
  background: transparent;
  grid-template-columns: none;
}

.video-slot__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 2.4vw, 36px);
}

.video-slot__head h3 {
  margin: 0;
  font-size: var(--type-subsection);
  line-height: 1.08;
}

.video-slot__head span {
  color: rgba(24, 24, 24, 0.55);
  font-size: var(--type-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* --- Сетка клипов --- */

.clip-grid {
  display: grid;
  gap: clamp(12px, 1.4vw, 22px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Один ролик — во всю ширину */
.clip-grid--1 {
  grid-template-columns: minmax(0, 1fr);
}

/* Три ролика: первый крупнее */
.clip-grid--3 > .clip:first-child {
  grid-column: 1 / -1;
}

/* --- Плеер --- */

.clip {
  position: relative;
  display: grid;
  gap: 10px;
}

.clip video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--clip-blue);
}

/* Кнопка появляется поверх кадра */
.clip__toggle {
  position: absolute;
  inset: 0 0 auto 0;
  display: grid;
  height: 0;
  padding-bottom: 56.25%;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background-color 220ms ease;
}

.clip__toggle:hover {
  background: rgba(1, 40, 82, 0.18);
}

.clip__toggle:focus-visible {
  outline: 3px solid var(--clip-orange);
  outline-offset: 3px;
}

/* Треугольник «play» */
.clip__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(48px, 4vw, 64px);
  height: clamp(48px, 4vw, 64px);
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%);
  transition: opacity 220ms ease, transform 220ms ease;
}

.clip__icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid var(--clip-blue);
}

/* Во время воспроизведения кнопка не мешает смотреть */
.clip.is-playing .clip__icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
}

.clip.is-playing .clip__toggle:hover .clip__icon,
.clip.is-playing .clip__toggle:focus-visible .clip__icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Пауза вместо треугольника при наведении на играющий клип */
.clip.is-playing .clip__toggle:hover .clip__icon::before {
  width: 13px;
  height: 16px;
  margin-left: 0;
  border: 0;
  border-left: 4px solid var(--clip-blue);
  border-right: 4px solid var(--clip-blue);
  background: transparent;
}

/* --- Подпись --- */

.clip__caption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  color: rgba(24, 24, 24, 0.72);
  font-size: var(--type-body);
  line-height: 1.35;
}

.clip__caption span {
  color: var(--clip-orange);
  font-size: var(--type-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

/* --- Финальный ролик фоном закрывающего блока --- */

.closing__image--video {
  /* position/inset наследуем из editorial.css: absolute + inset 0.
     Переопределение на relative ломало растяжение на всю высоту блока. */
  overflow: hidden;
}

/* Ролик ложится поверх статичного постера и наследует его кадрирование */
.closing__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 600ms ease;
  pointer-events: none;
}

/* Появляется только когда реально пошло воспроизведение —
   до этого виден постер, без чёрной вспышки */
.closing__image--video.is-playing .closing__video {
  opacity: 1;
}

/* --- Адаптив --- */

@media (max-width: 860px) {
  .clip-grid,
  .clip-grid--3 > .clip:first-child {
    grid-template-columns: minmax(0, 1fr);
    grid-column: auto;
  }

}

/* --- Меньше движения: автозапуска нет, кнопка всегда видна --- */

@media (prefers-reduced-motion: reduce) {
  .clip__icon,
  .clip.is-playing .clip__icon {
    opacity: 1;
    transform: translate(-50%, -50%);
    transition: none;
  }

  .clip__toggle {
    transition: none;
  }
}

/* Закрывающий блок: видео должно закрывать всю площадь, как постер.
   Без этого ролик ложился по пропорции 16:9 и оставлял пустую полосу
   под собой, а текст уходил за кадр. */


.closing__video {
  /* перебиваем .clip video { aspect-ratio: 16/9 } из этого же файла */
  aspect-ratio: auto;
  min-height: 100%;
}

/* Градиент затемнения остаётся поверх видео, иначе белый текст
   теряется на светлых кадрах */
.closing__image--video::after {
  z-index: 1;
}

/* ===========================================================
   Закрывающий блок крупнее: во весь экран.
   Было min(86svh, 900px) — на больших мониторах упиралось в 900px
   и выглядело мелко рядом с полноэкранными кадрами выше.
   =========================================================== */

.closing,
.closing__copy {
  min-height: 100svh;
}

/* Заголовок берёт больше места по ширине и кеглю */
.closing h2 {
  max-width: 900px;
  font-size: clamp(52px, 5.6vw, 96px);
}

.closing__copy {
  padding-block: clamp(96px, 12vh, 180px);
}

/* Подзаголовок и кнопка не должны теряться рядом с крупным заголовком */
.closing__copy > p:not(.eyebrow) {
  margin: clamp(28px, 3.4vh, 48px) 0 clamp(40px, 4.6vh, 64px);
  font-size: clamp(18px, 1.5vw, 24px);
}

@media (max-width: 820px) {
  .closing,
  .closing__copy {
    /* На телефоне учитываем шапку, иначе блок уходит за экран */
    min-height: calc(100svh - 68px);
  }

  .closing h2 {
    font-size: clamp(40px, 11vw, 64px);
  }

  .closing__copy {
    padding-block: clamp(64px, 9vh, 110px);
  }
}

/* Крупный заголовок теперь заходит на светлую часть кадра, где
   исходный горизонтальный градиент уже прозрачен. Добавляем мягкое
   затемнение снизу — текст читается, правая часть кадра открыта. */
.closing__image--video::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(1, 24, 40, 0.86) 0%,
    rgba(1, 24, 40, 0.5) 38%,
    rgba(1, 24, 40, 0.12) 68%,
    transparent 100%
  );
  pointer-events: none;
}

/* Индикатор загрузки: пульсация кнопки, пока тянется файл.
   Без него постер на медленной сети читается как поломка. */
.clip.is-loading .clip__icon {
  animation: clip-pulse 1.4s ease-in-out infinite;
}

@keyframes clip-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .clip.is-loading .clip__icon {
    animation: none;
  }
}

/* ===========================================================
   Фильм о проекте — второй блок страницы, сразу после hero.
   Белый фон и типографика совпадают с остальной страницей.
   =========================================================== */

.filmstrip {
  padding: clamp(64px, 8vw, 130px) var(--gutter, clamp(20px, 5vw, 80px));
  border-top: 1px solid #dfe4e2;
  background: #fff;
}

.filmstrip__head {
  max-width: 1440px;
  margin: 0 auto clamp(28px, 3.4vw, 52px);
}

.filmstrip__head h2 {
  margin: 0;
  color: #012852;
  font-family: "Optima", "Palatino", Georgia, serif;
  font-size: clamp(42px, 4.6vw, 78px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.filmstrip__lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: #4e5755;
  font-size: 17px;
  line-height: 1.6;
}

/* --- Плеер --- */

.filmstrip__player {
  position: relative;
  max-width: 1440px;
  margin-inline: auto;
  overflow: hidden;
  background: #012852;
}

.filmstrip__player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Крупная кнопка поверх постера, пока фильм не запущен */
.filmstrip__play {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 22px;
  place-content: center;
  place-items: center;
  border: 0;
  background: rgba(1, 40, 82, 0.34);
  color: #fff;
  cursor: pointer;
  transition: background-color 240ms ease;
}

.filmstrip__play:hover {
  background: rgba(1, 40, 82, 0.46);
}

.filmstrip__play:focus-visible {
  outline: 3px solid #ee5120;
  outline-offset: -6px;
}

.filmstrip__icon {
  display: grid;
  width: clamp(76px, 7vw, 104px);
  height: clamp(76px, 7vw, 104px);
  place-items: center;
  border-radius: 50%;
  background: #fff;
  transition: transform 240ms ease;
}

.filmstrip__play:hover .filmstrip__icon {
  transform: scale(1.06);
}

.filmstrip__icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 25px solid #012852;
}

.filmstrip__label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.filmstrip__label b {
  padding: 5px 9px;
  background: #ee5120;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* После запуска кнопка исчезает и не мешает управлять плеером */
.filmstrip__player.is-started .filmstrip__play {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 820px) {
  .filmstrip {
    padding-inline: 20px;
  }

  .filmstrip__head h2 {
    font-size: clamp(36px, 11vw, 56px);
  }

  .filmstrip__label {
    font-size: 11px;
  }
}


/* --- Левая часть: кто сделал --- */






/* --- Правая часть: контакты --- */










/* QR под фото — чуть меньше, чтобы блок не вырастал */


/* ===========================================================
   Разработка концепции — полноценный раздел в языке сайта:
   крупный заголовок, оранжевая метка, вертикальные линии-
   разделители как в .principles, много воздуха.
   =========================================================== */

.credits {
  padding: clamp(80px, 9vw, 150px) var(--gutter, clamp(20px, 5vw, 80px))
    clamp(64px, 7vw, 110px);
  border-top: 1px solid #dfe4e2;
  background: #fff;
}

.credits__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
  max-width: 1440px;
  margin-inline: auto;
}

/* --- Левая колонка --- */

.credits__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: #015152;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.credits__eyebrow i {
  width: 8px;
  height: 8px;
  background: #ee5120;
  transform: rotate(45deg);
}

.credits h2 {
  margin: 0;
  color: #012852;
  font-family: "Optima", "Palatino", Georgia, serif;
  font-size: clamp(38px, 4.2vw, 68px);
  font-weight: 700;
  line-height: 0.99;
  letter-spacing: -0.035em;
}

.credits__lead {
  max-width: 520px;
  margin: clamp(22px, 2.4vw, 32px) 0 0;
  color: #4e5755;
  font-size: 17px;
  line-height: 1.65;
}

.credits__site {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(28px, 3vw, 42px);
  padding-top: 24px;
  border-top: 1px solid #dfe4e2;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.credits__site:hover {
  opacity: 0.7;
}

.credits__site img {
  width: clamp(124px, 11vw, 150px);
  height: auto;
}

.credits__site span {
  color: #69716f;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Правая колонка: команда --- */

.credits__team {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Разделительные линии между людьми — как в .principles */
.credits__member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 2vw, 28px);
  align-items: center;
  padding: clamp(20px, 2.2vw, 28px) 0;
  border-bottom: 1px solid #dfe4e2;
}

.credits__member:first-child {
  border-top: 1px solid #dfe4e2;
}

.credits__photo {
  width: clamp(88px, 7.5vw, 112px);
  height: clamp(88px, 7.5vw, 112px);
  border-radius: 50%;
  object-fit: cover;
}

.credits__meta {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.credits__meta strong {
  color: #012852;
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: -0.012em;
}

.credits__meta a {
  color: #4e5755;
  font-size: clamp(15px, 1.25vw, 17px);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease;
}

.credits__meta a:hover {
  color: #ee5120;
}

.credits__qr {
  /* Крупнее: мелкий код камера телефона не ловит.
     130-150px уверенно сканируется с 20-30 см. */
  width: clamp(130px, 11vw, 150px);
  height: auto;
}

/* Почта — без фото и кода, выравниваем по текстовой колонке */
.credits__member--mail {
  grid-template-columns: minmax(0, 1fr);
}

.credits__member--mail .credits__meta strong {
  color: #69716f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.credits__member--mail .credits__meta a {
  color: #012852;
  font-size: clamp(16px, 1.35vw, 19px);
  font-weight: 600;
}

/* --- Адаптив --- */

@media (max-width: 1100px) {
  .credits__inner {
    grid-template-columns: 1fr;
    gap: clamp(36px, 5vw, 56px);
  }

  .credits__lead {
    max-width: 640px;
  }
}

@media (max-width: 640px) {
  .credits {
    padding-inline: 20px;
  }

  .credits__member {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
  }

  /* QR уходит под имя, чтобы строка не ломалась */
  .credits__qr {
    grid-column: 2;
    width: 132px;
  }

  .credits__photo {
    width: 76px;
    height: 76px;
  }
}

/* Ссылка на MAX под телефоном — вторичное действие, поэтому
   мельче имени и с иконкой мессенджера. */
.credits__max {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: #69716f;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 200ms ease;
}

.credits__max img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.credits__max:hover {
  color: #012852;
}

.credits__max::after {
  content: "→";
  font-size: 12px;
  opacity: 0.5;
  transition: transform 200ms ease;
}

.credits__max:hover::after {
  transform: translateX(3px);
}
