/* 15 Nov 2026 copy of the Mojito 3D touches (glass as a 3D photo, photos on a 3D carousel) for pina-colada-coconut (theme.json "polish", loaded after every shared sheet): the glass as a 3D photo and
   the photos on a 3D carousel. body.fx3d / body.fx-cf are set by pina-fx.js, so with the script off (editor, reduced motion,
   ?fx=0) nothing here applies. */

/* the 3D-photo glass: a canvas laid exactly over the film's last frame, with the same soft oval edge, faded in */
body.fx3d .sc-hero-media canvas.fx-glass {
  position: absolute; z-index: 2; display: block; opacity: 0; transition: opacity .4s ease; touch-action: pan-y;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%);
}
body.fx3d .sc-hero-media canvas.fx-glass.on { opacity: 1; }

/* the photos: a 3D carousel (two or more photos) */
body.fx-cf .sc-gallery {
  display: block !important; position: relative; perspective: 900px; perspective-origin: 50% 40%; touch-action: pan-y;
  margin: 8px -10px 0; padding: 0; overflow: visible;
}
html body.fx-cf .sc-section .sc-gallery figure {
  position: absolute; left: 50%; top: 14px; width: 62% !important; margin: 0 0 0 -31%; grid-column: auto;
  /* !important: the shared "seen" rule gives each polaroid its own slight rotate() and would otherwise win */
  opacity: var(--fx-o, 1) !important; transform: var(--fx-t, none) !important; transition: none !important; will-change: transform, opacity;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  -webkit-box-reflect: below 6px linear-gradient(transparent 74%, rgba(255,255,255,.28));
}
body.fx-cf .sc-gallery img { -webkit-user-drag: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.fx-cf .sc-gallery figure .sc-photo-window:not([data-fit="contain"]) { aspect-ratio: 1 !important; height: auto !important; }
html body.fx3d .sc-gallery figure::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 1;
  background: linear-gradient(110deg, rgba(255,255,255,0) 38%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 62%) no-repeat;
  background-size: 320% 100%; background-position: var(--fx-gx, 50%) 0; opacity: var(--fx-so, .3); mix-blend-mode: soft-light;
}
/* one photo: it lies tipped back and stands up as it scrolls in */
body.fx3d:not(.fx-cf) .sc-gallery { perspective: 1100px; perspective-origin: 50% 30%; }
html body.fx3d:not(.fx-cf) .sc-section .sc-gallery figure {
  opacity: var(--fx-o, 1) !important; transform: var(--fx-t, none) !important; transition: none !important; transform-origin: 50% 100%; will-change: transform, opacity;
}

/* iPhone only: Apple lets a page read the phone's tilt only after a tap, so a small pill offers it once the drink is made */
.fx-tilt-chip {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  font: 600 9px/1 'Montserrat', system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #26291f;
  background: rgba(251,247,242,.9); border: 1px solid rgba(201,163,90,.65); border-radius: 999px; padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(38,41,31,.12); cursor: pointer; animation: fx-chip-in .6s ease-out both;
}
@keyframes fx-chip-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
