:root {
  --ivory: #fdf6ea;
  --sand: #f6e2c4;
  --maroon: #7a1f2b;
  --maroon-d: #3a0b14;
  --gold: #c9973f;
  --gold-l: #f0cf8a;
  --ink: #4e3326;
  --serif: "Cormorant Garamond", Georgia, serif;
  --caps: "Cinzel", Georgia, serif;
  --script: "Great Vibes", cursive;
  --deva: "Tiro Devanagari Hindi", serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: #12060a; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { font-family: var(--serif); color: var(--ink); background: var(--ivory); overflow-x: hidden; font-size: 18px; line-height: 1.6; }
body.locked { overflow: hidden; height: 100svh; }
img { display: block; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@keyframes spin { to { rotate: 360deg; } }

/* ================= COVER: palace door ================= */
#cover { position: fixed; inset: 0; z-index: 50; overflow: hidden; background: #2a0710; }
#gate { position: absolute; perspective: 1600px; } /* size + position set in JS to 'cover' the screen */
.gate-img { width: 100%; height: 100%; }
/* the door opening in the photo: x 378-845, y 935-1690 of 1200x1800 */
.gate-light { position: absolute; left: 31.5%; top: 51.9%; width: 38.9%; height: 42%; opacity: 0;
  background: radial-gradient(ellipse at 50% 60%, #fffaf0, #ffe2a0 45%, #f0a64a 100%); box-shadow: 0 0 80px 30px rgba(255,214,140,.6); }
.leaf { position: absolute; top: 51.9%; height: 42%; overflow: hidden; backface-visibility: hidden; will-change: transform; }
.leaf img { position: absolute; height: auto; max-width: none; }
.leaf.l { left: 31.5%; width: 19.5%; transform-origin: 0 50%; clip-path: polygon(0 9%, 22% 4%, 55% 1%, 100% 0, 100% 100%, 0 100%); }
.leaf.r { left: 51%; width: 19.4%; transform-origin: 100% 50%; clip-path: polygon(0 0, 45% 1%, 78% 4%, 100% 9%, 100% 100%, 0 100%); }
.leaf.l img { width: 512.8%; left: -161.5%; top: -123.6%; }
.leaf.r img { width: 515.5%; left: -262.9%; top: -123.6%; }
.cover-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(26,6,10,.86) 0%, rgba(26,6,10,.55) 30%, rgba(26,6,10,0) 50%, rgba(26,6,10,0) 80%, rgba(26,6,10,.55) 100%); }
.cover-ui { position: absolute; left: 0; right: 0; top: max(7svh, 40px); text-align: center; color: var(--gold-l); padding: 0 20px; }
.greet { font-family: var(--script); font-size: clamp(36px, 10vw, 54px); color: #ffe6b0; line-height: 1.2; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.cover-sub { font-family: var(--caps); font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; margin-top: 8px; opacity: .85; }
.cover-names { font-weight: 600; font-size: clamp(44px, 12vw, 76px); line-height: 1.05; margin: 10px 0 6px; filter: drop-shadow(0 4px 18px rgba(0,0,0,.45)); }
.cover-names em { font-family: var(--script); font-weight: 400; font-style: normal; }
.cover-date { font-family: var(--caps); letter-spacing: .3em; font-size: 12px; }
#open-btn { position: absolute; left: 50%; bottom: max(5svh, 28px); translate: -50% 0; padding: 0; border: 0; background: none; }
#open-btn span { display: block; padding: 15px 34px; border-radius: 999px; color: #2a0710; font-family: var(--caps); font-weight: 600; letter-spacing: .25em; font-size: 12px; text-transform: uppercase;
  background: linear-gradient(180deg, #fff1c9, #e2b25f 55%, #b98a35); box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.7); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 0 rgba(240,207,138,.5); } 50% { box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 14px rgba(240,207,138,0); } }
.flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, #fffaf0, #ffe9bf 60%, #f6c77d); opacity: 0; pointer-events: none; }

/* ================= HERO ================= */
#hero { position: relative; height: 100svh; overflow: hidden; background: var(--ivory); }
.hero-win { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0% 0% 0% 0% round 0px 0px 0px 0px); will-change: clip-path; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform-origin: 50% 55%; will-change: transform; }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(40,10,16,.35) 0%, rgba(40,10,16,0) 22%, rgba(20,6,10,0) 50%, rgba(20,6,10,.55) 68%, rgba(20,6,10,.85) 100%); }
#dust { position: absolute; inset: 0; pointer-events: none; }
#dust i { position: absolute; bottom: 0; border-radius: 50%; background: radial-gradient(circle, #fff4d0, rgba(255,215,140,0) 70%); animation: float linear infinite; }
@keyframes float { from { transform: translate3d(0, 10svh, 0); opacity: 0; } 20% { opacity: .9; } 80% { opacity: .7; } to { transform: translate3d(var(--dx), -80svh, 0); opacity: 0; } }
.hero-frame { position: absolute; inset: 14px; pointer-events: none; border: 1px solid rgba(240,207,138,.55); }
.hero-frame i { position: absolute; width: 22px; height: 22px; border: 1.5px solid var(--gold-l); }
.hero-frame i:nth-child(1) { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.hero-frame i:nth-child(2) { top: -6px; right: -6px; border-left: 0; border-bottom: 0; }
.hero-frame i:nth-child(3) { bottom: -6px; left: -6px; border-right: 0; border-top: 0; }
.hero-frame i:nth-child(4) { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
#names { position: absolute; z-index: 2; bottom: clamp(80px, 12svh, 120px); left: 0; right: 0; text-align: center; color: #fff6e4; }
#names h2 { font-weight: 500; font-size: clamp(64px, 19vw, 104px); line-height: .92; letter-spacing: .01em; text-shadow: 0 4px 30px rgba(30,6,10,.55); perspective: 400px; }
.shubh { font-family: var(--deva); font-size: 16px; color: var(--gold-l); letter-spacing: .12em; }
.weds { font-family: var(--script); font-size: clamp(34px, 9vw, 52px); color: var(--gold-l); line-height: 1; margin: 6px 0 4px; }
.hero-date { font-family: var(--caps); letter-spacing: .34em; font-size: 12px; margin-top: 18px; color: #ffe9c4; }
.hero-city { font-style: italic; font-size: 16px; opacity: .9; }
.scroll-hint { position: absolute; z-index: 5; bottom: 30px; left: 50%; translate: -50% 0; font-family: var(--caps); font-size: 10px; letter-spacing: .35em; color: #fff1d6; }
.scroll-hint::after { content: ""; display: block; width: 1px; height: 34px; margin: 8px auto 0; background: linear-gradient(#fff1d6, transparent); animation: drip 2s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { scale: 1 0; } 50% { scale: 1 1; } 100% { scale: 1 1; opacity: 0; } }
.ch { display: inline-block; will-change: transform; }

/* ================= Shared ================= */
main { position: relative; z-index: 2; }
section:not(#hero) { position: relative; text-align: center; overflow: hidden; }
.eyebrow { font-family: var(--caps); letter-spacing: .38em; font-size: 10.5px; color: var(--gold); text-transform: uppercase; }
.eyebrow.light { color: var(--gold-l); }
.title { font-size: clamp(42px, 11.5vw, 60px); font-weight: 500; color: var(--maroon); line-height: 1.05; margin: 10px 0 40px; }
.foil {
  background: linear-gradient(110deg, #9c6a22 0%, #e9c27a 22%, #fff4d2 32%, #d4a14d 45%, #9c6a22 60%, #f3d48f 80%, #9c6a22 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: -250% 0; } }
.btn { display: inline-block; padding: 15px 34px; border-radius: 999px; border: 0; background: linear-gradient(180deg, #8f2a36, var(--maroon-d)); color: #fff1c9; font-family: var(--caps); letter-spacing: .2em; font-size: 11.5px; text-decoration: none; box-shadow: 0 10px 30px rgba(58,11,20,.3); min-height: 48px; }
.btn.gold { background: linear-gradient(180deg, #fff1c9, #e2b25f 55%, #b98a35); color: #2a0710; font-weight: 600; box-shadow: 0 10px 30px rgba(201,151,63,.35); }
.btn.ghost { background: rgba(0,0,0,.25); border: 1px solid rgba(240,207,138,.6); color: var(--gold-l); box-shadow: none; backdrop-filter: blur(4px); }
.scrub-words .w { display: inline-block; opacity: .14; }
.divider { width: 200px; margin: 30px auto; display: block; fill: none; stroke: var(--gold); stroke-width: 1.5; }
#progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 45; background: linear-gradient(90deg, #a87824, #fff1c9, #c9973f); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- 1. Blessing ---------- */
#blessing { padding: 100px 26px 90px; background: radial-gradient(ellipse at 50% 20%, #fffdf6 0%, var(--ivory) 60%); }
.rays { position: absolute; left: 50%; top: 130px; width: 900px; height: 900px; margin-left: -450px; margin-top: -450px; opacity: .35; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(201,151,63,.28) 0deg 2deg, transparent 2deg 12deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 60%); mask: radial-gradient(circle, #000 0, transparent 60%); animation: spin 120s linear infinite; }
.deva { font-family: var(--deva); color: #a2492d; position: relative; }
.ganesh { font-size: 21px; letter-spacing: .04em; }
.shloka { font-size: clamp(22px, 6.4vw, 30px); line-height: 1.75; margin: 22px auto 0; max-width: 420px; color: #8a2c22; }
.label { font-family: var(--caps); font-size: 11.5px; letter-spacing: .2em; color: var(--maroon); }
#blessings p { font-size: 19px; margin-top: 8px; font-style: italic; }

/* ---------- 2. Invitation ---------- */
#invite { background: var(--ivory); }
.invite-pin { min-height: 100svh; display: grid; align-content: center; justify-items: center; padding: 60px 26px; }
.invite-sentence { font-size: clamp(24px, 6.8vw, 34px); line-height: 1.45; max-width: 440px; color: var(--ink); }
.invite-sentence b { font-weight: 600; color: var(--maroon); }
.names-cross { position: relative; margin-top: 36px; width: 100%; }
.names-cross h2 { font-family: var(--script); font-weight: 400; font-size: clamp(86px, 26vw, 140px); line-height: .9; color: var(--maroon); }
.nc-groom { text-align: left; padding-left: 4%; }
.nc-bride { text-align: right; padding-right: 4%; }
.nc-amp { display: block; font-style: italic; font-size: 64px; line-height: .8; color: var(--gold); }
.nc-sub { font-family: var(--caps); letter-spacing: .4em; font-size: 11px; color: var(--gold); margin-top: 24px; }

/* ---------- 3. Couple ---------- */
#couple { padding: 100px 22px 110px; color: #fbe9cc;
  background: radial-gradient(ellipse at 50% 0%, rgba(240,207,138,.16), transparent 55%), repeating-linear-gradient(45deg, rgba(240,207,138,.03) 0 1px, transparent 1px 16px), linear-gradient(180deg, #2a0710, #4a0f18 40%, #2a0710); }
#couple .title { margin-bottom: 30px; }
.person { position: relative; max-width: 420px; margin: 56px auto 0; }
.portrait { position: relative; width: min(64vw, 280px); aspect-ratio: 3/4; margin: 0 auto; border-radius: 999px 999px 14px 14px / 190px 190px 14px 14px; overflow: hidden;
  box-shadow: 0 0 0 1.5px var(--gold-l), 0 0 0 10px #3a0b14, 0 0 0 11px rgba(240,207,138,.55), 0 30px 60px rgba(0,0,0,.5); }
.portrait img { width: 100%; height: 118%; object-fit: cover; }
.portrait .mono { display: grid; place-items: center; height: 100%; font-family: var(--script); font-size: 160px; background-color: #3a0b14; }
.person h3 { font-family: var(--script); font-weight: 400; font-size: 56px; line-height: 1; margin-top: 28px; color: var(--gold-l); }
.role { font-family: var(--caps); letter-spacing: .4em; font-size: 10.5px; color: var(--gold); margin-top: 6px; }
.about { font-style: italic; font-size: 19px; max-width: 320px; margin: 12px auto 0; opacity: .9; }
.tag { position: absolute; z-index: 2; padding: 8px 15px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; color: #2a0710;
  background: linear-gradient(180deg, #fff6de, #f0cf8a); box-shadow: 0 10px 24px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.6); }
.tag:nth-of-type(1) { top: 24px; left: 0; rotate: -8deg; }
.tag:nth-of-type(2) { top: 110px; right: 0; rotate: 6deg; }
.tag:nth-of-type(3) { top: 210px; left: 2%; rotate: 5deg; }
.tag:nth-of-type(4) { top: 290px; right: 2%; rotate: -6deg; }
.how { max-width: 440px; margin: 100px auto 0; }
.story-photo { width: 100%; aspect-ratio: 4/5; margin: 0 auto 40px; overflow: hidden; border-radius: 999px 999px 22px 22px / 260px 260px 22px 22px; box-shadow: 0 0 0 1px rgba(240,207,138,.5), 0 40px 80px rgba(0,0,0,.5); }
.story-photo img { width: 100%; height: 120%; object-fit: cover; }
.story { font-size: clamp(24px, 6.6vw, 32px); line-height: 1.45; margin-top: 18px; color: #fff1d6; }

/* ---------- 4. Celebrations ---------- */
#events { height: 100svh; padding: 0; background: #12060a; }
.ev-track { display: flex; height: 100%; will-change: transform; }
.ev-panel { --tint: 42,7,16; --acc: #f0cf8a; flex: none; width: 100%; height: 100%; position: relative; overflow: hidden;
  display: grid; align-content: end; justify-items: center; padding: 70px 28px 90px; color: #fff4e2; background: #12060a; }
.ev-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--tint), .05) 0%, rgba(var(--tint), .3) 35%, rgba(var(--tint), .9) 70%, rgba(var(--tint), .97) 100%); }
.ev-panel > *:not(.ev-bg) { position: relative; z-index: 1; }
.ev-panel::before { content: ""; position: absolute; inset: 16px; z-index: 1; border: 1px solid rgba(255,241,201,.45); border-radius: 999px 999px 16px 16px / 190px 190px 16px 16px; pointer-events: none; }
.ev-num { font-family: var(--caps); font-size: 13px; letter-spacing: .4em; color: var(--acc); }
.ev-name { font-family: var(--script); font-weight: 400; font-size: clamp(84px, 24vw, 120px); line-height: 1; color: var(--acc); margin-top: 4px; text-shadow: 0 6px 30px rgba(0,0,0,.4); }
.ev-meta { margin-top: 12px; display: grid; gap: 3px; font-size: 19px; }
.ev-meta .d { font-family: var(--caps); font-size: 12.5px; letter-spacing: .24em; }
.ev-dress { margin-top: 20px; padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(255,241,201,.5); font-size: 15px; font-style: italic; background: rgba(0,0,0,.18); backdrop-filter: blur(4px); }
.ev-panel.intro { align-content: center; background: radial-gradient(ellipse at 50% 30%, #5a1220, #12060a 75%); }
.ev-panel.intro::after { display: none; }
.ev-panel.intro .title { color: var(--acc); margin: 12px 0 14px; }
.ev-panel.intro p.sub { font-style: italic; font-size: 20px; max-width: 300px; }
.ev-strip { display: flex; gap: 8px; margin-top: 30px; }
.ev-strip img { width: 54px; height: 76px; object-fit: cover; border-radius: 30px 30px 6px 6px; box-shadow: 0 0 0 1px rgba(240,207,138,.6); }
.swipe { margin-top: 30px; font-family: var(--caps); font-size: 10.5px; letter-spacing: .32em; color: var(--acc); display: flex; align-items: center; gap: 10px; }
.swipe i { width: 40px; height: 1px; background: var(--acc); animation: nudge 1.6s ease-in-out infinite; transform-origin: left; }
@keyframes nudge { 50% { scale: 1.6 1; } }
.t-haldi { --tint: 120,62,4; --acc: #ffd45c; }
.t-mehendi { --tint: 22,52,28; --acc: #e9dc9a; }
.t-sangeet { --tint: 40,16,64; --acc: #f3c6ff; }
.t-wedding { --tint: 74,12,22; --acc: #f0cf8a; }
.t-reception { --tint: 12,10,16; --acc: #e3c27e; }
.ev-dots { position: absolute; bottom: 34px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.ev-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.35); transition: .3s; }
.ev-dots i.on { width: 24px; border-radius: 4px; background: #fff1c9; }

/* ---------- 5. Moments ---------- */
#gallery { height: 100svh; background: radial-gradient(ellipse at 50% 0%, #4a0f18, #12060a 70%); display: flex; flex-direction: column; justify-content: center; }
.g-head { padding: 0 20px; }
.g-head .title { margin-bottom: 28px; }
#gallery .track { display: flex; gap: 18px; padding: 0 12vw; align-items: center; width: max-content; will-change: transform; }
#gallery figure { flex: none; height: 52svh; aspect-ratio: 3/4; overflow: hidden; border-radius: 999px 999px 14px 14px / 160px 160px 14px 14px; box-shadow: 0 0 0 1px rgba(240,207,138,.6), 0 30px 60px rgba(0,0,0,.5); }
#gallery figure:nth-child(even) { border-radius: 14px; height: 44svh; }
#gallery figure img { width: 100%; height: 100%; object-fit: cover; scale: 1.25; }

/* ---------- 6. Venue ---------- */
#venue { padding: 100px 22px; background: linear-gradient(180deg, var(--ivory), #f6e2c4); }
.venue-arch { width: min(84vw, 380px); aspect-ratio: 3/4; margin: 0 auto; overflow: hidden; border-radius: 999px 999px 18px 18px / 240px 240px 18px 18px;
  box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 10px #fffaf1, 0 0 0 11px rgba(201,151,63,.5), 0 30px 60px rgba(122,31,43,.2); }
.venue-arch img { width: 100%; height: 120%; object-fit: cover; }
.venue-name { font-family: var(--script); font-weight: 400; font-size: 54px; color: var(--maroon); margin-top: 34px; line-height: 1.1; }
.venue-addr { font-size: 19px; font-style: italic; margin: 6px 0 24px; }
.map-card { max-width: 420px; margin: 0 auto 26px; height: 220px; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px rgba(201,151,63,.6), 0 20px 40px rgba(122,31,43,.12); }
#map { width: 100%; height: 100%; border: 0; filter: sepia(.3) saturate(.9); }

/* ---------- 7. RSVP ---------- */
#rsvp { padding: 100px 22px; color: #fbe9cc; background: radial-gradient(ellipse at 50% 0%, #6a1622, #2a0710 70%); }
#rsvp-form { max-width: 440px; margin: 0 auto; text-align: left; display: grid; gap: 22px; padding: 30px 22px; border-radius: 24px; background: rgba(255,241,201,.05); box-shadow: inset 0 0 0 1px rgba(240,207,138,.35); }
.fl { position: relative; display: block; }
.fl input, .fl textarea { width: 100%; font: 19px var(--serif); color: #fff1d6; background: transparent; border: 0; border-bottom: 1px solid rgba(240,207,138,.5); padding: 22px 2px 8px; resize: none; }
.fl input:focus, .fl textarea:focus { outline: none; border-bottom-color: var(--gold-l); }
.fl span { position: absolute; left: 2px; top: 20px; font-size: 18px; color: rgba(251,233,204,.6); transition: .25s; pointer-events: none; }
.fl input:focus + span, .fl input:not(:placeholder-shown) + span, .fl textarea:focus + span, .fl textarea:not(:placeholder-shown) + span { top: 0; font: 10.5px var(--caps); letter-spacing: .2em; color: var(--gold-l); }
fieldset { border: 0; display: flex; flex-wrap: wrap; gap: 10px; }
legend { font-family: var(--caps); font-size: 10.5px; letter-spacing: .22em; color: var(--gold-l); margin-bottom: 10px; width: 100%; }
fieldset label { display: block; position: relative; }
fieldset input { position: absolute; opacity: 0; }
fieldset span { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(240,207,138,.45); font-size: 16px; color: #fbe9cc; transition: .25s; min-height: 44px; }
fieldset input:checked + span { background: linear-gradient(180deg, #fff1c9, #e2b25f); color: #2a0710; border-color: transparent; font-weight: 600; }
fieldset input:focus-visible + span { outline: 2px solid var(--gold-l); outline-offset: 2px; }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper .lbl { font-family: var(--caps); font-size: 10.5px; letter-spacing: .22em; color: var(--gold-l); flex: 1; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(240,207,138,.6); background: transparent; color: var(--gold-l); font-size: 22px; }
.stepper output { font-family: var(--caps); font-size: 26px; min-width: 30px; text-align: center; color: #fff1d6; }
#rsvp-form .btn { justify-self: center; margin-top: 4px; }
#rsvp-done { text-align: center; font-size: 22px; font-style: italic; color: var(--gold-l); }

/* ---------- 8. Countdown on the night palace ---------- */
#count { padding: 120px 20px 110px; color: #fbe9cc; background: #12060a; min-height: 100svh; display: grid; align-content: center; }
.night-img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; }
.night-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #2a0710 0%, rgba(18,6,10,.6) 25%, rgba(18,6,10,.45) 60%, #12060a 100%); }
#count > *:not(.night-img):not(.night-shade) { position: relative; }
.big-date { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 18px 0 44px; perspective: 600px; }
.big-date b { font-family: var(--caps); font-weight: 400; font-size: clamp(56px, 17vw, 96px); line-height: 1;
  background: linear-gradient(180deg, #fff4d6, #d4a14d 60%, #8a5a1a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 20px rgba(0,0,0,.6)); }
.big-date i { width: 6px; height: 6px; rotate: 45deg; background: var(--gold); }
#rings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 420px; width: 100%; margin: 0 auto 44px; }
.ring { position: relative; }
.ring svg { width: 100%; display: block; rotate: -90deg; }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: rgba(240,207,138,.2); }
.ring .bar { transition: stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1); stroke: url(#ringGold); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(240,207,138,.6)); }
.ring b { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1; display: grid; place-items: center; font-family: var(--caps); font-size: clamp(20px, 6vw, 28px); font-weight: 500; color: #fff1d6; }
.ring span { display: block; margin-top: 8px; font-family: var(--caps); font-size: 9px; letter-spacing: .25em; color: var(--gold-l); }
#cal-link { justify-self: center; }

/* ---------- 9. Finale ---------- */
#finale { padding: 90px 22px 80px; color: #fff1c9; background: radial-gradient(ellipse at 50% 120%, #6a1622, #2a0710 55%, #12060a); }
#stars, #sparks { position: absolute; inset: 0; pointer-events: none; }
#stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff3cf; animation: twinkle 3s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .15; } to { opacity: 1; } }
#sparks i { position: absolute; bottom: 0; width: 4px; height: 4px; border-radius: 50%; background: #ffe3a3; box-shadow: 0 0 8px #ffcf6a; animation: rise linear infinite; }
@keyframes rise { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-70svh) translateX(var(--dx)); opacity: 0; } }
.finale-pre { font-family: var(--caps); letter-spacing: .3em; font-size: 11px; color: var(--gold-l); position: relative; }
.finale-names { font-weight: 500; font-size: clamp(54px, 15vw, 96px); line-height: 1.05; margin-top: 18px; position: relative; }
.finale-names em { font-family: var(--script); font-weight: 400; font-style: normal; }
.finale-line { font-style: italic; font-size: 20px; margin-top: 18px; position: relative; }
#diya-row { display: flex; justify-content: center; gap: clamp(14px, 5vw, 40px); margin-top: 50px; position: relative; }
#diya-row svg { width: 46px; overflow: visible; }
.flicker { animation: flicker .18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flicker { to { transform: scale(.88, 1.08); opacity: .85; } }

/* Music button */
#music-btn { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(42,7,16,.8); backdrop-filter: blur(6px); box-shadow: 0 0 0 1px var(--gold-l), 0 8px 20px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; gap: 3px; }
#music-btn i { width: 3px; height: 16px; background: #fff1c9; border-radius: 2px; animation: eq .9s ease-in-out infinite alternate; }
#music-btn i:nth-child(2) { animation-delay: -.3s; } #music-btn i:nth-child(3) { animation-delay: -.6s; } #music-btn i:nth-child(4) { animation-delay: -.15s; }
#music-btn.paused i { animation-play-state: paused; scale: 1 .35; }
@keyframes eq { from { scale: 1 .3; } to { scale: 1 1; } }

/* Desktop: the phone-shaped invite, centred like a card on a table */
@media (min-width: 700px) {
  html { background: radial-gradient(ellipse at center, #4a0f18, #12060a 80%); }
  body { max-width: 480px; margin: 0 auto; box-shadow: 0 0 0 1px rgba(240,207,138,.35), 0 0 80px rgba(0,0,0,.5); }
  #cover { left: 50%; right: auto; width: 480px; margin-left: -240px; }
  #progress { left: 50%; right: auto; width: 480px; margin-left: -240px; }
  #music-btn { right: calc(50% - 224px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .scrub-words .w { opacity: 1; }
}

/* Engine extras: RSVP error, preview watermark (added by the server on unpaid previews) */
#rsvp-done.err { color: #ffb4a8; font-size: 18px; }
#rsvp-form button:disabled { opacity: .6; }
.preview-mark { position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='180'%3E%3Ctext x='20' y='110' transform='rotate(-28 130 90)' font-family='Georgia' font-size='30' letter-spacing='6' fill='rgba(255,255,255,0.28)' stroke='rgba(90,15,25,0.35)' stroke-width='1'%3EPREVIEW%3C/text%3E%3C/svg%3E"); }
.preview-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 61; padding: 9px 14px; text-align: center; font: 600 11px/1.4 var(--caps); letter-spacing: .12em; color: #2a0710; background: linear-gradient(180deg, #fff1c9, #e2b25f); }
@media (min-width: 700px) { .preview-mark, .preview-bar { left: 50%; right: auto; width: 480px; margin-left: -240px; } }
