.main-block .section__body-main {
  isolation: isolate;
}

.main-block .main-block-relative {
  min-width: 0;
}

.main-block .main-title {
  --fz-title: min(11.6667vw, 224px);
  max-width: 100%;
  letter-spacing: -0.0045em;
  white-space: nowrap;
}

.main-block .main-title > :first-child {
  align-self: flex-start;
  width: max-content;
}

.hero-wordmark {
  display: none;
}

.main-block .about-button {
  padding: 0;
}

.main-block .about-button .scale-text {
  max-width: min(76%, 129px);
  line-height: 1.25;
}

.main-block .about-arrow {
  position: absolute;
  top: 68%;
  right: auto;
  left: 50%;
  width: clamp(9px, 1vw, 12px);
  height: auto;
  translate: -50%;
  animation-name: hero-arrow-nudge;
}

@keyframes hero-arrow-nudge {
  from { transform: translateY(0); }
  to { transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .main-block .about-arrow {
    animation: none;
  }
}

@media (min-width: 768px) {
  .main-block .section__body-main {
    --hero-header-height: 90px;
    container-type: inline-size;
    position: relative;
    min-height: max(min(40.78125vw, 783px), calc(100dvh - var(--hero-header-height)));
    height: auto;
    max-height: none;
    margin-top: 0;
    padding: 0;
  }

  .main-block .section__body-main > .block-image {
    position: absolute;
    top: 50%;
    right: 6.3020833333%;
    bottom: auto;
    left: auto;
    width: 57.2395833333%;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    transform: translateY(-50%);
    transition: none;
  }

  .main-block .position-img {
    height: auto;
    aspect-ratio: 1099 / 783;
  }

  .main-block .main-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .main-block .main-block-relative {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  .main-block .main-title {
    --fz-title: 11.6666666667cqw;
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    /* Reuse the supplied foreground alpha to put the lettering behind the roof. */
    mask-image: linear-gradient(#000 0 0), url("../assets/images/site/hero/wordmark-cutout.webp");
    mask-size: 100% 100%, 29.375cqw 9.375cqw;
    mask-position: 0 0, 36.4583333333cqw calc(50% - 7.265625cqw);
    mask-repeat: no-repeat;
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }

  .main-block .main-title > span {
    position: absolute;
    opacity: 0;
  }

  /* Exact SVG coordinates, scaled with the 1920 x 783 composition. */
  .main-block .hero-wordmark {
    display: block;
    position: absolute;
    left: 7.0833333333cqw;
    top: calc((100% - 40.78125cqw) / 2 + 8.9583333333cqw);
    width: 58.6979166667cqw;
    height: auto;
  }

  .main-block .about-button {
    top: 50.7024265645%;
    left: -6.8243858053%;
    right: auto;
    bottom: auto;
    width: 7.8125cqw;
    height: 7.8125cqw;
    font-family: "Manrope-Buttons", "Manrope-Variable", sans-serif;
    font-size: clamp(11px, 0.8333333333cqw, 16px);
    line-height: 1.5;
    transition: none;
  }

  .main-block .about-button .scale-text {
    max-width: 76%;
    line-height: 1.5;
    translate: 0 -0.4166666667cqw;
  }

  .main-block .about-arrow {
    top: 69.3333333333%;
    left: calc(50% - 0.0260416667cqw);
    width: 0.6770833333cqw;
    animation-name: none;
  }
}

@media (768px <= width < 1200px) {
  .main-block .about-button .scale-text {
    max-width: 84%;
  }
}

@media (width < 768px) {
  .main-block .section__body-main.block-height {
    --hero-header-height: 90px;
    min-height: calc(100dvh - var(--hero-header-height) + 1px);
    max-height: none;
    height: auto;
    margin-top: 0;
  }

  .main-block .section__body-main > .block-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    transition: none;
  }

  .main-block .position-img > picture img {
    object-position: center 20%;
  }
}

@media (width < 768px) {
  .main-block .main-block-relative {
    position: absolute;
    top: clamp(24px, 7vh, 64px);
    bottom: auto;
    z-index: 4;
  }

  .main-block .main-title {
    --fz-title: min(12vw, 90px);
    /* Include the side gutters and a possible reserved scrollbar in the fit. */
    font-size: min(var(--fz-title), calc((100vw - 56px) / 6));
    text-shadow: 0 2px 12px rgb(22 29 45 / 55%);
  }

  .main-block .main-title .title-span {
    --fz-title: min(10vw, 76px);
    margin-left: 0;
  }

  .main-block .about-button {
    top: auto;
    bottom: clamp(16px, 4vh, 40px);
  }
}

@media (max-width: 600px) {
  .main-block .section__body-main.block-height {
    --hero-header-height: 72px;
  }
}
