:root{--ink:#324736;--muted:#5e6a56;--gold:#937845;--line:#c2b998;--paper:#fbfaf4}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:Georgia,"Times New Roman",serif}a{color:inherit}header{height:78px;padding:0 6%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #d8d8c4}.brand{font-size:36px;letter-spacing:-4px;text-decoration:none}.brand i{font-size:.66em;color:var(--gold);margin:0 3px}nav{display:flex;gap:34px;font-size:16px}nav a{text-decoration:none}nav a:hover,.under:hover{text-decoration:underline;text-underline-offset:5px}.cover{position:relative;isolation:isolate;display:grid;align-items:center;justify-items:center;overflow:hidden;min-height:clamp(535px,74vh,780px);background:radial-gradient(ellipse at center,#faf9ed 5%,#e7ebd9 82%,#dce3cf);text-align:center}.frame{position:absolute;inset:19px;border:1px solid #adb195;z-index:-2}.frame:after{content:"";position:absolute;inset:4px;border:1px solid #c0c4ab}.botany{position:absolute;z-index:-1;width:min(38vw,600px);height:104%;object-fit:fill;pointer-events:none}.left{bottom:-5%;left:-4%;transform:rotate(-5deg)}.right{right:-5%;top:-3%;transform:rotate(173deg)}.card{padding:65px 16px}.kicker,.place{font:600 .78rem/1.5 Arial,sans-serif;letter-spacing:.25em;color:var(--muted)}.kicker span{margin:0 9px;color:var(--gold)}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:400}h1{font-size:clamp(4rem,8.9vw,9rem);line-height:1.13;letter-spacing:-.065em;margin:18px 0 4px}h1 i{color:var(--gold);font-size:.72em;font-weight:400;letter-spacing:-.08em}.motto{font-style:italic;font-size:clamp(20px,2vw,30px);color:var(--muted)}.flourish,.weds{display:flex;align-items:center;justify-content:center;gap:12px;color:var(--gold);font-size:24px;margin:22px auto}.flourish:before,.flourish:after,.weds:before,.weds:after{content:"";width:55px;height:1px;background:var(--line)}.date{font-size:clamp(20px,2vw,28px)}.place{margin:10px 0 30px;font-size:.75rem}.button{display:inline-flex;align-items:center;gap:12px;padding:15px 24px;background:#364d39;color:#fffdf2;border-radius:3px;text-decoration:none;font-size:17px}.button:hover{background:#243d29}.envelope{position:relative;width:18px;height:13px;border:1px solid;overflow:hidden}.envelope:before{content:"";position:absolute;width:12px;height:12px;left:1px;top:-7px;border:1px solid;transform:rotate(45deg)}.letter,footer{text-align:center}.letter{max-width:760px;margin:auto;padding:76px 25px}.letter h2,.details h2{font-size:clamp(32px,4vw,54px);letter-spacing:-.045em;margin:12px 0 22px}.letter p,.details p{font-size:18px;line-height:1.65;color:#515d4d;margin:15px auto;max-width:600px}.letter .invocation{font-style:italic;color:#806d48}.letter h3{font-size:36px;margin:28px 0 8px}.weds{font-style:italic;font-size:18px}.details{background:#e9edde;border-block:1px solid #c8cdb9;display:grid;grid-template-columns:1fr 1fr;padding:55px 8%;text-align:center}.details>div{padding:20px 6%}.details>div+div{border-left:1px solid #bec5ac}.details h2{font-size:clamp(29px,3vw,44px)}.under{display:inline-block;margin:6px 0;text-underline-offset:5px}footer{padding:40px 12px}footer p{font-size:21px;font-style:italic;margin:12px}small{font-size:15px;color:var(--muted)}:focus-visible{outline:3px solid #996d22;outline-offset:4px}
@media(max-width:650px){header{height:65px}nav{gap:16px;font-size:15px}.brand{font-size:31px}.cover{min-height:590px}.botany{width:210px;height:330px;opacity:.86}.left{left:-59px;bottom:-35px}.right{right:-74px;top:-46px}.card{padding:64px 20px}.frame{inset:10px}.kicker{font-size:.75rem}.letter{padding:52px 20px}.details{grid-template-columns:1fr;padding:20px}.details>div{padding:30px 0}.details>div+div{border-left:0;border-top:1px solid #bec5ac}}

/* The paper pocket stays in front while the hinged flap lifts behind the insert. */
[hidden]{display:none!important}
.cover.sealed .card{visibility:hidden}
.opening{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;perspective:900px}
.packet{position:relative;display:block;width:min(68vw,360px);aspect-ratio:1.63;background:#c8cdb6;border:1px solid #b5b59a;border-radius:3px;box-shadow:0 16px 30px #43543a29;padding:0;cursor:pointer;perspective:800px;color:var(--ink)}
.insert,.pocket,.flap,.seal{position:absolute;display:grid;place-items:center}
.insert{inset:5% 4%;background:#fbf8eb;border:3px double #bdae86;font:italic clamp(27px,4vw,45px) Georgia,serif}
.pocket{inset:0;background:linear-gradient(32deg,#dadcc6 49.7%,#b1b699 50%,transparent 50.3%),linear-gradient(-32deg,#e2e4cf 49.7%,#b1b699 50%,transparent 50.3%);z-index:2}
.flap{inset:0;background:linear-gradient(#f0f0dd,#c8ccb1);clip-path:polygon(0 0,100% 0,50% 63%);transform-origin:top;z-index:3}
.seal{top:49%;left:50%;transform:translateX(-50%);border:3px double #b49c67;border-radius:48% 53% 46% 51%;background:radial-gradient(at 35% 30%,#dfc995,#aa8b53);color:#574627;box-shadow:1px 3px 5px #42382340;width:54px;height:50px;display:block;padding-top:10px;font:italic 20px Georgia;z-index:4}.seal i{font-size:12px}
.start,.playback button{font:inherit;cursor:pointer}.start{margin-top:30px;background:var(--ink);color:white;padding:12px 25px;border:0;border-radius:3px}.sound-choice{margin-top:12px;font-size:15px}.sound-choice input{accent-color:var(--ink)}
.playback{position:fixed;bottom:max(16px,env(safe-area-inset-bottom));right:16px;z-index:5;display:flex;background:#f9f9ee;border:1px solid #adb398;box-shadow:0 3px 16px #33473426;border-radius:22px;padding:3px}.playback button{border:0;background:transparent;color:var(--ink);padding:9px 13px;font-size:15px}.playback button+button{border-left:1px solid #c7cbb7}footer{padding-bottom:85px}
@media all{
.opening.unfold .flap{animation:lift .85s ease-in-out both}.opening.unfold .seal{animation:dissolve .35s both}.opening.unfold .insert{animation:emerge 1s .55s both}.opening.unfold{animation:dissolve .55s 1.55s forwards}
.cover.revealed .card>*{animation:arrive .9s both}.cover.revealed .motto{animation-delay:.18s}.cover.revealed .date,.cover.revealed .place,.cover.revealed .button{animation-delay:.35s}
.enter{animation:arrive 1s both}
@keyframes lift{0%{transform:rotateX(0);z-index:3}65%{z-index:3}100%{transform:rotateX(171deg);z-index:0}}
@keyframes emerge{to{transform:translateY(-48%)}}
@keyframes dissolve{to{opacity:0}}
@keyframes arrive{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
}
.pocket em{position:absolute;bottom:8%;font:italic clamp(18px,3vw,26px) Georgia,serif;color:#596147}
@media all{.enter{animation-delay:1.05s}}

/* Ivory stationery, champagne foil, and a continuous paper background. */
:root {
  --ink: #4c3828;
  --muted: #71604d;
  --gold: #8b6736;
  --line: #ceb88c;
  --paper: #f4ebdd;
}
body { background: radial-gradient(ellipse at 0 45%, #f0ded2, transparent 52%), linear-gradient(#f8f0e1, #ecddc7); }
header { background: #fff8ec; border-color: #dcc8a4; }
.cover { background: radial-gradient(ellipse at 50% 38%, #fff8e8 18%, #f1e2c8 78%, #e7d1ac); }
.frame { border-color: #bb9e6a; }
.frame:after { border-color: #d9c49d; }
.botany { filter: sepia(1) saturate(.68) hue-rotate(354deg); }
.button, .start { background: #66492f; color: #fff8eb; }
.button:hover, .start:hover { background: #513823; }
.packet { background: #ddc7a3; border-color: #bc9d69; box-shadow: 0 16px 30px #62462632; }
.insert { background: #fff9ed; }
.pocket { background: linear-gradient(32deg,#e8d2ae 49.7%,#bda071 50%,transparent 50.4%),linear-gradient(-32deg,#f4e5c9 49.7%,#bda071 50%,transparent 50.4%); }
.pocket em { color: #6c5034; }
.flap { background: linear-gradient(#faeed8,#e0c69e); }
.playback { background: #fff7e7; border-color: #c6a878; box-shadow: 0 3px 16px #62462629; }
.playback button+button { border-color: #d7c29e; }

.letter, .details > div {
  background: linear-gradient(145deg, #fffaf1, #faf0df);
  border: 1px solid #cfb68b;
  outline: 1px solid #e4d1ae;
  outline-offset: -7px;
  border-radius: 8px;
  box-shadow: 0 18px 46px #674a2d14;
  scroll-margin-top: 26px;
}
.letter { width: min(760px, calc(100% - 32px)); margin: clamp(32px, 6vw, 80px) auto 0; }
.letter p, .details p { color: #63503d; }
.details { max-width: 1080px; padding: 0 16px; gap: 24px; margin: clamp(32px, 6vw, 72px) auto 0; border: 0; background: transparent; }
.details > div, .details > div + div { border: 1px solid #cfb68b; padding: 36px 22px; }
footer { margin: 26px auto 0; }
footer .brand { color: var(--gold); }

@media all {
  .stationery-enter { animation: stationery-in 880ms cubic-bezier(.33, 0, .25, 1) both; }
  .stationery-enter .kicker, .stationery-enter h2 {
    animation: stationery-title-in 780ms cubic-bezier(.33, 0, .25, 1) both;
  }
  .stationery-enter h2 { animation-delay: 105ms; }
  @keyframes stationery-in {
    from { opacity: .35; transform: translateY(30px) scale(.982); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes stationery-title-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Convert the original botanical artwork to a warm, monochrome foil. */
.botany { filter: grayscale(1) sepia(1) saturate(.72); }
.sound-choice { color: #66503b; }
.sound-choice input { accent-color: #8b6736; }

.wedding-doodles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 4;
  transition: opacity .35s ease-in-out, visibility .35s;
}
.show-doodles .wedding-doodles { opacity: 1; visibility: visible; }
.side-couple {
  position: absolute;
  right: 12px;
  bottom: clamp(125px, 21vh, 190px);
  width: clamp(80px, 11vw, 142px);
  transform: translateX(120%) rotate(5deg);
  transition: transform .9s cubic-bezier(.33, 0, .22, 1);
  filter: drop-shadow(0 5px 7px #50342630);
}
.show-doodles .side-couple { transform: translateX(0) rotate(-4deg); }
.walking-couple {
  position: absolute;
  left: 14px;
  bottom: max(70px, calc(env(safe-area-inset-bottom) + 58px));
  width: clamp(57px, 7vw, 88px);
  transform: translate(var(--walk-x, 0px), var(--walk-step, 0px));
}
.walking-couple img { display: block; width: 100%; filter: drop-shadow(0 4px 3px #5034263d); }

.garden {
  position:absolute; left:14px; bottom:max(13px,env(safe-area-inset-bottom));
  width:min(41vw,185px); height:45px;
}
.flowers {
  position:absolute; bottom:0; left:0; padding:2px 8px 0;
  border-radius:70% 90% 28% 45%; background:#e7d8b0;
  color:#a04f64; font-size:21px; letter-spacing:1px;
}
.garden-cat { position:absolute; bottom:0; left:64px; font-size:30px; }
.butterfly { position:absolute; left:9px; bottom:15px; font-size:19px; opacity:0; }
.butterfly.second { left:39px; font-size:15px; filter:hue-rotate(103deg); }
@media (max-width: 900px) {
  .side-couple { right:-18px; width:76px; bottom:145px; }
}
@media all {
  .garden.stir .butterfly { animation: butterfly-flight 2.4s ease-in-out both; }
  .garden.stir .butterfly.second { animation-delay:.22s; }
  .garden.stir .garden-cat { animation: garden-hop .68s .16s ease-in-out; }
  @keyframes butterfly-flight {
    0% { opacity:0; transform:translate(0,0) rotate(-12deg); }
    22% { opacity:1; transform:translate(17px,-26px) rotate(12deg); }
    65% { opacity:1; transform:translate(3px,-57px) rotate(-17deg); }
    100% { opacity:0; transform:translate(49px,-95px) rotate(13deg); }
  }
  @keyframes garden-hop {
    0%,100% { transform:translateY(0); }
    44% { transform:translateY(-13px) rotate(-6deg); }
  }
}


/* The opening arch, botanical letter, and closing card share the gold trim. */
:root { --burgundy: #67283e; --foil: #ddbe7d; }
body { background: radial-gradient(ellipse at 50% 38%,#f9f2e2,#efdfc2); }
.cover { min-height: max(620px, 77svh); background: radial-gradient(ellipse at center,#fff9ed,#ead6ac); }
.arch-stage { position:absolute; inset:16px 0 0; pointer-events:none; visibility:hidden; }
.cover.revealed .arch-stage { visibility:visible; }
.burgundy-arch {
  position:absolute; inset:0 max(12px,calc((100% - 820px)/2)) 0;
  background:linear-gradient(155deg,#81364d,#5b2239 77%);
  clip-path:shape(from 50% 0%, curve to 61% 10% with 54% 8% / 57% 8%, curve to 68% 15% with 65% 9% / 68% 11%, curve to 77% 20% with 73% 13% / 78% 16%, curve to 85% 29% with 82% 18% / 86% 23%, curve to 93% 40% with 92% 27% / 94% 34%, curve to 97% 55% with 99% 39% / 99% 49%, line to 97% 100%, line to 3% 100%, line to 3% 55%, curve to 7% 40% with 1% 49% / 1% 39%, curve to 15% 29% with 6% 34% / 8% 27%, curve to 23% 20% with 14% 23% / 18% 18%, curve to 32% 15% with 22% 16% / 27% 13%, curve to 39% 10% with 32% 11% / 35% 9%, curve to 50% 0% with 43% 8% / 46% 8%, close);
}
@supports not (clip-path:shape(from 50% 0%, line to 100% 100%, close)) {
  .burgundy-arch { border-radius:50% 50% 0 0 / 43% 43% 0 0; }
}
.cover .card { position:relative; z-index:1; padding-top:140px; }
.cover.revealed .card, .cover.revealed .card .kicker, .cover.revealed .motto, .cover.revealed .place { color:#fff2d6; }
.cover.revealed h1 i, .cover.revealed .flourish, .cover.revealed .kicker span { color:var(--foil); }
.cover.revealed h1 { font-size:clamp(3.05rem,8vw,7.2rem); }
.cover.revealed .button { background:#f5e4bc; color:#552339; }
.lantern {
  position:absolute; top:0; width:28px; height:clamp(140px,24vw,221px);
  transform-origin:top center;
}
.lantern-left { left:max(9%,calc(50% - 305px)); }
.lantern-right { right:max(9%,calc(50% - 305px)); height:clamp(130px,21vw,190px); }
.lantern:before {
  content:""; position:absolute; inset:0 auto 43px 50%; width:2px;
  background:repeating-linear-gradient(#dcb875 0 4px,#866338 4px 6px);
}
.lantern span {
  position:absolute; bottom:0; left:3px; width:22px; height:45px;
  border:3px double #ae803e; border-radius:40% 40% 43% 43%;
  background:repeating-linear-gradient(90deg,#ffc975 0 3px,#fff1b4 3px 6px);
  box-shadow:0 0 19px #ffce746a;
}
.lantern span:before,.lantern span:after { content:""; position:absolute; left:50%; translate:-50%; width:27px; height:5px; border-radius:60%; background:#d5a85e; }
.lantern span:before { top:-4px; }.lantern span:after { bottom:-4px; }
.letter { position:relative; isolation:isolate; overflow:hidden; margin-top:clamp(16px,4vw,46px); padding-top:116px; }
.botanical-corners { position:absolute; inset:0; z-index:-1; pointer-events:none; }
.botanical-corners img { position:absolute; width:clamp(84px,23vw,188px); opacity:.67; }
.botanical-corners img:nth-child(1) { left:-18px; top:-20px; rotate:90deg; }
.botanical-corners img:nth-child(2) { right:-18px; top:-20px; rotate:180deg; }
.botanical-corners img:nth-child(3) { left:-18px; bottom:-12px; }
.botanical-corners img:nth-child(4) { right:-18px; bottom:-12px; scale:-1 1; }
.blossoms { position:absolute; top:37%; color:#aa7832; font-size:clamp(13px,2.5vw,26px); writing-mode:vertical-rl; }
.left-blossoms { left:7px; }.right-blossoms { right:7px; }
.peek-window {
  position:absolute; top:20px; width:clamp(55px,11%,89px); height:91px; overflow:hidden;
  border:3px double #be9450; border-radius:50% 50% 4px 4px / 35% 35% 4px 4px;
  opacity:0; background:var(--burgundy); pointer-events:none;
}
.alfi-window { left:17%; }.ajmal-window { right:17%; }
.peek-window img { width:100%; position:absolute; top:4px; left:0; }
.final-card {
  isolation:isolate; position:relative; overflow:hidden; text-align:center;
  border:1px solid #bea069; border-radius:8px; background:#f9eed8;
  width:min(1016px,calc(100% - 32px)); margin:clamp(24px,5vw,58px) auto 0;
  box-shadow:0 18px 46px #674a2d14; padding:24px clamp(12px,8vw,120px) 54px;
}
.final-card .details { display:grid; margin:0; padding:0; gap:6px; }
.final-card .details > div { box-shadow:none; border:0; outline:0; background:transparent; padding:15px 10px; }
.final-card h2,.final-ornament { color:var(--burgundy); }
.final-ornament { font-size:28px; }
.arabic { display:block; font-size:1.18em; font-family:"Arabic Typesetting","Noto Naskh Arabic",Tahoma,serif; }
.nikkah-label { display:block; margin-top:4px; font-size:.55em; letter-spacing:.08em; }
.peacock { position:absolute; bottom:37px; z-index:-1; font-size:clamp(35px,9vw,99px); }
.peacock-left { left:5px; }.peacock-right { right:5px; scale:-1 1; }
.palace-border {
  position:absolute; height:31px; inset:auto 0 0; border-block:3px double #bc9150;
  background:radial-gradient(ellipse at 50% 100%,#f2d69f 0 35%,#c58e5b 37% 42%,transparent 44%) 0 0/36px 100%, #78384c;
}
@media (max-width:650px) {
  .letter { padding-inline:28px; }
  .final-card .details { grid-template-columns:1fr; }
  .final-card .details > div+div { border-top:1px solid #d7bc8a; }
  .peacock { bottom:32px; }
}
@media all {
  .cover.revealed .burgundy-arch { animation: arch-drop 1s cubic-bezier(.35,0,.23,1) both; }
  .cover.revealed .card { animation: arrive .85s .62s both; }
  .cover.revealed .lantern { animation: lantern-drop 1.3s .65s cubic-bezier(.31,0,.21,1) both; }
  .cover.revealed .lantern-right { animation-delay:.83s; }
  .stationery-enter .botanical-corners img { animation: leaves-in .9s .15s ease-in-out both; }
  .stationery-enter .left-blossoms { animation: gold-in .85s .53s ease-in-out both; }
  .stationery-enter .right-blossoms { --blossom-x:20px; animation:gold-in .85s .66s ease-in-out both; }
  .stationery-enter .peek-window { animation: peek 3.6s .62s ease-in-out both; }
  .stationery-enter .ajmal-window { animation-delay:.82s; }
  @keyframes arch-drop { from { transform:translateY(-103%); } to { transform:translateY(0); } }
  @keyframes lantern-drop {
    0% { transform:translateY(-110%) rotate(-7deg); }
    68% { transform:translateY(0) rotate(6deg); }
    86% { transform:rotate(-3deg); }
    100% { transform:rotate(0); }
  }
  @keyframes leaves-in { from { scale:.72; opacity:0; } to { opacity:.67; } }
  @keyframes gold-in { from { opacity:0; translate:var(--blossom-x,-20px); } to { opacity:1; translate:0; } }
  @keyframes peek {
    0%,100% { opacity:0; transform:translateY(12px) scale(.9); }
    18%,78% { opacity:1; transform:translateY(0) scale(1); }
  }
}

/* Supplied stationery is laid up as separate layers so each can enter on cue. */
.invitation-locked { overflow:hidden; overscroll-behavior:none; }
.invitation-locked body { overflow:hidden; }
.cover {
  min-height:max(690px, 92svh);
  background:#590825 url(opening-original.webp) center / 100% 100% no-repeat;
}
.cover.sealed { min-height:100svh; }
.cover { width:min(100%,780px); margin-inline:auto; }
.cover:not(.sealed) { min-height:max(690px,100svh); }
.cover > .botany, .cover > .frame { display:none; }
.opening { z-index:3; }
.packet { width:min(60vw,350px); }
.cover .arch-stage { inset:0; visibility:visible; }
.cover.sealed .lantern-art, .cover.sealed .hero-couple { visibility:hidden; }
.cover.sealed .sound-choice { color:#fff2d6; }
.cover .burgundy-arch {
  inset:0; width:100%; height:100%; margin:auto;
  object-fit:fill; clip-path:none; background:none; border-radius:0;
}
.lantern-art {
  position:absolute; left:50%; top:0; width:min(87%,680px); height:43%;
  translate:-50% 0; object-fit:fill;
}
.hero-couple {
  position:absolute; bottom:1%; left:50%; width:clamp(155px,25vh,225px);
  height:auto; translate:-50% 0; filter:drop-shadow(0 5px 7px #2f152255);
}
.cover .card { padding:75px 2px 240px; }
.cover.revealed .card .button { margin-top:0; }
.peek-window { opacity:1; }
@media (max-width:650px) {
  .cover .card { padding-top:80px; }
  .card .kicker { letter-spacing:.17em; }
}
@media all {
  .cover.revealed .lantern-art { animation:lantern-drop 1.25s .65s cubic-bezier(.31,0,.21,1) both; transform-origin:top; }
  .stationery-enter .peek-window { animation:arrive .85s .62s both; }
  .stationery-enter .ajmal-window { animation-delay:.82s; }
  .cover.revealed .burgundy-arch, .cover.revealed .card, .cover.revealed .card > * { animation:none; }
}

.cover.revealed h1 {
  display:grid;
  justify-items:center;
  gap:.02em;
  font-style:italic;
  color:#f5dca1;
  font-size:clamp(2.65rem,6vw,4.5rem);
  line-height:.98;
  letter-spacing:-.035em;
  margin:12px auto;
}
.cover.revealed h1 i { font-size:.46em; line-height:1.25; }
.cover.revealed .card { padding-top:80px; }
.cover.revealed .flourish { margin:11px auto; }
.cover.revealed .place { margin:7px 0 15px; }
.cover.revealed .motto { font-size:clamp(16px,2.4vw,24px); }
.cover.revealed .date { font-size:clamp(17px,2.7vw,24px); }
.hero-couple { bottom:2.5%; }
@media (max-height:720px) {
  .cover.revealed .card { padding-top:66px; }
}

.hero-couple {
  width:clamp(220px, 56vw, 370px);
  max-width:80%;
  max-height:43%;
  object-fit:contain;
  object-position:center bottom;
}
.cover.revealed .card {
  padding-top:clamp(77px, 14svh, 125px);
  padding-bottom:clamp(305px, 49svh, 455px);
}
@media all {
  .cover.revealed .card {
    animation: opening-reveal .9s .14s cubic-bezier(.33,0,.25,1) both;
  }
  .cover.revealed .hero-couple {
    animation: opening-reveal 1.05s .38s cubic-bezier(.33,0,.25,1) both;
  }
  @keyframes opening-reveal {
    from { opacity:0; transform:translateY(18px); }
    to { opacity:1; transform:translateY(0); }
  }
}

@media (min-width:900px) {
  .cover.revealed .card { padding-bottom:clamp(365px,55svh,515px); }
  .hero-couple { max-height:38%; }
}

/* The paper emerges between the lifted flap and the front pocket. */
.opening.unfold .flap { z-index:0; }
.opening.unfold .insert { z-index:2; }
.opening.unfold .pocket { z-index:3; }
@media all {
  .opening.unfold .flap { animation-name:fold-behind-paper; }
  @keyframes fold-behind-paper {
    0% { transform:rotateX(0); z-index:4; }
    30% { z-index:0; }
    100% { transform:rotateX(171deg); z-index:0; }
  }
}

.floral-bridge {
  height:0; position:relative; z-index:2; pointer-events:none;
  width:min(100%,780px); margin:0 auto;
}
.floral-bridge img {
  position:absolute; top:clamp(-100px,-13vw,-54px); width:clamp(68px,16vw,158px);
}
.floral-bridge img:first-child { left:0; transform-origin:left top; }
.floral-bridge img:last-child { right:0; transform-origin:right top; --sway:-1deg; }
.letter,.final-card {
  background:#590825 url(opening-original.webp) center / 100% 100% no-repeat;
  border:0; outline:0; color:#fff0da;
  width:min(100%,780px);
  margin:0 auto;
  border-radius:0;
  box-shadow:none;
}
.letter { margin:0 auto; padding:clamp(128px,22vw,187px) clamp(39px,11vw,110px) clamp(100px,18vw,165px); }
.letter .botanical-corners { display:none; }
.letter .kicker,.letter .invocation,.letter .weds { color:#f1d396; }
.letter h2,.letter h3 { color:#f8dda4; }
.letter p,.final-card .details p { color:#fff0d9; }
.letter .peek-window {
  top:clamp(52px,9vw,94px); height:clamp(65px,12vw,89px);
  background:radial-gradient(ellipse at 43% 28%,#fffdf2 9%,#f6e7c9 82%);
  box-shadow:0 5px 15px #32061855;
}
.alfi-window { left:calc(50% - 79px); }.ajmal-window { right:calc(50% - 79px); }
.final-card { padding:clamp(88px,15vw,140px) clamp(40px,12vw,145px) clamp(118px,18vw,155px); }
.final-card .details { grid-template-columns:1fr; }
.final-card .details .kicker,.final-ornament,.final-card #ceremony h2 { color:#f6d691; }
.final-card .details #venue {
  background:#fff3db; color:#61213a; border:3px double #c29a56; margin-top:10px;
  border-radius:40% 40% 4px 4px / 17% 17% 4px 4px; padding:23px 12px 15px;
}
.final-card #venue .kicker,.final-card #venue p { color:#624134; }
.final-card #venue h2 { font-size:clamp(1.4rem,3.6vw,2.15rem); }
.final-card .details .under { color:inherit; }
.final-card .peacock { z-index:0; bottom:11%; width:clamp(40px,10%,80px); pointer-events:none; }
.final-card .peacock img { display:block; width:100%; }
.final-card .peacock-left { left:6%; }.final-card .peacock-right { right:6%; }
.final-card .palace-border { display:none; }
@media all {
  .floral-bridge img { animation:foliage-sway 8s ease-in-out infinite alternate; }
  .floral-bridge img:last-child { animation-delay:-3.4s; }
  @keyframes foliage-sway {
    from { rotate:0deg; translate:0 0; }
    to { rotate:var(--sway,1deg); translate:0 2px; }
  }
}

.floral-bridge img { height:clamp(125px,24vw,224px); object-fit:fill; }
.gentle-foliage { position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:-1; }
.gentle-foliage img { position:absolute; bottom:-18px; width:clamp(68px,16vw,145px); opacity:.36; filter:sepia(1) saturate(.8) brightness(1.4); }
.gentle-foliage img:first-child { left:-16px; transform-origin:left bottom; }
.gentle-foliage img:last-child { right:-16px; scale:-1 1; transform-origin:right bottom; --sway:-1deg; }
@media all {
  .gentle-foliage img { animation:foliage-sway 10s ease-in-out infinite alternate; }
  .gentle-foliage img:last-child { animation-delay:-4s; }
}

/* Keep the swaying flowers inside the shared card width while they cross the seam. */
.floral-bridge { clip-path:inset(-130px 0 -245px); }
html:not(.invitation-locked) { overflow-x:clip; }

/* The burgundy stationery stays put while its lettering enters. */
@media all {
  .letter.stationery-enter,.letter.stationery-enter .peek-window { animation:none; }
  .letter.stationery-enter > :is(h2,h3,p,.weds) {
    animation:stationery-title-in .85s ease-in-out both;
    animation-delay:.1s;
  }
  .letter.stationery-enter > p { animation-delay:.23s; }
  .floral-bridge img { animation-duration:6.5s; }
  .gentle-foliage img { animation-duration:8s; }
  .floral-bridge img:last-child,.gentle-foliage img:last-child { --sway:-4deg; --drift:-7px; }
  @keyframes foliage-sway {
    from { rotate:0deg; translate:0 0; }
    to { rotate:var(--sway,4deg); translate:var(--drift,7px) 4px; }
  }
}
.final-card .details #venue {
  background:transparent; border:0; border-radius:0; margin:0; color:#fff0da; padding:8px 0 16px;
}
.final-card #venue .kicker,.final-card #venue p { color:#fff0d9; }
.final-card #venue h2 { color:#f6d691; }
.final-card .details #ceremony { padding-inline:0; }
.gold-divider { display:flex; align-items:center; gap:5px; justify-content:center; color:#eacb89; margin:12px auto 7px; width:min(82%,280px); }
.gold-divider:before,.gold-divider:after { content:""; flex:1; height:1px; background:linear-gradient(90deg,transparent,#e6bd76); }
.gold-divider:after { transform:scaleX(-1); }
.gold-divider span { line-height:1; font-size:20px; }
.ceremony-date { display:grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:clamp(7px,2vw,24px); width:min(100%,390px); margin:12px auto; color:#f7d894; }
.date-center { display:grid; gap:1px; text-transform:uppercase; font-size:.83rem; letter-spacing:.1em; }
.date-center strong { font-size:clamp(34px,8vw,57px); line-height:1; font-weight:400; letter-spacing:0; }
.date-side { border-block:1px solid #d9b679; padding:6px 0; font-size:clamp(12px,2.3vw,16px); line-height:1.2; }
.date-side small { font-size:10px; color:inherit; }
.final-card .hijri-date { margin:6px auto; font-size:15px; }
.final-card .peacock { bottom:8.5%; width:clamp(51px,14%,108px); }
.final-card .peacock-left { left:4%; }.final-card .peacock-right { right:4%; }

.final-card { padding-bottom:clamp(210px,39vw,290px); }
.final-card .peacock { bottom:3.6%; width:clamp(132px,28%,216px); }
.final-card .peacock-left { left:4%; }
.final-card .peacock-right { right:4%; }

@media all {
  .floral-bridge img,.gentle-foliage img {
    animation:flower-breeze 5.5s ease-in-out infinite alternate;
  }
  .gentle-foliage img { animation-duration:6.7s; }
  .floral-bridge img:last-child,.gentle-foliage img:last-child {
    --breeze-angle:-8deg;
    --breeze-offset:-15px;
    animation-delay:-2.7s;
  }
  @keyframes flower-breeze {
    from { rotate:0deg; translate:0 0; }
    to { rotate:var(--breeze-angle,8deg); translate:var(--breeze-offset,15px) 7px; }
  }
}

/* Two hinged shutters reveal the ivory balcony and its portrait together. */
.letter .peek-window {
  width:clamp(64px,12%,99px);
  height:clamp(72px,13vw,104px);
  isolation:isolate;
  perspective:260px;
  background:#fbebcd;
}
.letter .alfi-window { left:auto; right:calc(50% + 8px); }
.letter .ajmal-window { right:auto; left:calc(50% + 8px); }
.peek-window .balcony-portrait {
  position:absolute; inset:auto 0 6px;
  width:100%; height:90%; object-fit:contain; object-position:center bottom;
}
.balcony-shutters { position:absolute; inset:0; z-index:2; pointer-events:none; }
.balcony-rail {
  position:absolute; inset:auto 0 0; height:16%;
  z-index:1; border-top:2px solid #c59853;
  background:repeating-linear-gradient(90deg,#7a3a47 0 3px,#f1d79e 3px 5px,#ad7950 5px 7px);
}
@media all {
  .letter .peek-window { background:#63223a; --shutter-lag:0s; }
  .letter .ajmal-window { --shutter-lag:.18s; }
  .balcony-shutters::before,.balcony-shutters::after {
    content:""; position:absolute; top:0; bottom:0; width:51%;
    border:1px solid #b88d57;
    background:repeating-linear-gradient(0deg,#67243b 0 7px,#8a4e49 7px 8px);
    backface-visibility:hidden;
  }
  .balcony-shutters::before { left:0; transform-origin:left center; --swing:-112deg; }
  .balcony-shutters::after { right:0; transform-origin:right center; --swing:112deg; }
  .letter .balcony-portrait { opacity:0; transform:translateY(13px); }
  .letter.stationery-enter .peek-window {
    animation:balcony-ivory 1.12s calc(.18s + var(--shutter-lag)) ease-in-out both;
  }
  .letter.stationery-enter .balcony-shutters::before,.letter.stationery-enter .balcony-shutters::after {
    animation:shutter-open 1.12s calc(.18s + var(--shutter-lag)) cubic-bezier(.37,0,.22,1) both;
  }
  .letter.stationery-enter .balcony-portrait {
    animation:balcony-peek .68s calc(.64s + var(--shutter-lag)) ease-out both;
  }
  @keyframes balcony-ivory {
    0%,14% { background-color:#63223a; }
    100% { background-color:#fbebcd; }
  }
  @keyframes shutter-open {
    from { transform:rotateY(0); }
    to { transform:rotateY(var(--swing)); }
  }
  @keyframes balcony-peek {
    from { opacity:0; transform:translateY(13px) scale(.96); }
    to { opacity:1; transform:translateY(0) scale(1); }
  }
}

html.guided-scroll,html.invitation-locked { scroll-behavior:auto; }
.balcony-shutters { transform-style:preserve-3d; -webkit-transform-style:preserve-3d; }
.balcony-shutters::before,.balcony-shutters::after { -webkit-backface-visibility:hidden; }

@media (max-width:600px) {
  .cover,.letter,.final-card {
    background-image:url(mobile-frame-top.webp),url(mobile-frame-bottom.webp),url(mobile-frame-edge.webp);
    background-size:100% auto,100% auto,100% 2px;
    background-position:center top,center bottom,center;
    background-repeat:no-repeat,no-repeat,repeat-y;
  }
  .cover { min-height:100vh; }
  .cover:not(.sealed) { min-height:max(660px,100svh); }
  .cover.revealed .card {
    padding:clamp(66px,11vh,106px) 12px clamp(226px,64vw,326px);
    width:100%;
  }
  .letter { padding-inline:clamp(28px,8.5vw,47px); padding-bottom:108px; }
  .letter h2 { font-size:clamp(27px,7.8vw,40px); }
  .letter p,.final-card .details p { font-size:clamp(15px,4.4vw,18px); }
  .final-card { padding-inline:clamp(28px,9vw,46px); }
  .hero-couple { width:clamp(195px,57vw,325px); max-height:38%; bottom:2.5%; }
  .lantern-art { width:87%; height:auto; max-height:44%; }
  .opening { padding-block:env(safe-area-inset-top) env(safe-area-inset-bottom); }
  .playback { right:max(10px,env(safe-area-inset-right)); }
}


@media (max-width:600px) {
  .letter { padding-bottom:max(122px,31vw); }
  .letter > p:last-child { max-width:23ch; }
  .letter > h3:last-of-type { font-size:clamp(27px,7.5vw,35px); }
}

.motion-choice { margin-top:6px; }
html.motion-off { scroll-behavior:auto; }
html.motion-off *,html.motion-off *::before,html.motion-off *::after {
  animation:none!important; transition:none!important;
}
html.motion-off .letter .peek-window { background:#fbebcd; }
html.motion-off .balcony-shutters { display:none; }
html.motion-off .letter .balcony-portrait { opacity:1; transform:none; }
