/*
 * То, что на Webflow делал webflow.js: анимации (IX2) и служебные стили модулей.
 * Длительности и кривые взяты из опубликованных данных анимаций сайта.
 */

/* Прокрутка к якорю ставит фокус на секцию — без рамки (модуль scroll) */
.wf-force-outline-none[tabindex="-1"]:focus {
  outline: none;
}

/* Кнопка меню: полоски складываются в крестик («Navbar 15 menu [Open]/[Close]»: 400 мс, inOutQuint) */
.menu-icon2_line-top,
.menu-icon2_line-middle,
.menu-icon2_line-bottom {
  transition:
    transform 400ms cubic-bezier(0.86, 0, 0.07, 1),
    opacity 400ms cubic-bezier(0.86, 0, 0.07, 1);
}

.w-nav-button.w--open .menu-icon2_line-top {
  transform: translate3d(0, 8px, 0) rotateZ(45deg);
}

.w-nav-button.w--open .menu-icon2_line-bottom {
  transform: translate3d(0, -8px, 0) rotateZ(-45deg);
}

.w-nav-button.w--open .menu-icon2_line-middle {
  opacity: 0;
}

/* ---------- Кнопки ---------- */

/*
 * Плюс 1rem с каждой стороны к базовым 1.75rem. Не в счёт: кнопка в шапке
 * (.is-nav) и текстовые ссылки со стрелкой в карточках (.is-link) — у них
 * фона нет, и отступ увёл бы их от левого края текста.
 */
.button:not(.is-nav):not(.is-link) {
  padding-left: 2.75rem;
  padding-right: 2.75rem;
}

/* ---------- Герой: текст слева, фото справа ---------- */

/* Текст прижат к левому краю на всех ширинах */
.header26_component .text-align-center {
  text-align: left;
}

.header26_component .max-width-large.align-center {
  margin-left: 0;
  margin-right: 0;
}

.header26_component .button-group.is-center {
  justify-content: flex-start;
}

/*
 * Три ступени: крупная роль, подзаголовок, абзац. Размеры плавают вместе с
 * шириной окна, поэтому отдельных правил под каждый брейкпоинт не нужно.
 */
.header26_component .heading-style-h1 {
  font-size: clamp(2.75rem, 5.2vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em; /* на крупном кегле межбуквенное расстояние кажется больше */
  color: #fff;
  text-wrap: balance;
}

.hero_subheading {
  max-width: 36ch;
  margin-top: 1.25rem;
  font-family: Urbanist, sans-serif;
  font-size: clamp(1.375rem, 2.5vw, 2.25rem);
  font-weight: 400; /* на крупном кегле 500 выглядит тяжело */
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.85);
  text-wrap: pretty; /* balance рвал строку посреди «Scalable CMS» */
}

/* Абзац тише подзаголовка — иначе три ступени читаются как две */
.header26_component .text-size-medium-2 {
  max-width: 44ch;
  margin-top: 1rem; /* заголовок с подзаголовком — один блок, абзац отделён от него */
  color: rgba(255, 255, 255, 0.6);
}

@media screen and (min-width: 992px) {
  /*
   * Первый экран помещается в окно целиком: шапка занимает 7rem в потоке,
   * остаток отдан секции, содержимое стоит по центру оставшейся высоты.
   */
  .section_header26 .padding-section-large {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 7rem);
    min-height: calc(100svh - 7rem);
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .header26_component {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }

  .header26_component > .margin-bottom.margin-xxlarge {
    flex: 1 1 0%;
    min-width: 0;
    margin-bottom: 0;
  }

  /*
   * Портретный кадр 4:5 считается от ширины колонки. На низком окне высота
   * упирается в потолок — кадр становится шире, но за экран не уезжает.
   */
  .header26_image-wrapper {
    flex: 0 0 40%;
    width: auto;
    aspect-ratio: 4 / 5;
    max-height: calc(100vh - 13rem);
    max-height: calc(100svh - 13rem);
  }

  .header26_image {
    aspect-ratio: auto;
    height: 100%;
  }
}

/* Узкие ноутбуки: колонки те же, но тексту отдаём больше ширины */
@media screen and (min-width: 992px) and (max-width: 1199px) {
  .header26_component {
    gap: 3rem;
  }

  .header26_image-wrapper {
    flex-basis: 36%;
  }
}

/* Планшет и телефон: колонки складываются друг под друга */
@media screen and (max-width: 991px) {
  .header26_component > .margin-bottom.margin-xxlarge {
    width: 100%;
  }

  .header26_image-wrapper {
    width: 100%;
  }
}

/* ---------- Блок работ ---------- */

/*
 * Сетка главной: первая работа — широкая карточка на весь ряд, остальные по три.
 * Неполный последний ряд встаёт по центру, поэтому сетка держится и при 9, и при 6 работах.
 */
.portfolio13_list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.portfolio13_list > .portfolio13_item {
  width: calc((100% - 4rem) / 3);
}

.portfolio13_list > .portfolio13_item.is-featured {
  width: 100%;
}

@media screen and (max-width: 991px) {
  .portfolio13_list > .portfolio13_item {
    width: calc((100% - 2rem) / 2);
  }
}

@media screen and (max-width: 767px) {
  .portfolio13_list > .portfolio13_item {
    width: 100%;
  }
}

/* Широкая карточка: видео слева, текст справа */
@media screen and (min-width: 768px) {
  .portfolio13_item.is-featured .portfolio13_item-link {
    flex-direction: row;
  }

  .portfolio13_item.is-featured .portfolio13_item-link > a {
    flex: 0 0 60%;
  }

  .portfolio13_item.is-featured .portfolio15_image-link {
    padding: 0.5rem;
  }

  .portfolio13_item.is-featured .portfolio13_title-wrapper {
    padding: 2rem 2.5rem;
  }

  .portfolio13_item.is-featured .heading-style-h5 {
    font-size: 2rem;
    line-height: 1.25;
  }
}

/*
 * Кадр: сверху постер (.portfolio15_image), под ним видео (.portfolio15_bg-video).
 * Пропорции роликов (1976×1080) вместо 3:2 — видео и постер видны целиком.
 */
.portfolio15_image-link {
  aspect-ratio: 1976 / 1080;
}

/* На главной кадр вставлен в карточку с отступом 8px, радиусы концентричны (16 = 8 + 8) */
.portfolio13_item .portfolio15_image-link {
  aspect-ratio: auto;
  padding: 0.5rem 0.5rem 0;
}

.portfolio13_item .portfolio15_image-wrapper {
  aspect-ratio: 1976 / 1080;
  height: auto;
  border-radius: 0.5rem;
}

.portfolio15_image-wrapper {
  isolation: isolate; /* у видео Webflow z-index: -100 — без этого оно уходит под фон карточки */
}

/* Видео на 2% крупнее кадра: полоса скроллбара на записях (~1% справа) уходит за край */
.portfolio15_bg-video > video {
  object-position: 50% 0%;
  transform: scale(1.02);
  transform-origin: 0 0;
}

/* Пока видео играет, постер растворяется — классы ставит js/main.js */
.portfolio15_image {
  transition: opacity 300ms ease;
}

.portfolio15_image-wrapper.is-video-playing .portfolio15_image {
  opacity: 0;
}

/* Значок видео на постере; прячется, когда ролик грузится или играет */
.portfolio15_video-badge {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 6;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: rgba(15, 15, 15, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity 300ms ease;
}

.portfolio15_video-badge svg {
  width: 0.625rem;
  height: 0.75rem;
  margin-left: 2px;
  fill: var(--yellow-50);
}

.is-video-loading > .portfolio15_video-badge,
.is-video-playing > .portfolio15_video-badge {
  opacity: 0;
}

/* Полоса снизу кадра: бежит, пока ролик грузится, потом показывает, сколько проиграно */
.portfolio15_video-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  height: 3px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.portfolio15_video-progress > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--yellow-50);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.is-video-loading > .portfolio15_video-progress,
.is-video-playing > .portfolio15_video-progress {
  opacity: 1;
}

.is-video-loading > .portfolio15_video-progress > span {
  width: 30%;
  animation: portfolio15-video-loading 1.1s ease-in-out infinite;
}

@keyframes portfolio15-video-loading {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(340%);
  }
}

/* Текст карточки: описание тише заголовка, дизайн — мелкой подписью */
.portfolio13_item .text-size-regular-2,
.portfolio15_item .w-richtext {
  color: rgba(255, 255, 255, 0.7);
}

.portfolio15_credit {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.45);
}

/* Теги нейтральные: жёлтый на сайте — цвет действий */
.portfolio15_tag-item {
  border-color: transparent;
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

/* Наведение на всю карточку: жёлтая рамка, ссылка и сдвиг стрелки */
.portfolio13_item {
  transition: border-color 300ms ease;
}

.portfolio13_item .button.is-link,
.portfolio15_item .button.is-link {
  transition: color 300ms ease;
}

.portfolio13_item .button.is-link .icon-embed-xxsmall,
.portfolio15_item .button.is-link .icon-embed-xxsmall {
  transition: transform 300ms ease;
}

@media (hover: hover) {
  .portfolio13_item:hover {
    border-color: var(--yellow-60);
  }

  .portfolio13_item:hover .button.is-link,
  .portfolio15_item:hover .button.is-link {
    color: var(--yellow-50);
  }

  .portfolio13_item:hover .button.is-link .icon-embed-xxsmall,
  .portfolio15_item:hover .button.is-link .icon-embed-xxsmall {
    transform: translateX(4px);
  }
}
