/* The paper is continuous; the image files no longer define the visible chapters.
   All distances are relative to each unscaled 948 x 1659 composition. */
main { isolation: isolate; }
.image-section {
  --fade-in: 3%;
  --fade-out: 3%;
  --overlap: 2%;
  background: transparent;
  isolation: isolate;
}
.image-section + .image-section {
  /* Percent margins use the width: 2% = 19 source pixels, never content. */
  margin-top: calc(-1 * var(--overlap));
}
.image-section img {
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%, #000 var(--fade-in),
    #000 calc(100% - var(--fade-out)), transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0%, #000 var(--fade-in),
    #000 calc(100% - var(--fade-out)), transparent 100%);
}
/* In every section the feather ends before the first printed character,
   and begins below the last printed line. No product or CTA is clipped. */
#top { --fade-in: 0%; --fade-out: 2.2%; }
#taste { --fade-in: 5%; --fade-out: 4%; --overlap: 2.5%; }
#craft { --fade-in: 4%; --fade-out: 4%; --overlap: 3%; }
#bridge { --fade-in: 5.5%; --fade-out: 5.5%; --overlap: 2%; }
#drinks { --fade-in: 4%; --fade-out: 2.5%; --overlap: 3%; }
#pairing { --fade-in: 4%; --fade-out: .8%; --overlap: 2%; }
#faq { --fade-in: 3.4%; --fade-out: 0%; --overlap: 1.2%; }
#product { --overlap: 2.8%; --reading-paper: #edf6f4; }

/* The last glass and the bottle cap must remain fully opaque.
   The incoming edge is a shallow wave entirely above the cap (source y=37).
   Its deepest point is source y=24; neither photo's subject is covered. */
#product img {
  /* Inline the same SVG so file:// previews work without a CORS-blocked mask. */
  --product-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 948 1659' preserveAspectRatio='none'%3E%3Cpath d='M0 15C180 0 325 2 475 13S790 29 948 9V1659H0Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--product-mask);
  mask-image: var(--product-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
/* Fade only the blank margin BELOW the last note, to the actual next panel.
   The underlying paper is never exposed between these two sections. */
#product::after {
  content: "";
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.6%;
  background: linear-gradient(to bottom, #edf6f400, var(--reading-paper));
}

/* Two changes of scene: knowledge -> table, reassurance -> final product.
   A single wide water-like curve crosses the file boundary at each point.
   It occupies only the blank top margin, never the headline. */
#bridge::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  left: 0;
  top: -1.7%;
  width: 100%;
  height: 5%;
  background: url("assets/water-join.svg") center / 100% 100% no-repeat;
}
.reading {
  background: linear-gradient(#edf6f4, var(--paper) 80px);
  border: 0;
}
/* Masks apply only to the raster image, not the interactive hit target.
   Users without CSS masks retain the complete, readable source artwork. */
@media print {
  .purchase-bar { display: none; }
  body { padding-bottom: 0; }
}
