* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #000;
  color: #fff;
}

.scroll-trigger {
  height: 800vh;
  /* Много места для скролла */
}

.canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.block {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    font-size: clamp(24px, 4vw, 48px);
    font-weight: bold;
    line-height: 1.2;

    word-break: break-word;
    padding: 0 3vw;

    transition: opacity 0.3s linear;
    will-change: transform, opacity;
}


.block-base {
  background: #000;
  z-index: 1;
  transform: translateY(0);
}

.block-1 {
  background: #11a069;
  z-index: 2;
  transform: translateY(100vh);
}

.block-2 {
  background: #b90707;
  z-index: 3;
  transform: translateY(100vh);
}

.block-3 {
  background: #19077e;
  z-index: 4;
  transform: translateY(100vh);
}

.static-content {
  position: relative;
  z-index: 10;
  background: #1a1a1a;
  margin-top: -50vh;
  /* Поднимаем статичные блоки поверх анимации */
}

.content-section {
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #444;
}

.block-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* две колонки на ПК */
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  height: auto;
  /* больше не 100%, чтобы блоки не растягивались */
  margin: 0 auto;
  padding: 20px;
  align-items: start;
  /* элементы сверху */
  justify-items: center;
  overflow: hidden;
}

/* Внутренние блоки */
.block img {
  display: block;
  max-width: min(90%, 600px);
  max-height: 60vh;
  height: auto;
  object-fit: contain;
}

/* 3) Точный контроль для блока 2 (две колонки) */
.block-left,
.block-right {
  align-items: flex-start;
  /* чтобы не «распирало» по центру */
}

.block-left img,
.block-right img {
  max-width: min(42vw, 520px);
  max-height: 45vh;
}

/* 4) На мобильных делаем ещё компактнее */
@media (max-width: 767px) {
  .block {
    font-size: clamp(18px, 6vw, 32px);
  }
  
.block-grid {
    grid-template-columns: 1fr; /* ✅ только одна колонка на мобилках */
  }

  .block img {
    max-width: 95%;
    max-height: 40vh;
  }
}