@font-face {
  font-family: Fredoka;
  src: url(assets/flecki-hero/fredoka.ttf) format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

.scroll-hero {
  --soil: #3a2618;
  max-width: 1248px;
  margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-left, 0px)) 0;
  color: var(--ink);
  font-family: Fredoka, Nunito, sans-serif;
}

.scroll-hero__scroller {
  position: relative;
  height: 470vh;
}

.scroll-hero__sticky {
  position: sticky;
  top: max(12px, env(safe-area-inset-top, 0px));
}

.scroll-hero__stage {
  position: relative;
  width: 100%;
  max-width: min(100%, calc((100vh - 120px) * 16 / 9));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soil);
}

.scroll-hero__stage img,
.scroll-hero__stage canvas {
  position: absolute;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.scroll-hero__background,
.scroll-hero__overlay {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scroll-hero__dog {
  left: 30.27%;
  top: 14.6%;
  width: 42.54%;
  height: 70.35%;
}

.scroll-hero__dog[data-head="second"] {
  opacity: 0;
}

.scroll-hero__world {
  position: absolute;
  inset: 0;
}

.scroll-hero__canvas {
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.scroll-hero__video {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.scroll-hero__load {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 4px 10px;
  background: var(--bg);
  color: var(--ink);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 700px) and (orientation: portrait) {
  .scroll-hero__scroller {
    height: 250vh;
  }

  .scroll-hero__stage {
    aspect-ratio: 4 / 5;
    max-width: min(100%, calc((100vh - 120px) * 4 / 5));
  }

  .scroll-hero__world {
    inset: auto;
    top: 0;
    height: 100%;
    width: 222.2222%;
    left: -62.6736%;
  }
}