/* On a phone the watercolor becomes a small paper theatre. Desktop is untouched. */
.postcard-foreground { display:none; }

@media (max-width:760px) {
  .hero-art {
    perspective:780px;
    perspective-origin:44% 94%;
    isolation:isolate;
    will-change:auto;
    -webkit-perspective:780px;
  }
  .hero-art .postcard-stage {
    transform-origin:44% 94%;
    transform-style:preserve-3d;
    transform:translate3d(var(--mobile-scene-x,0px),var(--mobile-scene-y,0px),0)
      rotateX(var(--mobile-scene-rx,0deg)) rotateY(var(--mobile-scene-ry,0deg));
  }
  .hero-art .postcard-background {
    transform-origin:44% 94%;
    transform:translateZ(-6px) rotateY(var(--mobile-back-ry,0deg)) scale(var(--mobile-back-scale,1));
    backface-visibility:hidden;
  }
  .hero-art .postcard-couple {
    transform-origin:35% 97%;
    /* Separate the paper planes so the turning background cannot cut through either person. */
    transform:translateZ(18px) rotateY(var(--mobile-couple-ry,0deg))
      rotate(calc(var(--dance-turn,-3deg) + 3deg + var(--mobile-sway,0deg)));
    transform-style:preserve-3d;
    backface-visibility:hidden;
  }
  .hero-art .postcard-couple::before {
    content:'';
    position:absolute;
    left:12%;
    bottom:.8%;
    width:62%;
    height:2.4%;
    background:radial-gradient(ellipse,#65563b35,transparent 72%);
    filter:blur(1px);
    transform:rotate(-3deg);
    pointer-events:none;
    z-index:-1;
  }
  .hero-art .postcard-bird { will-change:auto; }
  .postcard-foreground {
    display:block;
    position:absolute;
    width:23%;
    max-width:145px;
    right:1.5%;
    bottom:8%;
    z-index:5;
    pointer-events:none;
    transform-origin:40% 70%;
    transform:translate3d(var(--mobile-front-x,0px),var(--mobile-front-y,0px),30px)
      rotate(calc(-13deg + var(--mobile-front-rz,0deg)));
    opacity:.9;
    backface-visibility:hidden;
  }
  .postcard-foreground img {
    display:block;
    width:100%;
    height:auto;
    filter:drop-shadow(1px 3px 2px #635c4320);
    user-select:none;
  }

  /* Only decorative layers receive motion. The type and form fields stay level. */
  .invitation-paper .mobile-parallax-art {
    --mobile-art-angle:0deg;
    transform-origin:50% 72%;
    transform:perspective(850px)
      translate3d(var(--mobile-art-x,0px),var(--mobile-art-y,0px),0)
      rotateX(var(--mobile-art-rx,0deg)) rotateY(var(--mobile-art-ry,0deg))
      rotate(calc(var(--mobile-art-angle) + var(--mobile-art-rz,0deg)));
    backface-visibility:hidden;
    transition:none;
    will-change:auto;
  }
  .venue:hover .venue-picture .mobile-parallax-art {
    transform:perspective(850px)
      translate3d(var(--mobile-art-x,0px),var(--mobile-art-y,0px),0)
      rotateX(var(--mobile-art-rx,0deg)) rotateY(var(--mobile-art-ry,0deg))
      rotate(calc(var(--mobile-art-angle) + var(--mobile-art-rz,0deg)));
  }
  .bus-inner>.mobile-parallax-art { --mobile-art-angle:-5deg; }
  .keepsake-band>.mobile-parallax-art { --mobile-art-angle:-3deg; }
  .record-scene.mobile-parallax-art { --mobile-art-angle:-8deg; }
  .program-section .watercolor-accent.mobile-parallax-art { --mobile-art-angle:9deg; }
  .last-note .watercolor-accent.mobile-parallax-art { --mobile-art-angle:5deg; }
  .hero-art.is-mobile-scene-visible .postcard-stage,
  .hero-art.is-mobile-scene-visible .postcard-background,
  .hero-art.is-mobile-scene-visible .postcard-couple,
  .hero-art.is-mobile-scene-visible .postcard-bird,
  .hero-art.is-mobile-scene-visible .postcard-foreground,
  .mobile-parallax-art.is-mobile-scene-visible { will-change:transform; }
}

@media (max-width:760px) and (prefers-reduced-motion:reduce) {
  .hero-art { perspective:none; }
  .hero-art .postcard-stage,
  .hero-art .postcard-background,
  .hero-art .postcard-couple { transform:none!important;will-change:auto; }
  .postcard-foreground { transform:rotate(-13deg);will-change:auto; }
  .hero-art:not([data-flight-ready]) .postcard-bird { opacity:.65;visibility:visible; }
  .invitation-paper .mobile-parallax-art,
  .venue:hover .venue-picture .mobile-parallax-art {
    transform:rotate(var(--mobile-art-angle,0deg))!important;
    will-change:auto;
  }
}

@media print {
  .postcard-foreground { display:none!important; }
  .hero-art .postcard-stage,
  .hero-art .postcard-background,
  .hero-art .postcard-couple,
  .mobile-parallax-art { transform:none!important;will-change:auto; }
}
