@font-face{font-family:ARB;font-style:normal;font-weight:700;font-display:swap;src:url('fonts/arb.woff2') format('woff2')}
@font-face{font-family:AMB;font-style:normal;font-weight:700;font-display:swap;src:url('fonts/amb.woff2') format('woff2')}

html,body{margin:0;padding:0;background:#F6F2E8}
body{min-height:100svh;display:grid;place-items:center;overflow-x:hidden;-webkit-text-size-adjust:100%}

/* ---------- invitation stage ---------- */
.wed-stage{
  position: relative;
  width: 100%;
  max-width: min(460px, calc(100svh * 900 / 2100));
  margin: 0 auto;
  aspect-ratio: 900 / 2100;
  container-type: inline-size;
  overflow: hidden;
  border-radius: 10px;
  background: #F6F2E8;
  isolation: isolate;
}
.wed-bg{
  position: absolute; inset: 0; z-index: 0;
  background-image: url('photos/page-bg.jpg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: wedBreathe 28s ease-in-out infinite alternate;
  transform-origin: 50% 42%;
  will-change: transform;
}
@keyframes wedBreathe{ from{ transform: scale(1) } to{ transform: scale(1.022) } }

.wed-pos{ position: absolute; left: 0; right: 0; z-index: 2; transform: translateY(-50%); text-align: center; padding: 0 5%; margin: 0; }
.wed-in{ opacity: 0; animation: wedDrop .95s cubic-bezier(.2,.7,.25,1) both; will-change: opacity, transform; }
@keyframes wedDrop{ from{ opacity: 0; transform: translateY(-24px) } to{ opacity: 1; transform: translateY(0) } }

.wed-title{ font-family: ARB; font-size: 13.2cqw; color: #B8912F; line-height: 1; margin: 0;
  background: linear-gradient(180deg,#A9801F 0%,#F1DCA4 22%,#CBA43C 45%,#FBEFC9 62%,#C29B33 82%,#9C7620 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(14,23,48,.28)); }
.wed-basmala{ font-family: AMB; font-size: 4.4cqw; color: #1C2B5E; margin: 0; line-height: 1.3; }
.wed-body{ font-family: AMB; font-size: 3.3cqw; color: #1C2B5E; line-height: 1.5; margin: 0; }
.wed-father{ font-family: AMB; font-feature-settings:"liga" 1,"calt" 1; letter-spacing:0; font-size: 3.5cqw; color: #1C2B5E; line-height: 1.1; margin: 0; }
.wed-father-sub{ font-family: AMB; font-size: 2.5cqw; color: #B8912F; margin: 0; line-height: 1.2; }
.wed-names{ font-family: ARB; font-size: 10.4cqw; color: #1C2B5E; line-height: 1; margin: 0; white-space: nowrap; }
.wed-heart{ display: inline-block; width: 4.6cqw; height: 4.2cqw; vertical-align: middle; margin: 0 1.6cqw; transform: translateY(-0.6cqw); }
.wed-icon{ display: block; width: 3.4cqw; height: 3.4cqw; margin: 0 auto 0.8cqw; }
.wed-label{ font-family: AMB; font-size: 3.3cqw; color: #5A6480; margin: 0; line-height: 1.2; }
.wed-value{ font-family: AMB; font-size: 5.1cqw; color: #1C2B5E; margin: 0; line-height: 1.15; }
.wed-venue{ font-family: AMB; font-size: 3.9cqw; color: #1C2B5E; margin: 0; line-height: 1.35; }
.wed-qr{ position: absolute; left: 50%; transform: translate(-50%,-50%); width: 24cqw; background: #fff; padding: 1.2cqw; border-radius: 1.6cqw; box-shadow: 0 0 0 .22cqw #C9A227; }
.wed-qr img{ display: block; width: 100%; height: auto; }
.wed-qr-wrap{ position: absolute; left: 0; right: 0; z-index: 2; top: 81%; transform: translateY(-50%); text-align: center; }
.wed-cta{ display: inline-block; margin-top: 2.2cqw; font-family: AMB; font-size: 3.2cqw; color: #1C2B5E;
  border: .25cqw solid #C9A227; border-radius: 99px; padding: 1.6cqw 4.2cqw; text-decoration: none; background: rgba(255,255,255,.55); }
.wed-closing{ font-family: ARB; font-size: 4.7cqw; color: #1C2B5E; margin: 0; line-height: 1.2; }
.wed-a{ text-decoration: none; color: inherit; }

/* petals: steady continuous drift, behind the text */
.wed-petals{ position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.wed-petal{ position: absolute; top: -8%; width: calc(3.0cqw * var(--s)); height: calc(4.6cqw * var(--s));
  opacity: 0;
  animation-name: wedFall; animation-timing-function: linear; animation-iteration-count: infinite; will-change: transform, opacity; }
@keyframes wedFall{
  0%{ transform: translate3d(0,0,0) rotate(0deg); opacity: 0 }
  6%{ opacity: .8 }
  50%{ transform: translate3d(-2.6cqw, 56cqw, 0) rotate(150deg); opacity: .72 }
  88%{ opacity: .6 }
  100%{ transform: translate3d(3.2cqw, 112cqw, 0) rotate(260deg); opacity: 0 }
}


/* quiet wedding motifs: sparkles, hearts, a pair of rings - all behind the text */
.wed-deco{ position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.wed-spark{ position: absolute; width: 2.6cqw; height: 2.6cqw; opacity: 0;
  animation-name: wedTwinkle; animation-timing-function: ease-in-out; animation-iteration-count: infinite; will-change: transform, opacity; }
@keyframes wedTwinkle{
  0%,100%{ opacity: 0; transform: scale(.5) rotate(0deg) }
  45%{ opacity: .78; transform: scale(1) rotate(22deg) }
  70%{ opacity: .22; transform: scale(.85) rotate(38deg) }
}
.wed-deco-heart{ position: absolute; width: 2.9cqw; height: 2.7cqw; opacity: 0;
  animation-name: wedRise; animation-timing-function: ease-in-out; animation-iteration-count: infinite; will-change: transform, opacity; }
@keyframes wedRise{
  0%{ opacity: 0; transform: translate3d(0,0,0) scale(.85) }
  12%{ opacity: .5 }
  50%{ opacity: .42; transform: translate3d(-1.6cqw,-34cqw,0) scale(1) }
  88%{ opacity: .3 }
  100%{ opacity: 0; transform: translate3d(1.4cqw,-70cqw,0) scale(1.05) }
}
.wed-rings{ position: absolute; width: 9cqw; height: auto; opacity: .26;
  animation: wedDrift 26s ease-in-out infinite; will-change: transform; }
@keyframes wedDrift{
  0%,100%{ transform: translate3d(0,0,0) rotate(-5deg) }
  50%{ transform: translate3d(1.4cqw,2.4cqw,0) rotate(5deg) }
}
@media (prefers-reduced-motion: reduce){ .wed-deco{ display: none } }

@media (prefers-reduced-motion: reduce){
  .wed-in{ animation: none; opacity: 1; }
  .wed-bg{ animation: none; }
  .wed-petal{ display: none; }
}




.wed-skip .pre{ display: none !important }
.wed-skip .wed-in{ animation-delay: 0s !important; animation-duration: .5s !important }

@media (prefers-reduced-motion: reduce){ .pre{ display: none } }

/* ---------- pre-roll: five beats, 2.5 s each ---------- */
.pre{position:absolute;inset:0;z-index:9;background:#F6F2E8;animation:preOut .7s ease 12.0s forwards}
.pre svg{position:absolute;inset:0;width:100%;height:100%;opacity:0;animation:beat 2.8s linear var(--d) both}
.pre svg.last{animation:beatL 2.8s linear var(--d) both}
@keyframes beat{0%{opacity:0}11%{opacity:1}89%{opacity:1}100%{opacity:0}}
@keyframes beatL{0%{opacity:0}11%{opacity:1}100%{opacity:1}}
@keyframes preOut{to{opacity:0;visibility:hidden}}
.pre-hint{position:absolute;left:0;right:0;bottom:4%;text-align:center;font-family:AMB;font-size:2.7cqw;color:#8A6A1C;opacity:.6}
.pre *{transform-box:fill-box}
/* 1 curtain */
.cl,.cr{animation:cOpen 1.9s cubic-bezier(.65,0,.3,1) calc(var(--d) + .4s) both;transform-box:view-box}
.cl{--x:-190px}.cr{--x:190px}
@keyframes cOpen{to{transform:translateX(var(--x))}}
/* 2 envelope */
.ev{animation:evIn .5s ease var(--d) both;transform-origin:50% 50%}
@keyframes evIn{from{opacity:0;transform:translateY(24px) scale(.94)}}
.cf{transform-origin:50% 0;animation:fClose .5s ease-in calc(var(--d) + .6s) forwards}
@keyframes fClose{to{transform:scaleY(0)}}
.fo{transform-origin:50% 100%;transform:scaleY(0);animation:fOpen .5s ease-out calc(var(--d) + 1.05s) forwards}
@keyframes fOpen{to{transform:scaleY(1)}}
.cd{animation:cUp 1.1s cubic-bezier(.3,.8,.3,1) calc(var(--d) + 1.25s) both}
@keyframes cUp{to{transform:translateY(-165px)}}
/* 3 names */
.mw{transform-box:fill-box;transform-origin:100% 50%;transform:scaleX(0);animation:wipe 1.5s linear calc(var(--d) + .35s) forwards}
@keyframes wipe{to{transform:scaleX(1)}}
.pen{animation:pen 1.5s linear calc(var(--d) + .35s) both}
@keyframes pen{0%{opacity:1;transform:translate(0,0)}45%{transform:translate(-110px,-14px)}100%{opacity:0;transform:translate(-250px,6px)}}
.fl{stroke-dasharray:1;stroke-dashoffset:1;animation:dash .8s ease-out calc(var(--d) + 1.7s) forwards}
.rb{stroke-dasharray:1 1;stroke-dashoffset:1;animation:dash 1.5s cubic-bezier(.3,.7,.3,1) calc(var(--d) + .3s) forwards}
.rb.r2{animation-delay:calc(var(--d) + .55s)}
@keyframes dash{to{stroke-dashoffset:0}}
.fi{opacity:0;animation:fadeIn .6s ease calc(var(--d) + 1.5s) forwards}
@keyframes fadeIn{to{opacity:1}}
/* 4 light */
.bm{opacity:0;transform-origin:50% 0;animation:beam 2.3s ease-in-out var(--d) both}
@keyframes beam{0%{opacity:0;transform:scaleX(.6)}35%{opacity:1;transform:scaleX(1)}100%{opacity:.75;transform:scaleX(1.06)}}
.tw{animation:twk 1.1s ease-in-out infinite alternate;opacity:0}
@keyframes twk{from{opacity:0}to{opacity:1}}
/* 5 rings */
.ra{animation:rA 1.3s cubic-bezier(.2,.7,.2,1) calc(var(--d) + .2s) both}
.rbb{animation:rB 1.3s cubic-bezier(.2,.7,.2,1) calc(var(--d) + .2s) both}
@keyframes rA{from{opacity:0;transform:translateX(-140px) rotate(-160deg)}to{opacity:1;transform:none}}
@keyframes rB{from{opacity:0;transform:translateX(140px) rotate(160deg)}to{opacity:1;transform:none}}
.gl{animation:glow 1s ease calc(var(--d) + 1.4s) forwards}
@keyframes glow{0%{opacity:0}40%{opacity:.5}100%{opacity:.18}}
.fl2{opacity:0;transform-origin:50% 50%;animation:spark .9s ease calc(var(--d) + 1.4s) forwards}
@keyframes spark{0%{opacity:0;transform:scale(.2) rotate(0)}40%{opacity:1;transform:scale(1.6) rotate(45deg)}100%{opacity:.9;transform:scale(1) rotate(90deg)}}
@media (prefers-reduced-motion: reduce){.pre{display:none}}
