/* Mehfil-e-Gul: isolated rose, jasmine, ivory paper and antique gold. */
.opening-overlay.op-gul{padding:0;display:block;overflow:hidden;background:#F8F4EC;color:#304638;isolation:isolate}
.op-gul .mg-opening-board{position:absolute;top:0;left:50%;height:100%;width:max(100%,calc(100dvh * .5625));transform:translateX(-50%);direction:ltr;perspective:1400px}
.mg-envelope,.mg-envelope-back,.mg-envelope-front,.mg-flap,.mg-letter{position:absolute;inset:0}
/* Separate paper faces and seal let the flap hinge upward without duplicate artwork. */
.mg-envelope-back,.mg-envelope-front,.mg-flap{background:#F8F4EC url('/themes/mehfil-e-gul/envelope-paper.webp') center/100% 100% no-repeat;backface-visibility:hidden}
.mg-envelope-back{z-index:0;transition:opacity .6s ease 1.6s}.mg-envelope-back:after{content:'';position:absolute;inset:0;background:#F8F4EC;clip-path:polygon(0 23%,100% 23%,50% 53%)}
.mg-flap{z-index:3;backface-visibility:visible;clip-path:polygon(0 23%,100% 23%,50% 53%);transform-origin:50% 23%;transform:rotateX(0deg);transition:transform 1.35s cubic-bezier(.35,0,.2,1) .35s;will-change:transform}
.mg-envelope-front{z-index:2;clip-path:polygon(0 23%,50% 53%,100% 23%,100% 100%,0 100%);transition:transform 1.1s cubic-bezier(.4,0,.2,1) 1.55s,opacity .65s ease 1.85s;will-change:transform,opacity}
.mg-envelope{z-index:2;perspective:1400px;transition:opacity .3s ease 2.5s}
.mg-envelope:before{content:'';position:absolute;inset:0;z-index:4;background:url('/themes/mehfil-e-gul/cover.webp') center/100% 100% no-repeat;pointer-events:none}
.mg-wax{position:absolute;z-index:4;left:34%;top:39%;width:32%;height:19%;background:url('/themes/mehfil-e-gul/cover.webp') 50% 48.148%/312.5% 526.316% no-repeat;clip-path:ellipse(49% 49% at 50% 50%);opacity:0;pointer-events:none}
.mg-letter{z-index:1;background:#F8F4EC;opacity:1;overflow:hidden}
.mg-letter:before{content:'';position:absolute;top:0;left:2%;width:96%;height:27%;background:url('/themes/mehfil-e-gul/frame.webp') center top/100% auto no-repeat;pointer-events:none}
.mg-letter-copy{position:absolute;inset:21% 12% 35%;display:flex;flex-direction:column;justify-content:center;text-align:center;gap:8px;overflow:auto;overflow-wrap:anywhere}.mg-letter-copy p{font:15px/1.6 'Cormorant Garamond',Georgia,serif;margin:0}.mg-letter-copy strong{font:400 34px/1.15 'Cormorant Garamond',Georgia,serif}.mg-letter-copy em{display:block;font-size:24px;color:#92743a}.mg-letter>.mg-garden{position:absolute;bottom:0;left:0;width:100%}
.mg-seal,.mg-open{position:absolute;z-index:5;color:#304638;cursor:pointer}.mg-seal{left:34%;top:39%;width:32%;height:19%;padding:0;border:0;background:transparent;color:#4f3817;font:32px/1.2 'Cormorant Garamond',Georgia,serif;overflow-wrap:anywhere}.mg-seal span{display:block;max-height:100%;overflow:hidden}.mg-cover-names{position:absolute;left:12%;right:12%;top:65%;max-height:12%;overflow:auto;z-index:4;text-align:center;font:34px/1.2 'Cormorant Garamond',Georgia,serif;overflow-wrap:anywhere}.mg-cover-names em{font-style:normal;color:#92743a}.mg-open{bottom:17%;left:22%;width:56%;min-height:44px;border:1px solid #a38345;border-radius:26px;background:#F8F4ECe8;padding:9px 12px;font:18px/1.4 'Cormorant Garamond',Georgia,serif}.mg-open span{margin-inline-start:8px}.mg-skip{position:absolute;top:max(12px,env(safe-area-inset-top));right:12px;z-index:6;min-height:44px;padding:8px 12px;border:1px solid #a3834560;border-radius:22px;background:#F8F4ECef;color:#304638;font:12px/1.4 Georgia,serif;cursor:pointer}
.op-gul.is-opening .mg-envelope:before{opacity:0}.op-gul.is-opening .mg-wax{animation:mg-seal-release .38s ease-out both}.op-gul.is-opening .mg-flap{transform:rotateX(180deg)}.op-gul.is-opening .mg-envelope-front{transform:translate3d(0,100%,0);opacity:0}.op-gul.is-opening .mg-envelope-back,.op-gul.is-opening .mg-envelope{opacity:0;pointer-events:none}.op-gul.is-opening :is(#openInvite,#openMonogram){display:none!important}.op-gul.is-opening .mg-cover-names{opacity:0;transition:opacity .2s}
@keyframes mg-seal-release{from{opacity:1;transform:translate3d(0,0,0) scale(1)}to{opacity:0;transform:translate3d(0,-14px,60px) scale(1.08)}}
/* Approved full upper-flap reveal. */
.opening-overlay.op-gul{background:transparent}
.op-gul .mg-letter{display:none}
.op-gul .mg-opening-board{perspective:none}
.op-gul .mg-envelope{perspective:1400px;transform-style:preserve-3d;transition:transform 1.1s cubic-bezier(.4,0,.2,1) 1.65s,opacity .5s ease 2.1s}
.op-gul .mg-envelope-back{clip-path:inset(0 0 77%);transition:none}
.op-gul .mg-envelope-back:after{display:none}
.op-gul .mg-flap{inset:auto;left:0;top:23%;width:100%;height:30%;background:none;clip-path:none;transform-origin:50% 0;transform-style:preserve-3d;backface-visibility:visible;transition:transform 1.35s cubic-bezier(.35,0,.2,1) .35s}
.op-gul .mg-flap:before,.op-gul .mg-flap:after{content:'';position:absolute;inset:0;clip-path:polygon(0 0,100% 0,50% 100%);backface-visibility:hidden}
.op-gul .mg-flap:before{background:#F8F4EC url('/themes/mehfil-e-gul/envelope-paper.webp') 50% 32.857%/100% 333.333% no-repeat}
.op-gul .mg-flap:after{background:linear-gradient(155deg,#e8deca,#faf5ea 45%,#eee3d1);transform:rotateX(180deg)}
.op-gul .mg-envelope-front{transition:none}
.op-gul.is-opening .mg-flap{transform:rotateX(180deg)}
.op-gul.is-opening .mg-envelope-front{transform:none;opacity:1}
.op-gul.is-opening .mg-envelope-back{opacity:1}
.op-gul.is-opening .mg-envelope{transform:translate3d(0,105%,0);opacity:0}
@media(prefers-reduced-motion:reduce){.op-gul *{transition:none!important;animation:none!important}}
/* Deterministic two-face fold: no nested 3D clipping or transparent paper gaps. */
.op-gul .mg-envelope{background:#F8F4EC;transform-style:flat}
.op-gul .mg-flap{transform-style:flat;transform:scaleY(1);transition:none;backface-visibility:visible}
.op-gul .mg-flap:before,.op-gul .mg-flap:after{backface-visibility:visible}
.op-gul .mg-flap:before{opacity:1}
.op-gul .mg-flap:after{transform:none;opacity:0;background:linear-gradient(150deg,#eee5d5,#faf5ea 55%,#e4d8c4)}
.op-gul.is-opening .mg-flap{transform:scaleY(-1);animation:mg-paper-fold 1.35s cubic-bezier(.35,0,.2,1) .35s both}
.op-gul.is-opening .mg-flap:before{animation:mg-fold-front 1.35s linear .35s both}
.op-gul.is-opening .mg-flap:after{animation:mg-fold-back 1.35s linear .35s both}
@keyframes mg-paper-fold{0%{transform:scaleY(1)}50%{transform:scaleY(0)}100%{transform:scaleY(-1)}}
@keyframes mg-fold-front{0%,49.99%{opacity:1}50%,100%{opacity:0}}
@keyframes mg-fold-back{0%,49.99%{opacity:0}50%,100%{opacity:1}}
/* Full upper panel, hinged at the envelope's top edge. */
.op-gul .mg-envelope-back{display:none}
.op-gul .mg-flap{top:0;height:53%;transform-origin:50% 0}
.op-gul .mg-flap:before,.op-gul .mg-flap:after{clip-path:polygon(0 0,100% 0,100% 43.396%,50% 100%,0 43.396%)}
.op-gul .mg-flap:before{background-position:50% 0;background-size:100% 188.679%}
.op-gul.is-opening .mg-envelope-front{opacity:1}
/* Clear the opened flap before the envelope body begins its downward exit. */
.op-gul.is-opening .mg-flap{animation:mg-paper-fold 1.35s cubic-bezier(.35,0,.2,1) .35s both,mg-flap-clear .08s linear 1.55s forwards}
@keyframes mg-flap-clear{to{opacity:0;visibility:hidden}}
/* Reveal the real card through the envelope mouth as the upper flap lifts. */
.op-gul .mg-envelope{background:transparent}

body[data-theme=gul] #invitation{container-type:inline-size;background:#F8F4EC;color:var(--base-text)}
body[data-theme=gul] #invitation .topbar{background:#697A64;color:#fffdf5;border-bottom:1px solid #A38345;padding:12px 24px;min-height:56px}
body[data-theme=gul] #invitation .topbar :is(.monogram,a,button){color:#fffdf5}body[data-theme=gul] #invitation .topbar button{background:transparent;border:0;border-inline-start:1px solid #fffdf580;border-radius:0}
body[data-theme=gul] #invitation :is(.mg-hero,.mg-section){--mg-width:100cqw;box-sizing:border-box;position:relative;display:block;width:100%;margin:18px 0;min-height:0;padding:0;border-style:solid;border-color:transparent;border-width:calc(var(--mg-width) * .3515625) calc(var(--mg-width) * .08203125) calc(var(--mg-width) * .1953125);border-image:url('/themes/mehfil-e-gul/frame.webp') 360 84 200 84 fill / 1 / 0 stretch repeat;background:#F8F4EC;color:var(--base-text);overflow:hidden}
body[data-theme=gul] #invitation .mg-hero{margin-top:0}
body[data-theme=gul] #invitation :is(.mg-hero,.mg-section):before,body[data-theme=gul] #invitation :is(.mg-hero,.mg-section):after{content:none}
.mg-hero-copy,.mg-copy{padding:4px 6px 12px;text-align:center;min-width:0;overflow-wrap:anywhere}.mg-hero-copy p{font:18px/1.6 'Cormorant Garamond',Georgia,serif;margin:12px 0;color:var(--base-text)}.mg-guest{font-size:16px!important}.mg-guest strong{display:block}
body[data-theme=gul] #invitation .mg-names{font:400 54px/1.02 'Cormorant Garamond',Georgia,serif;margin:18px 0;color:var(--base-heading);overflow-wrap:anywhere}.mg-names span,.mg-names em{display:block}.mg-names em{font:400 38px/1.15 'Cormorant Garamond',Georgia,serif;color:#92743a}.mg-divider{display:flex;align-items:center;justify-content:center;gap:10px;max-width:160px;margin:16px auto;color:#A38345;font:22px/1 Georgia,serif}.mg-divider:before,.mg-divider:after{content:'';height:1px;width:55px;background:#A38345}.mg-hero-copy .mg-welcome{font-size:17px}.mg-hero-copy .mg-date{font-size:20px;margin-bottom:4px}
.mg-garden{width:100%;overflow:hidden}.mg-garden img{display:block;width:100%;height:auto;max-width:none}.mg-portrait,.mg-venue{width:80%;max-height:250px;object-fit:cover;margin:16px auto;box-sizing:border-box;border:1px solid #A38345}.mg-portrait{display:block;border-radius:100px 100px 0 0}.mg-venue{padding:3px;overflow:hidden}.mg-venue img{display:block;width:100%;max-height:238px;object-fit:cover}.mg-default-venue{margin:14px 0}.mg-default-venue figcaption{font:14px/1.6 Georgia,serif;color:var(--base-muted);padding-top:8px}
body[data-theme=gul] #invitation .section h2{font:400 36px/1.15 'Cormorant Garamond',Georgia,serif;color:var(--base-heading);margin:10px 0 22px;overflow-wrap:anywhere}body[data-theme=gul] #invitation .small{font:10px/1.7 Georgia,serif;letter-spacing:1px;color:var(--base-muted)}
body[data-theme=gul] #invitation .mg-events{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin:18px 0 0}
body[data-theme=gul] #invitation .mg-event{position:relative;box-sizing:border-box;display:grid;grid-template-columns:minmax(70px,30%) minmax(0,1fr);align-items:center;width:100%;min-width:0;min-height:172px;padding:12px 8px;outline:1px solid #A3834580;outline-offset:-5px;border:1px solid #A38345;border-radius:14px;background:transparent;box-shadow:none}
.mg-event-art{width:100%;aspect-ratio:1/1;background-image:url('/themes/mehfil-e-gul/events.webp');background-size:300% 100%;background-repeat:no-repeat;mix-blend-mode:multiply;align-self:center}.mg-event-art-0{background-position:0 50%}.mg-event-art-1{background-position:50% 50%}.mg-event-art-2{background-position:100% 50%}.mg-event-copy{min-width:0;padding:5px 3px}.mg-event-copy p{overflow-wrap:anywhere}
body[data-theme=gul] #invitation .mg-event h3{font:400 31px/1.15 'Cormorant Garamond',Georgia,serif;color:var(--base-heading);margin:0 0 6px}body[data-theme=gul] #invitation .mg-event p{font:16px/1.4 'Cormorant Garamond',Georgia,serif;margin:4px 0;color:var(--base-text)}body[data-theme=gul] #invitation .mg-event :is(.mg-time,.mg-address){font-size:14px}
.mg-event-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;margin-top:9px}.mg-event-actions :is(a,button){display:inline-flex;align-items:center;justify-content:center;min-height:44px;box-sizing:border-box;max-width:100%;padding:6px 10px;background:transparent;color:#304638;border:1px solid #92743a;border-radius:22px;font:14px/1.3 'Cormorant Garamond',Georgia,serif;text-decoration:none;cursor:pointer}
body[data-theme=gul] #invitation .counter{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}body[data-theme=gul] #invitation .counter>div{min-width:0;border:1px solid #a3834580;background:transparent;padding:12px 1px}body[data-theme=gul] #invitation .counter strong{font-size:26px;color:var(--base-text)}body[data-theme=gul] #invitation .counter span{font-size:8px;letter-spacing:0;color:var(--base-muted)}
body[data-theme=gul] #invitation :is(.form-box,.upload-panel,.moment,.venue-frame){box-sizing:border-box;min-width:0;max-width:100%;padding:16px 6px;background:transparent;color:var(--base-text);box-shadow:none}body[data-theme=gul] #invitation :is(input,select,textarea){box-sizing:border-box;max-width:100%}
body[data-theme=gul] #invitation .mg-section .guest-actions .button{background:transparent;color:#304638;border:1px solid #92743a;border-radius:22px;text-transform:none;letter-spacing:0;font:18px/1.5 'Cormorant Garamond',Georgia,serif;padding:10px 14px}
body[data-theme=gul] #invitation footer.dark{margin:18px 0 0;padding:36px 24px;background:#697A64;color:#fffdf5;border:1px solid #A38345}body[data-theme=gul] #invitation footer :is(.script,a,button,.small,.company-name){color:#fffdf5}body[data-theme=gul] #invitation footer .script{font:32px/1.4 'Cormorant Garamond',Georgia,serif;overflow-wrap:anywhere}
body[data-theme=gul][dir=rtl] #invitation :is(.mg-names,.section h2,.mg-event h3){font-family:'Noto Nastaliq Urdu',serif;font-style:normal;font-size:28px;line-height:2}body[data-theme=gul][dir=rtl] #invitation :is(.mg-hero-copy p,.small,.mg-event p,.mg-event-actions a,.mg-event-actions button){font-family:'Noto Nastaliq Urdu',serif;line-height:2.2;letter-spacing:0}.op-gul[lang=ur] :is(.mg-open,.mg-skip,.mg-cover-names,.mg-letter-copy p){font-family:'Noto Nastaliq Urdu',serif;letter-spacing:0;line-height:2}.op-gul[lang=ur] .mg-cover-names{font-size:25px}
@media(min-width:768px){.op-gul .mg-opening-board{width:max(100%,calc(min(900px,100dvh) * .5625))}}
@container invitation (max-width:359px){body[data-theme=gul] #invitation .mg-names{font-size:45px}body[data-theme=gul] #invitation .mg-event{grid-template-columns:minmax(55px,28%) minmax(0,1fr);padding:10px 6px}body[data-theme=gul] #invitation .mg-event h3{font-size:26px}.mg-event-actions :is(a,button){font-size:13px;padding:6px 7px}}

@media(max-width:359px){.mg-cover-names{font-size:27px}.mg-seal{font-size:27px}.mg-open{font-size:16px}}
@media(max-height:540px){.mg-cover-names{font-size:24px}.mg-open{font-size:14px;bottom:12%;min-height:36px}.mg-seal{font-size:25px}}
body:has(.template-enquiry-bar) .op-gul .mg-open{bottom:max(19%,145px)}
@media(prefers-reduced-motion:reduce){.op-gul *{animation:none!important;transition:none!important}}
body[data-theme=gul] #invitation .mg-names>span{font:inherit;line-height:inherit;color:inherit}
body[data-theme=gul] #invitation .mg-names>em{font:400 38px/1.15 'Cormorant Garamond',Georgia,serif;color:#92743a}
body[data-theme=gul] #invitation .mg-event:before,body[data-theme=gul] #invitation .mg-event:after{content:'';position:absolute;right:5px;width:25px;height:34px;background-image:url('/themes/mehfil-e-gul/frame.webp');background-size:250px 375px;background-repeat:no-repeat;pointer-events:none}
body[data-theme=gul] #invitation .mg-event:before{bottom:5px;background-position:right bottom}
body[data-theme=gul] #invitation .mg-event:after{top:5px;background-position:right top}
body[data-theme=gul] #invitation .mg-event:before{mix-blend-mode:multiply;mask-image:radial-gradient(ellipse at bottom right,#000 35%,transparent 85%)}
body[data-theme=gul] #invitation .mg-event:after{mix-blend-mode:multiply;mask-image:radial-gradient(ellipse at top right,#000 35%,transparent 85%)}
