:root{--ease-luxury:cubic-bezier(.16,1,.3,1);--ivory:#faf7ef;--bronze:#a78355}
html{scroll-snap-type:none}
body{overflow-x:hidden;-webkit-overflow-scrolling:touch}

/* Light-led envelope reveal */
.envelope{isolation:isolate;background:#f8f4eb}
.envelope-aura{position:absolute;z-index:0;inset:18% 12%;border-radius:50%;background:radial-gradient(circle,#fff 0 9%,#fff5c8cc 24%,#e9bd6f66 43%,transparent 72%);filter:blur(18px);opacity:0;transform:scale(.35);pointer-events:none}
.opened .envelope-aura{animation:aura-open 4.8s var(--ease-luxury) forwards}
.envelope-light{position:absolute;z-index:4;inset:-35%;pointer-events:none;opacity:.18;transform:translate3d(-55%,-28%,0) rotate(18deg);background:linear-gradient(100deg,transparent 42%,#fff 48%,#fff8d6 50%,transparent 57%);filter:blur(6px);animation:light-drift 4.8s ease-in-out infinite}
.opened .envelope-light{animation:light-release 2.6s .18s var(--ease-luxury) forwards}
.envelope-sparkles{position:absolute;z-index:4;inset:0;pointer-events:none;opacity:.6}
.envelope-sparkles i{position:absolute;width:4px;height:4px;border-radius:50%;background:#fff;box-shadow:0 0 6px 2px #fff,0 0 15px 5px #eacb8c;animation:twinkle 2.6s ease-in-out infinite}
.envelope-sparkles i:nth-child(1){left:18%;top:23%;animation-delay:.2s}.envelope-sparkles i:nth-child(2){left:79%;top:29%;animation-delay:1.1s}.envelope-sparkles i:nth-child(3){left:31%;top:67%;animation-delay:1.7s}.envelope-sparkles i:nth-child(4){left:68%;top:72%;animation-delay:.7s}.envelope-sparkles i:nth-child(5){left:50%;top:48%;animation-delay:2.1s}.envelope-sparkles i:nth-child(6){left:88%;top:56%;animation-delay:1.35s}
.opened .envelope-sparkles{animation:sparkle-release 3.4s ease forwards}
.paper{filter:drop-shadow(0 10px 24px #775c3b24)}
.opened .flap{transform:translate3d(0,-108%,150px) rotateX(32deg)!important;filter:drop-shadow(0 28px 38px #4d392348) brightness(1.05)!important}
.opened .base{transform:translate3d(0,108%,0)!important}

/* The palace emerges from the envelope, then settles like a camera move. */
.hero{isolation:isolate;background:#f5eee4}
.hero .landscape{transform:scale(1.16) translateY(1.8%);filter:saturate(.92) brightness(1.05)!important;transition:transform 8.5s var(--ease-luxury),filter 4s ease!important}
.opened .hero .landscape{transform:scale(1) translateY(0);filter:saturate(1) brightness(1)!important}
.hero:before{content:'';position:absolute;z-index:2;inset:0;background:radial-gradient(circle at 50% 42%,#fffbe9b8 0,transparent 31%),linear-gradient(180deg,#fff0 45%,#fff9efda 83%,var(--ivory) 100%);opacity:0;pointer-events:none;transition:opacity 3.2s 1.2s ease}
.opened .hero:before{opacity:1}
.hero-copy{z-index:3!important;margin-top:18vh!important;padding-bottom:86px!important}
.hero-copy .names{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:clamp(30px,9vw,120px);width:min(100%,960px);margin-inline:auto;font-size:clamp(25px,5vw,56px)!important;font-weight:700!important;letter-spacing:0;text-align:center;direction:ltr}
.hero-copy .names span{display:block;white-space:nowrap;direction:rtl;unicode-bidi:isolate}
.hero-copy .names em{display:none!important}
.hero-copy .intro{font-size:16px!important}
.envelope-label{left:0!important;right:0!important;padding:0}
.envelope-label p{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;width:100%;gap:0;direction:ltr;font-size:clamp(24px,3vw,32px)!important;font-weight:700!important}
.envelope-label p span{text-align:center;direction:rtl;unicode-bidi:isolate}
@media(min-aspect-ratio:3/4){
  .envelope-label{left:max(0px,calc((100vw - 56.25svh)/2))!important;right:max(0px,calc((100vw - 56.25svh)/2))!important}
}
.kicker{font-size:12px!important}
.prompt{font-size:12px!important}
.scroll{font-size:12px!important}
.venue h2{font-size:28px}
.venue p{font-size:16px}
.closing p{font-size:16px}
.actions a,.actions button{font-size:13px;min-height:44px}
.film .venue-copy:before{content:'مدیا　　ویسی';font-size:28px}
.film .venue-copy:after{font-size:16px}
.scroll{left:50%!important;right:auto!important;width:max-content;min-width:76px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:4px;letter-spacing:0!important;line-height:1.4}
.scroll:after{content:'⌄';display:block;font-family:Arial,sans-serif;font-size:23px;line-height:.65;color:#9a784e;animation:scroll-cue 1.8s ease-in-out infinite}
.hero-copy>*{filter:blur(8px)}
.opened .hero-copy>*{filter:blur(0);transition-property:opacity,transform,filter!important}

/* Scroll choreography */
.reveal{opacity:0;transform:translate3d(0,38px,0);transition:opacity 1.15s var(--ease-luxury),transform 1.35s var(--ease-luxury)}
.reveal.in-view{opacity:1;transform:none}
.lake-showcase,.venue{isolation:isolate}
.lake-showcase:before,.venue:before{content:'';position:absolute;z-index:2;left:0;right:0;top:-1px;height:15vh;background:linear-gradient(180deg,var(--ivory),#faf7efaa 36%,transparent);pointer-events:none}
.lake-showcase img,.venue img{transform:scale(1.02);will-change:auto}
.lake-showcase:before{display:none}
.lake-showcase:after{background:transparent!important}
.blessing-copy{position:absolute;z-index:3;left:50%;bottom:8.5%;width:min(88%,660px);padding:30px 25px 28px;transform:translate(-50%,28px);text-align:center;color:#fff;text-shadow:0 2px 16px #2a1812,0 1px 4px #1b100c;opacity:0;transition:opacity 1.4s .3s ease,transform 1.7s .3s var(--ease-luxury)}
.lake-showcase.in-view .blessing-copy{opacity:1;transform:translate(-50%,0)}
.blessing-copy{display:flex;flex-direction:column;gap:3px}
.blessing-copy span{display:block;font-size:clamp(14px,2vw,16px);line-height:1.45;margin:0;color:#fff;letter-spacing:normal;word-spacing:normal}
.blessing-copy p{font-size:clamp(14px,2vw,16px);line-height:1.45;margin:0;font-weight:400;letter-spacing:normal;word-spacing:normal}
.blessing-copy strong{display:block;font-size:clamp(14px,2vw,16px);line-height:1.45;margin:0;font-weight:400;color:#fff;letter-spacing:normal;word-spacing:normal}
.venue-copy{opacity:0;transform:translateY(28px);transition:opacity 1.25s .3s ease,transform 1.5s .3s var(--ease-luxury)}
.venue.in-view .venue-copy{opacity:1;transform:none}
.closing{position:relative;background:linear-gradient(180deg,#faf7ef,#f6efe3)}
.closing.in-view .rule{animation:rule-grow 1.2s .2s var(--ease-luxury) both}
.children-note{font-size:14px!important;line-height:2!important;color:#80684c;margin:0 auto 26px;max-width:520px}

@keyframes aura-open{0%{opacity:0;transform:scale(.35)}32%{opacity:1;transform:scale(1.05)}78%{opacity:.72;transform:scale(1.9)}100%{opacity:0;transform:scale(2.4)}}
@keyframes light-drift{0%,100%{transform:translate3d(-55%,-28%,0) rotate(18deg);opacity:.08}50%{transform:translate3d(48%,22%,0) rotate(18deg);opacity:.32}}
@keyframes light-release{0%{transform:translate3d(-55%,-28%,0) rotate(18deg);opacity:.15}45%{opacity:.95}100%{transform:translate3d(58%,32%,0) rotate(18deg);opacity:0}}
@keyframes twinkle{0%,100%{opacity:.12;transform:scale(.45)}50%{opacity:1;transform:scale(1.6)}}
@keyframes sparkle-release{0%{opacity:.7;transform:scale(1)}60%{opacity:1;transform:scale(1.08)}100%{opacity:0;transform:scale(1.3)}}
@keyframes rule-grow{from{opacity:0;transform:scaleX(.15)}to{opacity:1;transform:scaleX(1)}}
@keyframes count-rise{from{opacity:0;transform:translateY(32px)}to{opacity:1;transform:none}}
@keyframes text-rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes scroll-cue{0%,100%{transform:translateY(0);opacity:.55}50%{transform:translateY(5px);opacity:1}}

@media(max-width:480px){.reveal{transform:translate3d(0,28px,0)}.envelope-aura{inset:24% 4%}.hero-copy{margin-top:14vh!important;padding-inline:10px!important}.hero-copy .names{font-size:clamp(21px,5.8vw,27px)!important;gap:clamp(24px,7vw,38px)}.hero-copy .intro{font-size:16px!important}.blessing-copy{bottom:6%;padding-inline:15px}}
@media(prefers-reduced-motion:reduce){html{scroll-snap-type:none}.envelope-aura,.envelope-light,.envelope-sparkles{display:none}.reveal,.blessing-copy,.venue-copy{opacity:1;transform:none;filter:none;transition:none}.blessing-copy{transform:translate(-50%,0)}.lake-showcase img,.venue img{transform:none}.hero-copy>*{filter:none}}
