/* Wed Nijiy · Shaadi Mahal — overlay UI on top of the WebGL world */
:root {
  --ink: #05040c; --plum: #2a0716; --wine: #5a0f2e; --gold: #f0c878; --gold-2: #c9963e; --cream: #fbf1df;
  --muted: rgba(251, 241, 223, .78); --line: rgba(240, 200, 120, .32);
  --serif: "Cormorant Garamond", Georgia, serif; --script: "Great Vibes", cursive; --cin: Cinzel, Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --hi: "Tiro Devanagari Hindi", serif;
  --vh: 1vh;
}
@supports (height: 1svh) { :root { --vh: 1svh; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.wm { margin: 0; color: var(--cream); font-family: var(--sans); background: var(--ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; overscroll-behavior-y: none; }
body.wm.is-loading { overflow: hidden; height: 100%; }
body.wm-hand { cursor: pointer; }
[hidden] { display: none !important; }
.wm-hi { font-family: var(--hi); letter-spacing: 0; text-transform: none; }

.wm-canvas { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; display: block; z-index: 0; }
.wm-fallback { display: none; }
body.no-gl .wm-fallback { display: block; position: fixed; inset: 0; z-index: 0; background: radial-gradient(ellipse at 50% 20%, #4a0c26 0%, #1a0510 50%, #05040c 100%); }
body.no-gl .wm-canvas { display: none; }

/* loader */
.wm-loader { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center;
  background: radial-gradient(ellipse at 50% 42%, #3b0a1f 0%, #14040c 55%, #05040c 100%); transition: opacity 1.2s ease, transform 1.4s cubic-bezier(.2,.7,.2,1); }
.wm-loader.is-done { opacity: 0; transform: scale(1.08); pointer-events: none; }
.wm-mandala { width: min(220px, 52vw); color: var(--gold); opacity: .9; animation: wm-spin 36s linear infinite; filter: drop-shadow(0 0 18px rgba(240, 190, 100, .35)); }
.wm-mandala path, .wm-mandala circle { stroke-dasharray: 300; stroke-dashoffset: 300; animation: wm-draw 3.2s ease forwards; }
.wm-mandala circle:nth-child(2) { stroke-dasharray: 2 4; animation: none; stroke-dashoffset: 0; }
@keyframes wm-spin { to { transform: rotate(360deg); } }
@keyframes wm-draw { to { stroke-dashoffset: 0; } }
.wm-l-om { margin: 6px 0 0; color: var(--gold); font-family: var(--hi); font-size: 15px; opacity: .9; }
.wm-l-names { margin: 0; font-family: var(--script); font-size: clamp(44px, 11vw, 76px); line-height: 1.05; color: #ffe2a6; text-shadow: 0 0 30px rgba(255, 180, 90, .45); }
.wm-l-names em { font-family: var(--cin); font-style: normal; font-size: .28em; letter-spacing: .3em; vertical-align: middle; color: var(--gold); margin: 0 .3em; }
.wm-l-bar { width: min(260px, 64vw); height: 2px; border-radius: 2px; background: rgba(240, 200, 120, .18); overflow: hidden; }
.wm-l-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a8741f, #fff1c4, #e9b95c); transition: width .4s ease; }
.wm-l-msg { margin: 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; }
.wm-enter { margin-top: 10px; min-width: 230px; padding: 16px 30px; border-radius: 999px; border: 1px solid rgba(255, 230, 170, .6); cursor: pointer;
  font: 600 15px var(--sans); letter-spacing: .06em; color: #2a1206; background: linear-gradient(135deg, #fff1c4, #e8b65a 45%, #fbe3a0 70%, #c58d35);
  box-shadow: 0 10px 40px rgba(232, 182, 90, .35), inset 0 1px 0 rgba(255, 255, 255, .6); opacity: .35; transform: translateY(6px); transition: opacity .6s, transform .6s, box-shadow .3s; }
.wm-enter.is-ready { opacity: 1; transform: none; animation: wm-pulse 2.4s ease-in-out infinite; }
.wm-enter:disabled { cursor: progress; }
@keyframes wm-pulse { 50% { box-shadow: 0 10px 60px rgba(255, 196, 100, .65), inset 0 1px 0 rgba(255, 255, 255, .6); } }
.wm-l-hint { margin: 2px 0 0; font-size: 12px; color: rgba(251, 241, 223, .55); letter-spacing: .08em; }

/* top bar + chapter dots */
.wm-top { position: fixed; z-index: 30; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 16px 10px; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 4, 12, .55), rgba(5, 4, 12, 0)); }
.wm-top > * { pointer-events: auto; }
.wm-brand { color: var(--gold); text-decoration: none; font: 600 18px var(--serif); letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.wm-top-r { display: flex; gap: 8px; }
.wm-ico { position: relative; height: 38px; min-width: 38px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 8, 16, .45); color: var(--cream);
  font: 600 13px var(--sans); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.wm-ico svg { width: 18px; height: 18px; }
#wmSound { padding: 0; width: 38px; }
.wm-tour { width: auto !important; padding: 0 14px 0 10px !important; gap: 6px; grid-auto-flow: column; }
.wm-tour span { font: 600 12px var(--sans); letter-spacing: .08em; }
.wm-tour.is-on { background: linear-gradient(135deg, #fff1c4, #e8b65a); color: #2a1206; border-color: transparent; }
.wm-tour.is-on svg path { d: path("M7 5h4v14H7zM13 5h4v14h-4z"); }
#wmSound.is-muted { opacity: .55; }
#wmSound.is-muted::after { content: ""; position: absolute; width: 22px; height: 1.6px; background: currentColor; transform: rotate(-40deg); }
.wm-nav { position: fixed; z-index: 25; right: max(10px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.wm-nav button { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 4px; border: 0; background: none; cursor: pointer; color: var(--cream); }
.wm-nav i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(240, 200, 120, .7); background: transparent; transition: transform .3s, background .3s; }
.wm-nav span { position: absolute; right: 20px; white-space: nowrap; font: 600 10px var(--sans); letter-spacing: .18em; text-transform: uppercase; opacity: 0; transform: translateX(6px); transition: .3s; text-shadow: 0 1px 8px #000; }
.wm-nav button.is-on i { background: var(--gold); transform: scale(1.35); box-shadow: 0 0 12px rgba(240, 200, 120, .8); }
.wm-nav button:hover span, .wm-nav button.is-on span { opacity: .9; transform: none; }
@media (max-width: 760px) { .wm-nav { gap: 9px; right: 6px; } .wm-nav span { display: none; } }

/* scroll story */
.wm-scroll { position: relative; z-index: 10; }
.wm-sec { position: relative; height: calc(var(--h, 120) * var(--vh)); }
.wm-cap { --o: 0; --y: 0px; --top: calc(58 * var(--vh)); position: sticky; top: var(--top); width: min(600px, calc(100vw - 44px)); margin: 0 auto; padding: 8px 4px; text-align: center;
  opacity: var(--o); transform: translate3d(0, var(--y), 0); will-change: opacity, transform; }
.wm-cap.is-off { pointer-events: none; visibility: hidden; }
.wm-cap::before { content: ""; position: absolute; z-index: -1; inset: -48px -40px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(6, 3, 10, .72) 0%, rgba(6, 3, 10, .42) 45%, rgba(6, 3, 10, 0) 72%); pointer-events: none; }
body.no-gl .wm-cap { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.wm-cap--hero { --top: calc(66 * var(--vh)); }
.wm-cap--date { --top: calc(57 * var(--vh)); }
.wm-cap--ev { --top: calc(77 * var(--vh)); }
.wm-cap--pass { --top: calc(20 * var(--vh)); }
.wm-cap--final { --top: calc(60 * var(--vh)); }
@media (min-aspect-ratio: 1/1) { .wm-cap--hero { --top: calc(70 * var(--vh)); } .wm-cap--ev { --top: calc(74 * var(--vh)); } .wm-cap--date { --top: calc(62 * var(--vh)); } .wm-cap--pass { --top: calc(14 * var(--vh)); } }
.wm-eyebrow { margin: 0 0 8px; font: 600 11px var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.wm-cap h2, .wm-cap h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; line-height: 1.04; letter-spacing: .01em; color: #fff5e2; text-shadow: 0 2px 22px rgba(0, 0, 0, .75); }
.wm-cap h2 { font-size: clamp(32px, 8vw, 56px); }
.wm-sub { margin: 0 auto 6px; max-width: 34em; font-size: 15px; line-height: 1.55; color: var(--muted); text-shadow: 0 1px 12px rgba(0, 0, 0, .9); }
.wm-om { margin: 0 0 6px; font-size: 15px; color: var(--gold); text-shadow: 0 0 18px rgba(255, 180, 90, .5); }
.wm-names { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
body.no-gl .wm-names { position: static; width: auto; height: auto; clip: auto; font-family: var(--script); font-weight: 400; font-size: clamp(56px, 14vw, 96px); color: #ffe2a6; line-height: 1; }
.wm-names em { font-family: var(--cin); font-style: normal; font-size: .26em; letter-spacing: .28em; color: var(--gold); }
.wm-fam { margin: 0 0 6px; font: 600 12px var(--cin); letter-spacing: .2em; color: var(--gold); }
.wm-hint { margin: 16px 0 0; display: inline-flex; align-items: center; gap: 10px; font: 600 11px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: rgba(251, 241, 223, .8); }
.wm-hint i { width: 18px; height: 28px; border-radius: 10px; border: 1.5px solid rgba(240, 200, 120, .8); position: relative; }
.wm-hint i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: wm-wheel 1.8s ease-in-out infinite; }
@keyframes wm-wheel { 60% { transform: translateY(8px); opacity: 0; } }
.wm-when { margin: 0 0 12px; font: 600 clamp(15px, 4vw, 19px) var(--cin); letter-spacing: .08em; color: #fff1d2; text-shadow: 0 2px 16px rgba(0, 0, 0, .9); }
.wm-count { display: flex; justify-content: center; gap: 10px; margin: 0 0 16px; }
.wm-count div { min-width: 64px; padding: 10px 6px 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(24, 8, 18, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wm-count b { display: block; font: 600 26px/1 var(--cin); color: var(--gold); }
.wm-count span { display: block; margin-top: 6px; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.wm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.wm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 22px; border-radius: 999px; border: 1px solid rgba(255, 230, 170, .55); cursor: pointer; text-decoration: none;
  font: 600 14px var(--sans); color: #2a1206; background: linear-gradient(135deg, #fff1c4, #e8b65a 45%, #fbe3a0 72%, #c58d35); box-shadow: 0 8px 26px rgba(232, 182, 90, .3); }
.wm-btn--ghost { color: var(--cream); background: rgba(24, 8, 18, .45); border-color: var(--line); box-shadow: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wm-btn:active { transform: translateY(1px); }
body:not(.no-gl) .wm-evname { display: none; }
.wm-evname { font-family: var(--script) !important; font-weight: 400 !important; font-size: clamp(40px, 11vw, 60px) !important; color: #ffe0a0 !important; }
.wm-evwhen { margin: 0 0 6px; font: 600 13px var(--cin); letter-spacing: .1em; color: #fff1d2; }
.wm-link { color: var(--gold); font-size: 14px; text-decoration: none; border-bottom: 1px dashed rgba(240, 200, 120, .55); }
.wm-tip { margin: 10px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.wm-script { font-family: var(--script) !important; font-weight: 400 !important; font-size: clamp(40px, 10vw, 64px) !important; color: #ffe0a0 !important; }
.wm-sign { margin: 6px 0 0; font: 600 14px var(--cin); letter-spacing: .14em; color: var(--gold); }
.wm-made { display: inline-block; margin-top: 18px; font-size: 12px; letter-spacing: .12em; color: rgba(251, 241, 223, .65); text-decoration: none; text-transform: uppercase; }

/* wedding pass card */
#wmPassSlot { margin: 12px auto 0; }
.wm-passcard { width: min(300px, 82vw); margin: 0 auto; padding: 18px 18px 14px; border-radius: 22px; text-align: center; color: #2a0716; background: radial-gradient(ellipse at 50% 0%, #fff8ea, #f0d9a8); border: 1px solid #c9a24b; box-shadow: 0 0 0 5px rgba(240, 200, 120, .18), 0 26px 60px rgba(0, 0, 0, .55); }
.wm-passcard .k { margin: 0; font: 600 10px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: #8a5a1e; }
.wm-passcard h4 { margin: 4px 0 6px; font: 400 34px/1.05 var(--script); color: #5a0f2e; }
.wm-passcard h4 em { font: 600 9px var(--cin); letter-spacing: .2em; font-style: normal; }
.wm-passcard .who { margin: 0; font: 700 22px var(--serif); }
.wm-passcard .meta { margin: 4px 0 10px; font-size: 12px; line-height: 1.5; color: #6b4a3a; }
.wm-passcard .qr { display: inline-grid; place-items: center; padding: 8px; background: #fff8ea; border-radius: 12px; border: 1px solid rgba(138, 90, 30, .3); }
.wm-passcard .qr img, .wm-passcard .qr canvas { display: block; width: 150px !important; height: 150px !important; }
.wm-passcard .code { margin: 8px 0 0; font: 700 15px var(--sans); letter-spacing: .3em; }
.wm-passbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }

/* sheets */
.wm-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(4, 2, 8, 0); transition: background .32s; }
.wm-sheet.is-open { background: rgba(4, 2, 8, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.wm-sheet-card { position: relative; width: min(480px, 100%); max-height: 92vh; overflow: auto; padding: 26px 22px max(22px, env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, rgba(48, 10, 28, .97), rgba(18, 5, 12, .98)); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
  transform: translateY(105%); transition: transform .42s cubic-bezier(.2, .8, .2, 1); }
.wm-sheet.is-open .wm-sheet-card { transform: none; }
@media (min-width: 760px) { .wm-sheet { align-items: center; } .wm-sheet-card { border-radius: 26px; border-bottom: 1px solid var(--line); } }
.wm-sheet-card h3 { margin: 0 0 6px; font: 600 30px var(--serif); color: #fff5e2; }
.wm-x { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--cream); font-size: 20px; cursor: pointer; }
.wm-form { display: grid; gap: 12px; margin-top: 14px; text-align: left; }
.wm-form label { display: grid; gap: 6px; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.wm-form input, .wm-form select, .wm-form textarea { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--cream); font: 16px var(--sans); }
.wm-form input:focus, .wm-form select:focus, .wm-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240, 200, 120, .18); }
.wm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wm-msg { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--gold); text-align: center; }
.wm-amts { display: flex; flex-wrap: wrap; gap: 8px; }
.wm-amts button { flex: 1 0 auto; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--cream); font: 600 14px var(--sans); cursor: pointer; }
.wm-amts button.is-on { background: linear-gradient(135deg, #fff1c4, #e8b65a); color: #2a1206; border-color: transparent; }
.wm-upiqr { display: grid; place-items: center; padding: 12px; margin: 0 auto; background: #fff8ea; border-radius: 16px; }
.wm-map { margin: 14px 0; height: 260px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.wm-map iframe { width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) { .wm-mandala, .wm-enter.is-ready, .wm-hint i::after { animation: none; } }
