/* Subtle per-page animations. Each layer sits behind the content, ignores taps, and is hidden for reduced-motion. */
.fx{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.kids{position:relative}
.kids,.card{overflow:hidden}
.fit{position:relative;z-index:3}

/* cover: slow falling marigold petals */
.petal{position:absolute;top:-8%;width:9px;height:13px;border-radius:70% 30% 70% 30%;opacity:0;
  background:radial-gradient(circle at 30% 30%,#ffd37a,#e98a1f);animation:petal linear infinite}
@keyframes petal{0%{transform:translate3d(0,0,0) rotate(0);opacity:0}10%{opacity:.55}
  50%{transform:translate3d(var(--dx),55vh,0) rotate(var(--r))}90%{opacity:.4}
  100%{transform:translate3d(calc(var(--dx)*-.6),112vh,0) rotate(calc(var(--r)*2));opacity:0}}

/* invocation + family: twinkling gold sparkles */
.spark{position:absolute;width:6px;height:6px;opacity:0;animation:twinkle ease-in-out infinite;
  background:radial-gradient(circle,#fff6d6 0,#f3c76c 40%,transparent 70%);border-radius:50%}
.spark::before,.spark::after{content:"";position:absolute;left:50%;top:50%;background:#f3c76c;transform:translate(-50%,-50%)}
.spark::before{width:1px;height:14px}.spark::after{width:14px;height:1px}
@keyframes twinkle{0%,100%{opacity:0;transform:scale(.4)}50%{opacity:.8;transform:scale(1)}}
.ivory .spark{filter:brightness(.8) saturate(1.3)}

/* couple page: soft shimmer sweeping across the names */
.who h3{background:linear-gradient(100deg,currentColor 40%,#d6a23a 50%,currentColor 60%);background-size:250% 100%;
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:shimmer 6s ease-in-out infinite}
@keyframes shimmer{0%,35%{background-position:120% 0}75%,100%{background-position:-60% 0}}

/* programme: flickering diyas */
#events .orn img,#invocation .orn img{transform-origin:50% 90%;animation:flicker 2.6s ease-in-out infinite}
@keyframes flicker{0%,100%{filter:brightness(1) drop-shadow(0 0 2px rgba(255,170,40,.3))}
  30%{filter:brightness(1.12) drop-shadow(0 0 7px rgba(255,170,40,.75));transform:scale(1.03)}
  60%{filter:brightness(.97) drop-shadow(0 0 3px rgba(255,170,40,.4));transform:scale(.99)}}
.glowdot{position:absolute;width:60px;height:60px;border-radius:50%;opacity:0;animation:twinkle 5s ease-in-out infinite;
  background:radial-gradient(circle,rgba(243,199,108,.5),transparent 70%)}

/* venue: slow breathing glow behind the arch */
.halo-fx{position:absolute;left:50%;top:44%;width:360px;height:360px;margin:-180px 0 0 -180px;border-radius:50%;
  background:radial-gradient(circle,rgba(243,199,108,.32),rgba(243,199,108,0) 65%);animation:breathe 7s ease-in-out infinite}
@keyframes breathe{0%,100%{transform:scale(.9);opacity:.5}50%{transform:scale(1.12);opacity:1}}

/* kids: fireworks canvas */
.fx canvas{display:block}

/* family: rising embers */
.ember{position:absolute;bottom:-4%;width:4px;height:4px;border-radius:50%;background:#f3c76c;opacity:0;animation:rise linear infinite;box-shadow:0 0 6px 1px rgba(243,199,108,.7)}
@keyframes rise{0%{transform:translate3d(0,0,0);opacity:0}15%{opacity:.7}85%{opacity:.3}100%{transform:translate3d(var(--dx),-105vh,0);opacity:0}}

/* off-screen pages stay paused */
.fx.off *{animation-play-state:paused!important}
@media (prefers-reduced-motion:reduce){.fx{display:none}.who h3{animation:none;background:none;-webkit-text-fill-color:currentColor}
  #events .orn img,#invocation .orn img{animation:none}}

/* ---- brought over from the video ---- */
/* line-by-line reveal: each block fades up from a soft blur, one after another */
.js .screen:not(.seen) .fit>*{filter:blur(6px)}
.fit>*{transition:opacity .8s ease,transform .8s cubic-bezier(.2,.7,.2,1),filter .8s ease,clip-path 1.1s cubic-bezier(.6,0,.2,1);transition-delay:calc(var(--i,0) * 110ms)}
/* cover: the names rise out of a mask */
.js .screen:not(.seen) .cover .names,.js .cover:not(.seen) .names{clip-path:inset(0 0 100% 0);transform:translateY(34px)}
.cover .names{clip-path:inset(-20% -10% -20% -10%)}
/* cover: marigolds sway gently */
.cover .corner{animation:sway 7s ease-in-out infinite;transform-origin:30% 0}
.cover .corner.tr{transform-origin:70% 0;animation-delay:-3.5s}
@keyframes sway{0%,100%{transform:rotate(0)}50%{transform:rotate(2.6deg)}}
/* programme: cards slide in from alternating sides */
.ev,.feast{transition:opacity .7s ease,transform .8s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--j,0) * 140ms + 250ms)}
.js .screen:not(.seen) .ev:nth-child(odd){opacity:0;transform:translateX(-46px)}
.js .screen:not(.seen) .ev:nth-child(even){opacity:0;transform:translateX(46px)}
.js .screen:not(.seen) .feast{opacity:0;transform:translateY(24px)}
/* venue: the arch draws in from the bottom */
.js .screen:not(.seen) .arch{clip-path:inset(100% 0 0 0)}
.arch{clip-path:inset(-4px)}
@media (prefers-reduced-motion:reduce){
  .js .screen:not(.seen) .fit>*,.js .screen:not(.seen) .ev,.js .screen:not(.seen) .feast,.js .screen:not(.seen) .arch,.js .cover:not(.seen) .names{opacity:1;transform:none;filter:none;clip-path:none}
  .cover .corner{animation:none}
}
