/* The scroll film: an old shop website shatters, a new one flies together, then fills the screen.
   The section is tall; the stage inside stays pinned while scrolling plays the film. */
.film { position: relative; height: 520vh; }
.film .pin { position: sticky; top: 0; height: 100vh; overflow: hidden; perspective: 1400px; }

/* the words that change as the film plays */
.film .cap { position: absolute; left: 0; right: 0; top: 11vh; text-align: center; z-index: 5; pointer-events: none; padding: 0 24px;
  font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(30px, 4.6vw, 58px); line-height: 1.08; letter-spacing: -.01em;
  opacity: 0; will-change: opacity, transform, filter; }
.film .cap small { display: block; margin-top: 12px; font: 500 clamp(15px, 1.5vw, 18px)/1.5 Inter, system-ui, sans-serif; color: var(--soft); letter-spacing: 0; }
.film .cap em { font-style: normal; background: linear-gradient(90deg, var(--violet), var(--peach)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.film .cap.big { top: 50%; transform: translateY(-50%); font-size: clamp(54px, 10vw, 150px); color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.35), 0 10px 60px rgba(0,0,0,.6); }

/* everything below is drawn at a fixed 1280 x 800 and scaled to fit the screen */
.film .stage { position: absolute; left: 50%; top: 56%; width: 1280px; height: 800px; margin: -400px 0 0 -640px; transform-style: preserve-3d; }

/* the "before" site: plain, dated, a bit sad */
.film .old, .film .tile .ghost { position: absolute; width: 640px; height: 420px; background: #fff; color: #222; font-family: "Times New Roman", serif;
  border: 1px solid #bbb; box-shadow: 0 30px 60px -30px rgba(27,26,46,.35); }
.film .old { left: 320px; top: 210px; }
.film .oldin { padding: 0; height: 100%; }
.film .oldin .bar { background: #3a62b5; color: #fff; font: bold 26px Arial, sans-serif; padding: 18px 22px; }
.film .oldin .mq { background: #ffef9a; font: 14px Arial, sans-serif; padding: 6px 22px; color: #6b5300; }
.film .oldin .body { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 20px 22px; font-size: 17px; line-height: 1.45; }
.film .oldin .side { font: 14px/2 Arial, sans-serif; color: #2346a8; text-decoration: underline; }
.film .oldin .pic { width: 100%; height: 108px; background: #ddd url(../samples/cafe/img/croissants.jpg) center/cover; filter: saturate(.35) contrast(.85) brightness(1.1); margin-top: 10px; }
.film .oldin .foot { position: absolute; bottom: 0; left: 0; right: 0; font: 12px Arial, sans-serif; color: #888; padding: 10px 22px; border-top: 1px solid #ddd; }
.film .shards { position: absolute; left: 320px; top: 210px; width: 640px; height: 420px; transform-style: preserve-3d; }
.film .dust { position: absolute; left: -320px; top: -210px; width: 1280px; height: 800px; pointer-events: none; }

/* the "after" site: the Hearth & Crumb sample, built from pieces */
.film .site { position: absolute; left: 90px; top: 70px; width: 1100px; height: 660px; border-radius: 22px; transform-style: preserve-3d;
  font-family: Inter, system-ui, sans-serif; color: #2b1d14; }
.film .site .back { position: absolute; inset: 0; border-radius: 22px; background: #2b1d14; box-shadow: 0 60px 120px -40px rgba(27,26,46,.55); }
.film .site .shade { position: absolute; inset: 0; border-radius: 22px; background: #1b120c; opacity: 0; transform: translateZ(2px); pointer-events: none; z-index: 4; }
.film .piece { position: absolute; will-change: transform, opacity; opacity: 0; }
.film .s-nav { left: 0; right: 0; top: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px;
  background: #f7f1e8; border-radius: 22px 22px 0 0; font-size: 15px; font-weight: 500; }
.film .s-nav b { font: 700 22px Fraunces, serif; }
.film .s-nav b span { color: #c4572f; }
.film .s-nav i { font-style: normal; display: flex; gap: 26px; align-items: center; }
.film .s-btn { display: inline-block; background: #c4572f; color: #fff; border-radius: 99px; padding: 11px 22px; font-weight: 600; font-size: 15px; }
.film .s-btn.light { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.4); }
.film .s-open { left: 60px; top: 130px; color: #fff; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px; border-radius: 99px; }
.film .s-open::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7bd88f; margin-right: 8px; }
.film .s-h1 { left: 60px; top: 170px; width: 520px; color: #fff; font: 600 58px/1.04 Fraunces, serif; letter-spacing: -.01em; }
.film .s-p { left: 60px; top: 366px; width: 470px; color: rgba(255,255,255,.88); font-size: 18px; line-height: 1.55; }
.film .s-acts { left: 60px; top: 464px; display: flex; gap: 12px; }
.film .s-photo { left: 640px; top: 104px; width: 400px; height: 500px; border-radius: 26px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.film .s-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film .s-card { top: 532px; width: 170px; height: 104px; border-radius: 16px; overflow: hidden; background: #fffaf3; display: grid; grid-template-columns: 70px 1fr;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); font-size: 13px; }
.film .s-card img { width: 70px; height: 104px; object-fit: cover; }
.film .s-card div { padding: 12px 10px; line-height: 1.35; }
.film .s-card b { display: block; font: 600 15px Fraunces, serif; }
.film .s-card span { color: #c4572f; font-weight: 600; }

/* the small progress pill along the bottom while the film plays */
.film .prog { position: absolute; left: 50%; bottom: 26px; width: 140px; height: 6px; margin-left: -70px; border-radius: 99px; background: rgba(27,26,46,.1); overflow: hidden; z-index: 6; }
.film .prog i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--violet), var(--peach)); }

/* reduced motion: no film, just the finished site sitting still */
@media (prefers-reduced-motion: reduce) {
  .film { height: auto; }
  .film .pin { position: relative; height: 900px; }
  .film .piece, .film .site .back { opacity: 1; }
  .film .old, .film .shards, .film .cap:not(.end), .film .prog { display: none; }
  .film .cap.end { opacity: 1; }
}
