/* ==========================================================
   Dawatnama invitation engine – base styles
   Themes override the variables in :root (see assets/themes)
   ========================================================== */
:root {
  --primary: #0f5f4a;
  --accent: #d4af37;
  --bg: #f7f2e8;
  --card: #fffdf8;
  --ink: #1d1a17;
  --muted: #6d675f;
  --line: rgba(0,0,0,.1);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', serif;
  --radius: 18px;
  --shadow: 0 30px 60px -20px rgba(0,0,0,.35);
  --backdrop: radial-gradient(circle at 30% 20%, #163f35, #071a15 70%);
  --ease: cubic-bezier(.22,1,.36,1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--backdrop); color: var(--ink);
  font-family: var(--font-body); line-height: 1.6; min-height: 100dvh;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.pre-entry { overflow: hidden; height: 100dvh; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- bilingual switching ---------- */
body [lang="ur"] { display: none; font-family: var(--font-urdu); line-height: 2; }
html[data-lang="ur"] [lang="ur"] { display: inline; }
html[data-lang="ur"] [lang="en"] { display: none; }
html[data-lang="ur"] .bi { direction: rtl; }
html[data-lang="ur"] body { font-family: var(--font-urdu); }
.entrance [lang="ur"] { display: block; margin-top: .3em; opacity: .75; font-size: .95em; }

/* One continuous name line, measured again when the font/language/width changes. */
.fit-names { min-width:0; text-align:center; }
.fit-names-line { display:inline-block; white-space:nowrap; max-width:none; font-size:var(--fit-name-size,1em); line-height:1.75; vertical-align:middle; }
html[data-lang="en"] .fit-names [lang="ur"] { display:none; }
html[data-lang="ur"] .fit-names [lang="ur"] { display:inline; font-size:1em; opacity:1; margin:0; line-height:2.1; }
.fit-names-line i { font-size:.7em; padding:0 .15em; }
.entrance .bow-copy .ent-names.fit-names, .demo-design .closing .atelier-signature.fit-names { line-height:0; }

/* ---------- the card (desktop: centred column) ---------- */
.card {
  position: relative; max-width: 640px; margin: 0 auto; background: var(--card);
  box-shadow: var(--shadow); min-height: 100dvh;
}
@media (min-width: 720px) {
  .card { margin: 40px auto; border-radius: 28px; overflow: hidden; min-height: 0; }
}
.sec { padding: 64px 28px; position: relative; scroll-margin-top: 8px; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-title {
  font-family: var(--font-display); font-weight: 400; font-size: 2.1rem; text-align: center;
  margin: 0 0 28px; letter-spacing: .02em; color: var(--primary);
}
.sec-title::after { content: ''; display: block; width: 56px; height: 2px; margin: 12px auto 0; background: var(--accent); }
.muted { color: var(--muted); } .center { text-align: center; }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: 104px; padding-bottom: 56px; background: var(--card); }
.eyebrow { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--muted); margin: 0 0 18px; }
.names { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.name { font-family: var(--font-script); font-weight: 400; font-size: clamp(3rem, 12vw, 4.6rem); margin: 0; color: var(--primary); line-height: 1.15; }
.name [lang="ur"] { font-family: var(--font-urdu); font-size: .75em; }
.amp { font-family: var(--font-display); font-style: italic; font-size: 1.8rem; color: var(--accent); }
.monogram { display: inline-block; margin: 22px auto 10px; padding: 8px 18px; border: 1px solid var(--accent); border-radius: 999px; font-family: var(--font-display); letter-spacing: .3em; font-size: .85rem; color: var(--accent); }
.date { font-family: var(--font-display); font-size: 1.3rem; margin: 10px 0 30px; color: var(--ink); }
.countdown { display: flex; justify-content: center; gap: 10px; }
.countdown > div { min-width: 64px; padding: 10px 6px; background: rgba(0,0,0,.03); border: 1px solid var(--line); border-radius: 12px; }
.countdown b { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; }
.countdown small { font-size: .65rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.countdown b.tick { animation: tick .5s var(--ease); }
@keyframes tick { 0% { transform: translateY(-8px); opacity: 0 } 100% { transform: none; opacity: 1 } }
.scroll-cue { width: 26px; height: 26px; margin: 30px auto 0; position: relative; opacity: .55; }
.scroll-cue span { position: absolute; left: 6px; top: 4px; width: 12px; height: 12px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: translateY(-4px) rotate(45deg); opacity: 0 } 50% { opacity: 1 } 100% { transform: translateY(8px) rotate(45deg); opacity: 0 } }

.ornament { height: 34px; margin: 0 auto; width: 160px; background: center/contain no-repeat var(--ornament, none); opacity: .9; }
.ornament.top { margin-bottom: 20px; } .ornament.bottom { margin-top: 28px; transform: scaleY(-1); }

/* ---------- invitation text ---------- */
.invite-text { text-align: center; }
.frame { padding: 36px 24px; border: 1px solid var(--accent); position: relative; }
.frame::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--line); pointer-events: none; }
.bismillah { font-family: var(--font-urdu); font-size: 1.35rem; line-height: 2.2; margin: 0 0 14px; color: var(--primary); direction: rtl; }
.families { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; margin-bottom: 22px; }
.families > div > .bi:first-child { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; display: block; color: var(--primary); }
.families small { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; line-height: 1.5; }
.fam-amp { font-family: var(--font-display); font-style: italic; color: var(--accent); font-size: 1.5rem; padding-top: 4px; }
.families.single { grid-template-columns: 1fr; }
.lead { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.7; margin: 0; }
.lead [lang="ur"] { font-size: 1.15rem; }

/* ---------- events ---------- */
.events { background: var(--bg); }
.event-list { display: grid; gap: 18px; }
.event { display: grid; grid-template-columns: 62px 1fr; gap: 16px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px -18px rgba(0,0,0,.3); }
.ev-icon { width: 62px; height: 62px; border-radius: 50%; background: var(--primary) center/60% no-repeat; box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--accent); }
.ev-body h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--primary); }
.ev-date { margin: 0; font-weight: 500; font-size: .95rem; }
.ev-venue { margin: 6px 0 0; font-family: var(--font-display); font-size: 1.15rem; }
.ev-addr { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.ev-dress { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
.ev-dress .bi { color: var(--ink); }
.ev-note { margin: 8px 0 0; font-size: .9rem; font-style: italic; color: var(--muted); }
.ev-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 340px) { .event { grid-template-columns: 1fr; } .ev-icon { width: 52px; height: 52px; } }

.icon-mehndi   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cpath d='M12 3c2 3 5 5 5 9a5 5 0 0 1-10 0c0-4 3-6 5-9z'/%3E%3Cpath d='M12 8v9M9 13c1 0 2-1 3-1s2 1 3 1'/%3E%3C/svg%3E"); }
.icon-dholki { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23fff'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M5%209.5C5%208.1%208.1%207%2012%207s7%201.1%207%202.5v5c0%201.4-3.1%202.5-7%202.5s-7-1.1-7-2.5z'/%3E%3Cellipse%20cx='5.6'%20cy='12'%20rx='1.1'%20ry='2.6'/%3E%3Cellipse%20cx='18.4'%20cy='12'%20rx='1.1'%20ry='2.6'/%3E%3Cpath%20d='M7.5%208.4l2%207.4M11%208l2%208M14.5%208.2l2%207.4M9.5%208.1l-2%207.4M13%208l-2%208M16.5%208.4l-2%207.4'%20stroke-width='.9'%20opacity='.85'/%3E%3Cpath%20d='M3%204.5l4%203M21%204.5l-4%203'/%3E%3Ccircle%20cx='2.8'%20cy='4.3'%20r='.9'%20fill='%23fff'/%3E%3Ccircle%20cx='21.2'%20cy='4.3'%20r='.9'%20fill='%23fff'/%3E%3C/svg%3E"); }
.icon-party { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23fff'%20stroke-width='1.5'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203.5l1.9%205.6%205.6%201.9-5.6%201.9L12%2018.5l-1.9-5.6-5.6-1.9%205.6-1.9z'/%3E%3Cpath%20d='M18.5%203v3M17%204.5h3M5.5%2016.5v3M4%2018h3'%20stroke-linecap='round'/%3E%3Ccircle%20cx='19'%20cy='17.5'%20r='1'%20fill='%23fff'%20stroke='none'/%3E%3Ccircle%20cx='4.5'%20cy='6'%20r='.9'%20fill='%23fff'%20stroke='none'/%3E%3C/svg%3E"); }
.icon-mayun    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); }
.icon-baraat   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cpath d='M4 20h16M6 20v-8l6-4 6 4v8'/%3E%3Cpath d='M9 20v-5h6v5M12 8V4M9 5l3-2 3 2'/%3E%3C/svg%3E"); }
.icon-nikah    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Ccircle cx='9' cy='13' r='5'/%3E%3Ccircle cx='15' cy='13' r='5'/%3E%3Cpath d='M12 4l-1.5 3h3z'/%3E%3C/svg%3E"); }
.icon-engagement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Ccircle cx='12' cy='14' r='6'/%3E%3Cpath d='M9 4l3 4 3-4z'/%3E%3C/svg%3E"); }
.icon-aqeeqah { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cpath d='M12 3a4 4 0 0 1 4 4v1a4 4 0 0 1-8 0V7a4 4 0 0 1 4-4zM5 21c0-4 3-7 7-7s7 3 7 7'/%3E%3Cpath d='M9 7c1 1 5 1 6 0'/%3E%3C/svg%3E"); }
.icon-birthday { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cpath d='M4 20h16M5 20v-7h14v7M7 13V9h10v4M12 9V6M12 3v1'/%3E%3C/svg%3E"); }
.icon-milad { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cpath d='M12 3a8 8 0 1 0 8 8 6 6 0 0 1-8-8z'/%3E%3Cpath d='M17 3l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z'/%3E%3C/svg%3E"); }
.icon-graduation { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cpath d='M2 9l10-4 10 4-10 4z'/%3E%3Cpath d='M6 11v5c0 1.5 3 3 6 3s6-1.5 6-3v-5M22 9v6'/%3E%3C/svg%3E"); }
.icon-corporate { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7V5h8v2M3 12h18'/%3E%3C/svg%3E"); }
.icon-walima, .icon-reception { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5'%3E%3Cpath d='M3 16h18M5 16a7 7 0 0 1 14 0M12 9V6M10 6h4M4 20h16'/%3E%3C/svg%3E"); }

/* ---------- hero banner ---------- */
.hero-banner-wrap { width: 100%; max-width: 440px; margin: 0 auto 20px; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 28px -8px rgba(0,0,0,0.18); border: 1px solid var(--accent, rgba(201,162,39,0.3)); }
.hero-banner-img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block; }

/* ---------- story ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 32px; border-left: 2px solid var(--accent); display: grid; gap: 26px; position: relative; }
.timeline li { position: relative; }
.tl-badge { position: absolute; left: -49px; top: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--card), 0 4px 12px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; font-size: .95rem; z-index: 2; }
.tl-card { background: rgba(255,255,255,0.72); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; box-shadow: 0 6px 20px -8px rgba(0,0,0,0.06); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.tl-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(0,0,0,0.12); border-color: var(--accent); }
.tl-meta { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.04); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.tl-date { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.tl-dot { color: var(--muted); font-size: .8rem; }
.tl-loc { font-size: .75rem; color: var(--muted); font-weight: 500; }
.timeline h3 { margin: 4px 0 8px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--primary); }
.timeline p { margin: 0; color: var(--ink); opacity: .88; font-size: .95rem; line-height: 1.6; }
.tl-photo { margin-top: 12px; border-radius: 12px; overflow: hidden; max-height: 220px; border: 1px solid var(--line); box-shadow: 0 4px 14px -4px rgba(0,0,0,0.1); }
.tl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
html[data-lang="ur"] .timeline { padding: 0 32px 0 0; border-left: 0; border-right: 2px solid var(--accent); }
html[data-lang="ur"] .tl-badge { left: auto; right: -49px; }

/* ---------- gallery ---------- */
.gallery { background: var(--bg); }
.masonry { columns: 2; column-gap: 12px; }
.ph { display: block; break-inside: avoid; margin-bottom: 12px; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px -16px rgba(0,0,0,.5); }
.ph img { transition: transform .8s var(--ease); aspect-ratio: auto; }
.ph:hover img { transform: scale(1.05); }
.vid { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.vid iframe { width: 100%; height: 100%; border: 0; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: grid; place-items: center; z-index: 90; padding: 20px; animation: fade .3s; }
.lightbox img { max-height: 90vh; border-radius: 10px; }
.lb-close { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; }
@keyframes fade { from { opacity: 0 } }

/* ---------- forms ---------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 460px; margin: 0 auto; }
.form label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-size: .85rem; font-weight: 500; color: var(--muted); }
.form input:not([type=radio]):not([type=checkbox]), .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
/* the corner drag handle may only change the height, never push the box past its frame */
.form textarea { resize: vertical; max-width: 100%; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 400px) { .seg3 { grid-template-columns: 1fr; } }
.seg label > span { font-size: .88rem; line-height: 1.3; }
.rsvp-why { max-width: 460px; margin: -10px auto 24px; }
.rsvp-alt { margin: 22px 0 0; color: var(--muted); font-size: .9rem; }
.rsvp-alt .btn { margin-top: 10px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg label > span { display: block; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font-weight: 500; transition: .2s; }
.seg input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
.chk { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 6px; }
.chk legend { padding: 0 6px; font-size: .8rem; color: var(--muted); }
.chk label { display: flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--ink); }
.acc { display: grid; gap: 14px; overflow: hidden; transition: max-height .4s var(--ease), opacity .3s; max-height: 600px; }
.acc.hide { max-height: 0; opacity: 0; }
.form-msg { margin: 0; text-align: center; font-size: .9rem; min-height: 1.4em; color: var(--primary); }
.form-msg.err { color: #b3261e; }
.form.done > *:not(.form-msg) { display: none; }
.form.done .form-msg { font-family: var(--font-display); font-size: 1.4rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--primary); background: transparent; color: var(--primary); font-weight: 500; font-size: .92rem; text-decoration: none; transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px var(--primary); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.ghost { font-size: .82rem; padding: 9px 14px; }
.btn.text { border: 0; }
.btn i { width: 16px; height: 16px; flex: 0 0 16px; background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.ic-pin { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 22s7-7 7-12a7 7 0 0 0-14 0c0 5 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 22s7-7 7-12a7 7 0 0 0-14 0c0 5 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); }
.ic-cal { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ic-wa { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18a8 8 0 0 1-4.1-1.1l-.3-.2-3 .8.8-2.9-.2-.3A8 8 0 1 1 12 20zm4.4-6c-.2-.1-1.4-.7-1.6-.8s-.4-.1-.5.1-.6.8-.8 1-.3.2-.5.1a6.5 6.5 0 0 1-3.2-2.8c-.2-.4.2-.4.7-1.3.1-.2 0-.3 0-.4l-.7-1.7c-.2-.5-.4-.4-.5-.4h-.5a1 1 0 0 0-.7.3 2.9 2.9 0 0 0-.9 2.1 5 5 0 0 0 1 2.6c.1.2 1.8 2.8 4.4 3.9 1.6.7 2.2.7 3 .6.5-.1 1.4-.6 1.6-1.1.2-.6.2-1 .1-1.1l-.4-.3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18a8 8 0 0 1-4.1-1.1l-.3-.2-3 .8.8-2.9-.2-.3A8 8 0 1 1 12 20zm4.4-6c-.2-.1-1.4-.7-1.6-.8s-.4-.1-.5.1-.6.8-.8 1-.3.2-.5.1a6.5 6.5 0 0 1-3.2-2.8c-.2-.4.2-.4.7-1.3.1-.2 0-.3 0-.4l-.7-1.7c-.2-.5-.4-.4-.5-.4h-.5a1 1 0 0 0-.7.3 2.9 2.9 0 0 0-.9 2.1 5 5 0 0 0 1 2.6c.1.2 1.8 2.8 4.4 3.9 1.6.7 2.2.7 3 .6.5-.1 1.4-.6 1.6-1.1.2-.6.2-1 .1-1.1l-.4-.3z'/%3E%3C/svg%3E"); }

/* ---------- wishes ---------- */
.wall { display: grid; gap: 12px; margin-top: 28px; }
.wish { padding: 16px 18px; background: var(--bg); border-radius: 14px; border-left: 3px solid var(--accent); animation: wishin .6s var(--ease); }
.wish b { display: block; font-size: .85rem; color: var(--primary); margin-bottom: 4px; }
.wish p { margin: 0; font-size: .95rem; }
.wish time { display: block; font-size: .7rem; color: var(--muted); margin-top: 6px; }
@keyframes wishin { from { opacity: 0; transform: translateY(14px) } }

/* ---------- closing ---------- */
.closing { text-align: center; }
.hashtag { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent); margin: 18px 0; letter-spacing: .04em; max-width: 100%; overflow-wrap: anywhere; }
.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.made-by { margin: 40px 0 0; font-size: .72rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.made-by a { text-decoration: none; color: var(--primary); }

/* ---------- floating controls ---------- */
.controls { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); display: flex; gap: 8px; z-index: 40; opacity: 0; transition: opacity .6s .6s; }
body:not(.pre-entry) .controls { opacity: 1; }
.ctl { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: rgba(20,20,20,.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: .9rem; }
.ctl [lang="ur"] { font-size: .8rem; line-height: 1; }
.bars { display: flex; gap: 2px; align-items: flex-end; height: 16px; }
.bars i { width: 3px; height: 6px; background: #fff; border-radius: 2px; }
.music.on .bars i { animation: bar .8s infinite ease-in-out; }
.music.on .bars i:nth-child(2) { animation-delay: .15s } .music.on .bars i:nth-child(3) { animation-delay: .3s } .music.on .bars i:nth-child(4) { animation-delay: .45s }
@keyframes bar { 0%,100% { height: 5px } 50% { height: 16px } }

/* ---------- petals ---------- */
#petals { position: fixed; inset: 0; pointer-events: none; z-index: 30; opacity: 0; transition: opacity 1.2s; will-change: opacity; }
body:not(.pre-entry) #petals { opacity: 1; }

/* ---------- bottom sheet ---------- */
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 80; display: flex; align-items: flex-end; justify-content: center; animation: fade .25s; }
.sheet-body { background: var(--card); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 24px 24px calc(34px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; animation: up .35s var(--ease); }
@media (min-width: 720px) { .sheet { align-items: center; } .sheet-body { border-radius: 22px; } }
.sheet-body h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.4rem; text-align: center; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } }

/* ==========================================================
   ENTRANCES
   ========================================================== */
.entrance { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.entrance-bg { position: absolute; inset: 0; background: var(--backdrop); }
.entrance.leave { animation: entLeave 1.2s var(--ease) forwards; }
@keyframes entLeave { to { opacity: 0; visibility: hidden; } }
.ent-center { position: relative; text-align: center; color: #fff; padding: 20px; z-index: 2; }
.ent-over { pointer-events: none; }
.ent-names { font-family: var(--font-script); font-size: clamp(2.4rem, 9vw, 3.6rem); margin: 0 0 24px; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.ent-names i { font-family: var(--font-display); font-size: .6em; color: var(--accent); }
.ent-hint { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; margin: 26px 0 0; animation: pulse 2.2s infinite; }
.ent-hint [lang="ur"] { text-transform: none; letter-spacing: 0; }
@keyframes pulse { 50% { opacity: .45 } }

/* --- diya --- */
.diya { position: relative; width: 150px; height: 150px; margin: 10px auto 0; cursor: pointer; }
.diya-bowl { position: absolute; left: 15px; right: 15px; bottom: 18px; height: 52px; border-radius: 0 0 70px 70px / 0 0 50px 50px; background: linear-gradient(#c6743a, #7a3d16); box-shadow: inset 0 -8px 14px rgba(0,0,0,.35), 0 12px 30px -10px #000; }
.diya-bowl::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 16px; border-radius: 50%; background: linear-gradient(#e2a068, #a55a24); }
.wick { position: absolute; left: 50%; bottom: 62px; width: 4px; height: 14px; margin-left: -2px; background: #222; border-radius: 2px; }
.flame { position: absolute; left: 50%; bottom: 74px; width: 26px; height: 46px; margin-left: -13px; transform-origin: 50% 100%; transform: scale(var(--f, 0)); transition: transform .15s;
  background: radial-gradient(ellipse at 50% 90%, #fff5c0 0, #ffb300 35%, #ff6a00 65%, transparent 72%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; will-change: transform;
  animation: flicker .3s infinite alternate; }
.flame-core { position: absolute; left: 50%; bottom: 4px; width: 8px; height: 16px; margin-left: -4px; background: radial-gradient(circle, #fff8dc 40%, transparent 70%); border-radius: 50%; }
@keyframes flicker { from { transform: scale(var(--f, 0)) rotate(-2deg) scaleY(1) } to { transform: scale(var(--f, 0)) rotate(2deg) scaleY(1.06) } }
.diya-glow { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; will-change: transform; border-radius: 50%; transform: translate(-50%, -50%) scale(calc(1 + var(--f, 0) * 30)); background: radial-gradient(circle, rgba(255,190,80,.55), rgba(255,150,40,.15) 40%, transparent 70%); transition: transform .15s; pointer-events: none; }
.hold-ring { position: absolute; left: 50%; top: 50%; width: 190px; height: 190px; transform: translate(-50%, calc(-50% - 22px)); pointer-events: none; }
.hold-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hold-ring circle { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 1.5; }
.hold-ring .prog { stroke: var(--accent); stroke-dasharray: 289; stroke-dashoffset: calc(289 - 289 * var(--f, 0)); transition: stroke-dashoffset .12s linear; }
.entrance-diya.lit .ent-center { animation: bloom 1.2s var(--ease) forwards; }
@keyframes bloom { to { transform: scale(1.4); opacity: 0; } }
.entrance-diya.lit .entrance-bg { animation: whiteout 1.1s .2s var(--ease) forwards; }
@keyframes whiteout { to { background: #fff2cc; } }

/* --- seal / envelope --- */
.envelope { position: relative; width: min(84vw, 340px); aspect-ratio: 1.45; margin: 0 auto; perspective: 1200px; }
.env-back, .env-front, .env-flap { position: absolute; inset: 0; }
.env-back { background: var(--env, #b9925a); border-radius: 8px; box-shadow: 0 30px 50px -20px #000; }
.env-card { position: absolute; left: 6%; right: 6%; top: 8%; bottom: 8%; background: var(--card); border-radius: 6px; color: var(--primary); display: grid; place-items: center; text-align: center; transition: transform 1s .5s var(--ease); z-index: 2; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.env-card .mono { display: block; font-family: var(--font-display); font-size: 2.4rem; letter-spacing: .2em; }
.env-card small { display: block; font-family: var(--font-script); font-size: 1.4rem; margin-top: 4px; }
.env-front { z-index: 3; background: var(--env, #b9925a); border-radius: 8px; clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); box-shadow: inset 0 -20px 30px -20px rgba(0,0,0,.35); }
.env-flap { z-index: 4; background: var(--env-dark, #94733f); border-radius: 8px 8px 0 0; clip-path: polygon(0 0, 100% 0, 50% 58%); transform-origin: top; transition: transform .9s var(--ease); backface-visibility: hidden; }
.seal { position: absolute; z-index: 5; left: 50%; top: 52%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #d94a4a, #7d1212 70%); color: #ffd9d9; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: .05em; box-shadow: 0 6px 14px -4px #000, inset 0 0 0 3px rgba(255,255,255,.15), inset 0 0 0 6px rgba(0,0,0,.15); transition: transform .2s; animation: sealbob 2.4s infinite ease-in-out; }
.seal:hover { transform: scale(1.06); }
@keyframes sealbob { 50% { transform: translateY(-3px) } }
.envelope.open .seal { animation: crack .5s var(--ease) forwards; }
@keyframes crack { 40% { transform: scale(1.15) rotate(-6deg); } to { transform: scale(0) rotate(30deg); opacity: 0; } }
.envelope.open .env-flap { transform: rotateX(180deg); transition-delay: .3s; z-index: 1; }
.envelope.open .env-card { transform: translateY(-58%) scale(1.06); }
.entrance-seal.leave .ent-center { animation: bloom 1.2s var(--ease) forwards; }

/* --- doors --- */
.doors { position: absolute; inset: 0; display: flex; }
.door { flex: 1; position: relative; background: var(--door, #5a3416); transition: transform 1.6s var(--ease); transform-origin: left; overflow: hidden; will-change: transform; }
.door-r { transform-origin: right; }
.door .panel { position: absolute; inset: 8% 10%; border: 3px double var(--accent); border-radius: 220px 220px 0 0; background:
  repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 3px, transparent 3px 26px), radial-gradient(circle at 50% 30%, rgba(255,255,255,.08), transparent 60%); box-shadow: inset 0 0 40px rgba(0,0,0,.5); }
.door .panel::before { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(212,175,55,.5); border-radius: 200px 200px 0 0; }
.door .knocker { position: absolute; top: 50%; width: 34px; height: 34px; border-radius: 50%; border: 5px solid var(--accent); box-shadow: 0 4px 10px rgba(0,0,0,.5); animation: knockerSwing 3s infinite ease-in-out; transform-origin: top; }
.door-l .knocker { right: 14%; } .door-r .knocker { left: 14%; }
@keyframes knockerSwing { 0%,100% { transform: rotate(0) } 50% { transform: rotate(8deg) } }
.door-arch { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px 40px rgba(0,0,0,.7); }
.doors.knock .door-l { animation: knockL .25s; } .doors.knock .door-r { animation: knockR .25s; }
@keyframes knockL { 50% { transform: rotateY(4deg); } } @keyframes knockR { 50% { transform: rotateY(-4deg); } }
.doors.open .door-l { transform: perspective(1400px) rotateY(-110deg); }
.doors.open .door-r { transform: perspective(1400px) rotateY(110deg); }
.knocks { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.knocks i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--accent); transition: background .2s; }
.knocks i.on { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.entrance-door .entrance-bg { background: var(--card); }
.entrance-door.leave .ent-center, .entrance-door.leave .ent-door-layout { animation: bloom 1s var(--ease) forwards; }
.ent-door-layout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: clamp(30px, 8vh, 60px) 20px clamp(40px, 10vh, 70px);
  z-index: 2;
  text-align: center;
  color: #fff;
  pointer-events: none;
}
.door-knocker-zone {
  min-height: 140px;
  flex: 0 0 140px;
  pointer-events: none;
}
.ent-door-top {
  padding-top: 10px;
}
.ent-door-bottom {
  padding-bottom: 10px;
}

/* --- sehra entrance --- */
.sehra-stage { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; perspective: 1000px; }
.sehra-band {
  position: absolute; top: 0; left: 0; right: 0; height: clamp(54px, 9vh, 74px);
  background: linear-gradient(180deg, #dfb74a 0%, #b8860b 55%, #6d4e04 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.5);
  border-bottom: 3px solid #f6e27a; z-index: 4; display: flex; justify-content: center; align-items: center;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.sehra-filigree { position: absolute; inset: 6px 14px; border: 1px dashed rgba(255,255,255,.7); border-radius: 4px; }
.sehra-jewel {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e11d48, #881337 75%);
  border: 3px solid #f6e27a; box-shadow: 0 0 16px rgba(246,226,122,.8), 0 4px 10px rgba(0,0,0,.4);
  display: grid; place-items: center;
}
.sehra-jewel span { width: 12px; height: 12px; border-radius: 50%; background: #0f5f4a; border: 1.5px solid #ffd700; }
.sehra-curtain { position: absolute; top: clamp(54px, 9vh, 74px); left: 0; right: 0; bottom: 0; display: flex; justify-content: space-evenly; pointer-events: none; }
.s-strand {
  position: relative; width: 8px; height: var(--len, 90%); display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  transform-origin: top center; animation: sehraSway 3.2s ease-in-out infinite alternate; animation-delay: calc(var(--i) * 0.12s);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s; will-change: transform, opacity;
}
@keyframes sehraSway { 0% { transform: rotate(-2.5deg); } 100% { transform: rotate(2.5deg); } }
.s-pearl { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e2ded9 65%, #a8a29b 100%); box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.s-bud { width: 14px; height: 10px; border-radius: 50% 50% 30% 30%; background: #fffef8; border: 1px solid #e7dfcf; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.s-bead { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b); box-shadow: 0 0 6px rgba(255,215,0,.5); }
.s-drop { width: 10px; height: 16px; border-radius: 50% 50% 50% 50% / 20% 20% 80% 80%; background: linear-gradient(180deg, #ffd700, #996515); box-shadow: 0 4px 8px rgba(0,0,0,.4); }
.sehra-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: rgba(0,0,0,.5); border: 1px solid rgba(212,175,55,.6); border-radius: 999px; margin-bottom: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sehra-crest { font-size: 1.2rem; }
.sehra-tag { font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.sehra-stage.parted .sehra-band { transform: translateY(-105%); }
.sehra-stage.parted .s-strand:nth-child(-n+11) { transform: translateX(calc(-140px - (11 - var(--i)) * 25px)) rotate(calc(-30deg - (11 - var(--i)) * 3deg)); opacity: 0; }
.sehra-stage.parted .s-strand:nth-child(n+12) { transform: translateX(calc(140px + (var(--i) - 11) * 25px)) rotate(calc(30deg + (var(--i) - 11) * 3deg)); opacity: 0; }
.entrance-sehra .entrance-bg { background: radial-gradient(circle at 50% 30%, #2e0814 0%, #100307 85%); }
.entrance-sehra.leave .ent-center { animation: bloom 1.2s var(--ease) forwards; }

/* --- farmaan entrance --- */
.farmaan-box { position: relative; width: min(88vw, 360px); max-height: 84vh; margin: 0 auto; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.farmaan-roller { position: relative; width: 106%; height: 26px; display: flex; align-items: center; justify-content: space-between; z-index: 5; }
.farmaan-roller .rod { flex: 1; height: 16px; background: linear-gradient(180deg, #ffd978 0%, #c4973b 50%, #6e4b09 100%); border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,.5); border: 1px solid #ffe89e; }
.farmaan-roller .finial { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b0, #b5821c 70%, #543905 100%); box-shadow: 0 4px 8px rgba(0,0,0,.4); border: 1px solid #ffd700; }
.farmaan-scroll {
  position: relative; width: 100%; background: #fbf5e6; color: #3a2510;
  border-left: 5px solid #d4af37; border-right: 5px solid #d4af37;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.7), inset 0 0 30px rgba(180,140,70,.2);
  background-image: repeating-linear-gradient(0deg, rgba(160,110,40,.04) 0 2px, transparent 2px 24px), radial-gradient(circle at 50% 50%, rgba(255,255,255,.5), rgba(230,205,160,.4));
  overflow: hidden; padding: 26px 20px 22px; text-align: center; border-radius: 2px;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.9s;
}
.farmaan-content { display: flex; flex-direction: column; align-items: center; }
.farmaan-bismillah { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.1rem; color: #8a1d29; margin-bottom: 6px; }
.farmaan-title { font-family: var(--font-display); font-size: .82rem; letter-spacing: .25em; text-transform: uppercase; color: #b5821c; font-weight: 600; border-bottom: 1px solid #d4af37; padding-bottom: 4px; margin-bottom: 14px; }
.farmaan-content .ent-names { color: #4a1c24; text-shadow: none; font-size: clamp(1.9rem, 7vw, 2.7rem); margin: 0 0 16px; }
.farmaan-content .ent-hint { color: #5a3416; margin-top: 18px; }
.farmaan-seal {
  position: relative; width: 72px; height: 72px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 35%, #b91c1c, #6b0707 75%);
  color: #ffe4e4; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.25), inset 0 0 0 5px rgba(0,0,0,.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .25s ease; animation: sealbob 2.4s infinite ease-in-out;
}
.farmaan-seal:hover { transform: scale(1.08); }
.f-seal-icon { font-size: 1.3rem; line-height: 1; }
.f-seal-text { font-family: var(--font-display); font-size: .65rem; letter-spacing: .12em; font-weight: 700; margin-top: 2px; }
.farmaan-box.unrolled .farmaan-seal { animation: crack .5s var(--ease) forwards; }
.farmaan-box.unrolled .farmaan-scroll { transform: scaleY(1.06); }
.farmaan-box.unrolled .farmaan-top { transform: translateY(-20px); transition: transform .8s; }
.farmaan-box.unrolled .farmaan-bottom { transform: translateY(20px); transition: transform .8s; }
.entrance-farmaan .entrance-bg { background: radial-gradient(circle at 50% 30%, #1a1006 0%, #0a0602 85%); }
.entrance-farmaan.leave .ent-center { animation: bloom 1.2s var(--ease) forwards; }

/* --- curtains --- */
.curtains { position: absolute; inset: 0; display: flex; }
.curtain { flex: 1; position: relative; background: var(--curtain, #6b0f1a); transition: transform 1.4s var(--ease); box-shadow: inset 0 0 80px rgba(0,0,0,.5); will-change: transform; }
.curtain::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 14px, rgba(0,0,0,.15) 14px 34px, rgba(255,255,255,.05) 34px 48px); }
.curtain::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.curtain-l { transform: translateX(calc(var(--p, 0) * -100%)); } .curtain-r { transform: translateX(calc(var(--p, 0) * 100%)); }
.curtains.drag .curtain { transition: none; }
.curtains.open .curtain-l { transform: translateX(-100%) scaleX(.3); } .curtains.open .curtain-r { transform: translateX(100%) scaleX(.3); }
.swipe-hint { width: 120px; height: 3px; background: rgba(255,255,255,.25); margin: 20px auto 0; border-radius: 3px; position: relative; overflow: hidden; }
.swipe-hint span { position: absolute; inset: 0; width: 40%; background: var(--accent); animation: swipe 1.6s infinite var(--ease); }
@keyframes swipe { 0% { left: -40% } 100% { left: 100% } }
.entrance-curtain .entrance-bg { background: var(--card); }
.entrance-curtain.leave .ent-center { animation: bloom 1s var(--ease) forwards; }

/* --- origami entrance (Bazm-e-Ghulab 3D 4-flap unfold) --- */
.origami-stage { position: relative; width: min(88vw, 360px); aspect-ratio: 1; margin: 0 auto; perspective: 1200px; -webkit-perspective: 1200px; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.origami-box { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; box-shadow: 0 32px 70px -15px rgba(0,0,0,.75); border-radius: 14px; background: var(--bg, #2a060d); }
.origami-card-under { position: absolute; inset: 0; background: var(--card, #fffdfa); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 20px; text-align: center; border: 2px solid var(--accent, #d4af37); box-shadow: inset 0 0 35px rgba(212,175,55,.18); z-index: 1; }
.origami-bismillah { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.05rem; color: var(--primary, #85182a); margin-bottom: 6px; }
.origami-mono { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent, #d4af37); letter-spacing: .2em; font-weight: 700; margin-bottom: 6px; }
.origami-names { color: var(--primary, #85182a) !important; text-shadow: none !important; font-size: clamp(1.7rem, 6.5vw, 2.3rem) !important; margin: 0 0 8px !important; }
.origami-title { font-family: var(--font-display); font-size: .8rem; color: var(--muted, #785a62); letter-spacing: .08em; }

.origami-flap { position: absolute; z-index: 3; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform 1.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 1.25s; will-change: transform; overflow: hidden; background: linear-gradient(135deg, #781325 0%, #4a0a15 60%, #29040b 100%); }
.origami-flap .flap-inner { position: absolute; inset: 0; border: 1.5px solid rgba(212,175,55,.65); pointer-events: none; }

.flap-top { top: 0; left: 0; right: 0; height: 50%; transform-origin: top center; clip-path: polygon(0 0, 100% 0, 50% 100%); -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%); }
.flap-bottom { bottom: 0; left: 0; right: 0; height: 50%; transform-origin: bottom center; clip-path: polygon(0 100%, 100% 100%, 50% 0); -webkit-clip-path: polygon(0 100%, 100% 100%, 50% 0); }
.flap-left { top: 0; bottom: 0; left: 0; width: 50%; transform-origin: center left; clip-path: polygon(0 0, 100% 50%, 0 100%); -webkit-clip-path: polygon(0 0, 100% 50%, 0 100%); }
.flap-right { top: 0; bottom: 0; right: 0; width: 50%; transform-origin: center right; clip-path: polygon(100% 0, 0 50%, 100% 100%); -webkit-clip-path: polygon(100% 0, 0 50%, 100% 100%); }

.origami-seal {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; z-index: 6; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fde08b 0%, #d4af37 45%, #886209 100%);
  color: #3b2203; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.6), inset 0 0 0 5px rgba(136,98,9,.6);
  transition: transform .25s ease; animation: sealbob 2.4s infinite ease-in-out;
}
.origami-seal:hover { transform: scale(1.08); }
.o-seal-ring { position: absolute; inset: 4px; border: 1px dashed rgba(255,255,255,.5); border-radius: 50%; }
.o-seal-emblem { font-size: 1.25rem; line-height: 1; }
.o-seal-label { font-family: var(--font-display); font-size: .62rem; letter-spacing: .12em; font-weight: 700; margin-top: 2px; }

.origami-box.unfolded .origami-seal { animation: origamiBurst .55s var(--ease) forwards; }
@keyframes origamiBurst { 40% { transform: scale(1.22) rotate(-8deg); } to { transform: scale(0) rotate(35deg); opacity: 0; } }
.origami-box.unfolded .flap-top { transform: rotateX(118deg); }
.origami-box.unfolded .flap-bottom { transform: rotateX(-118deg); }
.origami-box.unfolded .flap-left { transform: rotateY(-118deg); }
.origami-box.unfolded .flap-right { transform: rotateY(118deg); }

.entrance-origami .entrance-bg { background: radial-gradient(circle at 50% 25%, #4a0a14 0%, #120205 85%); }
.entrance-origami.leave .ent-center, .entrance-origami.leave .origami-stage { animation: bloom 1.2s var(--ease) forwards; }

/* --- gatefold entrance (Royal Gatefold Doors with Silk Ribbon) --- */
.gatefold-stage { position: relative; width: min(88vw, 360px); height: min(78vh, 540px); perspective: 1400px; -webkit-perspective: 1400px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.gatefold-frame { position: relative; width: 100%; height: 100%; box-shadow: 0 40px 80px -20px rgba(0,0,0,.75); border-radius: 180px 180px 14px 14px; overflow: visible; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
.gatefold-card-reveal { position: absolute; inset: 0; background: var(--card, #fffdfa); border-radius: 180px 180px 14px 14px; border: 2px solid var(--accent, #d4af37); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; box-shadow: inset 0 0 40px rgba(212,175,55,.15); z-index: 1; }
.gf-reveal-inner { display: flex; flex-direction: column; align-items: center; width:100%; min-width:0; }
.gf-custom { flex-shrink:0; transform:scale(var(--opening-fit,1)); transform-origin:center; }
.gf-custom > * { flex-shrink:0; }
.gf-custom .gf-bismillah,.gf-custom .gf-caption,.gf-custom .gf-note { max-width:100%; overflow-wrap:anywhere; white-space:pre-line; }
.gf-custom .gf-bismillah { max-width:78%; }   /* a long blessing wraps inside the narrow top of the arch instead of touching its curve */
.gf-custom .gf-note { font:400 clamp(.75rem,2.7vw,.9rem)/1.7 var(--font-body); margin:12px 0 0; }
.gf-custom .gf-caption { line-height:1.6; }
.gf-continue { margin-top:12px; padding:8px 16px; min-height:40px; border:1px solid var(--accent); border-radius:24px; background:var(--card); color:var(--ink); font:500 .8rem/1.5 var(--font-body); }
.gf-continue[hidden] { display:none; }
.gatefold-stage.note-open > .ent-hint { visibility:hidden; }
html[data-lang="en"] .gf-custom .bi [lang="ur"] { display:none; }
html[data-lang="ur"] .gf-custom .bi [lang="en"] { display:none; }
html[data-lang="ur"] .gf-custom .bi [lang="ur"] { display:inline; font-size:1em; opacity:1; }
.gatefold-card-reveal .gf-names.fit-names { width:100%; min-width:0; line-height:0; }
.gf-bismillah { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.15rem; color: var(--primary, #85182a); margin-bottom: 12px; }
.gf-names { color: var(--primary, #85182a) !important; text-shadow: none !important; font-size: clamp(1.9rem, 7vw, 2.6rem) !important; margin: 0 0 16px !important; }
.gf-date-badge { display: inline-block; padding: 6px 18px; border-radius: 999px; background: rgba(212,175,55,.14); border: 1px solid var(--accent, #d4af37); font-family: var(--font-display); font-size: .85rem; letter-spacing: .12em; color: var(--ink, #2a1117); margin-bottom: 12px; }

.gatefold-doors { position: absolute; inset: 0; display: flex; z-index: 3; border-radius: 180px 180px 14px 14px; overflow: hidden; pointer-events: none; }
.gf-door { flex: 1; height: 100%; position: relative; background: var(--door, #3a0d14); transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1); will-change: transform; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.gf-door-left { transform-origin: left center; border-right: 1px solid rgba(212,175,55,.4); }
.gf-door-right { transform-origin: right center; border-left: 1px solid rgba(212,175,55,.4); }
.gf-panel { position: absolute; inset: 12px 10px; border: 2px double var(--accent, #d4af37); border-radius: 160px 160px 8px 8px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 3px, transparent 3px 24px), radial-gradient(circle at 50% 30%, rgba(212,175,55,.15), transparent 70%); box-shadow: inset 0 0 30px rgba(0,0,0,.6); }
.gf-lattice { position: absolute; inset: 10px; border: 1px dashed rgba(212,175,55,.4); border-radius: 140px 140px 6px 6px; }

.gatefold-ribbon { position: absolute; left: 0; right: 0; top: 56%; height: 34px; margin-top: -17px; z-index: 5; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.gf-ribbon-band { position: absolute; left: 0; right: 0; height: 26px; background: linear-gradient(180deg, #d4af37 0%, #aa8218 50%, #684f09 100%); border-top: 1px solid #ffe599; border-bottom: 1px solid #ffe599; box-shadow: 0 6px 14px rgba(0,0,0,.5); transition: transform 0.8s var(--ease), opacity 0.8s; }
.gf-ribbon-bow { position: relative; width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; background: radial-gradient(circle at 35% 30%, #fff0b3, #c49a26 65%, #6e4e04 100%); color: #3b2203; box-shadow: 0 8px 20px rgba(0,0,0,.6), inset 0 0 0 2px #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: transform .25s ease; animation: sealbob 2.4s infinite ease-in-out; }
.gf-ribbon-bow:hover { transform: scale(1.1); }
.gatefold-ribbon.untied .gf-ribbon-band { transform: scaleX(0); opacity: 0; }
.gatefold-ribbon.untied { pointer-events: none; }   /* once untied, the ribbon's area must not catch taps meant for the card (e.g. the View invitation button) */
.gatefold-ribbon.untied .gf-ribbon-bow { animation: origamiBurst .5s var(--ease) forwards; }
.gatefold-doors.open .gf-door-left { transform: perspective(1400px) rotateY(-108deg); }
.gatefold-doors.open .gf-door-right { transform: perspective(1400px) rotateY(108deg); }

.entrance-gatefold .entrance-bg { background: radial-gradient(circle at 50% 25%, #2a0810 0%, #0c0205 85%); }
.entrance-gatefold.leave .ent-center, .entrance-gatefold.leave .gatefold-stage { animation: bloom 1.2s var(--ease) forwards; }

/* --- noor entrance (Madina Arch & Glowing Fanoos) --- */
.noor-stage { position: relative; width: min(88vw, 360px); height: min(78vh, 540px); margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.noor-arch-frame { position: relative; width: 100%; height: 100%; border: 2px solid rgba(197,160,89,.7); border-radius: 180px 180px 16px 16px; background: radial-gradient(circle at 50% 30%, #154535 0%, #061912 85%); box-shadow: 0 35px 80px -20px rgba(0,0,0,.8), inset 0 0 50px rgba(197,160,89,.2); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 30px 20px 38px; overflow: hidden; }
.noor-arch-frame::before { content: ''; position: absolute; inset: 8px; border: 1px dashed rgba(197,160,89,.4); border-radius: 168px 168px 10px 10px; pointer-events: none; }
.noor-crescent { width: 34px; height: 34px; border-radius: 50%; box-shadow: 6px 6px 0 0 #c5a059; margin-top: 10px; opacity: .85; }
.noor-fanoos-rig { position: relative; display: flex; flex-direction: column; align-items: center; margin: 10px 0; }
.fanoos-chain { width: 2px; height: 36px; background: linear-gradient(180deg, #c5a059, #886824); box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.fanoos { position: relative; width: 68px; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; transform-origin: top center; animation: lanternSway 3.6s ease-in-out infinite alternate; padding: 0; }
@keyframes lanternSway { 0% { transform: rotate(-3.5deg); } 100% { transform: rotate(3.5deg); } }
.fanoos-top { width: 44px; height: 14px; background: linear-gradient(180deg, #fce59f, #b88a28); clip-path: polygon(50% 0, 100% 100%, 0 100%); -webkit-clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.fanoos-cage { position: relative; width: 52px; height: 60px; background: radial-gradient(circle at 50% 50%, rgba(255,230,140,.85) 0%, rgba(212,175,55,.4) 60%, rgba(100,70,15,.7) 100%); border: 2px solid #e2be67; border-radius: 12px; box-shadow: 0 0 25px rgba(255,215,100,.6); display: flex; align-items: center; justify-content: center; }
.fanoos-flame { position: absolute; width: 14px; height: 26px; border-radius: 50% 50% 35% 35%; background: radial-gradient(circle at 50% 80%, #fff 15%, #ffb703 60%, #fb8500 100%); animation: flicker .3s infinite alternate; }
.fanoos-aura { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255,220,120,.8), rgba(255,180,50,.3) 45%, transparent 70%); pointer-events: none; transition: transform 1.2s var(--ease), opacity 1.2s; }
.noor-arch-frame.illuminated .fanoos-aura { transform: translate(-50%, -50%) scale(40); opacity: 1; }
.fanoos-bottom { width: 38px; height: 12px; background: linear-gradient(180deg, #b88a28, #6d4e0e); clip-path: polygon(0 0, 100% 0, 50% 100%); -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%); }
.fanoos-tassel { width: 8px; height: 14px; background: #c5a059; border-radius: 0 0 4px 4px; box-shadow: 0 2px 4px rgba(0,0,0,.5); }

.noor-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.noor-bismillah { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.15rem; color: #eedcb0; margin-bottom: 6px; }
.noor-names { color: #ffffff !important; text-shadow: 0 4px 20px rgba(0,0,0,.7) !important; font-size: clamp(1.8rem, 6.8vw, 2.5rem) !important; margin: 0 0 10px !important; }
.noor-sub { font-family: var(--font-display); font-size: .78rem; letter-spacing: .25em; text-transform: uppercase; color: #c5a059; font-weight: 600; }
.noor-sub [lang="ur"] { letter-spacing: 0; font-family: 'Noto Nastaliq Urdu', serif; }

.entrance-noor .entrance-bg { background: radial-gradient(circle at 50% 25%, #0e3528 0%, #03120c 85%); }
.entrance-noor.leave .ent-center, .entrance-noor.leave .noor-stage { animation: bloom 1.2s var(--ease) forwards; }

@media (prefers-reduced-motion: reduce) {
  .ent-hint, .seal, .origami-seal, .gf-ribbon-bow, .fanoos, .farmaan-seal, .door .knocker, .scroll-cue span, .swipe-hint span, .s-strand { animation: none; }
}

/* ==========================================================
   v2 additions – guest greeting, name reveal, new sections,
   scratch entrance, quick-action bar
   ========================================================== */
.greeting { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--accent); margin: 0 0 6px; }

/* letter-by-letter name reveal (spans injected by JS) */
.name .wd { display: inline-block; white-space: nowrap; }
.name .ch { display: inline-block; opacity: 0; transform: translateY(.4em) rotate(4deg); animation: chIn .7s var(--ease) forwards; animation-delay: calc(var(--d) * 45ms); }
@keyframes chIn { to { opacity: 1; transform: none; } }
.name.shimmer [lang="en"] { background-image: linear-gradient(110deg, var(--primary) 40%, var(--accent) 50%, var(--primary) 60%); background-size: 250% 100%; -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent; animation: shimmer 4s 1.5s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 120% 0 } 100% { background-position: -120% 0 } }
@media (prefers-reduced-motion: reduce) { .name .ch { opacity: 1; transform: none; animation: none; } .name.shimmer [lang="en"] { animation: none; } }

/* section title ornament */
.sec-title::after { width: auto; height: auto; background: none; content: '✦ ✦ ✦'; font-size: .7rem; letter-spacing: .5em; color: var(--accent); margin-top: 10px; }

/* dress-code swatches */
.swatches { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: 8px; }
.swatches i { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }
.seats-note { margin: -6px 0 0; font-size: .82rem; }

/* voice message */
.voice-card { display: flex; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.voice-play { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; border: 0; background: var(--primary); display: grid; place-items: center; box-shadow: 0 10px 24px -10px var(--primary); transition: transform .2s; }
.voice-play:active { transform: scale(.94); }
.voice-play i { width: 0; height: 0; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 4px; }
.voice-play.on i { width: 16px; height: 18px; border: 0; margin: 0; background: linear-gradient(90deg, #fff 0 35%, transparent 35% 65%, #fff 65%); }
.voice-card b { display: block; font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 6px; }
.voice-wave { display: flex; align-items: center; gap: 2px; height: 26px; }
.voice-wave i { width: 3px; height: var(--h); background: var(--accent); border-radius: 2px; opacity: .5; }
.voice-play.on ~ div .voice-wave i { animation: wave 1s infinite ease-in-out; animation-delay: calc(var(--h) * .01s); opacity: 1; }
@keyframes wave { 50% { transform: scaleY(.4) } }
.voice-card small { font-size: .72rem; color: var(--muted); }

/* travel & stay */
.info-grid { display: grid; gap: 14px; }
.info-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.info-ico { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.info-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.3rem; color: var(--primary); }
.info-card p { margin: 0 0 10px; font-size: .95rem; color: var(--muted); }
.travel { background: var(--bg); }

/* shagun */
.shagun-intro { max-width: 440px; margin: -10px auto 24px; font-size: .95rem; }
.shagun-list { display: grid; gap: 12px; }
.shagun-item { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "type title copy" "type num copy" "type extra copy"; gap: 2px 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.shagun-type { grid-area: type; font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); font-weight: 600; writing-mode: vertical-rl; transform: rotate(180deg); border-right: 1px solid var(--line); padding: 4px 0; }
.shagun-item b { grid-area: title; font-size: .95rem; }
.shagun-item code { grid-area: num; font-family: ui-monospace, Menlo, monospace; font-size: 1rem; letter-spacing: .05em; color: var(--primary); word-break: break-all; }
.shagun-item small { grid-area: extra; color: var(--muted); font-size: .78rem; }
.shagun-item .copy { grid-area: copy; }
.copy.done { background: var(--primary); color: #fff; }

/* guest faq */
.gfaq-list { display: grid; gap: 8px; }
.gfaq-list details { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; background: var(--card); }
.gfaq-list summary { cursor: pointer; padding: 14px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.gfaq-list summary::-webkit-details-marker { display: none; }
.gfaq-list summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; line-height: 1; transition: transform .3s; }
.gfaq-list details[open] summary::after { transform: rotate(45deg); }
.gfaq-list details p { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }

/* quick-action bar (phones only) */
.actionbar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 120%); z-index: 45; display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: rgba(20,20,20,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 16px 40px -14px rgba(0,0,0,.6); transition: transform .6s var(--ease); max-width: calc(100vw - 24px); }
body:not(.pre-entry) .actionbar { transform: translate(-50%, 0); transition-delay: 1.4s; }
.actionbar a { display: grid; justify-items: center; gap: 3px; padding: 8px 12px; border-radius: 999px; color: #fff; text-decoration: none; font-size: .62rem; letter-spacing: .04em; min-width: 58px; }
.actionbar a.ab-main { background: var(--accent); color: #111; }
.actionbar i { width: 18px; height: 18px; background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.ab-cal { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ab-pin { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 22s7-7 7-12a7 7 0 0 0-14 0c0 5 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 22s7-7 7-12a7 7 0 0 0-14 0c0 5 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); }
.ab-check { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E"); }
.ab-heart { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 21s-7-4.6-9.5-9A5.5 5.5 0 0 1 12 6a5.5 5.5 0 0 1 9.5 6c-2.5 4.4-9.5 9-9.5 9z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 21s-7-4.6-9.5-9A5.5 5.5 0 0 1 12 6a5.5 5.5 0 0 1 9.5 6c-2.5 4.4-9.5 9-9.5 9z'/%3E%3C/svg%3E"); }
.ab-share { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.6 13.5l6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.6 13.5l6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E"); }
@media (min-width: 720px) { .actionbar { display: none; } }
@media (max-width: 719px) { .card { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } .actionbar a { min-width: 52px; padding: 8px 9px; } }

/* series switcher (one card per night) */
.series { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 0; }
.series-label { display: block; width: 100%; font-size: .68rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.series .chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .88rem; background: var(--card); transition: transform .25s var(--ease), border-color .25s; }
.series .chip small { font-size: .7rem; color: var(--muted); }
.series .chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.series .chip.on small { color: rgba(255,255,255,.75); }
.series .chip:hover { transform: translateY(-2px); border-color: var(--accent); }
.closing .series { margin-top: 18px; }

/* --- scratch entrance --- */
.scratch { position: relative; width: min(84vw, 340px); aspect-ratio: 1.5; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px -20px #000; touch-action: none; }
.scratch-under { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; background: var(--card); color: var(--primary); padding: 20px; }
.scratch-under .sc-eyebrow { font-size: .65rem; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.scratch-under b { font-family: var(--font-script); font-weight: 400; font-size: 2.2rem; line-height: 1.1; }
.scratch-under b i { font-family: var(--font-display); font-size: .6em; color: var(--accent); }
.scratch-under .sc-date { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .08em; }
.scratch-under small { font-size: .75rem; color: var(--muted); }
.scratch-top { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.scratch.done .scratch-top { animation: fade 1s forwards; pointer-events: none; }
.entrance-scratch.leave .ent-center { animation: bloom 1s var(--ease) forwards; }

/* --- entrance ambience: soft sparkles --- */
.entrance::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 2px), radial-gradient(circle, rgba(255,220,140,.8) 0 1px, transparent 2px);
  background-size: 160px 160px, 230px 230px; background-position: 20px 40px, 90px 120px; opacity: .35; animation: sparkle 6s linear infinite; }
@keyframes sparkle { 0% { background-position: 20px 40px, 90px 120px; opacity: .2 } 50% { opacity: .5 } 100% { background-position: 20px -120px, 90px -110px; opacity: .2 } }
@media (prefers-reduced-motion: reduce) { .entrance::after { animation: none; } }

/* --- hero parallax ornaments --- */
.hero::before, .hero::after { transition: transform .1s linear; transform: translateY(calc(var(--py, 0) * -1px)); }
.hero::after { transform: translateY(calc(var(--py, 0) * -1px)) scaleX(-1); }

/* embedded in the landing-page phone: tighter chrome */

/* no visible scrollbar inside the landing-page phone; no seam under the hero */
html.embedded { scrollbar-width: none; }
html.embedded::-webkit-scrollbar { display: none; }
html.embedded body { scrollbar-width: none; }
.hero + .sec { border-top: 0; }
.bismillah { font-size: clamp(1rem, 4.6vw, 1.35rem); }
@media (max-width: 380px) {
  .families { grid-template-columns: 1fr; gap: 6px; }
  .fam-amp { padding: 0; line-height: 1; }
  .families small { font-size: .8rem; }
  .frame { padding: 28px 18px; }
}


/* ==========================================================
   "Untie the bow" entrance
   ========================================================== */
.entrance-bow { --bow: var(--accent, #c9a227); --bow-hi: color-mix(in srgb, var(--bow) 45%, #fff); --bow-dk: color-mix(in srgb, var(--bow) 60%, #000); }
.entrance-bow .entrance-bg { background: var(--backdrop); }
/* once untying starts, the backdrop fades so the invitation itself appears between the parting panels */
.entrance-bow .entrance-bg, .entrance-bow::after { transition: opacity .7s ease .7s; }
.entrance-bow.untying .entrance-bg { opacity: 0; }
.entrance-bow.untying::after { animation: none; opacity: 0; }
.bow-stage { position: absolute; inset: 0; z-index: 2; }
.bow-panel { position: absolute; top: 0; bottom: 0; width: 50.5%; will-change: transform;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, transparent 2px 38px, rgba(0,0,0,.10) 38px 44px, transparent 44px 64px),
    radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.18), transparent 60%),
    var(--curtain, var(--env, #6b0f1a));
  box-shadow: inset 0 0 90px rgba(0,0,0,.45);
  transition: transform 1.25s cubic-bezier(.65,0,.25,1) .75s; }
.bow-panel::after { content: ''; position: absolute; inset: 18px; border: 1px solid color-mix(in srgb, var(--bow) 55%, transparent); border-radius: 6px; }
.bow-panel-l { left: 0; transform-origin: left center; }
.bow-panel-r { right: 0; transform-origin: right center; }
.bow-band { position: absolute; background: linear-gradient(90deg, var(--bow-dk), var(--bow) 35%, var(--bow-hi) 50%, var(--bow) 65%, var(--bow-dk)); box-shadow: 0 0 18px rgba(0,0,0,.35); will-change: transform, opacity; }
.bow-band-v { left: 50%; top: 0; bottom: 0; width: 34px; margin-left: -17px; transition: transform .6s cubic-bezier(.55,0,.8,.2) .42s, opacity .6s .42s; }
.bow-band-h { top: 50%; left: 0; right: 0; height: 34px; margin-top: -17px; background: linear-gradient(180deg, var(--bow-dk), var(--bow) 35%, var(--bow-hi) 50%, var(--bow) 65%, var(--bow-dk)); transition: transform .6s cubic-bezier(.55,0,.8,.2) .42s, opacity .6s .42s; }
.bow-btn { position: absolute; left: 50%; top: 50%; width: 220px; height: 192px; margin: -84px 0 0 -110px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 3; filter: drop-shadow(0 12px 18px rgba(0,0,0,.45)); animation: bowSway 3.2s ease-in-out infinite; -webkit-tap-highlight-color: transparent; }
.bow-svg { width: 100%; height: 100%; overflow: visible; }
.bow-svg g { transform-box: view-box; transform-origin: 120px 97px; transition: transform .55s cubic-bezier(.5,0,.75,0), opacity .5s; }
@keyframes bowSway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.bow-btn:hover .bow-loop-l { transform: rotate(-4deg) scale(1.03); }
.bow-btn:hover .bow-loop-r { transform: rotate(4deg) scale(1.03); }
.bow-copy { position: absolute; left: 0; right: 0; bottom: 9vh; text-align: center; color: #fff; z-index: 3; transition: opacity .4s; padding: 0 20px; }
.bow-copy .ent-names { margin-bottom: 8px; }
/* untie sequence */
.bow-stage.untie .bow-btn { animation: none; }
.bow-stage.untie .bow-loop-l { transform: translate(34px, 6px) rotate(38deg) scale(.15); opacity: 0; }
.bow-stage.untie .bow-loop-r { transform: translate(-34px, 6px) rotate(-38deg) scale(.15); opacity: 0; }
.bow-stage.untie .bow-knot { transform: scale(0); opacity: 0; transition-delay: .3s; }
.bow-stage.untie .bow-tail-l { transform: translate(-30px, 260px) rotate(-22deg); opacity: 0; transition-duration: .8s; transition-delay: .18s; }
.bow-stage.untie .bow-tail-r { transform: translate(30px, 280px) rotate(24deg); opacity: 0; transition-duration: .8s; transition-delay: .22s; }
.bow-stage.untie .bow-band-v { transform: translateY(105%); opacity: .2; }
.bow-stage.untie .bow-band-h { transform: scaleX(0); opacity: .2; }
.bow-stage.untie .bow-panel-l { transform: translateX(-101%) skewY(-2deg); }
.bow-stage.untie .bow-panel-r { transform: translateX(101%) skewY(2deg); }
.bow-stage.untie .bow-copy { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .bow-btn { animation: none; } .bow-panel, .bow-band, .bow-svg g { transition-duration: .01s !important; transition-delay: 0s !important; } }

/* ==========================================================
   Full-screen artwork hero (themes with assets/img/hero/<theme>.jpg)
   ========================================================== */
.hero.hero-art { position: relative; min-height: min(100svh, 900px); display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: var(--hero-art) center / cover no-repeat, var(--card); padding: 120px 32px 70px; isolation: isolate; }
.hero.hero-art::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 58% 42% at 50% 50%, color-mix(in srgb, var(--hero-scrim, #000) 55%, transparent), transparent 75%); }
.hero.hero-art::after { display: none; }
.hero.hero-art .ornament.top { display: none; }
.hero.hero-art .countdown > div { background: color-mix(in srgb, var(--hero-scrim, #000) 35%, transparent); backdrop-filter: none; }
@media (min-width: 720px) { .hero.hero-art { min-height: 860px; } }


/* ==========================================================
   Painted art packs (assets/img/art/<theme>/) - used when a theme has them
   ========================================================== */
.art-vig { display: block; width: min(82%, 360px); height: auto; margin: 0 auto 14px; pointer-events: none; user-select: none; }
.art-vig-end { margin: 22px auto 0; width: min(90%, 380px); }
/* cloth panels: the painted textile frames each card, a soft mat keeps the words readable */
body.has-art .frame, body.has-art .event { position: relative; isolation: isolate; background: var(--cloth) center / cover no-repeat !important; border-color: transparent !important; }
body.has-art .frame { padding: 44px 30px; border-radius: 6px; }
body.has-art .event { padding: 30px 26px; }
body.has-art .frame::after, body.has-art .event::after { content: ''; position: absolute; inset: 14px; z-index: -1; border-radius: 4px; pointer-events: none;
  background: color-mix(in srgb, var(--card) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
body.has-art.cloth-dark .frame::after, body.has-art.cloth-dark .event::after { background: color-mix(in srgb, var(--card) 95%, transparent); }
body.has-art .frame::before { inset: 20px; }
@media (max-width: 520px) { body.has-art .frame { padding: 38px 24px; } body.has-art .event { padding: 26px 22px; gap: 12px; } body.has-art .frame::after, body.has-art .event::after { inset: 11px; } }
/* painted doors - the one artwork is split down the middle */
.doors-art .door, .bow-art .bow-panel { background: var(--doors) no-repeat !important; background-size: 200% 100% !important; }
.doors-art .door-l, .bow-art .bow-panel-l { background-position: left center !important; }
.doors-art .door-r, .bow-art .bow-panel-r { background-position: right center !important; }
.doors-art .door .panel, .doors-art .door .knocker, .bow-art .bow-panel::after { display: none; }
.bow-art .bow-panel { box-shadow: inset 0 0 70px rgba(0,0,0,.35); }
.bow-art .bow-copy .ent-names, .doors-art ~ .ent-over .ent-names { text-shadow: 0 2px 18px rgba(0,0,0,.75), 0 0 4px rgba(0,0,0,.5); }
.bow-art .bow-copy { background: radial-gradient(closest-side, rgba(0,0,0,.42), transparent); padding: 18px 26px; border-radius: 50%; }
/* painted bow: lifts, then slips off and falls */
.bow-btn.has-img { width: min(62vw, 260px); height: auto; aspect-ratio: 1; }
.bow-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.35)); transition: transform .95s cubic-bezier(.5,0,.75,0), opacity .6s ease .35s; pointer-events: none; }
.bow-stage.untie .bow-img { transform: translateY(46vh) rotate(-14deg) scale(.7); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .bow-img { transition-duration: .01s !important; transition-delay: 0s !important; } }

/* Lock the document during an opening; its internal letter can still scroll if needed. */
html:has(body.pre-entry){overflow:hidden;overscroll-behavior:none;height:100%}
body.pre-entry{overscroll-behavior:none}
.trial-preview-notice{position:fixed;left:0;right:0;bottom:0;z-index:99999;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 8px;padding:6px 8px;background:#0f5f4a;color:#fff;font:500 11px/1.35 system-ui,sans-serif;text-align:center;box-shadow:0 -2px 8px #0002}
.trial-preview-notice a{color:#ffe9a8;white-space:nowrap;text-underline-offset:2px}
/* Long unbroken text (a phone number typed after a venue, a long name, long Urdu words) wraps instead of pushing the page sideways on a phone: grid columns may shrink below their content, and a word may break as a last resort. */
.event-list{grid-template-columns:minmax(0,1fr)}
.event{grid-template-columns:62px minmax(0,1fr);overflow-wrap:anywhere}
@media (max-width:340px){.event{grid-template-columns:minmax(0,1fr)}}
.families{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);overflow-wrap:anywhere}
.families.single{grid-template-columns:minmax(0,1fr)}
@media (max-width:380px){.families{grid-template-columns:minmax(0,1fr)}}
.shagun-item{grid-template-columns:auto minmax(0,1fr) auto;overflow-wrap:anywhere}
main.card{overflow-wrap:anywhere}   /* every section: a very long word (in English or Urdu) breaks at the screen edge instead of widening the page */
body{overflow-x:clip}   /* the safety net: a decoration that bleeds a pixel or two past the screen edge can never make the card scroll sideways */
