/* Motion and 3D: scroll reveal, falling shapes, 3D carousel and tilt, five 3D or animated decors, 3D opening
   screens. Everything moving is switched off for visitors who prefer reduced motion. Shared by the application
   and by the public invitation page. */

/* The page must clip without becoming a scroll container, so the particle layer can stick to the viewport. */
.invitation {
  overflow: hidden;
  overflow: clip;
}
.invite-has-decor {
  overflow: hidden;
  overflow: clip;
}

/* --- Sections that appear while scrolling ---------------------------------------------------------------------- */
[data-rv] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.invite-motion-lively [data-rv] {
  transform: translateY(44px) scale(0.97);
}
[data-rv].is-in {
  opacity: 1;
  transform: none;
}

/* --- Lively pages: shimmering title, 3D tilt with a reflection, flipping countdown digits -------------------------- */
.invite-motion-lively .invite-content h2 {
  background: linear-gradient(
      100deg,
      var(--invite-accent) 30%,
      color-mix(in srgb, var(--invite-accent) 35%, #fff) 50%,
      var(--invite-accent) 70%
    )
    0 0 / 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    fade-up 0.9s 0.15s both,
    shimmer 5s ease-in-out infinite;
}
@keyframes shimmer {
  0%,
  35% {
    background-position: 120% 0;
  }
  80%,
  100% {
    background-position: -20% 0;
  }
}
.invite-motion-lively .bn-card,
.invite-motion-lively .invite-moments li,
.invite-gal-tilt .invite-gallery-item {
  position: relative;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s ease;
  will-change: transform;
}
.invite-motion-lively .bn-card::after,
.invite-motion-lively .invite-moments li::after,
.invite-gal-tilt .invite-gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 0%),
    rgb(255 255 255 / 30%),
    transparent 55%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.is-tilting {
  transition: transform 0.08s linear !important;
}
.is-tilting::after {
  opacity: 1 !important;
}
.invite-gal-tilt .invite-gallery {
  gap: 10px;
}
.invite-gal-tilt .invite-gallery-item {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgb(0 0 0 / 22%);
}
.invite-count-live b.tick {
  animation: tick 0.55s cubic-bezier(0.3, 0.7, 0.3, 1);
}
@keyframes tick {
  0% {
    transform: rotateX(90deg);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

/* --- Falling and floating shapes ------------------------------------------------------------------------------- */
.invite-particles {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 0;
  pointer-events: none;
}
.invite-particles i {
  position: absolute;
  top: -10vh;
  left: var(--x);
  width: var(--s);
  aspect-ratio: 1;
  background: var(--invite-accent);
  opacity: 0;
  animation: fall var(--t) linear var(--d) infinite;
}
.invite-particles-petals i {
  aspect-ratio: 2 / 3;
  background: color-mix(in srgb, var(--invite-accent) 70%, #fff);
  -webkit-mask: url('/art/forme/petale.svg') center / contain no-repeat;
  mask: url('/art/forme/petale.svg') center / contain no-repeat;
}
.invite-particles-hearts i {
  aspect-ratio: 1.1;
  -webkit-mask: url('/art/forme/coeur.svg') center / contain no-repeat;
  mask: url('/art/forme/coeur.svg') center / contain no-repeat;
}
.invite-particles-stars i {
  background: #ffe9a8;
  -webkit-mask: url('/art/forme/etoile.svg') center / contain no-repeat;
  mask: url('/art/forme/etoile.svg') center / contain no-repeat;
}
.invite-particles-confetti i {
  aspect-ratio: 1 / 2.2;
  border-radius: 2px;
  background: var(--c);
}
.invite-particles-bubbles i {
  top: auto;
  bottom: -10vh;
  border: 2px solid rgb(255 255 255 / 85%);
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgb(255 255 255 / 70%),
    color-mix(in srgb, var(--invite-accent) 25%, transparent) 60%
  );
  animation-name: rise;
}
@keyframes fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(var(--dx), 112vh, 0) rotate(var(--r));
    opacity: 0;
  }
}
@keyframes rise {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(var(--dx), -112vh, 0);
    opacity: 0;
  }
}
.invite-particles i:nth-child(1) {
  --x: 0%;
  --s: 16px;
  --t: 11.5s;
  --d: -0.6s;
  --dx: 43px;
  --r: -49deg;
  --c: #ffd166;
}
.invite-particles i:nth-child(2) {
  --x: 49%;
  --s: 17px;
  --t: 12.8s;
  --d: -3.9s;
  --dx: -34px;
  --r: 115deg;
  --c: #4cc9f0;
}
.invite-particles i:nth-child(3) {
  --x: 13%;
  --s: 15px;
  --t: 13.7s;
  --d: -11.6s;
  --dx: -14px;
  --r: -224deg;
  --c: #06d6a0;
}
.invite-particles i:nth-child(4) {
  --x: 20%;
  --s: 20px;
  --t: 13.7s;
  --d: -7.8s;
  --dx: -3px;
  --r: -143deg;
  --c: #f78fb3;
}
.invite-particles i:nth-child(5) {
  --x: 29%;
  --s: 21px;
  --t: 9.1s;
  --d: -2.7s;
  --dx: 9px;
  --r: 115deg;
  --c: #b388ff;
}
.invite-particles i:nth-child(6) {
  --x: 1%;
  --s: 15px;
  --t: 16.1s;
  --d: -7.3s;
  --dx: -48px;
  --r: 60deg;
  --c: #ff6b6b;
}
.invite-particles i:nth-child(7) {
  --x: 90%;
  --s: 14px;
  --t: 16.2s;
  --d: -0.3s;
  --dx: 26px;
  --r: 166deg;
  --c: #ffd166;
}
.invite-particles i:nth-child(8) {
  --x: 89%;
  --s: 14px;
  --t: 10.3s;
  --d: -11.2s;
  --dx: 54px;
  --r: 125deg;
  --c: #4cc9f0;
}
.invite-particles i:nth-child(9) {
  --x: 94%;
  --s: 21px;
  --t: 12.5s;
  --d: -3.6s;
  --dx: 14px;
  --r: -257deg;
  --c: #06d6a0;
}
.invite-particles i:nth-child(10) {
  --x: 89%;
  --s: 22px;
  --t: 11.8s;
  --d: -12.2s;
  --dx: -60px;
  --r: 90deg;
  --c: #f78fb3;
}
.invite-particles i:nth-child(11) {
  --x: 89%;
  --s: 18px;
  --t: 14.4s;
  --d: -7.1s;
  --dx: 42px;
  --r: -36deg;
  --c: #b388ff;
}
.invite-particles i:nth-child(12) {
  --x: 87%;
  --s: 24px;
  --t: 12.4s;
  --d: -11.4s;
  --dx: 1px;
  --r: -148deg;
  --c: #ff6b6b;
}
.invite-particles i:nth-child(13) {
  --x: 5%;
  --s: 11px;
  --t: 15.6s;
  --d: -1.5s;
  --dx: -18px;
  --r: 27deg;
  --c: #ffd166;
}
.invite-particles i:nth-child(14) {
  --x: 35%;
  --s: 17px;
  --t: 9.8s;
  --d: -5.3s;
  --dx: -39px;
  --r: 39deg;
  --c: #4cc9f0;
}

/* --- 3D carousel of photos ------------------------------------------------------------------------------------------ */
.invite-gallery-ring {
  display: block;
  height: 290px;
  margin: 0 16px 28px;
  perspective: 1000px;
}
.invite-ring-track {
  position: relative;
  width: 142px;
  height: 192px;
  margin: 40px auto 0;
  transform-style: preserve-3d;
  animation: ring-spin 40s linear infinite;
}
.invite-gallery-ring:hover .invite-ring-track,
.invite-gallery-ring:focus-within .invite-ring-track {
  animation-play-state: paused;
}
.invite-gallery-ring .invite-gallery-item {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgb(0 0 0 / 30%);
  transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(170px);
  transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(calc(71px / tan(180deg / var(--n))));
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.invite-gallery-ring .invite-gallery-item img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}
@keyframes ring-spin {
  to {
    transform: rotateY(-360deg);
  }
}

/* --- Decor: Carte 3D (flip card) ---------------------------------------------------------------------------------- */
.dc-flip {
  width: min(100%, 320px);
  aspect-ratio: 3 / 4;
  perspective: 1200px;
  animation: sway 7s ease-in-out infinite;
}
.dc-flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.dc-flip-card.is-flipped {
  transform: rotateY(180deg);
}
.dc-flip-card:focus-visible {
  outline: 3px solid var(--invite-accent);
  outline-offset: 6px;
  border-radius: 16px;
}
.dc-flip-face {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  border-radius: 16px;
  box-shadow:
    0 22px 44px rgb(0 0 0 / 28%),
    inset 0 0 0 7px var(--invite-bg),
    inset 0 0 0 8px var(--invite-accent);
  text-align: center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.dc-flip-front {
  background: linear-gradient(145deg, #fffdf8, color-mix(in srgb, var(--invite-bg) 70%, #fff));
  color: var(--invite-accent);
}
.dc-flip-back {
  background: linear-gradient(
    145deg,
    var(--invite-accent),
    color-mix(in srgb, var(--invite-accent) 70%, #000)
  );
  color: var(--invite-on-accent);
  transform: rotateY(180deg);
}
.dc-flip-face b {
  font: 700 30px/1.15 var(--font-elegant, Georgia, serif);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dc-flip-face small {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
}
.dc-flip-face em {
  font-size: 14px;
  line-height: 1.6;
}
.dc-flip-photo {
  width: 62%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid var(--invite-accent);
  border-radius: 50%;
}
.dc-flip-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dc-flip-star {
  width: 44px;
  height: 44px;
}
@keyframes sway {
  0%,
  100% {
    transform: rotateX(2deg) rotateY(-4deg);
  }
  50% {
    transform: rotateX(-2deg) rotateY(4deg);
  }
}

/* --- Decor: Cube photo ------------------------------------------------------------------------------------------------ */
.dc-cube {
  display: grid;
  place-items: center;
  width: min(100%, 300px);
  height: 290px;
}
.dc-cube-scene {
  position: relative;
  width: 170px;
  height: 170px;
  perspective: 900px;
}
.dc-cube-scene::after {
  content: '';
  position: absolute;
  right: 10px;
  bottom: -52px;
  left: 10px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 30%), transparent);
}
.dc-cube-box {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: cube-spin 20s linear infinite;
}
.dc-cube-scene:hover .dc-cube-box {
  animation-play-state: paused;
}
.dc-cube-face {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border: 5px solid #fff;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 10%);
}
.dc-cube-face img,
.dc-cube-face .dc-blank {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dc-cube-face-0 {
  transform: translateZ(85px);
}
.dc-cube-face-1 {
  transform: rotateY(90deg) translateZ(85px);
}
.dc-cube-face-2 {
  transform: rotateY(180deg) translateZ(85px);
}
.dc-cube-face-3 {
  transform: rotateY(270deg) translateZ(85px);
}
@keyframes cube-spin {
  from {
    transform: rotateX(-14deg) rotateY(0);
  }
  to {
    transform: rotateX(-14deg) rotateY(360deg);
  }
}

/* --- Decor: Paysage en couches (parallax) ------------------------------------------------------------------------- */
.dc-land {
  width: min(100%, 360px);
  height: 310px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(
    color-mix(in srgb, var(--invite-accent) 38%, #fff),
    color-mix(in srgb, var(--invite-accent) 8%, #fff)
  );
}
.dc-layer {
  position: absolute;
  transform: translate3d(calc(var(--px, 0) * var(--d, 8) * 1px), calc(var(--py, 0) * var(--d, 8) * 0.6px), 0);
  transition: transform 0.25s ease-out;
}
.dc-sun {
  top: 26px;
  right: 56px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff6c8;
  box-shadow: 0 0 34px 12px rgb(255 243 166 / 70%);
}
.dc-cloud {
  width: 92px;
  height: 46px;
  background: #fff;
  opacity: 0.9;
  --d: 18;
}
.dc-cloud-1 {
  top: 40px;
  left: 26px;
  animation: drift 24s ease-in-out infinite alternate;
}
.dc-cloud-2 {
  top: 88px;
  right: 14px;
  width: 70px;
  height: 35px;
  opacity: 0.7;
  --d: 10;
  animation: drift 32s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  to {
    margin-left: 44px;
  }
}
.dc-hill {
  right: -12px;
  left: -12px;
  width: calc(100% + 24px);
  height: 120px;
  background: var(--invite-accent);
}
.dc-hill-1 {
  bottom: 70px;
  opacity: 0.32;
  --d: 6;
}
.dc-hill-2 {
  bottom: 36px;
  opacity: 0.6;
  --d: 12;
}
.dc-hill-3 {
  bottom: -6px;
  opacity: 1;
  --d: 22;
}
.dc-land-photo {
  top: 62px;
  left: 50%;
  width: 150px;
  aspect-ratio: 1;
  margin-left: -75px;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 50%;
  background: color-mix(in srgb, var(--invite-accent) 20%, #fff);
  box-shadow: 0 10px 26px rgb(0 0 0 / 22%);
}
.dc-land-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Decor: Néon ---------------------------------------------------------------------------------------------------- */
.invite-decor-neon {
  --neon: var(--invite-accent);
}
.dc-neon {
  display: grid;
  place-items: center;
  width: min(100%, 300px);
  aspect-ratio: 1;
}
.dc-neon-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: conic-gradient(var(--neon), #00e5ff, #ff3df5, var(--neon));
  filter: blur(14px);
  opacity: 0.85;
  animation: spin 8s linear infinite;
}
.dc-neon-photo {
  position: relative;
  width: 62%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #1b1b2a;
  box-shadow: 0 0 0 3px var(--neon);
}
.dc-neon-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.invite-decor-neon h2,
.invite-decor-neon h3 {
  color: #fff;
  text-shadow:
    0 0 6px #fff,
    0 0 14px var(--neon),
    0 0 34px var(--neon);
}
.invite-decor-neon h2 {
  animation: neon-flicker 6s infinite;
}
.invite-decor-neon .bn-card {
  /* The cards are dark glass here: their text must be light whatever the accent colour is. */
  --card-fg: #fff;
  --card-head: #fff;
  color: #fff;
}
.invite-decor-neon .bn-card,
.invite-decor-neon .invite-moments li {
  border: 1px solid var(--neon);
  background: color-mix(in srgb, var(--neon) 8%, transparent);
  box-shadow:
    0 0 14px color-mix(in srgb, var(--neon) 55%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--neon) 18%, transparent);
  animation: neon-pulse 3.4s ease-in-out infinite;
}
@keyframes neon-flicker {
  0%,
  18%,
  22%,
  62%,
  66%,
  100% {
    opacity: 1;
  }
  20%,
  64% {
    opacity: 0.55;
  }
}
@keyframes neon-pulse {
  50% {
    box-shadow:
      0 0 26px color-mix(in srgb, var(--neon) 80%, transparent),
      inset 0 0 22px color-mix(in srgb, var(--neon) 28%, transparent);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Decor: Fête (bunting and balloons) ---------------------------------------------------------------------------- */
.dc-party {
  width: min(100%, 340px);
  height: 330px;
  overflow: hidden;
}
.dc-bunting {
  position: absolute;
  top: 0;
  right: -4px;
  left: -4px;
  display: flex;
  justify-content: space-between;
}
.dc-bunting i {
  width: 34px;
  height: 40px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: #ff6b6b;
  transform-origin: top center;
  animation: flutter 3.2s ease-in-out infinite alternate;
}
.dc-bunting i:nth-child(4n + 2) {
  background: #ffd166;
  animation-delay: -0.8s;
}
.dc-bunting i:nth-child(4n + 3) {
  background: #4cc9f0;
  animation-delay: -1.6s;
}
.dc-bunting i:nth-child(4n) {
  background: #06d6a0;
  animation-delay: -2.4s;
}
@keyframes flutter {
  to {
    transform: rotate(5deg);
  }
}
.dc-balloon {
  position: absolute;
  bottom: -40px;
  width: 44px;
  aspect-ratio: 60 / 110;
  opacity: 0;
  animation: balloon-rise 9s ease-in infinite;
}
.dc-balloon-1 {
  left: 4%;
  background: #ff6b6b;
  animation-delay: 0s;
}
.dc-balloon-2 {
  left: 18%;
  background: #ffd166;
  animation-delay: -2.2s;
  width: 36px;
}
.dc-balloon-3 {
  left: 78%;
  background: #4cc9f0;
  animation-delay: -4.4s;
}
.dc-balloon-4 {
  left: 90%;
  background: #06d6a0;
  animation-delay: -6.6s;
  width: 34px;
}
.dc-balloon-5 {
  left: 6%;
  background: #b388ff;
  animation-delay: -5.5s;
  width: 38px;
}
.dc-balloon-6 {
  left: 70%;
  background: #f78fb3;
  animation-delay: -1.1s;
  width: 40px;
}
@keyframes balloon-rise {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  100% {
    transform: translate3d(14px, -380px, 0) rotate(8deg);
    opacity: 0;
  }
}
.dc-party-photo {
  position: relative;
  width: 58%;
  margin: 58px auto 0;
}
.dc-party-photo::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 4px dashed var(--invite-accent);
  border-radius: 50%;
  animation: spin 26s linear infinite;
}
.dc-party-photo .dc-round-photo {
  position: relative;
  width: 100%;
}

/* --- Opening screens in 3D: book and doors -------------------------------------------------------------------------- */
.invite-opening-book,
.invite-opening-doors {
  transition: none;
}
.invite-opening-book {
  background: radial-gradient(
    circle at 50% 30%,
    color-mix(in srgb, var(--invite-accent) 60%, #fff),
    var(--invite-accent) 75%
  );
}
.ob-stage {
  display: grid;
  justify-items: center;
  gap: 26px;
  perspective: 1400px;
}
.ob-book {
  position: relative;
  width: min(62vw, 250px);
  aspect-ratio: 3 / 4;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-14deg);
  transition: transform 1.2s cubic-bezier(0.5, 0.1, 0.2, 1);
}
.ob-page {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  border-radius: 4px 10px 10px 4px;
  background: linear-gradient(90deg, #e9e3d6, #fffdf7 12%);
  box-shadow: 0 22px 44px rgb(0 0 0 / 35%);
  color: var(--invite-accent);
  text-align: center;
}
.invitation .ob-page h2 {
  margin: 0;
  color: var(--invite-accent);
  font: 400 26px/1.15 var(--font-elegant, Georgia, serif);
}
.invite-opening-book p {
  margin: 0;
  color: color-mix(in srgb, var(--invite-accent) 70%, #555);
  font-size: 14px;
}
.ob-cover {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.5, 0.1, 0.2, 1);
}
.ob-face {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  border-radius: 4px 10px 10px 4px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--invite-accent) 82%, #fff),
    var(--invite-accent)
  );
  color: var(--invite-on-accent);
  text-align: center;
  box-shadow:
    inset 0 0 0 8px rgb(255 255 255 / 10%),
    inset 0 0 0 9px rgb(255 255 255 / 40%);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.ob-face b {
  font: 700 24px/1.2 var(--font-elegant, Georgia, serif);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ob-face small {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}
.ob-star {
  width: 36px;
  height: 36px;
  background: currentColor;
}
.ob-back {
  transform: rotateY(180deg);
  background: color-mix(in srgb, var(--invite-accent) 75%, #000);
}
.invite-opening-book.is-leaving .ob-cover {
  transform: rotateY(-172deg);
}
.invite-opening-book.is-leaving .ob-book {
  transform: translateX(26%) rotateX(0) rotateY(0);
}
.invite-opening-book.is-leaving,
.invite-opening-doors.is-leaving {
  animation: opening-away 0.45s ease 1s forwards;
}
.invite-opening-book .invite-opening-btn {
  background: #f4efe3;
  color: var(--invite-accent);
}
@keyframes opening-away {
  to {
    opacity: 0;
  }
}
.invite-opening-doors {
  background: #0d0d14;
}
.od-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 1500px;
}
.od-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    color-mix(in srgb, var(--invite-accent) 55%, #fff),
    color-mix(in srgb, var(--invite-accent) 35%, #000) 70%
  );
}
.od-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.3%;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 25%), transparent 30%, rgb(255 255 255 / 8%) 75%, rgb(0 0 0 / 30%)),
    linear-gradient(var(--invite-accent), color-mix(in srgb, var(--invite-accent) 70%, #000));
  box-shadow:
    inset 0 0 0 10px rgb(255 255 255 / 8%),
    inset 0 0 0 11px rgb(255 255 255 / 25%);
  transition: transform 1.3s cubic-bezier(0.6, 0, 0.2, 1);
}
.od-left {
  left: 0;
  transform-origin: left center;
}
.od-right {
  right: 0;
  transform-origin: right center;
}
.od-handle {
  position: absolute;
  top: 78%;
  width: 10px;
  height: 64px;
  border-radius: 6px;
  background: linear-gradient(#f3dd9a, #b98a3a);
  box-shadow: 0 2px 6px rgb(0 0 0 / 40%);
  transform: translateY(-50%);
}
.od-left .od-handle {
  right: 16px;
}
.od-right .od-handle {
  left: 16px;
}
.od-center {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--invite-on-accent);
  text-align: center;
  transition: opacity 0.5s;
}
.od-star {
  width: 34px;
  height: 34px;
  background: currentColor;
}
.invitation .od-center h2 {
  margin: 4px 0 0;
  color: var(--invite-on-accent);
  font: 400 36px/1.15 var(--font-elegant, Georgia, serif);
}
.invitation .od-center .invite-opening-date {
  margin: 0;
  color: var(--invite-on-accent);
  font-size: 17px;
}
.invite-opening-doors .invite-opening-btn {
  background: var(--invite-on-accent);
  color: var(--invite-accent);
}
.invite-opening-doors.is-leaving .od-left {
  transform: rotateY(-105deg);
}
.invite-opening-doors.is-leaving .od-right {
  transform: rotateY(105deg);
}
.invite-opening-doors.is-leaving .od-center {
  opacity: 0;
}

/* --- More opening screens: gift, ticket, lens, blinds, wax seal ---------------------------------------------------- */
.invite-opening-gift,
.invite-opening-ticket,
.invite-opening-wax {
  overflow: hidden;
}
.og-stage,
.ot-stage,
.os-stage,
.oi-center,
.obl-center {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--invite-on-accent);
  text-align: center;
}
.invitation .og-stage h2,
.invitation .oi-center h2,
.invitation .obl-center h2 {
  margin: 4px 0 0;
  color: var(--invite-on-accent);
  font: 400 36px/1.15 var(--font-elegant, Georgia, serif);
}
.og-stage .invite-opening-date,
.oi-center .invite-opening-date,
.obl-center .invite-opening-date,
.og-greeting,
.oi-center p,
.obl-center p {
  margin: 0;
  color: var(--invite-on-accent);
  font-size: 17px;
}
.invite-opening-gift .invite-opening-btn,
.invite-opening-iris .invite-opening-btn,
.invite-opening-blinds .invite-opening-btn,
.invite-opening-wax .invite-opening-btn {
  background: var(--invite-on-accent);
  color: var(--invite-accent);
}

/* Gift: a box with a ribbon; the lid flies off, light fills the screen */
.og-box {
  position: relative;
  width: 210px;
  height: 190px;
  margin: 14px 0 4px;
}
.og-body,
.og-lid {
  position: absolute;
  left: 0;
  right: 0;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 22%), transparent 35%, rgb(255 255 255 / 12%) 80%, rgb(0 0 0 / 22%)),
    color-mix(in srgb, var(--invite-on-accent) 88%, var(--invite-accent));
  box-shadow: 0 14px 30px rgb(0 0 0 / 35%);
}
.og-body {
  bottom: 0;
  height: 128px;
  border-radius: 0 0 8px 8px;
}
.og-lid {
  top: 22px;
  left: -10px;
  right: -10px;
  height: 46px;
  border-radius: 8px;
  transition:
    transform 0.9s cubic-bezier(0.5, -0.4, 0.4, 1),
    opacity 0.5s 0.5s;
}
.og-body::before,
.og-lid::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 17px);
  width: 34px;
  background: linear-gradient(90deg, #b98a3a, #f3dd9a 50%, #b98a3a);
}
.og-bow {
  position: absolute;
  left: calc(50% - 32px);
  top: -34px;
  width: 64px;
  height: 36px;
}
.og-bow::before,
.og-bow::after {
  content: '';
  position: absolute;
  top: 0;
  width: 30px;
  height: 34px;
  border: 7px solid #e3c372;
  border-radius: 60% 40% 60% 40%;
}
.og-bow::before {
  left: 0;
  transform: rotate(-24deg);
}
.og-bow::after {
  right: 0;
  transform: scaleX(-1) rotate(-24deg);
}
.og-glow {
  position: absolute;
  left: calc(50% - 20px);
  top: 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(#fff, rgb(255 255 255 / 0%) 70%);
  opacity: 0;
  transform: scale(0.2);
}
.og-greeting {
  max-width: 300px;
}
.invite-opening-gift.is-leaving {
  transition-delay: 0.9s;
}
.invite-opening-gift.is-leaving .og-lid {
  opacity: 0;
  transform: translateY(-150px) rotate(-22deg);
}
.invite-opening-gift.is-leaving .og-glow {
  opacity: 1;
  transform: scale(60);
  transition:
    transform 1.1s ease-in 0.3s,
    opacity 0.3s 0.3s;
}

/* Ticket: torn along the perforation */
.ot-ticket {
  display: flex;
  width: min(360px, 92vw);
  filter: drop-shadow(0 18px 28px rgb(0 0 0 / 40%));
}
.ot-main,
.ot-stub {
  background: color-mix(in srgb, var(--invite-bg) 60%, #fff);
  color: var(--invite-accent);
  transition:
    transform 0.9s cubic-bezier(0.5, 0, 0.3, 1),
    opacity 0.7s 0.2s;
}
.ot-main {
  display: grid;
  flex: 1;
  gap: 6px;
  padding: 26px 22px 26px 26px;
  border-radius: 12px 0 0 12px;
  text-align: left;
  -webkit-mask:
    radial-gradient(circle 11px at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 11px at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle 11px at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 11px at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.ot-main small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.invitation .ot-main h2 {
  margin: 0;
  color: var(--invite-accent);
  font: 400 30px/1.1 var(--font-elegant, Georgia, serif);
}
.ot-main p {
  margin: 0;
  color: color-mix(in srgb, var(--invite-accent) 75%, #555);
  font-size: 15px;
}
.ot-stub {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  width: 86px;
  border-left: 2px dashed color-mix(in srgb, var(--invite-accent) 45%, transparent);
  border-radius: 0 12px 12px 0;
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 1.3;
  -webkit-mask:
    radial-gradient(circle 11px at 0 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 11px at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle 11px at 0 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 11px at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.ot-star {
  width: 26px;
  height: 26px;
  background: currentColor;
}
.invite-opening-ticket .invite-opening-btn {
  background: var(--invite-on-accent);
  color: var(--invite-accent);
}
.invite-opening-ticket.is-leaving {
  transition-delay: 0.8s;
}
.invite-opening-ticket.is-leaving .ot-main {
  opacity: 0;
  transform: translate(-70px, 10px) rotate(-8deg);
}
.invite-opening-ticket.is-leaving .ot-stub {
  opacity: 0;
  transform: translate(90px, 50px) rotate(14deg);
}

/* Lens: the circle opens from the centre (the hole grows; browsers without @property simply fade) */
@property --iris-r {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}
.invite-opening-iris {
  --iris-r: 0%;
  -webkit-mask: radial-gradient(
    circle at 50% 50%,
    transparent var(--iris-r),
    #000 calc(var(--iris-r) + 0.4%)
  );
  mask: radial-gradient(circle at 50% 50%, transparent var(--iris-r), #000 calc(var(--iris-r) + 0.4%));
}
.invite-opening-iris.is-leaving {
  opacity: 1;
  animation: iris-open 1.1s cubic-bezier(0.6, 0, 0.3, 1) forwards;
}
@keyframes iris-open {
  to {
    --iris-r: 150%;
  }
}
.oi-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.oi-ring {
  position: absolute;
  border: 2px solid color-mix(in srgb, var(--invite-on-accent) 55%, transparent);
  border-radius: 50%;
  animation: iris-pulse 3.2s ease-in-out infinite;
}
.oi-ring-1 {
  width: min(86vw, 420px);
  aspect-ratio: 1;
}
.oi-ring-2 {
  width: min(66vw, 320px);
  aspect-ratio: 1;
  animation-delay: -1.6s;
}
@keyframes iris-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.03);
  }
}
.oi-center {
  position: relative;
  max-width: 280px;
}
.oi-star {
  width: 30px;
  height: 30px;
  background: currentColor;
}

/* Blinds: slats turn one after the other */
.invite-opening-blinds {
  background: transparent;
}
.obl-stage {
  position: absolute;
  inset: 0;
  perspective: 1400px;
}
.obl-slats {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: repeat(8, 1fr);
}
.obl-slat {
  display: block;
  background: linear-gradient(
    color-mix(in srgb, var(--invite-accent) 82%, #fff),
    var(--invite-accent) 45%,
    color-mix(in srgb, var(--invite-accent) 60%, #000)
  );
  box-shadow: 0 1px 0 rgb(0 0 0 / 25%);
  transform-origin: 50% 50%;
  transition: transform 0.8s cubic-bezier(0.5, 0, 0.3, 1) calc(var(--i) * 0.07s);
}
.obl-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  align-content: center;
  padding: 20px;
  transition: opacity 0.4s;
}
.obl-star {
  width: 30px;
  height: 30px;
  background: currentColor;
}
.invite-opening-blinds.is-leaving {
  opacity: 1;
}
.invite-opening-blinds.is-leaving .obl-slat {
  transform: rotateX(90deg);
}
.invite-opening-blinds.is-leaving .obl-center {
  opacity: 0;
}

/* Wax seal: the seal cracks, the paper lifts away */
.os-paper {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(340px, 90vw);
  padding: 40px 24px 74px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(transparent 0 27px, rgb(0 0 0 / 4%) 27px 28px),
    color-mix(in srgb, var(--invite-bg) 55%, #fff);
  color: var(--invite-accent);
  margin-bottom: 30px;
  box-shadow: 0 24px 50px rgb(0 0 0 / 40%);
  transition:
    transform 0.9s cubic-bezier(0.5, 0, 0.3, 1) 0.35s,
    opacity 0.6s 0.55s;
}
.os-greeting {
  margin: 0;
  font-size: 15px;
  font-style: italic;
}
.invitation .os-paper h2 {
  margin: 4px 0 0;
  color: var(--invite-accent);
  font: 400 34px/1.15 var(--font-elegant, Georgia, serif);
}
.os-paper .invite-opening-date {
  margin: 0;
  font-size: 16px;
}
.os-seal {
  position: absolute;
  left: calc(50% - 38px);
  bottom: -30px;
  width: 76px;
  height: 76px;
  color: color-mix(in srgb, var(--invite-on-accent) 85%, #fff);
}
.os-half {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    color-mix(in srgb, var(--invite-accent) 55%, #fff),
    var(--invite-accent) 55%,
    color-mix(in srgb, var(--invite-accent) 55%, #000)
  );
  box-shadow: 0 6px 14px rgb(0 0 0 / 40%);
  transition:
    transform 0.7s cubic-bezier(0.5, 0, 0.3, 1),
    opacity 0.5s 0.2s;
}
.os-l {
  clip-path: polygon(0 0, 54% 0, 44% 30%, 58% 62%, 46% 100%, 0 100%);
}
.os-r {
  clip-path: polygon(54% 0, 100% 0, 100% 100%, 46% 100%, 58% 62%, 44% 30%);
}
.os-star {
  position: absolute;
  inset: 22px;
  background: currentColor;
  transition: opacity 0.3s;
}
.invite-opening-wax.is-leaving {
  transition-delay: 0.7s;
}
.invite-opening-wax.is-leaving .os-l {
  opacity: 0;
  transform: translate(-34px, 18px) rotate(-24deg);
}
.invite-opening-wax.is-leaving .os-r {
  opacity: 0;
  transform: translate(34px, 24px) rotate(26deg);
}
.invite-opening-wax.is-leaving .os-star {
  opacity: 0;
}
.invite-opening-wax.is-leaving .os-paper {
  opacity: 0;
  transform: translateY(-60px) scale(1.06);
}

/* --- Ambient animations of every decor (pages with animations on) -------------------------------------------------- */
.invite-motion-reveal .dc-intro .invite-eyebrow,
.invite-motion-lively .dc-intro .invite-eyebrow {
  animation: fade-up 0.8s both;
}
.invite-motion-reveal .dc-intro .invite-date,
.invite-motion-lively .dc-intro .invite-date,
.invite-motion-reveal .dc-intro .invite-message,
.invite-motion-lively .dc-intro .invite-message {
  animation: fade-up 0.9s 0.35s both;
}
@keyframes fade-up {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes sway-a {
  from {
    transform: rotate(-2.5deg);
  }
  to {
    transform: rotate(2.5deg);
  }
}
/* Envelope: photos slide out, flowers sway */
.invite-motion-reveal .bn-photo-0,
.invite-motion-lively .bn-photo-0 {
  animation: photo-out-0 1s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.invite-motion-reveal .bn-photo-1,
.invite-motion-lively .bn-photo-1 {
  animation: photo-out-1 1s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes photo-out-0 {
  from {
    transform: translateY(80px) rotate(-7deg);
    opacity: 0;
  }
  to {
    transform: rotate(-7deg);
    opacity: 1;
  }
}
@keyframes photo-out-1 {
  from {
    transform: translateY(80px) rotate(6deg);
    opacity: 0;
  }
  to {
    transform: rotate(6deg);
    opacity: 1;
  }
}
.invite-motion-reveal .bn-flower-l,
.invite-motion-lively .bn-flower-l,
.invite-motion-reveal .dc-arch-flower-l,
.invite-motion-lively .dc-arch-flower-l,
.invite-motion-reveal .dc-wash-flower-l,
.invite-motion-lively .dc-wash-flower-l {
  transform-origin: 80% 100%;
  animation: sway-a 6s ease-in-out infinite alternate;
}
.invite-motion-reveal .bn-flower-r,
.invite-motion-lively .bn-flower-r,
.invite-motion-reveal .dc-arch-flower-r,
.invite-motion-lively .dc-arch-flower-r,
.invite-motion-reveal .dc-wash-flower-r,
.invite-motion-lively .dc-wash-flower-r {
  transform-origin: 20% 100%;
  animation: sway-a 7s ease-in-out infinite alternate-reverse;
}
/* Courrier: the letter rises out of the envelope, the stamp lands */
.invite-motion-reveal .dc-mail-letter,
.invite-motion-lively .dc-mail-letter {
  animation: letter-up 1.2s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes letter-up {
  from {
    transform: translateY(90px) rotate(-2deg);
  }
  to {
    transform: rotate(-2deg);
  }
}
.invite-motion-reveal .dc-stamp,
.invite-motion-lively .dc-stamp {
  animation: stamp-in 0.6s 1.2s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.invite-motion-reveal .dc-postmark,
.invite-motion-lively .dc-postmark {
  animation: fade-up 0.8s 1.6s both;
}
@keyframes stamp-in {
  from {
    transform: scale(2.2) rotate(-20deg);
    opacity: 0;
  }
  to {
    transform: rotate(4deg);
    opacity: 1;
  }
}
/* Cœurs: the heart beats */
.invite-motion-reveal .dc-heart-photo,
.invite-motion-lively .dc-heart-photo {
  animation: beat-photo 2.8s ease-in-out infinite;
}
.invite-motion-reveal .dc-heart-ring,
.invite-motion-lively .dc-heart-ring {
  animation: beat-ring 2.8s ease-in-out infinite;
}
@keyframes beat-photo {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  15% {
    transform: translateX(-50%) scale(1.045);
  }
  30% {
    transform: translateX(-50%) scale(1.01);
  }
  45% {
    transform: translateX(-50%) scale(1.035);
  }
}
@keyframes beat-ring {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.8;
  }
  15%,
  45% {
    transform: translateX(-50%) scale(1.06);
    opacity: 1;
  }
}
/* Album: polaroids drop in, then float */
.invite-motion-reveal .dc-polaroid,
.invite-motion-lively .dc-polaroid {
  animation:
    polaroid-drop 0.9s var(--dl, 0.2s) cubic-bezier(0.2, 0.9, 0.3, 1.15) both,
    polaroid-bob 5s calc(var(--dl, 0.2s) + 1s) ease-in-out infinite alternate;
}
.dc-polaroid-0 {
  --rot: -8deg;
  --dl: 0.2s;
}
.dc-polaroid-1 {
  --rot: 3deg;
  --dl: 0.5s;
}
.dc-polaroid-2 {
  --rot: 9deg;
  --dl: 0.8s;
}
@keyframes polaroid-drop {
  from {
    transform: translateY(-110px) rotate(calc(var(--rot) * 3));
    opacity: 0;
  }
  to {
    transform: rotate(var(--rot));
    opacity: 1;
  }
}
@keyframes polaroid-bob {
  from {
    transform: translateY(0) rotate(var(--rot));
  }
  to {
    transform: translateY(-5px) rotate(calc(var(--rot) + 1.2deg));
  }
}
/* Planche: the film advances and the frames appear one after the other */
.invite-motion-reveal .dc-film-frame,
.invite-motion-lively .dc-film-frame {
  animation: fade-up 0.6s both;
}
.invite-motion-reveal .dc-film-frame:nth-child(2),
.invite-motion-lively .dc-film-frame:nth-child(2) {
  animation-delay: 0.25s;
}
.invite-motion-reveal .dc-film-frame:nth-child(3),
.invite-motion-lively .dc-film-frame:nth-child(3) {
  animation-delay: 0.5s;
}
.invite-motion-reveal .dc-film-strip::before,
.invite-motion-lively .dc-film-strip::before,
.invite-motion-reveal .dc-film-strip::after,
.invite-motion-lively .dc-film-strip::after {
  animation: sprocket 1.4s linear infinite;
}
@keyframes sprocket {
  to {
    background-position: 14px 0;
  }
}
/* Arche: the arch opens, the ring glows */
.invite-motion-reveal .dc-arch-photo,
.invite-motion-lively .dc-arch-photo {
  animation: arch-open 1.3s 0.2s ease both;
}
@keyframes arch-open {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0);
  }
}
.invite-motion-reveal .dc-arch-ring,
.invite-motion-lively .dc-arch-ring {
  animation: ring-glow 4s ease-in-out infinite;
}
@keyframes ring-glow {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
/* Palmes: the fronds sway from their base */
.invite-motion-reveal .dc-palm,
.invite-motion-lively .dc-palm {
  transform-origin: 50% 100%;
  animation: sway-a 5s ease-in-out infinite alternate;
}
.invite-motion-reveal .dc-palm-r,
.invite-motion-lively .dc-palm-r,
.invite-motion-reveal .dc-palm-r2,
.invite-motion-lively .dc-palm-r2 {
  animation-direction: alternate-reverse;
}
.invite-motion-reveal .dc-palm-l2,
.invite-motion-lively .dc-palm-l2 {
  animation-delay: -2s;
}
.invite-motion-reveal .dc-tropical .dc-round-photo,
.invite-motion-lively .dc-tropical .dc-round-photo {
  animation: float-y 6s ease-in-out infinite alternate;
}
@keyframes float-y {
  to {
    transform: translateY(-8px);
  }
}
/* Pagne: the wax bands slide in opposite directions */
.invite-motion-reveal .dc-pagne-band,
.invite-motion-lively .dc-pagne-band {
  animation: wax-slide 16s linear infinite;
}
.invite-motion-reveal .dc-pagne-band:last-child,
.invite-motion-lively .dc-pagne-band:last-child {
  animation-direction: reverse;
}
@keyframes wax-slide {
  to {
    -webkit-mask-position: 54px center;
    mask-position: 54px center;
  }
}
/* Art déco: the fans breathe, a glint crosses the frame */
.invite-motion-reveal .dc-fan,
.invite-motion-lively .dc-fan {
  animation: fan-glow 5s ease-in-out infinite alternate;
}
@keyframes fan-glow {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 0.95;
  }
}
.invite-motion-reveal .dc-deco-photo,
.invite-motion-lively .dc-deco-photo {
  position: relative;
  overflow: hidden;
}
.invite-motion-reveal .dc-deco-photo::after,
.invite-motion-lively .dc-deco-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgb(255 255 255 / 55%) 50%, transparent 60%);
  animation: glint 5s 1.5s ease-in-out infinite;
}
@keyframes glint {
  from {
    transform: translateX(-120%);
  }
  60%,
  to {
    transform: translateX(120%);
  }
}
/* Aquarelle: the washes breathe */
.invite-motion-reveal .dc-wash-blob,
.invite-motion-lively .dc-wash-blob {
  animation: breathe 7s ease-in-out infinite alternate;
}
.invite-motion-reveal .dc-wash-2,
.invite-motion-lively .dc-wash-2 {
  animation-delay: -3.5s;
}
@keyframes breathe {
  to {
    transform: scale(1.14) translate(6px, -6px);
  }
}
/* The card keeps its own sway: it is the hero element itself. */
.invite-motion-reveal .dc-hero:not(.dc-flip),
.invite-motion-lively .dc-hero:not(.dc-flip) {
  animation: fade-up 0.9s 0.1s both;
}

/* --- Reduced motion: no movement, no 3D, everything visible and still ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .invitation *,
  .invitation *::before,
  .invitation *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-rv] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
  .invite-particles {
    display: none;
  }
  .invite-motion-lively .invite-content h2 {
    animation: none;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
  .invite-motion-lively .bn-card,
  .invite-motion-lively .invite-moments li,
  .invite-gal-tilt .invite-gallery-item {
    transform: none;
    transition: none;
  }
  .invite-gallery-ring {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    height: auto;
    perspective: none;
  }
  .invite-ring-track {
    display: contents;
    animation: none;
  }
  .invite-gallery-ring .invite-gallery-item {
    position: relative;
    inset: auto;
    transform: none;
    height: 96px;
  }
  .dc-flip,
  .dc-cube-box,
  .dc-neon-glow,
  .dc-party-photo::before,
  .dc-bunting i,
  .dc-cloud,
  .invite-decor-neon h2,
  .invite-decor-neon .bn-card,
  .invite-decor-neon .invite-moments li {
    animation: none;
  }
  .dc-balloon {
    animation: none;
    opacity: 0.9;
    bottom: 8px;
  }
  .dc-flip-card,
  .dc-layer,
  .ob-cover,
  .ob-book,
  .od-door {
    transition: none;
  }
  .dc-cube-box {
    transform: rotateX(-14deg) rotateY(-24deg);
  }
  .invite-opening-book.is-leaving,
  .invite-opening-doors.is-leaving {
    animation-delay: 0s;
  }
  .og-lid,
  .og-glow,
  .ot-main,
  .ot-stub,
  .obl-slat,
  .os-paper,
  .os-half,
  .invite-opening-iris.is-leaving,
  .oi-ring {
    transition: none;
    animation: none;
  }
  .invite-opening-gift.is-leaving,
  .invite-opening-ticket.is-leaving,
  .invite-opening-wax.is-leaving {
    transition-delay: 0s;
  }

  .invitation [data-rv] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .invite-motion-glow .invite-content h2 {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

/* Shapes used by the new decors on miniatures */
.dc-m-collines-1 {
  --m: url('/art/forme/collines-1.svg');
}
.dc-m-nuage {
  --m: url('/art/forme/nuage.svg');
}
.dc-m-ballon {
  --m: url('/art/forme/ballon.svg');
}
.dc-m-petale {
  --m: url('/art/forme/petale.svg');
}
.dc-m-cube {
  --m: url('/art/forme/cube.svg');
}
.dc-m-eclair {
  --m: url('/art/forme/eclair.svg');
}
/* Neon decor with the shimmer: the sign keeps its glow */
.invite-decor-neon.invite-motion-lively .invite-content h2 {
  background: none;
  -webkit-text-fill-color: #fff;
  animation: neon-flicker 6s infinite;
}

/* --- More ways to enter and move ---------------------------------------------------------------------------------
   Each of these pages also carries .invite-motion-reveal (the decor animations and the scroll reveal come from it);
   the rules below only change how a section arrives, or what keeps moving afterwards. */
.invite-motion-zoom [data-rv]:not(.is-in) {
  opacity: 0;
  transform: scale(0.84);
}
.invite-motion-slide [data-rv]:not(.is-in) {
  opacity: 0;
  transform: translateX(-64px);
}
.invite-motion-slide [data-rv]:nth-child(even):not(.is-in) {
  transform: translateX(64px);
}
.invite-motion-flip [data-rv] {
  transform-origin: 50% 0;
}
.invite-motion-flip [data-rv]:not(.is-in) {
  opacity: 0;
  transform: perspective(900px) rotateX(-72deg) translateY(-12px);
}
.invite-motion-flip [data-rv].is-in {
  transition-duration: 0.9s;
}
.invite-motion-wipe [data-rv] {
  transition: none;
}
/* Hidden by its opacity only (a block clipped away entirely is never seen by the observer), then uncovered from the top. */
.invite-motion-wipe [data-rv]:not(.is-in) {
  opacity: 0;
  transform: none;
}
.invite-motion-wipe [data-rv].is-in {
  animation: wipe-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes wipe-in {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(-60px);
  }
}

/* Floating: cards, photos and the countdown keep bobbing, each at its own pace. The photos themselves keep their
   own transform (carousel, tilt), so the whole gallery floats instead, except the 3D carousel. */
.invite-motion-float .bn-card,
.invite-motion-float .invite-moments li,
.invite-motion-float .invite-party-list li,
.invite-motion-float .invite-gallery:not(.invite-gallery-ring),
.invite-motion-float .invite-gifts li,
.invite-motion-float .invite-datebox {
  animation: bob 6s ease-in-out infinite;
}
.invite-motion-float .invite-moments li:nth-child(2),
.invite-motion-float .invite-party-list li:nth-child(even),
.invite-motion-float .invite-gifts li:nth-child(even) {
  animation-delay: -2.4s;
  animation-duration: 7s;
}
.invite-motion-float .invite-moments li:nth-child(3) {
  animation-delay: -4.2s;
  animation-duration: 5.4s;
}
.invite-motion-float .invite-content h2 {
  animation: bob 7s ease-in-out infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

/* Golden glow: a light runs through the titles, buttons and timeline dots pulse softly. */
.invite-motion-glow .invite-content h2 {
  background: linear-gradient(
      100deg,
      var(--invite-accent) 30%,
      color-mix(in srgb, var(--invite-accent) 30%, #fff) 50%,
      var(--invite-accent) 70%
    )
    0 0 / 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4.5s ease-in-out infinite;
}
.invite-motion-glow .btn.primary,
.invite-motion-glow .invite-copy,
.invite-motion-glow .invite-timeline li::before,
.invite-motion-glow .invite-datebox {
  animation: glow-pulse 2.8s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--invite-accent) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 18px 4px color-mix(in srgb, var(--invite-accent) 55%, transparent);
  }
}

/* Behind a greeting screen the page waits: its own animations (entrances of the decor, falling shapes) start when the
   screen opens, instead of finishing unseen underneath it. */
.invitation:has(> .invite-opening:not(.is-leaving)) > :not(.invite-opening),
.invitation:has(> .invite-opening:not(.is-leaving)) > :not(.invite-opening) *,
.invitation:has(> .invite-opening:not(.is-leaving)) > :not(.invite-opening) *::before,
.invitation:has(> .invite-opening:not(.is-leaving)) > :not(.invite-opening) *::after {
  animation-play-state: paused;
}

/* While the greeting screen of a real page is up, the page behind does not scroll */
html.opening-open,
html.opening-open body {
  overflow: hidden;
}
