/* Cinematic invitation chapters: one continuous, reel-like invitation after the opening film. */
:root{
  --chapter-ink:#2f1420;
  --chapter-wine:#4b1022;
  --chapter-wine-deep:#210610;
  --chapter-ivory:#fff9ed;
  --chapter-blush:#ead8dc;
  --chapter-gold:#c99a55;
  --chapter-gold-light:#f1d59b;
  --chapter-shadow:0 28px 75px rgba(63,20,31,.16);
}

html{scroll-behavior:smooth;scroll-padding-top:0}
body.cinematic-chapters{overflow-x:hidden;background:var(--chapter-ivory)}
body.cinematic-chapters #main-content{position:relative;overflow:clip}

/* The approved newvid opening is the only film intro. */
.engagement-film-section{display:none!important}
.engagement-welcome{position:relative;display:grid;min-height:100svh;padding:clamp(6rem,13vh,9rem) max(1.35rem,calc((100vw - 1050px)/2));overflow:hidden;place-content:center;text-align:center;color:var(--chapter-ink);background:
  radial-gradient(circle at 50% 13%,rgba(255,255,255,.95),transparent 29%),
  radial-gradient(circle at 5% 95%,rgba(117,38,54,.11),transparent 32%),
  linear-gradient(145deg,#fffaf0,#f3e2d5 58%,#ead4d6);isolation:isolate}
.engagement-welcome::before{position:absolute;inset:clamp(.8rem,2.5vw,2rem);z-index:-1;content:"";border:1px solid rgba(161,112,43,.48);border-radius:48% 48% 2rem 2rem/11rem 11rem 2rem 2rem;box-shadow:inset 0 0 0 .38rem rgba(255,255,255,.25),inset 0 0 80px rgba(118,30,48,.07)}
.engagement-welcome::after{position:absolute;inset:-9rem -7rem auto;z-index:-2;height:24rem;content:"";opacity:.7;background:
  radial-gradient(ellipse at 18% 45%,transparent 0 24%,rgba(167,112,41,.22) 25% 26%,transparent 27%),
  radial-gradient(ellipse at 82% 45%,transparent 0 24%,rgba(167,112,41,.22) 25% 26%,transparent 27%);animation:chapter-canopy 9s ease-in-out infinite alternate}
.engagement-welcome__kicker{margin:0 0 1rem;color:#9a681f;font:700 .66rem/1.2 Manrope,sans-serif;letter-spacing:.28em;text-transform:uppercase}
.engagement-welcome h1{max-width:950px;margin:0 auto .8rem;color:#6b2030;font:400 clamp(4rem,12vw,8rem)/.78 Corinthia,"Noto Serif Gujarati",serif;text-wrap:balance;text-shadow:0 .18rem .35rem rgba(105,39,51,.1)}
.engagement-welcome__names{margin:0;color:#554047;font:500 clamp(.95rem,2vw,1.25rem)/1.65 Newsreader,serif}
.engagement-welcome__continue{display:inline-flex;gap:.7rem;align-items:center;justify-self:center;margin-top:2.4rem;padding:.82rem 1.2rem;color:#fff9ed;border:1px solid #9f7131;border-radius:999px;background:linear-gradient(135deg,#8e632b,#b38644);box-shadow:0 13px 35px rgba(91,53,14,.2);font:700 .66rem/1 Manrope,sans-serif;letter-spacing:.14em;text-decoration:none;text-transform:uppercase;transition:transform .3s ease,box-shadow .3s ease}
.engagement-welcome__continue:hover,.engagement-welcome__continue:focus-visible{transform:translateY(-3px);box-shadow:0 18px 42px rgba(91,53,14,.28)}

.invitation-chapter{--scene-x:0px;--scene-y:0px;position:relative;min-height:100svh;scroll-margin-top:0;overflow:hidden;isolation:isolate}
.invitation-chapter.section{display:grid;align-content:center;padding-top:clamp(5.5rem,10vh,8rem);padding-bottom:clamp(5.5rem,10vh,8rem)}
.chapter-scenery{position:absolute;z-index:-1;inset:0;overflow:hidden;pointer-events:none}
.chapter-scenery::before,.chapter-scenery::after{position:absolute;content:"";border:1px solid rgba(183,135,65,.34);border-radius:50%;filter:drop-shadow(0 7px 12px rgba(75,16,34,.08))}
.chapter-scenery::before{top:-12rem;left:-9rem;width:25rem;height:25rem;box-shadow:inset 0 0 0 1.5rem rgba(255,255,255,.08),inset 0 0 0 1.65rem rgba(183,135,65,.13);transform:translate3d(var(--scene-x),var(--scene-y),0)}
.chapter-scenery::after{right:-11rem;bottom:-14rem;width:29rem;height:29rem;box-shadow:inset 0 0 0 2rem rgba(255,255,255,.07),inset 0 0 0 2.15rem rgba(183,135,65,.13);transform:translate3d(var(--scene-x),var(--scene-y),0)}
.chapter-scenery span{position:absolute;width:.28rem;height:.28rem;border-radius:50%;background:var(--chapter-gold-light);box-shadow:0 0 .8rem rgba(231,190,112,.8);animation:chapter-sparkle 4.7s ease-in-out infinite}
.chapter-scenery span:nth-child(1){top:17%;left:10%;animation-delay:-1s}.chapter-scenery span:nth-child(2){top:30%;right:9%;animation-delay:-2.8s}.chapter-scenery span:nth-child(3){right:20%;bottom:15%;animation-delay:-.4s}.chapter-scenery span:nth-child(4){bottom:22%;left:17%;animation-delay:-3.5s}
.chapter-number{position:absolute;z-index:3;top:max(1rem,env(safe-area-inset-top));left:max(1rem,env(safe-area-inset-left));display:flex;align-items:center;gap:.6rem;color:rgba(82,41,50,.62);font:700 .58rem/1 Manrope,sans-serif;letter-spacing:.2em;text-transform:uppercase}
.chapter-number::before{width:1.8rem;height:1px;content:"";background:currentColor}

/* Page palette, paced like successive invitation-card screens. */
.chapter-welcome,.chapter-couple,.chapter-date-reveal,.chapter-story,.chapter-dress-code,.chapter-rsvp{background:
  linear-gradient(rgba(255,252,244,.72),rgba(255,249,237,.94)),
  repeating-linear-gradient(135deg,rgba(132,75,86,.035) 0 1px,transparent 1px 12px),var(--chapter-ivory)}
.chapter-celebrations,.chapter-programme,.chapter-venue{background:
  radial-gradient(circle at 50% 0,rgba(255,255,255,.86),transparent 34%),
  linear-gradient(145deg,#f5e9e6,#e8d6dc 60%,#dfc9d0)}
.chapter-countdown,.chapter-closing{color:#fff4dd;background:
  radial-gradient(circle at 50% 20%,rgba(183,76,92,.34),transparent 32%),
  linear-gradient(160deg,#65182d,#3b0918 58%,#1e050d)}
.chapter-countdown .chapter-number,.chapter-closing .chapter-number{color:rgba(247,218,157,.67)}

/* Architectural invitation-card frames. */
.invitation-chapter:not(.chapter-countdown):not(.chapter-closing)::before{position:absolute;z-index:-1;inset:clamp(.65rem,2vw,1.55rem);content:"";pointer-events:none;border:1px solid rgba(169,117,49,.35);clip-path:polygon(0 0,42% 0,50% 1.35rem,58% 0,100% 0,100% 100%,58% 100%,50% calc(100% - 1.35rem),42% 100%,0 100%)}
.invitation-chapter:not(.chapter-countdown):not(.chapter-closing)::after{position:absolute;z-index:-1;top:1.4rem;left:50%;width:clamp(5rem,12vw,8rem);height:2.3rem;content:"✦  ◇  ✦";color:rgba(165,113,45,.6);font:400 .72rem/1 Newsreader,serif;letter-spacing:.5em;text-align:center;transform:translateX(-50%)}

/* Distinct staged movement per chapter. */
body.chapter-motion-ready .invitation-chapter>[data-chapter-reveal],
body.chapter-motion-ready .invitation-chapter .section-heading>*,
body.chapter-motion-ready .invitation-chapter .ceremony,
body.chapter-motion-ready .invitation-chapter .story-step,
body.chapter-motion-ready .invitation-chapter .programme>li,
body.chapter-motion-ready .invitation-chapter .dress-columns>div,
body.chapter-motion-ready .invitation-chapter .contact-item{opacity:0;filter:blur(5px);transform:translate3d(0,2rem,0) scale(.985)}
body.chapter-motion-ready .invitation-chapter.is-active>[data-chapter-reveal],
body.chapter-motion-ready .invitation-chapter.is-active .section-heading>*,
body.chapter-motion-ready .invitation-chapter.is-active .ceremony,
body.chapter-motion-ready .invitation-chapter.is-active .story-step,
body.chapter-motion-ready .invitation-chapter.is-active .programme>li,
body.chapter-motion-ready .invitation-chapter.is-active .dress-columns>div,
body.chapter-motion-ready .invitation-chapter.is-active .contact-item{animation:chapter-rise .9s cubic-bezier(.2,.75,.22,1) forwards;animation-delay:calc(.1s + var(--motion-order,0)*.09s)}

body.chapter-motion-ready .chapter-welcome h1{clip-path:inset(0 100% 0 0)}
body.chapter-motion-ready .chapter-welcome.is-active h1{animation:chapter-ink-reveal 1.35s cubic-bezier(.22,.72,.12,1) .18s forwards}
.chapter-welcome.is-active .engagement-welcome__continue span{animation:chapter-arrow 1.4s ease-in-out infinite}

/* Main cover: retain the local cinematic background, with sharper type and image staging. */
body[data-theme="royal-keepsake-card"] .chapter-welcome.hero-section{padding:0}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-cinematic-hero{width:100%;min-height:100svh}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy{z-index:4}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy h1{font-family:Corinthia,"Noto Serif Gujarati",serif;font-size:clamp(5.4rem,14vw,10rem);line-height:.68;text-shadow:0 .22rem 1.2rem rgba(0,0,0,.5)}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy h1 b{color:#e5ba65;font-size:.62em}
body.chapter-motion-ready .chapter-welcome .keepsake-hero-copy>*{opacity:0;transform:translateY(1.4rem)}
body.chapter-motion-ready .chapter-welcome.is-active .keepsake-hero-copy>*{animation:chapter-rise .9s cubic-bezier(.2,.75,.22,1) forwards;animation-delay:calc(.18s + var(--motion-order,0)*.13s)}
body.chapter-motion-ready .chapter-welcome .keepsake-welcome-couple{opacity:0;filter:blur(8px);transform:translate3d(4rem,2rem,0) scale(1.06)}
body.chapter-motion-ready .chapter-welcome.is-active .keepsake-welcome-couple{animation:chapter-couple-enter 1.5s cubic-bezier(.12,.75,.18,1) .28s forwards}

.chapter-couple .arch-panel{will-change:transform;transform:translate3d(0,var(--scene-y),0);filter:drop-shadow(0 25px 35px rgba(91,36,48,.2))}
.chapter-couple .couple-main img{object-fit:contain}
.chapter-couple .couple-copy{padding:clamp(1rem,4vw,3rem)}
.chapter-couple .couple-copy h2{font-family:Corinthia,"Noto Serif Gujarati",serif;font-size:clamp(4.6rem,9vw,7.5rem);line-height:.7}
body.chapter-motion-ready .chapter-couple .arch-panel{opacity:0;clip-path:inset(0 50% 0 50% round 12rem 12rem 0 0);transform:translateY(3rem) scale(.94)}
body.chapter-motion-ready .chapter-couple.is-active .arch-panel{animation:chapter-arch-open 1.35s cubic-bezier(.2,.78,.15,1) .1s forwards}

.chapter-celebrations .ceremony-grid{perspective:1200px}
.chapter-celebrations .ceremony{position:relative;overflow:hidden;min-height:25rem;border:1px solid rgba(152,102,38,.26);box-shadow:var(--chapter-shadow);background:rgba(255,251,242,.83);backdrop-filter:blur(8px)}
.chapter-celebrations .theme2-ceremony-icon{display:block!important;width:5.4rem;height:5.4rem;margin:0 auto 1.25rem;padding:.9rem;color:#a87531;border:1px solid rgba(173,121,46,.34);border-radius:50%;background:radial-gradient(circle,#fffdf5,#f2e1bd);filter:drop-shadow(0 .7rem .8rem rgba(111,65,17,.14));fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.chapter-celebrations .ceremony-symbol,.chapter-celebrations .ring-symbol{display:none!important}
.chapter-celebrations .ceremony::after{position:absolute;inset:-80% -35%;content:"";pointer-events:none;background:linear-gradient(105deg,transparent 43%,rgba(255,255,255,.75) 50%,transparent 57%);transform:translateX(-65%) rotate(8deg)}
.chapter-celebrations.is-active .ceremony::after{animation:chapter-shine 1.5s ease 1.1s forwards}
body.chapter-motion-ready .chapter-celebrations .ceremony:first-child{transform:translateX(-3rem) rotateY(12deg)}
body.chapter-motion-ready .chapter-celebrations .ceremony:last-child{transform:translateX(3rem) rotateY(-12deg)}

.chapter-date-reveal .scratch-card{box-shadow:0 2rem 5rem rgba(91,35,45,.24),0 0 0 .6rem rgba(255,255,255,.4);transform:perspective(900px) rotateX(1deg)}
.chapter-date-reveal .scratch-reveal strong{font-family:Italiana,Newsreader,serif}
.chapter-date-reveal.is-active .scratch-instruction i{animation:chapter-scratch-hint 2.2s ease-in-out infinite}

.chapter-countdown .section-heading{position:relative;z-index:1}
.chapter-countdown .countdown{position:relative;z-index:1;width:min(100%,900px);margin-inline:auto;perspective:900px}
.chapter-countdown .countdown>div{position:relative;overflow:hidden;border:1px solid rgba(240,205,135,.3);background:linear-gradient(145deg,rgba(255,255,255,.11),rgba(255,255,255,.025));box-shadow:0 20px 45px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.16);backdrop-filter:blur(10px)}
.chapter-countdown .countdown strong{font-family:Italiana,serif;text-shadow:0 .25rem .75rem rgba(0,0,0,.35)}
.chapter-countdown.is-active .mandala{animation:chapter-mandala-turn 38s linear infinite}

.chapter-story .story-rail{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(.8rem,2vw,1.5rem);perspective:1200px}
.chapter-story .story-step{min-height:18rem;padding:clamp(1.5rem,3vw,2.4rem);border:1px solid rgba(161,111,43,.27);border-radius:48% 48% 1.2rem 1.2rem/6rem 6rem 1.2rem 1.2rem;background:rgba(255,253,247,.82);box-shadow:var(--chapter-shadow)}
.chapter-story .ring-exchange{filter:drop-shadow(0 1.4rem 1.5rem rgba(79,29,40,.18));transform:translate3d(0,var(--scene-y),0)}
body.chapter-motion-ready .chapter-story .story-step:nth-child(1){transform:translateX(35%) rotate(-7deg)}
body.chapter-motion-ready .chapter-story .story-step:nth-child(2){transform:translateY(2rem) scale(.92)}
body.chapter-motion-ready .chapter-story .story-step:nth-child(3){transform:translateX(-35%) rotate(7deg)}

.chapter-programme .programme{position:relative;width:min(100%,820px);margin-inline:auto}
.chapter-programme .programme::before{transform:scaleY(0);transform-origin:top}
.chapter-programme.is-active .programme::before{animation:chapter-line-draw 1.6s cubic-bezier(.3,.7,.2,1) .25s forwards}
.chapter-programme .programme li{background:rgba(255,251,244,.62);box-shadow:0 12px 32px rgba(95,42,53,.08)}

.chapter-venue .venue-illustration{filter:drop-shadow(0 2rem 2rem rgba(78,24,37,.22));transform:translate3d(0,var(--scene-y),0)}
body.chapter-motion-ready .chapter-venue .venue-illustration{opacity:0;transform:translateY(5rem) scale(.92)}
body.chapter-motion-ready .chapter-venue.is-active .venue-illustration{animation:chapter-palace-rise 1.25s cubic-bezier(.18,.78,.15,1) .1s forwards}
.chapter-venue .venue-copy{padding:clamp(1rem,4vw,3rem);border-left:1px solid rgba(154,104,36,.3)}

.chapter-dress-code .dress-columns>div,.chapter-rsvp .contact-item{border:1px solid rgba(157,105,38,.22);background:rgba(255,253,247,.74);box-shadow:0 17px 45px rgba(81,31,42,.09)}
.chapter-dress-code .dress-swatch{box-shadow:0 0 0 .45rem rgba(255,255,255,.7),0 12px 30px rgba(75,28,39,.15)}
.chapter-rsvp .rsvp-open{margin-top:2rem}

.chapter-closing{min-height:100svh!important}
.chapter-closing .lotus{filter:drop-shadow(0 1rem 1.4rem rgba(0,0,0,.28))}
body.chapter-motion-ready .chapter-closing .lotus{opacity:0;transform:scale(.4) rotate(-20deg)}
body.chapter-motion-ready .chapter-closing.is-active .lotus{animation:chapter-lotus-bloom 1.5s cubic-bezier(.16,.84,.21,1) forwards}
.chapter-closing h2{max-width:800px;font-size:clamp(3rem,7vw,6rem)}
.chapter-closing .closing-names{font-size:clamp(4.2rem,10vw,7rem)}

/* A slim zari thread shows progress through the invitation. */
.invitation-scroll-progress{position:fixed;z-index:90;top:50%;right:max(.45rem,env(safe-area-inset-right));display:flex;align-items:center;gap:.45rem;pointer-events:none;transform:translateY(-50%)}
.invitation-scroll-progress span{writing-mode:vertical-rl;color:rgba(124,77,27,.75);font:700 .52rem/1 Manrope,sans-serif;letter-spacing:.16em}
.invitation-scroll-progress i{position:relative;display:block;width:2px;height:min(36vh,15rem);overflow:hidden;border-radius:2px;background:rgba(139,90,32,.18)}
.invitation-scroll-progress b{position:absolute;inset:0;display:block;background:linear-gradient(#8d5c26,#f0d18f);transform:scaleY(var(--page-progress,0));transform-origin:top;box-shadow:0 0 .7rem rgba(203,154,76,.5)}
.chapter-nav{position:fixed;z-index:88;top:50%;right:1.6rem;display:grid;gap:.42rem;transform:translateY(-50%)}
.chapter-nav button{width:.42rem;height:.42rem;padding:0;border:1px solid rgba(153,103,38,.55);border-radius:50%;background:rgba(255,250,238,.72);box-shadow:0 2px 8px rgba(55,15,25,.18);cursor:pointer;transition:transform .25s,background .25s}
.chapter-nav button[aria-current="true"]{background:#d3a657;transform:scale(1.65)}
.chapter-nav button:focus-visible{outline:2px solid #fff;outline-offset:3px}

@keyframes chapter-rise{to{opacity:1;filter:blur(0);transform:none}}
@keyframes chapter-ink-reveal{to{clip-path:inset(0 0 0 0)}}
@keyframes chapter-couple-enter{to{opacity:1;filter:blur(0);transform:translate3d(0,0,0) scale(1)}}
@keyframes chapter-arch-open{to{opacity:1;filter:none;clip-path:inset(0 0 0 0 round 12rem 12rem 0 0);transform:translateY(0) scale(1)}}
@keyframes chapter-palace-rise{to{opacity:1;filter:none;transform:translateY(0) scale(1)}}
@keyframes chapter-lotus-bloom{to{opacity:1;filter:none;transform:scale(1) rotate(0)}}
@keyframes chapter-line-draw{to{transform:scaleY(1)}}
@keyframes chapter-shine{to{transform:translateX(65%) rotate(8deg)}}
@keyframes chapter-scratch-hint{0%,100%{transform:translate(0,0)}45%{transform:translate(1.3rem,-1rem)}}
@keyframes chapter-arrow{0%,100%{transform:translateY(-2px)}50%{transform:translateY(4px)}}
@keyframes chapter-canopy{to{transform:translateY(1.2rem) scale(1.03)}}
@keyframes chapter-sparkle{0%,100%{opacity:.16;transform:scale(.55)}45%{opacity:1;transform:scale(1.4)}}
@keyframes chapter-mandala-turn{to{transform:rotate(360deg)}}

@media(min-width:900px){
  body.cinematic-chapters #main-content{scroll-snap-type:y proximity}
  .invitation-chapter{scroll-snap-align:start;scroll-snap-stop:normal}
  .chapter-couple,.chapter-venue{min-height:100svh}
}

@media(max-width:760px){
  .invitation-chapter.section{padding:5.25rem 1.15rem 4.75rem}
  .engagement-welcome{padding-inline:1.45rem}
  .engagement-welcome::before{border-radius:42% 42% 1rem 1rem/7rem 7rem 1rem 1rem}
  .engagement-welcome h1{font-size:clamp(4.2rem,19vw,6.3rem)}
  .chapter-number{top:.9rem;left:1rem}
  .chapter-story .story-rail{grid-template-columns:1fr;gap:.8rem}
  .chapter-story .story-step{min-height:0;border-radius:5rem 5rem 1rem 1rem/3rem 3rem 1rem 1rem}
  body.chapter-motion-ready .chapter-story .story-step:nth-child(n){transform:translateY(2rem) scale(.96)}
  .chapter-venue .venue-copy{border-top:1px solid rgba(154,104,36,.3);border-left:0;text-align:center}
  .chapter-nav{display:none}
  .invitation-scroll-progress{right:.32rem}
  .invitation-scroll-progress span{display:none}
  .invitation-scroll-progress i{height:26vh}
  .chapter-celebrations .ceremony{min-height:21rem}
}

@media(max-width:430px){
  .engagement-welcome h1{line-height:.82}
  .chapter-countdown .countdown{gap:.38rem}
  .chapter-countdown .countdown>div{padding:.85rem .2rem}
  .chapter-countdown .countdown strong{font-size:clamp(1.8rem,10vw,2.7rem)}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy h1{font-size:clamp(5rem,23vw,7rem)}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .chapter-scenery,.chapter-welcome::after{animation:none!important}
  body.chapter-motion-ready .invitation-chapter *,body.chapter-motion-ready .invitation-chapter>*{animation:none!important;opacity:1!important;filter:none!important;clip-path:none!important;transform:none!important;transition:none!important}
  .chapter-nav,.invitation-scroll-progress{display:none!important}
}

/* V7 — a single living portrait folio. The ambient film carries the motion;
   content settles once, without scroll-jacking, blur or competing effects. */
html[data-theme="royal-keepsake-card"]{background:#17050c}
body[data-theme="royal-keepsake-card"].cinematic-chapters{background:#17050c}
body[data-theme="royal-keepsake-card"] .theme-atmosphere{
  position:fixed;inset:0;z-index:0;display:block;overflow:hidden;pointer-events:none;
  background:#210711 url("../assets/images/royal-card-chamber-v6.png") center/cover no-repeat
}
body[data-theme="royal-keepsake-card"] .theme-background-video{
  position:absolute;inset:-3%;width:106%;height:106%;object-fit:cover;opacity:.82;
  filter:saturate(.92) contrast(1.06) brightness(.64);transform:scale(1.025)
}
body[data-theme="royal-keepsake-card"] .theme-background-video.video-unavailable{display:none}
body[data-theme="royal-keepsake-card"] .theme-atmosphere::after{
  position:absolute;inset:0;content:"";background:
    radial-gradient(circle at 50% 42%,transparent 8%,rgba(18,2,8,.18) 58%,rgba(14,1,6,.68) 100%),
    linear-gradient(90deg,rgba(8,1,4,.55),transparent 31% 69%,rgba(8,1,4,.55))
}
body[data-theme="royal-keepsake-card"] #main-content{
  position:relative;z-index:1;width:min(100%,620px);margin-inline:auto;overflow:hidden;
  border-inline:1px solid rgba(220,174,91,.38);background:transparent;
  box-shadow:0 0 0 1px rgba(44,7,18,.65),0 0 90px rgba(0,0,0,.62)
}
body[data-theme="royal-keepsake-card"] .invitation-chapter.section{
  padding-inline:clamp(1.25rem,7vw,3.6rem)
}
body[data-theme="royal-keepsake-card"] .chapter-greeting{
  background:linear-gradient(rgba(255,251,242,.9),rgba(242,220,207,.94))
}
body[data-theme="royal-keepsake-card"] .chapter-greeting h1{
  font-size:clamp(4.2rem,16vw,5.6rem)
}
body[data-theme="royal-keepsake-card"] .chapter-welcome,
body[data-theme="royal-keepsake-card"] .chapter-couple,
body[data-theme="royal-keepsake-card"] .chapter-date-reveal,
body[data-theme="royal-keepsake-card"] .chapter-story,
body[data-theme="royal-keepsake-card"] .chapter-dress-code,
body[data-theme="royal-keepsake-card"] .chapter-rsvp{background:rgba(255,249,237,.87)}
body[data-theme="royal-keepsake-card"] .chapter-celebrations,
body[data-theme="royal-keepsake-card"] .chapter-programme,
body[data-theme="royal-keepsake-card"] .chapter-venue{background:rgba(239,222,220,.88)}
body[data-theme="royal-keepsake-card"] .chapter-countdown,
body[data-theme="royal-keepsake-card"] .chapter-closing{background:rgba(61,9,24,.95)}

body[data-theme="royal-keepsake-card"] .chapter-welcome.hero-section{background:rgba(40,5,16,.42)}
body[data-theme="royal-keepsake-card"] .chapter-welcome.hero-section{padding-inline:0}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-cinematic-hero::before{
  background:linear-gradient(180deg,rgba(31,3,12,.82),rgba(31,3,12,.2) 44%,rgba(31,3,12,.82))
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-video{display:none}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy{
  width:100%;padding:max(4.6rem,9vh) 1.35rem 54vh;text-align:center
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy h1{
  max-width:none;font-size:clamp(5rem,21vw,7rem);line-height:.7
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-welcome-couple{
  right:0;bottom:0;width:100%;height:50vh;max-width:none;max-height:none
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-welcome-couple img{
  width:100%;height:100%;object-fit:contain;object-position:center bottom
}

body.cinematic-chapters .reveal-on-scroll{opacity:1;transform:none;transition:none}
.chapter-scenery,.chapter-nav,.invitation-scroll-progress{display:none!important}
.chapter-celebrations .ceremony::after{display:none}
.chapter-welcome::after,.chapter-countdown .mandala,.chapter-date-reveal .scratch-instruction i{animation:none!important}

body.chapter-motion-ready .invitation-chapter>[data-chapter-reveal],
body.chapter-motion-ready .invitation-chapter .section-heading>*,
body.chapter-motion-ready .invitation-chapter .ceremony,
body.chapter-motion-ready .invitation-chapter .story-step,
body.chapter-motion-ready .invitation-chapter .programme>li,
body.chapter-motion-ready .invitation-chapter .dress-columns>div,
body.chapter-motion-ready .invitation-chapter .contact-item,
body.chapter-motion-ready .chapter-couple .arch-panel,
body.chapter-motion-ready .chapter-venue .venue-illustration,
body.chapter-motion-ready .chapter-closing .lotus{
  opacity:0;filter:none!important;clip-path:none!important;
  transform:translate3d(0,1rem,0)!important;animation:none!important
}
body.chapter-motion-ready .invitation-chapter.was-seen>[data-chapter-reveal],
body.chapter-motion-ready .invitation-chapter.was-seen .section-heading>*,
body.chapter-motion-ready .invitation-chapter.was-seen .ceremony,
body.chapter-motion-ready .invitation-chapter.was-seen .story-step,
body.chapter-motion-ready .invitation-chapter.was-seen .programme>li,
body.chapter-motion-ready .invitation-chapter.was-seen .dress-columns>div,
body.chapter-motion-ready .invitation-chapter.was-seen .contact-item,
body.chapter-motion-ready .chapter-couple.was-seen .arch-panel,
body.chapter-motion-ready .chapter-venue.was-seen .venue-illustration,
body.chapter-motion-ready .chapter-closing.was-seen .lotus{
  animation:folio-settle 1s cubic-bezier(.2,.72,.2,1) forwards!important;
  animation-delay:calc(.06s + var(--motion-order,0)*.055s)!important
}
body.chapter-motion-ready .chapter-welcome h1{clip-path:none!important}
@keyframes folio-settle{to{opacity:1;transform:none}}

@media(min-width:621px){
  body[data-theme="royal-keepsake-card"] #main-content::before{
    position:fixed;z-index:50;inset:0 auto 0 50%;width:620px;content:"";pointer-events:none;
    border-inline:1px solid rgba(239,199,123,.38);transform:translateX(-50%)
  }
}
@media(max-width:620px){
  body[data-theme="royal-keepsake-card"] #main-content{border:0;box-shadow:none}
  body[data-theme="royal-keepsake-card"] .theme-background-video{opacity:.7}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy{padding-bottom:52vh}
}
@media(prefers-reduced-motion:reduce){
  body[data-theme="royal-keepsake-card"] .theme-background-video{display:none}
}

/* V8 — mobile-safe likeness portrait and naturally populated chapters. */
body[data-theme="royal-keepsake-card"] .chapter-welcome.hero-section{
  grid-template-columns:minmax(0,1fr);justify-content:stretch;align-items:stretch
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-cinematic-hero{
  width:auto!important;min-width:0;margin:0;justify-self:stretch;
  grid-template-columns:minmax(0,1fr);place-items:stretch
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-cinematic-hero::after{
  position:absolute;inset:0;z-index:1;content:"";pointer-events:none;background:
    linear-gradient(180deg,rgba(18,5,16,.9) 0%,rgba(18,5,16,.68) 18%,rgba(18,5,16,.12) 37%,rgba(18,5,16,.08) 72%,rgba(18,5,16,.42) 100%)
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy{
  position:absolute;inset:max(1.35rem,3.5vh) 0 auto;z-index:3;width:100%;margin:0;padding:0 1rem;text-align:center
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy h1{
  display:flex;align-items:baseline;justify-content:center;gap:.16em;max-width:100%;margin:.15rem auto .35rem;
  color:#fff2d7;font-size:clamp(3.2rem,14.5vw,5.2rem);line-height:.72;white-space:nowrap
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy h1 span{display:inline}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy h1 b{font-size:.58em}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy>p[data-bind]{margin:.35rem 0 .15rem;font-size:.72rem}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-guest-line{
  display:table;max-width:min(92%,34rem);margin:0 auto .25rem;padding:.28rem .72rem;border:1px solid rgba(229,186,101,.42);
  border-radius:999px;background:rgba(13,9,24,.58);color:#f9e3b4;font-weight:700;line-height:1.35;text-shadow:0 1px 8px rgba(0,0,0,.9);white-space:normal
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy>p[data-bind],
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy time{
  display:table;width:auto;max-width:94%;margin-inline:auto;padding:.2rem .62rem;border-radius:999px;background:rgba(13,9,24,.58);
  color:#fff1d0;text-shadow:0 1px 8px rgba(0,0,0,.95);white-space:normal
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy time{font-size:.7rem}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-welcome-couple{
  position:absolute;inset:0;z-index:0;width:100%;height:100%;max-width:none;max-height:none;margin:0!important
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-welcome-couple img{
  width:100%;height:100%;object-fit:contain;object-position:center;background:transparent
}

@media(max-width:620px){
  body[data-theme="royal-keepsake-card"] .invitation-chapter:not(.chapter-greeting):not(.chapter-welcome):not(.chapter-countdown):not(.chapter-closing){min-height:auto}
  body[data-theme="royal-keepsake-card"] .invitation-chapter.section:not(.chapter-welcome){padding-top:5.4rem;padding-bottom:5rem}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-cinematic-hero{min-height:100svh}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy{inset:max(.85rem,2vh) 0 auto;padding-inline:.72rem}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-blessing{margin-bottom:.2rem;font-size:.8rem}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-guest-line{max-width:96%;margin:0 auto .18rem;font-size:.7rem}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy h1{font-size:clamp(3.05rem,14.5vw,4.3rem);line-height:.72;white-space:nowrap}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy>p[data-bind]{margin-top:.28rem;font-size:.66rem}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-copy time{font-size:.65rem}

  body[data-theme="royal-keepsake-card"] .chapter-couple .arch-panel{
    width:100%;min-height:0;margin:0;padding:0;overflow:hidden;border-radius:.65rem;background:#071329
  }
  body[data-theme="royal-keepsake-card"] .chapter-couple .couple-main{
    width:100%;height:auto;aspect-ratio:864/1821;border-radius:0
  }
  body[data-theme="royal-keepsake-card"] .chapter-couple .couple-main img{
    width:100%;height:100%;object-fit:cover;object-position:center
  }
  body[data-theme="royal-keepsake-card"] .chapter-couple .couple-copy{padding:2rem 0 0}

  body[data-theme="royal-keepsake-card"] .chapter-story .ring-exchange{
    width:100%;height:auto;aspect-ratio:4/5;overflow:hidden;border:1px solid rgba(201,154,85,.48);
    border-radius:.65rem;background:#071329;box-shadow:0 22px 55px rgba(35,8,18,.2)
  }
  body[data-theme="royal-keepsake-card"] .chapter-story .ring-exchange img{
    width:100%;height:100%;object-fit:cover;object-position:center 24%
  }
  body[data-theme="royal-keepsake-card"] .chapter-venue .venue-illustration{width:100%;max-width:100%;overflow:hidden}
  body[data-theme="royal-keepsake-card"] .chapter-closing h2{max-width:100%;overflow-wrap:break-word}
}

/* V10 — animated hero film with an isolated approved couple cutout. */
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-video{
  display:block!important;position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:cover;object-position:center;
  opacity:1;filter:saturate(.92) contrast(1.08) brightness(.7);transform:none
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-welcome-couple{
  inset:8% 0 0;z-index:2;height:92%;filter:drop-shadow(0 1.2rem 1.8rem rgba(0,0,0,.42))
}
body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-welcome-couple img{
  object-fit:contain;object-position:center bottom
}
@media(max-width:620px){
  body[data-theme="royal-keepsake-card"] .chapter-couple .couple-main{aspect-ratio:941/1672}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-welcome-couple{inset:7% 0 0;height:93%}
}
@media(prefers-reduced-motion:reduce){
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-hero-video{display:none!important}
  body[data-theme="royal-keepsake-card"] .chapter-welcome .keepsake-cinematic-hero{background:#071329 url("../assets/images/royal-card-chamber-v6.png") center/cover no-repeat}
}
