.lookbook-opening {
  position: relative;
  isolation: isolate;
}

@media (prefers-reduced-motion: no-preference) {
  .lookbook-opening > .collections-home {
    --cover-lead: clamp(96px, 14svh, 158px);
    margin-block-start: calc(var(--cover-lead) - var(--sweep-height));
  }

  /* Keep the navigation anchor in flow while the printed sheet eases into place. */
  .collection-turn {
    translate: 0 var(--sheet-offset, calc(0px - var(--cover-lead)));
  }

  /* A tall cover scrolls until its hem fits, then the curve slides over it. */
  .lookbook-opening > .cloth-cover {
    position: sticky;
    top: min(0px, calc(100svh - var(--cover-height)));
    z-index: 0;
  }
}

@media (prefers-reduced-motion: no-preference) and (min-height: 450px) {
  /* The plaster edge travels above the viewport while the full portrait settles into place. */
  .collections-home .collection-spread {
    position: sticky;
    top: calc(0px - var(--sweep-height));
    height: calc(var(--cover-height) + var(--sweep-height));
  }

  .collection-view {
    position: sticky;
    top: 0;
  }

  .collection-turn::after {
    content: "";
    display: block;
    height: clamp(340px, 95svh, 1000px);
    background: var(--rose-plaster);
    pointer-events: none;
  }

  @supports (animation-timeline: scroll(root block)) {
    .cloth-cover__fabric img {
      animation: nouf-cover-drift linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px 64svh;
    }

    @keyframes nouf-cover-drift {
      from { transform: scale(1.035); }
      to { transform: scale(1.105) translateY(3%); }
    }
  }
}

@media (max-width: 650px) and (min-height: 450px) and (prefers-reduced-motion: no-preference) {
  .collection-turn::after {
    height: clamp(290px, 70svh, 600px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .collection-plate {
    transition: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Let the whole paper spread pass the reading line before holding its hem. */
  .boutique-story {
    position: sticky;
    top: min(0px, calc(100svh - var(--spread-height)));
    z-index: 0;
  }

  .boutique-story + .boutique-letter {
    --turn-depth: clamp(16px, 2.8vw, 40px);
    margin-block-start: calc(0px - var(--turn-depth));
    min-block-size: max(420px, calc(100lvh - var(--signature-height) + var(--turn-depth)));
    /* Cut the photograph and its ink ground with the same paper edge. */
    mask: url("/brand/closing-edge.svg") top / 100% var(--turn-depth) no-repeat,
      linear-gradient(#000 0 0) bottom / 100% calc(100% - var(--turn-depth) + 1px) no-repeat;
  }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .boutique-story + .boutique-letter {
    display: grid;
    grid-template-rows: minmax(clamp(180px, 53vw, 285px), 1fr) auto;
  }

  .boutique-story + .boutique-letter .boutique-letter__art {
    align-self: stretch;
    height: auto;
    min-height: 0;
    overflow: clip;
  }
}
