/* Roshni & Nikhil — Keepsake edition. Mobile-first art direction. */
:root {
  --page: #F9F0E7;
  --page-2: #F2E4D7;
  --ink: #652B39;
  --muted: #8F6E6A;
  --gold: #B38B50;
  --gold-soft: rgba(179, 139, 80, .38);
  --foil: linear-gradient(115deg, #9A6D32, #DBB773 36%, #987038 54%, #E8C88D 75%, #A7793D);
  --ph-a: #EBD6C9;
  --ph-b: #F7E9D8;
  --shadow: 0 16px 40px rgba(84, 29, 45, .16);
  --scrim: rgba(249, 240, 231, .9);
  --royal: #74172E;
  --royal-deep: #510F24;
  --royal-ink: #FFF4DF;
  --royal-muted: #EBCDBB;
  --champagne: #EED5A1;
  --ruby: #8F203A;
  --ruby-hi: #BE4961;
  --ruby-lo: #5A0D24;
  --sapphire: #8F203A;
  --obj: #FFF9ED;
  --obj-2: #F6EADA;
  --obj-ink: #652B39;
  --obj-muted: #856664;
  --obj-line: rgba(177, 127, 65, .49);
  color-scheme: light;
}

html { background: #5A1427; scroll-behavior: smooth; }
body { background: var(--page); }
.foil, .foil-bright { filter: saturate(.85); }
.sec-title { color: var(--ink); }
.kicker { font-size: .94rem; letter-spacing: .12em; }
.cream, .couple, .events, .closing { background-color: var(--page); }
.cream, .story-v2, .gallery, .events, .closing {
  background-image: radial-gradient(circle at 2px 2px, rgba(123, 48, 58, .03) 1px, transparent 1.5px);
  background-size: 13px 13px;
}
.invite-sec .jaali-bg, .gallery .jaali-bg, .royal .jaali-bg { opacity: .08; }
.royal { margin: 0; background: #74172E; background-image: radial-gradient(ellipse at 20% 15%, rgba(245, 195, 163, .12), transparent 55%), radial-gradient(ellipse at 80% 100%, rgba(39, 3, 21, .27), transparent 55%); }
.royal .sec-title { color: #FFF0DD; }
.royal .kicker, .royal .flourish { color: #EAD1A4; }
.edge { color: #74172E; }
.btn.primary, .round.solid, .scroll-cue { background: var(--royal); color: #FFF4E6; }
.round { box-shadow: 0 3px 12px rgba(99, 34, 52, .08); }

/* Scene 1 — soft, tactile, illustrated envelope with a stillness before opening. */
html.js .cover {
  background: #FAF9F5;
  color: var(--ink);
}
.cover .jaali-bg, .cover .lantern { display: none; }
.cover-top { width: 100%; max-width: 25rem; }
.cover-title, .cover-title[lang='en'] { margin: .35rem 0 0; color: var(--ink); font-size: clamp(2.45rem, 9vw, 3.15rem); letter-spacing: .01em; }
.cover-shloka { margin: .3rem auto 0; max-width: 28ch; color: #906B64; font-size: .86rem; line-height: 1.56; }
.cover-edition { margin: 1.2rem 0 0; font-family: var(--f-ui); color: #8F6654; font-size: .61rem; font-weight: 500; letter-spacing: .26em; }
.cover .lang { margin: 0 auto 1.25rem; background: rgba(255, 250, 241, .64); border: 1px solid rgba(173, 123, 78, .3); box-shadow: 0 4px 18px rgba(100, 48, 42, .08); }
.cover .lang button { color: #774D45; }
.cover .lang .thumb { background: #DDBD91; }
.cover .envelope { margin: 1.6rem auto 1.25rem; width: min(82vw, 390px); filter: drop-shadow(0 12px 15px rgba(77, 30, 35, .13)); }
.env-back { box-shadow: 0 20px 36px rgba(94, 39, 46, .24); }
.env-front { background: linear-gradient(160deg, #FDF6E9, #F3E5D0 58%, #E7D4B9); }
.flap-front { background: linear-gradient(180deg, #FFF9ED 0%, #F6EAD7 75%, #EAD6B8 100%); }
.seal { box-shadow: 0 8px 12px rgba(79, 15, 36, .29), inset 0 -4px 7px rgba(0, 0, 0, .23), inset 0 3px 5px rgba(255, 255, 255, .23); }
.cover-hint { color: #724342; font-size: .77rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.cover-hint::before { content: '✦'; margin-right: .6rem; color: var(--gold); }
.cover-hint::after { content: '✦'; margin-left: .6rem; color: var(--gold); }

/* Scene 2 — editorial palace garden, with live, accessible names. */
.hero { background: #F6E4D4; }
.hero .hero-art { background-position: center top; }
.hero .lantern { display: none; }
.hero-scrim { height: 60%; background: linear-gradient(180deg, rgba(252, 239, 221, .16), rgba(253, 237, 218, .5) 45%, transparent); }
.hero-frame { inset: 14px; border-color: rgba(129, 55, 51, .26); }
.hero-frame::before { border-color: rgba(201, 156, 101, .38); }
.hero-content { padding-top: clamp(10rem, 27vh, 16rem); }
.hero-content .ganesha { width: 43px; height: 43px; color: #B88E4E; }
.hero-kicker { margin-top: .9rem; font-size: .7rem; letter-spacing: .19em; color: #875C59; }
.names { margin-top: .7rem; font-size: clamp(4.1rem, 18vw, 6.5rem); line-height: .99; }
.names .script { background: none; -webkit-text-fill-color: #74172E; color: #74172E; }
.names .amp { background: none; -webkit-text-fill-color: #B08B52; color: #B08B52; font-size: .52em; }
.hero-date { font-family: var(--f-ui); color: #6D3542; font-size: .95rem; font-weight: 500; }
.hero-personal { max-width: 25ch; margin: 1.4rem auto 0; color: #875F55; font-family: var(--f-en); font-style: italic; font-size: 1.35rem; line-height: 1.2; }
.scroll-cue { bottom: calc(env(safe-area-inset-bottom, 0px) + 1.1rem); background: rgba(255, 248, 236, .88); color: #74323F; box-shadow: 0 0 0 1px rgba(174, 131, 78, .35), 0 8px 20px rgba(58, 24, 35, .09); }

/* Scene 3 — printed invitation, richer paper and slower breathing room. */
.invite-sec { padding: 5rem 0 5.5rem; }
.scroll { filter: drop-shadow(0 14px 18px rgba(94, 52, 52, .13)); }
.paper { background: linear-gradient(90deg, rgba(181, 133, 75, .19), transparent 7%, transparent 93%, rgba(181, 133, 75, .19)), #FBF1DF; }
.paper-in { padding-top: 3.3rem; padding-bottom: 3rem; }
.paper-shloka { color: #8C344C; }
.p-names .script { background: none; -webkit-text-fill-color: #7A213A; color: #7A213A; }

/* Scene 4 — one shared photograph, playful cutout and an envelope-style secret note. */
.story-v2 { position: relative; overflow: hidden; padding: 5rem 1.1rem 4.75rem; background-color: #F7ECE5; }
.story-v2::before, .story-v2::after { position: absolute; color: rgba(166, 107, 91, .17); font: 5rem var(--f-en); pointer-events: none; }
.story-v2::before { content: '❦'; top: 1rem; left: -1rem; transform: rotate(-20deg); }
.story-v2::after { content: '❦'; bottom: .5rem; right: -1rem; transform: rotate(155deg); }
.story-v2 .sec-head { position: relative; z-index: 2; }
.story-intro { position: relative; z-index: 2; max-width: 23ch; margin: .35rem auto 0; color: #846764; font-family: var(--f-en); font-size: 1.25rem; font-style: italic; line-height: 1.35; text-align: center; }
.duo-stage { position: relative; width: min(100%, 28rem); margin: 1.25rem auto 0; padding: 4.1rem 0 1.2rem; }
.birds-button { position: absolute; top: 0; left: 50%; z-index: 4; width: min(68vw, 17rem); margin: 0; padding: 0; transform: translateX(-50%); background: none; border: none; cursor: pointer; touch-action: manipulation; }
.bird-cutout { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 4px rgba(91, 46, 45, .15)); animation: mynaFloat 4.7s ease-in-out infinite; }
.birds-button.flutter .bird-cutout { animation: birdsFlutter .8s cubic-bezier(.2, .8, .3, 1); }
@keyframes mynaFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
@keyframes birdsFlutter { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-28px) rotate(-8deg); } 58% { transform: translateY(-18px) rotate(6deg); } }
.duo-polaroid { position: relative; width: min(78%, 21rem); margin: .7rem auto 0; padding: 12px 12px 0; transform: rotate(-3deg); background: #FFFCF2; box-shadow: 0 0 0 1px rgba(112, 73, 65, .08), 0 22px 44px rgba(79, 32, 45, .2); }
.duo-polaroid::before { content: ''; position: absolute; z-index: 3; width: 76px; height: 24px; top: -11px; left: calc(50% - 38px); background: rgba(207, 167, 130, .51); transform: rotate(2deg); clip-path: polygon(2% 4%, 100% 0, 99% 95%, 0 100%); }
.duo-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #E6CFC1; }
.duo-photo.art.ph { background: linear-gradient(145deg, #DDC0B4, #F4E3D6 48%, #E4B8AF); }
.duo-photo.art.ph::after { display: none; }
.photo-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .6rem; color: #7D3F4D; }
.photo-fallback::before { content: '✦'; font-size: 2.3rem; color: rgba(151, 84, 76, .52); }
.photo-fallback span { font-family: var(--f-script); font-size: 4.5rem; line-height: 1; }
.photo-fallback span i { font-size: .55em; font-weight: 400; }
.photo-fallback small { max-width: 16ch; font: italic .95rem var(--f-en); letter-spacing: .03em; }
.duo-photo:not(.ph) .photo-fallback { display: none; }
.duo-caption { height: 57px; display: flex; justify-content: center; align-items: center; gap: .6rem; color: #77394A; font-family: var(--f-script); font-size: 1.85rem; }
.duo-caption span { color: #BA8C89; font-size: 1.25rem; }
.pocket-note { position: relative; z-index: 3; display: flex; align-items: center; gap: .7rem; justify-content: space-between; margin: -4px 0 0 auto; transform: rotate(5deg); padding: .65rem .8rem; max-width: 13rem; border: 1px dashed #BF8E82; border-radius: 3px; color: #78364B; background: #F8D5D0; font: 600 .72rem var(--f-ui); letter-spacing: .03em; box-shadow: 0 6px 15px rgba(95, 52, 51, .12); cursor: pointer; }
.pocket-note.opened { background: #F0C4C1; }
.pocket-note span:last-child { font-size: 1.1rem; }
.pocket-message { position: relative; width: min(90%, 22rem); margin: 1rem auto 0; padding: 1.6rem 1.5rem; transform: rotate(-2deg); color: #714152; background: #FFF8EC; border: 1px solid #DEC6A7; box-shadow: 0 12px 25px rgba(94, 41, 52, .12); text-align: center; animation: noteUnfold .45s ease both; }
.pocket-message[hidden] { display: none !important; }
.pocket-message p { margin: .6rem auto 0; max-width: 24ch; font: italic 1.4rem/1.3 var(--f-en); }
.pocket-heart { color: #A34D60; font-size: 1.15rem; }
.loveburst { position: absolute; top: 1.5rem; left: 50%; z-index: 5; transform: translateX(-50%); font-size: 1.6rem; color: #B65D6F; animation: loveRise 1.4s ease-out forwards; pointer-events: none; }
@keyframes noteUnfold { from { transform: translateY(-12px) rotate(1deg); opacity: 0; } to { transform: translateY(0) rotate(-2deg); opacity: 1; } }
@keyframes loveRise { from { opacity: 0; transform: translate(-50%, 14px) scale(.6); } 35% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -60px) scale(1.2); } }
.story-v2 .quote { max-width: 23ch; margin-top: 1.8rem; color: #78545C; }

/* Scene 5/6 — burgundy paper, polaroids, and a miniature festive dhol. */
.save { padding: 5.5rem 1.2rem 6rem; }
.save .pull-card { background: #FFF8EB; }
.gallery { background-color: #F9F0E7; }
.polaroid { background: #FFFCF5; box-shadow: 0 14px 30px rgba(90, 35, 48, .17); }
.lights .wire { stroke: rgba(103, 50, 51, .35); }
.events { padding-top: 5rem; }
.dhol-cutout { display: block; width: min(36vw, 9.5rem); height: auto; margin: .5rem auto 0; transform: rotate(-8deg); filter: drop-shadow(0 8px 8px rgba(97, 38, 47, .13)); animation: dholBeat 3s ease-in-out infinite; }
.book-tease { max-width: 27ch; margin: .35rem auto 0; font: italic 1.2rem/1.3 var(--f-en); color: #8F6662; text-align: center; }
@keyframes dholBeat { 0%, 100% { transform: rotate(-8deg) scale(1); } 45% { transform: rotate(-3deg) scale(1.045); } }
.board { background: radial-gradient(ellipse at 45% 30%, #91384C, #641329 76%, #410F1F); box-shadow: 0 22px 42px rgba(104, 30, 48, .28); }
.lid-face { background: #74172E; }
.lid-face.front .velvet { background: radial-gradient(ellipse at 35% 20%, rgba(255, 223, 189, .13), transparent 68%), repeating-linear-gradient(115deg, rgba(255, 255, 255, .024) 0 1px, transparent 1px 4px); }
.lid .ganesha { color: #E1BD81; }
.contents li { border-color: rgba(234, 206, 163, .36); }
.pp-tag { background: rgba(255, 248, 235, .95); }
.venue-photo { box-shadow: 0 0 0 1px #C9A04F, 0 0 0 6px #74172E, 0 0 0 7px rgba(232, 210, 158, .6), 0 24px 50px rgba(0, 0, 0, .24); }
.closing { padding-top: 5.5rem; }
.strip { background: #74172E; }

@media (max-width: 390px) {
  .cover-edition { letter-spacing: .18em; }
  .hero-content { padding-top: 25vh; }
  .hero-personal { font-size: 1.15rem; }
  .duo-stage { padding-top: 3.3rem; }
  .birds-button { width: min(70vw, 15rem); }
  .duo-polaroid { width: 82%; }
  .pocket-note { font-size: .67rem; }
}
@media (min-width: 768px) {
  .story-v2 { padding-top: 6rem; }
  .duo-stage { width: 28rem; }
  .hero .hero-art { background-position: center 28%; }
  .cover .envelope { width: 390px; }
}
@media (prefers-reduced-motion: reduce) {
  .bird-cutout, .dhol-cutout, .loveburst { animation: none !important; }
  html { scroll-behavior: auto; }
}
