.scroll-frames {
  position: relative;
  /* Насколько опустить картинку: высота шапки + дополнительный отступ.
     Чтобы опустить ещё ниже — увеличить 40px. */
  --frames-offset: calc(var(--header-h) - 40px);
}

/* Первый экран идёт под прозрачную шапку и занимает всю высоту окна. */
.scroll-frames__pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  /* Цвет фона самих кадров — полоса под шапкой сливается с картинкой. */
  background: #f1f1f1;
}

/* Картинка начинается ниже шапки, чтобы шапка не перекрывала каску. */
.scroll-frames__poster {
  position: absolute;
  top: var(--frames-offset);
  left: 0;
  display: block;
  width: 100%;
  height: calc(100% - var(--frames-offset));
}

.scroll-frames__poster {
  object-fit: cover;
  object-position: 72% 0%;
}

/* ---------- Карточка справа ---------- */

.hero-badge {
  position: absolute;
  top: 20%;
  right: clamp(16px, 4vw, 64px);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: clamp(240px, 18vw, 300px);
  padding: 1rem;
  background: #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  text-align: left;
  color: #111;
  border-radius: 10px;
}

.hero-badge__img {
  display: block;
  flex: 0 0 30%;
  width: 30%;
  height: auto;
}

.hero-badge__text {
  margin: 0;
  font-size: clamp(0.8rem, 0.95vw, 1rem);
  font-weight: 600;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Текст первого экрана ---------- */

/* Колонка слева: от шапки до названия внизу, текст по центру. */
.hero-copy {
  position: absolute;
  top: var(--header-h);
  bottom: var(--wordmark-h, 0px);
  left: clamp(16px, 6vw, 96px);
  width: min(44vw, 640px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #111;
}

.hero-copy__eyebrow {
  margin: 0 0 1.25rem;
  font-size: clamp(0.75rem, 0.9vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5c5c5c;
}

.hero-copy__title {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 88px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.045em;
}

/* Сменяющиеся преимущества: одна строка, новая всплывает снизу. */
.hero-copy__benefits {
  position: relative;
  height: 1.5em;
  margin-top: 1.25rem;
  overflow: hidden;
  font-size: clamp(16px, 1.8vw, 26px);
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.scroll-frames__caption {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: 0;
  color: #5c5c5c;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition:
    opacity 0.3s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.4s;
}

.scroll-frames__caption::before {
  content: '— ';
  color: #111;
}

.scroll-frames__caption.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.3s ease 0.05s,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s,
    visibility 0s;
}

.scroll-frames__caption.is-past {
  transform: translateY(-100%);
}

/* Ключевые условия: 2×2, иконка слева от текста. */
.hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(17, 17, 17, 0.15);
  list-style: none;
}

.hero-facts__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: clamp(13px, 1.25vw, 19px);
  line-height: 1.4;
  color: #5c5c5c;
}

.hero-facts__item strong {
  font-weight: 700;
  color: #111;
}

.hero-facts__icon {
  flex: none;
  width: clamp(28px, 2.2vw, 36px);
  height: clamp(28px, 2.2vw, 36px);
  color: #111;
}

.hero-copy__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-copy__actions .hero-cta {
  padding: 1.1rem 1.75rem;
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
}

/* ---------- Название по буквам ---------- */

.scroll-frames__wordmark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0 clamp(12px, 2vw, 32px);
  overflow: hidden;
  color: #111;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.85;
  white-space: nowrap;
  /* Точный размер подбирает скрипт под ширину экрана. */
  font-size: 9vw;
  pointer-events: none;
}

.scroll-frames__letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition:
    opacity 0.25s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-frames__letter.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  /* Отдельная вертикальная картинка, рабочий по центру. */
  .scroll-frames__poster {
    object-position: 50% 0%;
  }

  /* Текст внизу, поэтому карточку поднимаем к шапке. */
  .hero-badge {
    top: calc(var(--header-h) + 12px);
    right: 16px;
    transform: none;
    width: 190px;
    gap: 0.5rem;
    padding: 0.6rem;
  }

  .hero-badge__text {
    font-size: 0.65rem;
  }

  /* На телефоне рабочий занимает почти весь экран — текст ставим вниз,
     над названием, на светлую подложку. */
  /* Подложка доходит до низа экрана, чтобы название читалось
     не поверх тёмной куртки, а на светлом фоне. */
  .hero-copy {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    padding: 5rem 16px calc(var(--wordmark-h, 0px) + 1rem);
    background: linear-gradient(to top, rgba(241, 241, 241, 0.97) 75%, rgba(241, 241, 241, 0));
  }

  .hero-copy__eyebrow {
    margin-bottom: 0.6rem;
  }

  .hero-copy__benefits {
    margin-top: 0.75rem;
  }

  .hero-facts {
    gap: 0.85rem 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
  }

  .hero-facts__item {
    gap: 0.5rem;
    font-size: 12px;
  }

  .hero-facts__icon {
    width: 22px;
    height: 22px;
  }

  .hero-copy__actions {
    margin-top: 1.25rem;
    gap: 0.5rem;
  }

  .hero-copy__actions .hero-cta {
    flex: 1 1 0;
    justify-content: center;
    padding: 0.85rem 0.5rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-frames__pin {
    height: auto;
  }

  .scroll-frames__poster {
    position: static;
    height: auto;
  }

  /* Без анимации текст идёт под картинкой, все преимущества списком. */
  .hero-copy {
    position: static;
    width: auto;
    padding: 24px 16px;
    background: none;
  }

  .hero-copy__benefits {
    height: auto;
  }

  .scroll-frames__caption,
  .scroll-frames__caption.is-active,
  .scroll-frames__caption.is-past {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    white-space: normal;
  }

  .scroll-frames__wordmark {
    position: static;
    padding-bottom: 16px;
  }
}
