/* ═════════════════════════════════════════════
   Ramsha's Barat — Royal Mughal Night
   ═════════════════════════════════════════════ */
:root {
  --ink: #13071a;
  --night: #230d30;
  --night-2: #331545;
  --maroon: #4e103b;
  --maroon-2: #701756;
  --gold-deep: #927954;
  --gold: #d5b682;
  --gold-hi: #ffecc5;
  --ivory: #f6ecd6;
  --ivory-dim: #d9ccb0;
  --rose: #bc2890;

  --gold-grad: linear-gradient(100deg, #927954 0%, #d5b682 22%, #ffecc5 45%, #d5b682 62%, #927954 100%);

  --f-display: "Cinzel", "Cinzel", Georgia, serif;
  --f-caps: "Cinzel", Georgia, serif;
  --f-body: "EB Garamond", Georgia, serif;
  --f-script: "Parisienne", "EB Garamond", cursive;
  --f-ar: "Amiri", "Noto Naskh Arabic", serif;
  --f-ur: "Noto Nastaliq Urdu", "Amiri", serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 5vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.locked, html.locked body { overflow: hidden; height: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--f-body);
  font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

/* gold foil text */
.gold, .names .name, .title, .card__title, .date__day, .closing__hosts {
  background: var(--gold-grad);
  background-size: 220% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  margin: 0;
  font-family: var(--f-caps);
  font-size: .72rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ─────────────── Sky & FX ─────────────── */
.sky {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 70% at 50% 110%, rgba(112, 23, 86, .55), transparent 60%),
    radial-gradient(90% 60% at 80% -10%, rgba(51, 21, 69, .9), transparent 70%),
    linear-gradient(180deg, #12051a 0%, var(--night) 45%, #22102c 75%, #160b1d 100%);
}
.fx {
  position: fixed; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ─────────────── Letterbox ─────────────── */
.letterbox { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.letterbox__bar {
  position: absolute; left: 0; right: 0; height: 6svh;
  background: #000000;
  transform-origin: top;
}
.letterbox__bar--top { top: 0; }
.letterbox__bar--bot { bottom: 0; transform-origin: bottom; }
html:not(.js) .letterbox, .is-open .letterbox { display: none; }

/* ─────────────── Controls ─────────────── */
.controls {
  position: fixed; z-index: 70;
  top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  display: flex; gap: 8px;
}
.ctrl {
  inline-size: 44px; block-size: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(213, 182, 130, .55);
  background: rgba(19, 7, 26, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: border-color .3s, background-color .3s;
}
.ctrl:hover { border-color: var(--gold-hi); background: rgba(78, 16, 59, .6); }
.ctrl svg { width: 20px; height: 20px; fill: none; stroke: var(--gold-hi); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#musicBtn .ico-off { display: none; }
#musicBtn[data-state="off"] .ico-off { display: block; }
#musicBtn[data-state="off"] .ico-on { opacity: .45; }
#motionBtn .ico-play { display: none; }
#motionBtn[data-state="paused"] .ico-play { display: block; fill: var(--gold-hi); stroke: none; }
#motionBtn[data-state="paused"] .ico-pause { display: none; }

/* Soundtrack player: rendered, but behind everything and transparent (audio only) */
.yt-host {
  position: fixed; left: 0; bottom: 0; z-index: -1;
  inline-size: 200px; block-size: 200px;
  opacity: 0; pointer-events: none; overflow: hidden;
}

/* ═════════════ ACT I — GATE ═════════════ */
.gate {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  touch-action: manipulation;          /* no double-tap zoom on taps */
  -webkit-user-select: none; user-select: none;
  overflow: hidden;
  background: #0c0510;
}
.gate__wall {
  position: absolute; inset: -5%;
  background:
    radial-gradient(60% 50% at 50% 48%, rgba(112, 23, 86, .0) 0 30%, rgba(7, 3, 10, .85) 100%),
    radial-gradient(circle at 50% 50%, rgba(213, 182, 130, .14) 0 1.2px, transparent 1.6px) 0 0 / 26px 26px,
    radial-gradient(circle at 50% 50%, rgba(213, 182, 130, .08) 0 1px, transparent 1.4px) 13px 13px / 26px 26px,
    linear-gradient(180deg, #2d0922, var(--maroon) 50%, #27081e);
}
.gate__scene {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(10px, 2svh, 22px);
  padding: 7svh var(--gutter) 6svh;
  transform-origin: 50% 52%;
  will-change: transform, opacity;
}
.gate__top, .gate__bottom { text-align: center; }
.gate__guest {
  margin: .2em 0 0;
  font-family: var(--f-body); font-style: italic;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem);
  color: var(--ivory);
}
.gate__urdu {
  margin: 0;
  font-family: var(--f-ur);
  font-size: clamp(1.1rem, 1rem + .8vw, 1.4rem);
  line-height: 2.2;
  color: var(--gold);
}
.gate__cta {
  margin: 0;
  font-family: var(--f-caps); font-size: .74rem;
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold-hi);
}
.gate__cta span {
  display: inline-block;
  padding: .7em 1.4em;
  border: 1px solid rgba(213, 182, 130, .5);
  border-radius: 999px;
  background: rgba(19, 7, 26, .4);
}

/* Portal (arch + doors) */
.portal {
  --w: min(74vw, calc(52svh * .536), 380px);
  position: relative;
  inline-size: var(--w);
  aspect-ratio: 300 / 560;
  /* the carved frame and finial overhang the doorway */
  margin-block: calc(var(--w) * .3) calc(var(--w) * .06);
}
.portal__opening {
  position: absolute; inset: 0;
  clip-path: url(#archClip);
  perspective: 1100px;
  perspective-origin: 50% 45%;
}
.portal__beyond {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 50% 55%, #fff6dc 0%, #ffecc5 22%, #d5b682 45%, #701756 80%, #2d0922 100%);
  opacity: .0;
}
.door {
  position: absolute; top: 0; bottom: 0; inline-size: 50%;
  backface-visibility: hidden;
  will-change: transform;
}
.door svg { width: 100%; height: 100%; }
.door--l { left: 0; transform-origin: 0% 50%; }
.door--r { right: 0; transform-origin: 100% 50%; }
.door__shade {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.door--l .door__shade { background: linear-gradient(90deg, rgba(0, 0, 0,.1), rgba(0, 0, 0,.85)); }
.door--r .door__shade { background: linear-gradient(270deg, rgba(0, 0, 0,.1), rgba(0, 0, 0,.85)); }
.portal__seam {
  position: absolute; left: 50%; top: 18%; bottom: 0;
  inline-size: 2px; margin-left: -1px;
  background: linear-gradient(180deg, transparent, #fff6dc 30%, #ffecc5 70%, transparent);
  box-shadow: 0 0 14px 3px rgba(255, 236, 197, .8);
  transform: scaleY(0); opacity: 0;
}
.portal__frame { position: absolute; inset: 0; pointer-events: none; }
.portal__frame svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.portal__rays {
  position: absolute; left: 50%; top: 52%;
  inline-size: 260vmax; block-size: 260vmax;
  margin: -130vmax 0 0 -130vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 234, 196, 0) 0deg 7deg, rgba(255, 234, 196, .22) 9deg, rgba(255, 234, 196, 0) 12deg 19deg);
  -webkit-mask: radial-gradient(circle, #000000 0, rgba(0, 0, 0,.6) 12%, transparent 42%);
  mask: radial-gradient(circle, #000000 0, rgba(0, 0, 0,.6) 12%, transparent 42%);
  opacity: 0;
  pointer-events: none;
}
.portal__open {
  position: absolute;
  left: 50%; top: 51.8%;
  inline-size: 30%; aspect-ratio: 1;
  translate: -50% -50%;
  border: 0; border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.portal__halo {
  position: absolute; inset: -18%;
  border-radius: 50%;
  border: 1px solid rgba(255, 236, 197, .7);
  box-shadow: 0 0 24px rgba(255, 236, 197, .35), inset 0 0 18px rgba(255, 236, 197, .25);
  opacity: .6;
}
@media (prefers-reduced-motion: no-preference) {
  .portal__halo { animation: halo 2.6s var(--ease-out) infinite; }
}
@keyframes halo {
  0% { transform: scale(.85); opacity: .9; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* Dark interior behind the doors: the lattice and door gap glow when the light inside rises */
.portal__opening { background: #0d030a; }

/* Opening screen (one tap unlocks sound) */
.begin {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(circle at 50% 45%, #1b0816 0%, #000000 70%);
  text-align: center;
}
html:not(.js) .begin, html:not(.motion) .begin { display: none; }
.begin__btn {
  position: relative;
  inline-size: 132px; aspect-ratio: 1;
  border: 0; border-radius: 50%; padding: 0;
  background: none; cursor: pointer;
  margin-bottom: 14px;
}
.begin__seal {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff1d0, #debf8a 50%, #755c3b 100%);
  box-shadow: 0 0 0 3px rgba(129, 104, 69, .6) inset, 0 0 0 7px rgba(255, 241, 208, .18) inset, 0 10px 40px rgba(213, 182, 130, .35);
  font-family: var(--f-display); font-weight: 700; font-size: 2.1rem;
  color: #5f4a2f; text-shadow: 0 1px 0 rgba(255, 245, 218, .55);
}
.begin__seal i { font-style: normal; font-size: .9rem; color: #816845; }
.begin__halo {
  position: absolute; inset: -16%; border-radius: 50%;
  border: 1px solid rgba(255, 236, 197, .6);
}
@media (prefers-reduced-motion: no-preference) {
  .begin__halo { animation: halo 2.6s var(--ease-out) infinite; }
  .begin__seal { animation: sealGlow 3s ease-in-out infinite alternate; }
}
@keyframes sealGlow { to { box-shadow: 0 0 0 3px rgba(129, 104, 69, .6) inset, 0 0 0 7px rgba(255, 241, 208, .18) inset, 0 10px 70px rgba(255, 236, 197, .6); } }
.begin__cta { margin: 0; font-family: var(--f-caps); font-size: .8rem; letter-spacing: .4em; text-transform: uppercase; color: var(--gold-hi); }
.begin__hint { margin: 0; font-style: italic; font-size: .95rem; color: rgba(217, 204, 176, .6); }

/* Film-style title cards */
.titles { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.title-card {
  grid-area: 1 / 1;
  margin: 0; padding: 0 var(--gutter);
  display: grid; justify-items: center; gap: .35em;
  text-align: center;
  opacity: 0;
}
.title-card span { font-family: var(--f-caps); font-weight: 500; font-size: clamp(1.15rem, 1rem + 1.2vw, 1.7rem); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); }
.title-card em { font-family: var(--f-body); font-style: italic; font-size: clamp(1.2rem, 1.05rem + .9vw, 1.6rem); color: var(--ivory-dim); }

/* Approach shot */
.approach {
  position: absolute; inset: 0; z-index: 2;
  overflow: hidden; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, #0a020f 0%, #210a2e 45%, #261033 75%, #2d0e24 100%);
}
html:not(.motion) .approach { display: none; }
.approach > * { position: absolute; will-change: transform, opacity; }
.approach__stars {
  inset: -20% 0 0 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .9) 0 1px, transparent 1.4px) 0 0 / 53px 47px,
    radial-gradient(circle, rgba(255, 236, 197, .8) 0 1.2px, transparent 1.6px) 17px 23px / 97px 89px,
    radial-gradient(circle, rgba(255, 255, 255, .55) 0 .8px, transparent 1.1px) 31px 7px / 37px 41px;
  -webkit-mask: linear-gradient(180deg, #000000 40%, transparent 85%); mask: linear-gradient(180deg, #000000 40%, transparent 85%);
}
.approach__moon {
  top: 10%; right: 18%;
  inline-size: clamp(54px, 13vw, 96px); aspect-ratio: 1; border-radius: 50%;
  box-shadow: 16px 9px 0 0 var(--gold-hi);
  filter: drop-shadow(0 0 22px rgba(255, 236, 197, .6));
  rotate: -18deg;
}
.approach__cloud {
  left: -30%; inline-size: 160%; block-size: 34svh;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(200, 190, 235, .3), rgba(154, 110, 180, .12) 60%, transparent);
  filter: blur(14px);
  opacity: 0;
}
.approach__cloud--1 { top: 50%; }
.approach__cloud--2 { top: 62%; left: -45%; }
.approach__cloud--3 { top: 74%; left: -20%; }
.approach__palace {
  left: 0; right: 0; bottom: 0; block-size: 58svh;
  transform-origin: 50% 93%;
}
.approach__palace svg { width: 100%; height: 100%; }
.approach__glow {
  left: 50%; bottom: 0; inline-size: 60vmax; aspect-ratio: 1;
  translate: -50% 50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 241, 215, .95), rgba(255, 218, 166, .55) 30%, rgba(213, 154, 120, .15) 60%, transparent);
  opacity: 0;
}

/* Skip intro */
.skip {
  position: absolute; z-index: 6;
  right: max(16px, env(safe-area-inset-right)); bottom: calc(6svh + max(14px, env(safe-area-inset-bottom)));
  padding: 10px 16px; min-block-size: 44px;
  border: 1px solid rgba(255, 236, 197, .35); border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  font-family: var(--f-caps); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 236, 197, .85); cursor: pointer;
}

/* Seal glow: warm light blooming from the R|U seal before the doors open */
.seal-glow {
  position: absolute; left: 50%; top: 51.8%;
  inline-size: 46%; aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 225, .95) 0%, rgba(255, 234, 196, .7) 22%, rgba(255, 218, 166, .28) 48%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.seal-glow::after {           /* a thin glint sweeping across the seal */
  content: ""; position: absolute; inset: 22%;
  border-radius: 50%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .9) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 160% 0;
}
.seal-glow.is-glinting::after { animation: glint 1.1s ease-in-out forwards; }
@keyframes glint { to { background-position: -70% 0; } }

/* Prelude */
.prelude {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: #000000;
  pointer-events: none;
}
.prelude__thread {
  display: block; inline-size: min(64vw, 340px); block-size: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent);
  transform: scaleX(0);
}
.prelude__bismillah {
  margin: 0;
  font-family: var(--f-ar);
  font-size: clamp(1.7rem, 1.3rem + 2.4vw, 2.6rem);
  line-height: 1.9;
  background: var(--gold-grad); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  clip-path: inset(0 0 0 100%);
}
html:not(.js) .prelude { display: none; }

/* ═════════════ ACT II — HERO ═════════════ */
.invite { position: relative; z-index: 2; }
.hero {
  position: relative;
  min-block-size: 100svh;
  display: grid; place-items: center;
  padding: 14svh var(--gutter) 10svh;
  overflow: clip;
  isolation: isolate;
}
.hero__layers {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-mask: linear-gradient(180deg, #000000 78%, transparent);
  mask: linear-gradient(180deg, #000000 78%, transparent);
}
.moon {
  position: absolute; top: 9svh; right: 14vw;
  inline-size: clamp(44px, 9vw, 86px); aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 13px 7px 0 0 var(--gold-hi);
  filter: drop-shadow(0 0 16px rgba(255, 236, 197, .55));
  rotate: -18deg;
}
.skyline {
  position: absolute; left: 0; right: 0; bottom: 0;
  block-size: min(46svh, 62vw);
}
.skyline svg { width: 100%; height: 100%; }
.lanterns { position: absolute; inset: 0 0 auto 0; block-size: 42svh; }
.lantern {
  position: absolute; top: 0;
  inline-size: clamp(26px, 5.5vw, 46px);
  transform-origin: 50% 0;
}
.lantern svg { width: 100%; height: auto; overflow: visible; }
.lantern__glow { filter: blur(6px); }
@media (prefers-reduced-motion: no-preference) {
  .lantern { animation: sway var(--dur, 6s) ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
  .lantern__flame { animation: flicker 1.8s ease-in-out infinite alternate; }
}
@keyframes sway { from { rotate: -3.5deg; } to { rotate: 3.5deg; } }
@keyframes flicker { 0% { opacity: .75; } 40% { opacity: 1; } 70% { opacity: .82; } 100% { opacity: .95; } }
.motion-paused .lantern, .motion-paused .lantern__flame, .motion-paused .portal__halo, .motion-paused .scroll-cue i::after { animation-play-state: paused !important; }

/* Hero parallax: native scroll-driven, progressive enhancement */
@supports ((animation-timeline: scroll()) and (animation-range: 0 100vh)) {
  @media (prefers-reduced-motion: no-preference) {
    .moon, .skyline, .lanterns, .hero__content {
      animation: parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100svh;
    }
    .moon { --py: 28svh; }
    .lanterns { --py: 12svh; }
    .skyline { --py: 3svh; }
    .hero__content { --py: -6svh; }
  }
}
@keyframes parallax { to { translate: 0 var(--py, 0); } }

.hero__content {
  position: relative;
  text-align: center;
  max-inline-size: 40rem;
  display: grid; justify-items: center; gap: clamp(6px, 1.4svh, 14px);
  text-shadow: 0 2px 18px rgba(19, 7, 26, .8);
}
.bismillah {
  margin: 0;
  font-family: var(--f-ar);
  font-size: clamp(1.45rem, 1.2rem + 1.6vw, 2.1rem);
  line-height: 1.9;
  color: var(--gold-hi);
}
.flourish {
  inline-size: min(220px, 60vw); block-size: 18px;
  background:
    radial-gradient(circle, var(--gold-hi) 0 2.5px, transparent 3px) center / 18px 18px no-repeat,
    linear-gradient(90deg, transparent, var(--gold) 30%, transparent 46%, transparent 54%, var(--gold) 70%, transparent) center / 100% 1px no-repeat;
}
.hero__hosts {
  margin: .4em 0 0;
  font-family: var(--f-caps); font-weight: 500;
  font-size: clamp(1rem, .9rem + .7vw, 1.3rem);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ivory);
}
.hero__lead {
  margin: 0;
  font-style: italic;
  font-size: clamp(1.05rem, .95rem + .6vw, 1.3rem);
  color: var(--ivory-dim);
}
.names {
  margin: .3em 0 .2em;
  display: grid; justify-items: center;
  font-weight: 400;
  line-height: 1;
}
.names .name {
  font-family: var(--f-display);
  font-size: clamp(2.9rem, 1.6rem + 7.5vw, 5.6rem);
  letter-spacing: .06em;
  text-shadow: none;
  filter: drop-shadow(0 4px 22px rgba(213, 182, 130, .25));
  perspective: 600px;
}
.names .name.is-split { background: none; }
.names .name .ch {
  display: inline-block;
  background: var(--gold-grad); background-size: 260% 100%; background-position: 0% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.names__with {
  font-family: var(--f-script);
  font-size: clamp(1.9rem, 1.5rem + 2vw, 2.8rem);
  color: var(--ivory);
  line-height: 1.3;
  margin: .1em 0 .05em;
}
.groom-parent {
  margin: .5em 0 0;
  display: grid; justify-items: center; gap: .15em;
}
.groom-parent__rel {
  font-family: var(--f-script);
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  color: var(--ivory);
  line-height: 1.2;
}
.groom-parent__name {
  font-family: var(--f-caps); font-weight: 500;
  font-size: clamp(.88rem, .8rem + .5vw, 1.1rem);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-hi);
  text-wrap: balance;
  max-inline-size: 18em;
}
.hero__date {
  margin: .6em 0 0;
  font-family: var(--f-caps);
  font-size: clamp(.8rem, .75rem + .3vw, .95rem);
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold-hi);
}
.scroll-cue {
  margin-top: clamp(16px, 4svh, 44px);
  display: grid; justify-items: center; gap: 10px;
  font-family: var(--f-caps); font-size: .66rem;
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--ivory-dim); text-decoration: none;
  padding: 8px;
}
.scroll-cue i {
  position: relative; inline-size: 1px; block-size: 46px;
  background: rgba(213, 182, 130, .3);
  overflow: hidden;
}
.scroll-cue i::after {
  content: ""; position: absolute; left: 0; top: 0; inline-size: 1px; block-size: 50%;
  background: var(--gold-hi);
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue i::after { animation: drip 2.2s var(--ease-out) infinite; }
}
@keyframes drip { from { translate: 0 -100%; } to { translate: 0 200%; } }

/* ═════════════ Sections ═════════════ */
.section {
  position: relative;
  padding: clamp(72px, 14svh, 140px) var(--gutter);
  text-align: center;
  display: grid; justify-items: center;
}
.title {
  margin: .15em 0 .6em;
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.4rem);
  letter-spacing: .05em;
  line-height: 1.15;
}
.ornament {
  inline-size: 120px; block-size: 34px; margin-bottom: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 34'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-width='1'%3E%3Cpath d='M0 17h44M76 17h44'/%3E%3Cpath d='M60 3c6 7 12 10 16 14-4 4-10 7-16 14-6-7-12-10-16-14 4-4 10-7 16-14z'/%3E%3Cpath d='M60 10c3 3 5 5 7 7-2 2-4 4-7 7-3-3-5-5-7-7 2-2 4-4 7-7z' fill='%23f3dc9a'/%3E%3Ccircle cx='40' cy='17' r='2' fill='%23c9a24a'/%3E%3Ccircle cx='80' cy='17' r='2' fill='%23c9a24a'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* Verse */
.verse__ar {
  margin: 0 0 .8em;
  max-inline-size: 30ch;
  font-family: var(--f-ar);
  font-size: clamp(1.45rem, 1.15rem + 1.8vw, 2.2rem);
  line-height: 2.1;
  color: var(--gold-hi);
  text-wrap: balance;
}
.verse__en { margin: 0; max-inline-size: 36rem; font-style: italic; font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: var(--ivory); }
.verse__en .line { display: block; text-wrap: balance; }
.verse__ref { margin: 1.2em 0 0; font-family: var(--f-caps); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }

/* Story — arched photo frames */
.story__grid {
  inline-size: 100%;
  max-inline-size: 1040px;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 7svh, 64px);
  justify-items: center;
}
@media (min-width: 900px) {
  .story__grid { grid-template-columns: repeat(3, 1fr); gap: 56px; }
  .story__grid .arch-card:nth-child(2) { margin-top: 60px; }
}
.arch-card { margin: 0; inline-size: min(78vw, 320px); }
.arch-card__frame {
  position: relative;
  aspect-ratio: 3 / 4.3;
  border-radius: 50% 50% 6px 6px / 34% 34% 6px 6px;
  padding: 7px;
  background: var(--gold-grad);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 236, 197, .2);
}
.arch-card__frame::after {
  content: ""; position: absolute; inset: 7px;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 197, .55), inset 0 -60px 60px -30px rgba(19, 7, 26, .55);
  pointer-events: none;
}
.arch-card__inner {
  block-size: 100%;
  overflow: hidden;
  border-radius: 50% 50% 3px 3px / 34% 34% 3px 3px;
  background: var(--maroon);
  isolation: isolate;
}
.arch-card__frame img {
  inline-size: 100%; block-size: 100%;
  object-fit: cover;
}
/* Whole-image card: the photo is shown complete and centred, over a blurred copy of itself */
.arch-card--fit .arch-card__inner { position: relative; isolation: isolate; }
.arch-card__blur {
  position: absolute; inset: -12%; z-index: -1;
  background: center / cover no-repeat;
  filter: blur(18px) brightness(.6) saturate(1.1);
  transform: scale(1.15);
}
.arch-card--fit .arch-card__frame img { position: relative; object-fit: contain; object-position: 50% 50%; background: transparent; }

/* Contact numbers near the end */
.contact { margin: 2.4em 0 0; display: grid; justify-items: center; gap: 12px; }
.contact__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.contact__num { letter-spacing: .12em; font-variant-numeric: lining-nums tabular-nums; }

.arch-card figcaption {
  margin-top: 18px;
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem);
  color: var(--ivory-dim);
}

/* Barat card */
.card {
  position: relative;
  inline-size: min(100%, 520px);
  padding: clamp(44px, 9svh, 72px) clamp(26px, 7vw, 56px);
  display: grid; justify-items: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(112, 23, 86, .55), transparent 70%),
    linear-gradient(180deg, rgba(45, 9, 34, .92), rgba(35, 13, 48, .92));
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9), inset 0 0 80px rgba(0, 0, 0, .35);
  border-radius: 6px;
}
.card::before, .card::after {
  content: ""; position: absolute; pointer-events: none; border-radius: 4px;
}
.card::before { inset: 8px; border: 1.4px solid var(--gold); }
.card::after { inset: 15px; border: 1px solid rgba(213, 182, 130, .5); border-radius: 2px; }
.card > * { position: relative; z-index: 1; }
.card > .card__corner { position: absolute; }
.pet { fill: rgba(213, 182, 130, .28); stroke: #ffecc5; stroke-width: .6; }
.card__corner {
  position: absolute; inline-size: 46px; aspect-ratio: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'%3E%3Cg fill='none' stroke='%23f3dc9a' stroke-width='1.2'%3E%3Cpath d='M4 30V4h26'/%3E%3Cpath d='M10 22c0-7 5-12 12-12'/%3E%3Ccircle cx='10' cy='10' r='3' fill='%23c9a24a'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.card__corner--tl { top: 4px; left: 4px; }
.card__corner--tr { top: 4px; right: 4px; scale: -1 1; }
.card__corner--bl { bottom: 4px; left: 4px; scale: 1 -1; }
.card__corner--br { bottom: 4px; right: 4px; scale: -1 -1; }
.card__urdu { margin: 0; font-family: var(--f-ur); font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem); line-height: 2.1; color: var(--gold); }
.card__title { margin: 0 0 .6em; font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 1.5rem + 2.6vw, 3rem); letter-spacing: .06em; }

.date {
  display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center;
  gap: clamp(10px, 3vw, 22px);
  inline-size: 100%;
}
.date__weekday, .date__month {
  font-family: var(--f-caps); font-size: clamp(.72rem, .66rem + .4vw, .9rem);
  letter-spacing: .26em; text-transform: uppercase; color: var(--ivory);
}
.date__weekday { text-align: right; }
.date__month { text-align: left; }
.date__rule { inline-size: 1px; block-size: 56px; background: linear-gradient(180deg, transparent, var(--gold), transparent); }
.date__day { font-family: var(--f-caps); font-size: clamp(3.4rem, 2.6rem + 3.6vw, 4.6rem); line-height: 1; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
/* Scratch-to-reveal date */
.scratch {
  position: relative;
  inline-size: 100%;
  border-radius: 6px;
  isolation: isolate;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.scratch .date { padding: 16px 6px; }
.scratch__foil {
  position: absolute; inset: 0; z-index: 1;
  inline-size: 100%; block-size: 100%;
  border-radius: 6px;
  touch-action: none;            /* finger rubs the foil instead of scrolling */
  cursor: crosshair;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 243, 221, .3);
  transition: opacity .9s ease;
}
.scratch::after {                /* travelling sheen that invites a rub */
  content: ""; position: absolute; inset: 0; z-index: 2;
  border-radius: 6px; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 252, 235, .55) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; background-position: 150% 0;
}
@media (prefers-reduced-motion: no-preference) {
  .scratch::after { animation: sheen 3.2s ease-in-out infinite; }
}
@keyframes sheen { 0%, 35% { background-position: 150% 0; } 100% { background-position: -60% 0; } }
.motion-paused .scratch::after { animation-play-state: paused; }
.scratch__hint {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 6px; background: none;
  pointer-events: none;          /* touches fall through to the foil; keyboard can still press it */
  font-family: var(--f-caps); font-weight: 600;
  font-size: clamp(.72rem, .66rem + .3vw, .85rem);
  letter-spacing: .22em; text-transform: uppercase;
  color: #4e3a23;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 244, 210, .7);
  transition: opacity .4s ease;
}
.scratch__icon { color: #816845; }
.scratch.is-scratching::after, .scratch.is-scratching .scratch__hint { opacity: 0; }
.scratch.is-scratching::after { animation: none; }
.scratch.is-revealed .scratch__foil { opacity: 0; pointer-events: none; }
.scratch.is-revealed .scratch__hint, .scratch.is-revealed::after { display: none; }

/* Download-the-card button (fixed, after the date reveal) */
.download-card {
  position: fixed; z-index: 64;
  left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  translate: -50% 0;
  display: inline-flex; align-items: center; gap: 9px;
  min-block-size: 46px; padding: 10px 20px;
  border: 0; border-radius: 999px;
  background: var(--gold-grad); background-size: 200% 100%;
  color: #2d0922;
  font-family: var(--f-caps); font-size: .74rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 245, 218, .35) inset;
  cursor: pointer;
  transition: background-position .4s, opacity .3s;
}
.download-card:hover { background-position: 100% 0; }
.download-card svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.download-card[aria-busy="true"] { opacity: .75; cursor: progress; }

/* Fireworks overlay (created only while the show runs) */
.fireworks {
  position: fixed; inset: 0; z-index: 65;
  inline-size: 100%; block-size: 100%;
  pointer-events: none;
}

/* Venue map under the Barat card */
.venue-map {
  inline-size: min(100%, 520px);
  margin-top: clamp(40px, 7svh, 64px);
  display: grid; justify-items: center; gap: 12px;
}
.venue-map__place { margin: 0 0 6px; font-style: italic; color: var(--ivory-dim); }
.map {
  margin: 0; inline-size: 100%;
  padding: 6px;
  border-radius: 10px;
  background: var(--gold-grad);
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 236, 197, .2);
}
.map__inner {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #2d1b28, #230d30);
  box-shadow: inset 0 0 0 1px rgba(255, 236, 197, .5);
}
.map__inner iframe {
  position: absolute; inset: 0;
  inline-size: 100%; block-size: 100%;
  border: 0;
  filter: saturate(.85) brightness(.92);
}
@media (min-width: 900px) { .map__inner { aspect-ratio: 16 / 9; } }

.card__time {
  margin: 1.1em 0 0;
  font-family: var(--f-caps); font-size: clamp(.95rem, .9rem + .3vw, 1.1rem);
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold-hi);
}
.card__venue { margin-top: 1.3em; }
.card__venue-name { margin: 0; font-family: var(--f-body); font-weight: 600; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); line-height: 1.25; color: var(--ivory); }
.card__venue-city { margin: .15em 0 0; font-style: italic; color: var(--ivory-dim); }

.countdown {
  margin-top: 2em;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(6px, 2vw, 14px);
  inline-size: 100%;
}
.countdown__cell {
  display: grid; justify-items: center; gap: 4px;
  padding: 12px 4px 10px;
  border: 1px solid rgba(213, 182, 130, .35);
  border-radius: 4px;
  background: rgba(19, 7, 26, .45);
}
.countdown__num {
  font-family: var(--f-caps); font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.1rem);
  line-height: 1.1; color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .countdown__num.tick { animation: tick .5s var(--ease-out); }
}
@keyframes tick { from { translate: 0 -40%; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.countdown__lbl { font-family: var(--f-caps); font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ivory-dim); }
.countdown__done { margin: 1.4em 0 0; font-style: italic; color: var(--gold-hi); }

.card__actions { margin-top: 2em; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-block-size: 46px;
  padding: 10px 18px;
  border: 1px solid rgba(213, 182, 130, .7);
  border-radius: 999px;
  background: rgba(19, 7, 26, .35);
  color: var(--gold-hi);
  font-family: var(--f-caps); font-size: .74rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s, color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:hover { background: rgba(213, 182, 130, .14); border-color: var(--gold-hi); }
.btn--solid { background: var(--gold-grad); background-size: 200% 100%; color: #2d0922; border-color: transparent; }
.btn--solid:hover { background-position: 100% 0; color: #2d0922; }
.btn--wide { inline-size: 100%; margin-top: 8px; }

/* Closing */
.closing { padding-bottom: clamp(90px, 16svh, 160px); }
.closing__dua { margin: 0; font-family: var(--f-ar); font-size: clamp(1.4rem, 1.15rem + 1.6vw, 2rem); line-height: 2; color: var(--gold-hi); max-inline-size: 26ch; text-wrap: balance; }
.closing__dua-en { margin: .6em 0 0; font-style: italic; color: var(--ivory); }
.closing__note { margin: 2em 0 0; color: var(--ivory-dim); }
.closing__sign { margin: 2.2em 0 0; font-family: var(--f-script); font-size: clamp(1.8rem, 1.5rem + 1.4vw, 2.4rem); color: var(--ivory); line-height: 1.2; }
.closing__hosts { margin: .2em 0 0; font-family: var(--f-display); font-size: clamp(1.25rem, 1.05rem + 1.2vw, 1.8rem); letter-spacing: .05em; line-height: 1.3; }
.closing__family { margin: .1em 0 0; font-style: italic; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--ivory-dim); }
.closing__urdu { margin: 1.2em 0 0; font-family: var(--f-ur); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); line-height: 2.2; color: var(--gold); }

/* JS-driven reveals start hidden only when the intro will animate them in */
.js.motion .reveal { opacity: 0; }

@media (max-height: 700px) {
  .portal { --w: min(74vw, calc(44svh * .536), 380px); }
  .gate__scene { gap: 8px; }
}
@media (min-width: 900px) {
  .portal { --w: min(30vw, calc(47svh * .536), 400px); }
  .skyline { block-size: min(30svh, 40vw); }
  .arch-card { inline-size: min(100%, 290px); }
}
