/* A cropped glimpse at the viewport edge invites the first downward scroll. */
.hero-scroll-peek { display: none; }

@media (max-width: 1024px), (max-width: 1100px) and (max-height: 550px) {
  html[data-hero-layout="spacious"] .hero-scroll-peek:not([hidden]) {
    display: block;
    position: fixed;
    z-index: 32;
    left: 50%;
    bottom: 0;
    width: clamp(160px, 46vw, 192px);
    aspect-ratio: 2;
    transform: translateX(-50%);
    overflow: hidden;
    contain: layout paint;
    pointer-events: none;
    user-select: none;
  }

  .hero-scroll-peek__head {
    position: absolute;
    inset: 0;
    transform: translateY(101%);
    transform-origin: 50% 100%;
    will-change: transform;
  }

  .hero-scroll-peek__image,
  .hero-scroll-peek__face {
    position: absolute;
    display: block;
    top: 0;
    left: -26.6667%;
    width: 133.3333%;
    max-width: none;
    height: auto;
    transform: rotate(-20deg);
    transform-origin: 54% 32%;
    pointer-events: none;
  }

  .hero-scroll-peek__lid { opacity: 0; clip-path: inset(0 0 100% 0); }

  .hero-scroll-peek__marks {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: white;
    stroke-width: 3.2;
    stroke-linecap: round;
    pointer-events: none;
    filter: drop-shadow(0 1px 1px #24300b24);
  }
  .hero-scroll-peek__marks g {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
  }
}

/* Leave the central invitation clear when the phone is held horizontally. */
@media (max-width: 1100px) and (max-height: 550px) and (orientation: landscape) {
  html[data-hero-layout="spacious"] .hero-scroll-peek:not([hidden]) {
    left: max(12px, env(safe-area-inset-left, 0px));
    width: clamp(88px, 18vw, 140px);
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-peek__head { transform: none; will-change: auto; }
  .hero-scroll-peek__marks,
  .hero-scroll-peek__face { display: none; }
}
