:root{--stage-width:min(100vw,56.388svh);--ink:#fff5df;--ink-display:#fff5df}
html,body{height:100%;overflow:hidden}body{background:#6f4540}
.garden-stage,.page{position:fixed;top:0;bottom:0;left:50%;width:var(--stage-width);height:100svh;transform:translateX(-50%);max-width:none;margin:0}
.garden-stage{background:#ac6962;overflow:hidden;box-shadow:0 0 100px #301f2140}.garden-stage video{width:100%;height:100%;object-fit:cover;display:block}.garden-stage:after{content:'';position:absolute;inset:0;background:linear-gradient(#36191638,transparent 68%);pointer-events:none}
.page{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;background:transparent;isolation:auto;box-shadow:none;overscroll-behavior-x:contain;z-index:1}
.page::-webkit-scrollbar{display:none}.page:after{display:none}
.section,.section.intro,.section.couple,.section.summary{flex:0 0 100%;width:100%;height:100%;min-height:0;padding:0;display:block;background:transparent;scroll-snap-align:start;scroll-snap-stop:always;overflow:hidden}
.safe-area{position:absolute;left:7%;right:7%;top:max(22px,env(safe-area-inset-top));height:59%;display:flex;align-items:center;justify-content:center}
.page-content{width:100%;flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:10px;transform-origin:center center;text-align:center}
.js .reveal,.js .reveal.is-visible{opacity:1;transform:none;filter:none;transition:none}.js [data-reveal],.js .stagger{opacity:1;transform:none;transition:none}
.stack{gap:10px}.family{font-size:14px;line-height:1.5}.wording{font-size:16px}.bismillah__en{font-size:13px}.bismillah__img{width:235px;filter:brightness(0) invert(94%) sepia(10%) saturate(370%)}.divider{width:132px;margin-block:6px;filter:brightness(0) invert(94%) sepia(10%) saturate(370%)}
.couple__name{font-size:31px}.couple__with{font-size:19px;margin:2px 0}.date__side{font-size:18px;padding:2px 6px}.date__day{font-size:60px}.date__month{font-size:21px;margin:0}.display-sm{font-size:20px}.btn{min-height:42px;margin-top:4px;font-size:13px;padding:0 20px;background:#6e353322}.glow{animation:none}
.summary__card{padding:0;background:none;border:0;gap:5px}.summary__name{font-size:24px}.summary__date{margin-top:5px;font-size:14px}.summary__time,.summary__venue{font-size:14px}.summary__qr{width:96px;margin-top:5px}.summary__qr-label{font-size:10px;margin-bottom:0}.summary__card .divider{display:none}.countdown__label{font-size:10px}.countdown__num{font-size:30px}.countdown__grid{gap:7px}.closing__label{font-size:12px}.closing__line{font-size:16px}.inshallah{margin:0}
.scroll-hint,.petals{display:none!important}.page-nav{position:fixed;left:50%;top:63%;transform:translateX(-50%);width:calc(var(--stage-width) - 50px);z-index:4;display:flex;align-items:center;justify-content:center;gap:24px;font-size:12px;color:#fff5df}.page-nav button{width:44px;height:44px;border:1px solid #fff5df70;border-radius:50%;background:#783f3930;color:inherit;font-size:22px;cursor:pointer}.page-nav button:disabled{opacity:.25;cursor:default}.sealed .page-nav,.sealed .motion-toggle{visibility:hidden}.motion-toggle{position:fixed;z-index:5;bottom:max(10px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);border:0;background:#2e342ad9;color:#fff5df;border-radius:20px;padding:8px 14px;font:11px var(--font-body);cursor:pointer;min-height:32px}
.envelope__hint{color:#64584a}.sheet{--ink:#64584a;--ink-display:#64584a}.sheet .btn{background:none}
/* Full-screen phone composition; retain an invitation-sized canvas on desktop. */
:root{--stage-width:min(100vw,56.388dvh);--envelope:#aa6961}
.garden-stage,.page{height:100dvh}.garden-stage video{object-position:center bottom}.garden-stage:after{background:linear-gradient(#35191628,transparent 66%)}
@media(max-width:600px){:root{--stage-width:100vw}}
.safe-area{top:max(22px,env(safe-area-inset-top));height:58%;left:8%;right:8%}.page-content{transform:none!important}
.page-nav{top:62%;gap:6px;font-size:9px;letter-spacing:.15em;width:auto;color:#fff3dcc9}.page-nav button{width:32px;height:36px;border:0;background:none;border-radius:0;font-size:14px;padding:0}.page-nav button:disabled{opacity:.15}[data-page-count]{font-size:8px;letter-spacing:.2em}
.motion-toggle{font-size:0;width:36px;height:36px;min-height:0;padding:0;background:#26362b30;border:1px solid #fff3dc40;color:#fff3dcb3}.motion-toggle:before{content:'Ⅱ';font-size:12px}.motion-toggle.is-paused:before{content:'▷'}
.envelope::before{background:#aa6961}.envelope__flap{background-image:var(--grain)}.envelope__flap--left,.envelope__flap--right{background-color:#995d57;background-image:var(--grain)}.envelope__flap--bottom{background-color:#b8766b;background-image:linear-gradient(#ad6c6500,#ad6c6500),url('../assets/img/garden.webp?v=f99e653');background-size:cover;background-position:center bottom}.envelope__flap--top{background-color:#b57970;background-image:linear-gradient(150deg,#d79d851f,transparent 65%),var(--grain);filter:drop-shadow(0 2px 1px #56382b50)}.envelope__hint{color:#f1dbc0;font-size:12px;letter-spacing:.09em;bottom:17%}.envelope__seal{width:92px;height:92px;left:calc(50% - 46px);top:calc(60% - 65px);filter:drop-shadow(0 3px 5px #46352855)}
.butterfly-path{position:absolute;z-index:1;top:70%;left:15%;width:18px;height:18px;pointer-events:none;animation:garden-flight 24s ease-in-out infinite;opacity:.76}.butterfly{width:18px;height:18px;overflow:visible;filter:drop-shadow(0 1px 1px #3b403130)}.wing-left{transform-origin:10px 11px;animation:wing-left .65s ease-in-out infinite alternate}.wing-right{transform-origin:10px 11px;animation:wing-right .65s ease-in-out infinite alternate}
@keyframes wing-left{to{transform:scaleX(.3)}}@keyframes wing-right{to{transform:scaleX(.35)}}
@keyframes garden-flight{0%,100%{transform:translate(0,0) rotate(-12deg)}20%{transform:translate(12vw,-25px) rotate(15deg)}45%{transform:translate(25vw,12px) rotate(30deg)}68%{transform:translate(37vw,-37px) rotate(-20deg)}85%{transform:translate(13vw,-12px) rotate(-35deg)}}
.motion-paused .butterfly-path,.motion-paused .butterfly path{animation-play-state:paused}
@media(min-width:601px){.envelope{width:var(--stage-width);left:50%!important;right:auto!important;transform:translateX(-50%)}}

/* Original illustration with a live SVG foliage layer, no video decoding. */
.garden-art{display:block;width:100%;height:100%;overflow:hidden}
.garden-stage{background:#ac6d65 url('../assets/img/garden.webp?v=f99e653') center bottom/cover no-repeat}
.sealed .butterfly-path,.sealed .butterfly path{animation-play-state:paused}


/* Match the supplied portrait video's coordinates without cropping its borders. */
:root{--stage-width:min(100vw,56.263736dvh);--stage-height:min(100dvh,177.734375vw)}
body{background:#a6695b}
.garden-stage,.page{top:50%;bottom:auto;width:var(--stage-width);height:var(--stage-height);transform:translate(-50%,-50%)}
.garden-stage{background:#a6695b url('../assets/video/invite-loop-poster.jpg?v=f99e653') center/contain no-repeat}
.garden-stage video{object-fit:contain;object-position:center}.garden-stage:after{display:none}
.safe-area{left:20%;right:20%;top:24%;height:49%}
.page-content{gap:8px;text-shadow:0 1px 2px #60392a30}.stack{gap:8px}
.family{font-size:13px;line-height:1.45}.wording{font-size:14px}.bismillah__en{font-size:12px}.bismillah__img{width:210px}
.couple__name{font-size:26px}.couple__with{font-size:17px}.display-sm{font-size:19px}
.date{gap:8px}.date__side{font-size:13px;padding:3px}.date__day{font-size:48px}.date__month{font-size:19px;letter-spacing:.06em}
.btn{min-height:40px;font-size:11px;padding:0 12px;max-width:100%;text-align:center;line-height:1.3}
.countdown__grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.countdown__num{font-size:25px}.countdown__label{font-size:8px}
.summary__name{font-size:22px}.summary__qr{width:76px}.summary__date,.summary__time,.summary__venue{font-size:12px}
.page-nav{top:calc(50% + var(--stage-height)*.26);height:40px}.page-nav button{width:40px;height:40px}
.motion-toggle{bottom:auto;top:calc(50% + var(--stage-height)*.43)}
.envelope__flap--bottom{background-image:url('../assets/video/invite-loop-poster.jpg?v=f99e653');background-position:center;background-size:cover}
.section:not(.intro):not(.couple):not(.summary){padding:0}

/* Vertical reading window, wholly inside the video's clear central area. */
@font-face{font-family:'Great Vibes';src:url('../assets/fonts/great-vibes.woff2?v=f99e653') format('woff2');font-style:normal;font-weight:400;font-display:swap}
:root{--stage-width:min(100vw,56.263736svh);--stage-height:min(100svh,177.734375vw)}
.garden-stage{top:50%;width:var(--stage-width);height:var(--stage-height);overflow:visible}
.garden-stage video{width:100%;height:100%;object-fit:contain!important;object-position:center!important}
.page{top:calc(50% - var(--stage-height)*.005);width:calc(var(--stage-width)*.64);height:calc(var(--stage-height)*.51);display:block;overflow-x:hidden;overflow-y:auto;scroll-snap-type:none;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scroll-behavior:smooth}
.section,.section.intro,.section.couple,.section.summary{height:auto;min-height:100%;width:100%;padding:18px 3px!important;display:flex;align-items:center;justify-content:center;overflow:visible;scroll-snap-align:none}
.page-content{width:100%;gap:13px;transform:none!important;zoom:1!important;flex-shrink:0}
.stack{gap:12px}.family{font-size:15px;line-height:1.5}.wording{font-size:16px;line-height:1.55}.bismillah__en{font-size:14px}.display-sm{font-size:21px}
.couple__name,.summary__name{font-family:'Great Vibes',cursive;font-size:53px;line-height:1.2;font-weight:400;letter-spacing:0;text-transform:none;padding:3px 5px}
.couple__with,.summary__with{font-family:var(--font-body);font-style:italic;font-size:16px;letter-spacing:0;margin:0}
.date__side{font-size:15px}.date__day{font-size:55px}.date__month{font-size:21px}.btn{font-size:12px;min-height:44px}
.summary__date,.summary__time,.summary__venue{font-size:15px}.summary__card{gap:10px}.summary__qr{width:85px}.closing__line{font-size:18px}.closing__label{font-size:13px}.countdown__num{font-size:29px}.countdown__label{font-size:9px}
.page-nav{top:calc(50% + var(--stage-height)*.275)}

/* Discrete vertical swipe pages: one invitation panel visible at a time. */
.page{top:50%;width:var(--stage-width);height:var(--stage-height);overflow:hidden;touch-action:pinch-zoom;scroll-behavior:auto}
.section,.section.intro,.section.couple,.section.summary{position:absolute;left:18%;top:24%;width:64%;height:51%;min-height:0;padding:0!important;display:flex;align-items:center;justify-content:center;overflow:visible;opacity:0!important;visibility:hidden;pointer-events:none;transition:none!important}
.section.is-current{opacity:1!important;visibility:visible;pointer-events:auto}
.page-content{width:100%;transform:scale(var(--content-scale,1))!important;transform-origin:center;will-change:auto}
.section.is-current .page-content{animation:page-pop .55s cubic-bezier(.2,.7,.2,1) both}
@keyframes page-pop{from{opacity:0;translate:0 22px;scale:.96}to{opacity:1;translate:0 0;scale:1}}

/* Readable type; dense content is distributed across separate panels. */
.section,.section.intro,.section.couple,.section.summary{left:17%;top:21%;width:66%;height:57%}
.page-content,.stack{gap:10px}
.family,.summary__date,.summary__time,.summary__venue{font-size:18px;line-height:1.4}
.wording{font-size:19px;line-height:1.4}.bismillah__en{font-size:17px;line-height:1.4}
.display-sm{font-size:24px;line-height:1.25}.couple__name,.summary__name{font-size:62px;line-height:1.1}
.couple__with,.summary__with{font-size:19px}.summary__card{gap:8px}
.date__side{font-size:17px}.date__day{font-size:64px}.date__month{font-size:23px}
.btn{font-size:15px;min-height:44px;padding:7px 12px}
.countdown__title{font-size:25px}.countdown__num{font-size:35px}.countdown__label{font-size:11px;letter-spacing:0}
.closing__line{font-size:21px;line-height:1.4}.closing__label{font-size:16px}.inshallah{font-size:32px}
.summary__qr{width:120px}.summary__qr-label{font-size:13px}.divider{width:110px;margin:3px 0}
.bismillah__img{width:225px}.page-nav{top:calc(50% + var(--stage-height)*.30)}
[data-page-count]{font-size:11px}.page-nav button{font-size:18px}
@media(max-height:550px){.page-content{max-height:100%;overflow-y:auto;overscroll-behavior:contain}.page{touch-action:pan-y}}

/* Preserve the original five groups with compact spacing and readable type. */
.section,.section.intro,.section.couple,.section.summary{left:16%;width:68%;top:18%;height:63%}
.page-content,.stack{gap:6px}
.family{font-size:17px;line-height:1.32}
.wording{font-size:18px;line-height:1.35}.bismillah__en{font-size:16px;line-height:1.35}
.display-sm{font-size:23px;line-height:1.2}.couple__name,.summary__name{font-size:54px;line-height:1.05;padding:0 4px}
.couple__with,.summary__with{font-size:17px;line-height:1.2;margin:0}
.bismillah__img{width:200px}.divider{width:100px;margin:2px 0}
.date__side{font-size:16px}.date__day{font-size:56px}.date__month{font-size:22px}
.btn{font-size:14px;min-height:40px;padding:6px 12px;margin-top:3px}
.closing__line{font-size:19px;line-height:1.3}.closing__label{font-size:15px;margin-top:4px}.inshallah{font-size:28px;line-height:1.4}
.summary__card{gap:5px}.summary__date,.summary__time,.summary__venue{font-size:16px;line-height:1.3}
.summary__qr{width:80px;margin-top:3px}.summary__qr-label{font-size:11px;line-height:1.2}
.page-nav{top:calc(50% + var(--stage-height)*.325)}

/* One consistent off-white, with quieter family details under the names. */
:root{--ink:#f1ecdf;--ink-display:#f1ecdf}
.page,.page-nav,.motion-toggle{color:#f1ecdf}
.couple .family{font-size:14px;line-height:1.4;max-width:34ch}
.couple__inner{gap:9px}.couple__with{margin:5px 0}
.bismillah__img,.divider{filter:url('#ivory-ink')}
.sheet{--ink:#f1ecdf;--ink-display:#f1ecdf;background:#535740;color:#f1ecdf}
.sheet .sheet__close,.sheet .sheet__title{color:#f1ecdf}
.btn:hover{color:#f1ecdf;background:#f1ecdf14}
.section.is-current .page-content{animation:none}

/* Quiet scroll cue inspired by the supplied reference. */
.page-nav{top:calc(50% + var(--stage-height)*.325);height:auto;letter-spacing:0}
.page-nav [data-prev],.page-nav [data-page-count]{display:none}
.page-nav [data-next]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:90px;height:65px;padding:5px;border:0;background:none;color:#f1ecdf}
.page-nav [data-next]:disabled{visibility:hidden}
.scroll-label{font-family:var(--font-body);font-size:10px;letter-spacing:.32em;font-weight:400;line-height:1.4}
.scroll-chevron{width:25px;height:15px;animation:scroll-invitation 2.6s ease-in-out infinite}
@keyframes scroll-invitation{0%,100%{transform:translateY(0);opacity:.7}50%{transform:translateY(4px);opacity:1}}
.intro .bismillah__img{width:160px}.intro .bismillah__text{font-size:24px}
.intro .bismillah__en{font-size:14px}.intro .family{font-size:14px;line-height:1.4}
.page,.page p,.page h1,.page h2,.page .display,.page .display-sm,.page .btn,.page .countdown__num,.page .countdown__label{color:#f1ecdf}

.sound-toggle{position:fixed;z-index:45;left:calc(50% + var(--stage-width)*.36);top:calc(50% + var(--stage-height)*.43);width:36px;height:36px;padding:8px;border:1px solid #f1ecdf55;border-radius:50%;background:#26362b30;color:#f1ecdf;cursor:pointer}
.sound-toggle svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.sound-slash,.is-muted .sound-waves{display:none}.is-muted .sound-slash{display:block}

/* Fill the browser viewport on phones, tablets, and desktops. */
:root{--stage-width:100vw;--stage-height:100vh}
@supports(height:100dvh){:root{--stage-height:100dvh}}
.garden-stage,.page{width:var(--stage-width);height:var(--stage-height)}
.garden-stage{overflow:hidden;background-size:cover;box-shadow:none}
.garden-stage video{object-fit:cover!important;object-position:center!important}
.section,.section.intro,.section.couple,.section.summary{left:50%;width:min(68%,600px);transform:translateX(-50%)!important}

/* Anchor artwork directly to all four edges, without a portrait canvas. */
html,body{width:100%;height:100%;margin:0;padding:0;overflow:hidden}
.garden-stage,.page{position:fixed;inset:0;left:0;top:0;bottom:0;right:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;transform:none}
.garden-stage video{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover!important;object-position:center!important}

/* Fixed line breaks: each .fit-line stays on one line; video.js shrinks the font only if a line is too wide. */
.family[data-fit]{max-width:none}
.family[data-fit] .fit-line{display:block;width:max-content;max-width:none;margin-inline:auto;white-space:nowrap}

/* Portrait only: phones and tablets held sideways get a full-screen cover asking to rotate. Desktops keep the portrait card. */
.rotate-notice{display:none}
@media (orientation:landscape) and (hover:none) and (pointer:coarse){
 .rotate-notice{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px;background:#68745a;color:#f1ecdf;text-align:center;font:400 17px/1.4 var(--font-body);touch-action:none}
 .rotate-notice svg{width:56px;height:56px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;animation:rotate-hint 2.4s ease-in-out infinite}
 .rotate-notice p{margin:0}
 .rotate-notice__sub{font-size:13px;font-style:italic;opacity:.8}
 html,body{overflow:hidden}
}
@keyframes rotate-hint{0%,35%{transform:rotate(-90deg)}60%,100%{transform:rotate(0deg)}}

/* The venue QR code doubles as a tap target for Google Maps. */
.summary__qr-link{display:inline-block;line-height:0;border-radius:4px;-webkit-tap-highlight-color:transparent}
.summary__qr-link:focus-visible{outline:1px solid currentColor;outline-offset:4px}

/* Desktop and other wide screens: show the invitation as a full-height phone column in the
   centre (9:16, the artwork's own shape, so nothing stretches), over a dimmed, blurred garden.
   Portrait phones and tablets keep the full-bleed layout; landscape touch devices get the rotate cover. */
@media (min-aspect-ratio:4/5){
 :root{--stage-height:100vh;--stage-width:calc(var(--stage-height)*9/16)}
 @supports(height:100dvh){:root{--stage-height:100dvh}}
 html{background:#1f1d17}
 body{background:transparent}
 body::before{content:'';position:fixed;inset:-60px;z-index:-1;background:url('../assets/img/garden.webp?v=f99e653') center/cover no-repeat;filter:blur(30px) brightness(.45) saturate(.85);pointer-events:none}
 .garden-stage,.page{left:calc(50% - var(--stage-width)/2);right:auto;top:0;bottom:auto;width:var(--stage-width);height:var(--stage-height);transform:none}
 .garden-stage{box-shadow:0 0 80px #0008}
 html.sealed .green-envelope{left:calc(50% - var(--stage-width)/2)!important;right:auto!important;width:var(--stage-width)!important;height:var(--stage-height)!important}
}

/* Pause/play and mute/unmute share one look: same 36px circle, border, colour, and an 18px line icon. */
.motion-toggle,.sound-toggle{box-sizing:border-box;width:36px;height:36px;min-height:0;padding:8px;border:1px solid #f1ecdf55;border-radius:50%;background:#26362b30;color:#f1ecdf;font-size:0;line-height:0}
.motion-toggle svg,.sound-toggle svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.motion-toggle::before,.motion-toggle.is-paused::before{content:none}
.motion-play,.is-paused .motion-pause{display:none}
.is-paused .motion-play{display:block}
/* 46px touch area around the 36px circles (Apple/Google minimum ~44-48px), no visual change. */
.motion-toggle::after,.sound-toggle::after{content:'';position:absolute;inset:-5px;border-radius:50%}
/* Mirror the sound button: same height, bottom-left instead of bottom-right. */
.motion-toggle{position:fixed;z-index:45;left:calc(50% - var(--stage-width)*.36 - 36px);top:calc(50% + var(--stage-height)*.43);bottom:auto;transform:none}

/* Scroll cue: up arrow (pages 2-5) over SCROLL over down arrow (pages 1-4), set a little lower.
   Hidden arrows keep their space so the word never jumps between pages. */
.page-nav{top:calc(50% + var(--stage-height)*.355 - 20px);height:auto;width:auto;display:flex;flex-direction:column;align-items:center;gap:0;letter-spacing:0}
.page-nav [data-prev],.page-nav [data-next]{display:flex;align-items:center;justify-content:center;width:64px;height:26px;padding:0;border:0;background:none;color:#f1ecdf;cursor:pointer}
.page-nav [data-prev]:disabled,.page-nav [data-next]:disabled{visibility:hidden}
.page-nav [data-page-count]{display:none}
.page-nav .scroll-label{margin:2px 0;padding-left:.32em;cursor:pointer}
.scroll-chevron--up{animation-name:scroll-invitation-up}
@keyframes scroll-invitation-up{0%,100%{transform:translateY(0);opacity:.7}50%{transform:translateY(-4px);opacity:1}}
/* Short phones (iPhone SE): the last page's content reaches lower, so drop the cue a little further. */
@media (max-height:600px){.page-nav{top:calc(50% + var(--stage-height)*.355 - 8px)}}

/* First page text stays hidden while the envelope opens; video.js animates it in (see revealPage). */
.page.awaiting-reveal .page-content{opacity:0}

/* Safari paints the strips behind its status bar and toolbars with the page background: match the
   olive cover's edge while it is up (terracotta, the garden's edge colour, once it opens). */
@media (max-aspect-ratio:4/5){html.sealed,html.sealed body{background:#6b7350}}

/* Touch screens swipe between pages, so phones show the up arrow only on the last page (where there is
   no down arrow); desktops show it on pages 2-5. Its space is kept so SCROLL stays in the same place. */
@media (hover:none) and (pointer:coarse){.page-nav:not(.is-last) [data-prev]{visibility:hidden;pointer-events:none}}

/* Page 5: more room between the countdown labels and the Arabic line. */
.inshallah{margin-top:16px}
