/* The Indo-Pak Quranic script (DigitalKhatt IndoPak, SIL OFL: fonts/OFL-indopak.txt),
   cut down to the letters of the dua. See the README to regenerate it if the dua changes. */
@font-face {
  font-family: 'IndoPak';
  src: url('../fonts/indopak-dua.woff2') format('woff2');
  font-display: swap;
}

:root {
  --paper: #f3eddd;
  --paper-hi: #fbf8ef;
  --ink: #1c2a55;
  --navy: #1f3570;
  --blue: #2b52a0;
  --sage: #7a8c68;
  --khaki: #b1a472;
  --gold: #ae9254;
  --gold-hi: #eadba6;
  --muted: #56607a;
  /* The bride's dress: celadon with a hint of blush. */
  --celadon: #cedfdf;
  --celadon-lt: #e4eeed;
  --celadon-ink: #3d5f5c;
  --blush: #d9a9a3;

  --script: 'Pinyon Script', cursive;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  /* Nastaliq, the script of the Mughal court. */
  --arabic: 'Gulzar', 'Noto Nastaliq Urdu', serif;

  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .2  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--noise), var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
p, h1, h2, h3 { margin: 0; }
::selection { background: var(--celadon); color: var(--ink); }
img { display: block; }
[hidden] { display: none !important; }
/* Show only what the guest's invitation includes (see the note in index.html). */
html:not([data-events~="nikkah"]) [data-for~="nikkah"],
html:not([data-events~="dinner"]) [data-for~="dinner"],
html[data-events~="nikkah"] [data-unless~="nikkah"] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .8em 1.5em;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: #f8f1dc;
  font: 600 .8rem/1 var(--serif);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: rgba(31, 53, 112, .07); color: var(--navy); }
.btn--sm { min-height: 40px; padding: .7em 1.1em; font-size: .72rem; }
.btn--wide { width: 100%; margin-top: 8px; }

/* =====================================================
 * 1. The card
 * ===================================================== */
.stage {
  position: relative;
  height: 330vh;
  background: var(--buti) 0 0 / 120px auto, radial-gradient(ellipse at 50% 40%, #e3eeed, #bcd3d2 80%);
}
.stage.is-still { height: auto; }
.stage__view {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.is-still .stage__view { position: relative; height: auto; min-height: 100svh; padding: 24px 0; }

.card {
  position: relative;
  background: var(--noise), var(--paper);
  box-shadow: 0 30px 70px rgba(40, 74, 72, .35), 0 4px 12px rgba(40, 74, 72, .15);
}
.card.is-bleed { box-shadow: none; }
.card__layer { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Flowers grow in from the corners once drawn. */
@property --grow { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
.card__border, .card__field {
  --grow: 100%;
  -webkit-mask-image: radial-gradient(farthest-corner at 50% 50%, transparent var(--grow), #000 calc(var(--grow) + 16%));
  mask-image: radial-gradient(farthest-corner at 50% 50%, transparent var(--grow), #000 calc(var(--grow) + 16%));
}
.card.is-ready .card__border { animation: grow 2.4s cubic-bezier(.25, .7, .25, 1) forwards; }
.card.is-ready .card__field { animation: grow 2.4s cubic-bezier(.25, .7, .25, 1) .3s forwards; }
@keyframes grow { to { --grow: 0%; } }

/* ---------- Invitation text, inside the arch ---------- */
.inv { position: absolute; container-type: size; display: flex; }
.inv__body {
  --u: min(1cqw, .66cqh);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  color: var(--ink);
}
.inv__body > * { width: 100%; }
.inv__bism { font: 400 calc(var(--u) * 11)/1.25 var(--arabic); color: var(--navy); padding-top: calc(var(--u) * 3); }
.inv__to { display: none; font: italic 500 calc(var(--u) * 4.8)/1.2 var(--serif); letter-spacing: .03em; color: var(--blue); }
.has-guest .inv__to { display: block; }
.has-guest .inv__body { --u: min(1cqw, .62cqh); }
.inv__lead { font: italic 500 calc(var(--u) * 6.4)/1.12 var(--serif); }
.inv__parents { font: 500 calc(var(--u) * 4.2)/1.3 var(--serif); text-wrap: balance; }
.inv__name {
  font: 400 calc(var(--u) * 10)/1.3 var(--script);
  white-space: nowrap;
  padding: 0 .1em;
  overflow: visible;
}
.inv__amp, .inv__join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 2.4);
  margin: 0 auto;
}
.inv__amp { width: 64%; font: italic 500 calc(var(--u) * 8)/1 var(--serif); color: var(--navy); }
.inv__amp i, .inv__join i { font-style: normal; }
.inv__amp span, .inv__join span { position: relative; flex: 1; height: 1px; background: var(--navy); }
.inv__amp span::after, .inv__join span::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  background: var(--navy);
  rotate: 45deg;
}
.inv__amp span:first-child::after, .inv__join span:first-child::after { left: -2px; }
.inv__amp span:last-child::after, .inv__join span:last-child::after { right: -2px; }
.inv__join { width: 84%; margin-bottom: calc(var(--u) * 1.6); font: calc(var(--u) * 4.6)/1.2 var(--script); color: var(--navy); }
.inv__date {
  font: 500 calc(var(--u) * 5.4)/1.3 var(--serif);
  letter-spacing: .22em;
  text-indent: .22em;
  text-transform: uppercase;
  color: var(--navy);
}
.inv__time { font: 500 calc(var(--u) * 4.8)/1.4 var(--serif); letter-spacing: .18em; text-indent: .18em; color: var(--navy); }
.inv__insha { font: calc(var(--u) * 5)/1.3 var(--script); color: var(--blue); }
.inv--dinner .inv__name { font-size: calc(var(--u) * 14); }
.inv--dinner .inv__name i { font: italic 500 .62em/1 var(--serif); margin: 0 .08em; }
.inv--dinner .inv__join { width: 60%; margin-bottom: 0; }
.inv__title {
  margin-top: calc(var(--u) * 1);
  font: 600 calc(var(--u) * 6)/1.2 var(--serif);
  letter-spacing: .14em;
  text-indent: .14em;
  text-transform: uppercase;
  color: var(--navy);
}
.inv__motto { font: italic 500 calc(var(--u) * 4.4)/1.2 var(--serif); letter-spacing: .08em; color: var(--celadon-ink); }
.inv__place { font: 600 calc(var(--u) * 4.6)/1.3 var(--serif); letter-spacing: .16em; text-indent: .16em; text-transform: uppercase; color: var(--navy); }
.inv__addr { font: 500 calc(var(--u) * 4.5)/1.35 var(--serif); letter-spacing: .06em; color: var(--navy); }

/* ---------- Doors ---------- */
.doors { position: absolute; display: none; perspective: calc(var(--ow, 400px) * 2.4); z-index: 3; }
.js .doors { display: block; }
.is-still .doors { display: none; }
.door { position: absolute; top: 0; width: 50%; height: 100%; will-change: transform; }
.door--l { left: 0; transform-origin: 0 50%; }
.door--r { right: 0; transform-origin: 100% 50%; }
.door__art { width: 100%; height: 100%; }
.door--r .door__art { transform: scaleX(-1); }
.door__seal, .door__plate { position: absolute; translate: -50% 0; }
.door--l .door__seal, .door--l .door__plate { left: 100%; clip-path: inset(-20% 50% -20% -20%); }
.door--r .door__seal, .door--r .door__plate { left: 0; clip-path: inset(-20% -20% -20% 50%); }
.door__seal {
  top: calc(var(--seal-y) - var(--seal-d) / 2);
  width: var(--seal-d);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 35%, #fffaf0, #efe4c4 58%, #d7c58f);
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px #f4ecd6, 0 0 0 6.5px var(--gold), 0 8px 18px rgba(40, 74, 72, .35);
}
/* The ampersand sits exactly on the seam, the initials balanced either side of it. */
.door__seal span {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  width: 100%;
  font: calc(var(--seal-d) * .33)/1 var(--script);
  color: var(--navy);
}
.door__seal b { font-weight: 400; }
.door__seal b:first-child { justify-self: end; }
.door__seal b:last-child { justify-self: start; padding-left: .04em; }
.door__seal i { font: italic 500 .62em/1 var(--serif); margin: 0 .12em; color: var(--blue); }
.door__plate {
  top: var(--plate-y);
  width: var(--plate-w);
  height: var(--plate-h);
  display: grid;
  place-items: center;
  color: var(--navy);
}
.door__plate > span {
  display: block;
  max-width: 78%;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
}
.plate__default {
  font: italic 600 calc(var(--plate-h) * .44)/1.2 var(--serif);
  letter-spacing: .04em;
  text-decoration: underline dotted rgba(31, 53, 112, .5);
  text-underline-offset: .22em;
}
.plate__guest { display: none !important; font: calc(var(--plate-h) * .62)/1.3 var(--script); }
.has-guest .plate__default { display: none; }
.has-guest .plate__guest { display: block !important; }

.cue {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 0;
  background: none;
  color: var(--ink);
  font: italic 600 clamp(.95rem, 2.6vw, 1.1rem)/1 var(--serif);
  letter-spacing: .04em;
  text-shadow: 0 0 6px #e4eeed, 0 0 2px #e4eeed;
  cursor: pointer;
  white-space: nowrap;
}
.cue i {
  width: 11px;
  height: 11px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: 45deg;
  animation: bob 1.8s ease-in-out infinite;
}
.is-still .cue { display: none; }
@keyframes bob { 50% { translate: 0 5px; } }

/* "Find your invitation": an invisible button over the nameplate, for the plain link. */
.find {
  position: absolute;
  z-index: 4;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  font-size: 1px;
  cursor: pointer;
}
.find:hover { background: rgba(255, 255, 255, .25); }
.find:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.has-guest .find, .is-still .find { display: none; }

.finder {
  width: min(440px, calc(100vw - 32px));
  padding: 28px 24px 22px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: var(--noise), #fbf8ef;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 80px rgba(20, 40, 60, .35);
}
.finder::backdrop { background: rgba(35, 60, 60, .45); backdrop-filter: blur(2px); }
.finder[open] { display: grid; justify-items: center; gap: 10px; animation: rise .35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.finder form { position: absolute; top: 6px; right: 8px; }
.finder__close { width: 40px; height: 40px; border: 0; background: none; font: 1.6rem/1 var(--serif); color: var(--muted); cursor: pointer; }
.finder .spray { width: 200px; margin: 0; }
.finder__title { font: 2.1rem/1.2 var(--script); font-weight: 400; color: var(--navy); }
.finder__hint { font-style: italic; color: var(--muted); }
.finder__input {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  border: 1px solid #cfc5a3;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 500 1.15rem/1.2 var(--serif);
  text-align: center;
}
.finder__input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.finder__status { min-height: 1.3em; font-style: italic; color: var(--muted); }
.finder__skip { margin-top: 2px; font-size: 1rem; }
.link { border: 0; background: none; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Matching invitations, in the finder and the RSVP gate. */
.suggest__list { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.suggest__list button {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: linear-gradient(#fdf9ee, #f3ead2);
  color: var(--navy);
  font: 1.45rem/1.2 var(--script);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.suggest__list button::after { content: "  ›"; font: 500 1.1rem/1 var(--serif); color: var(--blue); }
.suggest__list button:hover { background: var(--celadon-lt); transform: translateY(-1px); }
.suggest__list button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.form__who { display: none; text-align: center; font-style: italic; color: var(--muted); }
.form__who b { font: normal 400 1.35em/1 var(--script); color: var(--navy); }
.has-guest .form__who { display: block; }

/* ---------- Petal shower ---------- */
.petals { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.petal {
  position: absolute;
  top: -30px;
  width: var(--size);
  height: var(--size);
  background: center / contain no-repeat;
  opacity: 0;
  animation: fall var(--dur) linear var(--delay) infinite;
  animation-play-state: paused;
  transition: opacity 1.2s;
}
.is-open .petal { opacity: .9; animation-play-state: running; }
@keyframes fall {
  from { transform: translate3d(0, -5vh, 0) rotate(0); }
  to { transform: translate3d(var(--drift), 108svh, 0) rotate(var(--spin)); }
}

/* =====================================================
 * Shared section styles
 * ===================================================== */
.band { height: 30px; background: var(--chain) 0 50% / auto 100% repeat-x, var(--celadon-lt); }
.section { padding: clamp(64px, 10vw, 112px) 16px; }
.head { display: grid; justify-items: center; text-align: center; gap: 6px; margin-bottom: clamp(32px, 6vw, 56px); }
.spray { width: min(280px, 72vw); height: auto; margin-bottom: 6px; }
.kicker { font: 600 .78rem/1.4 var(--serif); letter-spacing: .3em; text-transform: uppercase; color: var(--blue); }
.head h2 {
  margin-top: 2px;
  font: 500 clamp(2.2rem, 7vw, 3.4rem)/1.05 var(--serif);
  letter-spacing: .14em;
  text-indent: .14em;
  text-transform: uppercase;
  color: var(--navy);
}
.head__script { font: clamp(1.6rem, 5vw, 2.1rem)/1.3 var(--script); color: var(--blue); }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =====================================================
 * 1b. Enclosure card — the dinner, for guests invited to both
 * ===================================================== */
.encl {
  padding: clamp(56px, 9vw, 96px) 16px clamp(64px, 10vw, 110px);
  background: var(--buti) 0 0 / 120px auto, radial-gradient(ellipse at 50% 30%, #e3eeed, #bcd3d2 85%);
  text-align: center;
}
.encl__lead { margin-bottom: 26px; font: clamp(1.7rem, 5.6vw, 2.4rem)/1.25 var(--script); color: var(--navy); }
.encl__card {
  position: relative;
  isolation: isolate;
  max-width: 520px;
  margin: 0 auto;
  padding: var(--pad-top, 140px) var(--pad-x, 60px) var(--pad-bottom, 120px);
}
.encl__frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; filter: drop-shadow(0 22px 40px rgba(40, 74, 72, .28)); }
.encl__body { display: grid; justify-items: center; gap: 4px; color: var(--navy); }
.encl__kicker { font: italic 500 clamp(1.05rem, 3.6vw, 1.25rem)/1.3 var(--serif); color: var(--ink); }
.encl__names { margin: 4px 0; font: clamp(2.4rem, 9vw, 3.4rem)/1.2 var(--script); }
.encl__names i { font: italic 500 .6em/1 var(--serif); margin: 0 .08em; }
.encl__join { display: flex; align-items: center; gap: 10px; width: 56%; font: 1.3rem/1.2 var(--script); }
.encl__join i { font-style: normal; }
.encl__join span { flex: 1; height: 1px; background: var(--navy); }
.encl__event { margin: 2px 0 10px; font: 600 clamp(1.05rem, 3.8vw, 1.35rem)/1.25 var(--serif); letter-spacing: .14em; text-indent: .14em; text-transform: uppercase; }
.encl__date { font: 500 clamp(.95rem, 3.2vw, 1.1rem)/1.4 var(--serif); letter-spacing: .16em; text-transform: uppercase; }
.encl__time { font: 500 1.05rem/1.4 var(--serif); letter-spacing: .12em; }
.encl__time em { font: 1.25rem/1 var(--script); letter-spacing: 0; color: var(--blue); }
.encl__place { margin-top: 12px; font: 600 1rem/1.3 var(--serif); letter-spacing: .16em; text-indent: .16em; text-transform: uppercase; }
.encl__addr { font: 500 1.05rem/1.4 var(--serif); }
.encl__motto { margin-top: 12px; font: italic 500 1rem/1.2 var(--serif); letter-spacing: .08em; color: var(--celadon-ink); }

/* =====================================================
 * 2. Details — niches
 * ===================================================== */
.niches {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 330px));
  justify-content: center;
  gap: clamp(22px, 3vw, 34px);
}
.niche {
  position: relative;
  isolation: isolate;
  min-height: 460px;
  padding: var(--top, 120px) 30px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.niche__frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; filter: drop-shadow(0 16px 24px rgba(28, 42, 85, .12)); }
.niche__vase { width: 96px; height: 96px; margin: -34px 0 4px; }
.niche h3 { font: 600 .78rem/1 var(--serif); letter-spacing: .32em; text-indent: .32em; text-transform: uppercase; color: var(--blue); }
.niche__big { margin-top: 6px; font: 500 1.55rem/1.25 var(--serif); color: var(--navy); }
.niche__sub { font-size: 1.1rem; line-height: 1.4; color: var(--muted); font-style: italic; }
.niche__place { margin-top: 10px; font: 600 .95rem/1.3 var(--serif); letter-spacing: .16em; text-indent: .16em; text-transform: uppercase; color: var(--navy); }
.niche__actions { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* The call to reply, under the event niches. */
.reply-cta { margin: clamp(40px, 6vw, 60px) auto 0; max-width: 520px; display: grid; justify-items: center; gap: 10px; text-align: center; }
.reply-cta__line { display: flex; align-items: center; gap: 12px; width: min(100%, 360px); font: 1.9rem/1.2 var(--script); color: var(--navy); }
.reply-cta__line i { font-style: normal; }
.reply-cta__line span { position: relative; flex: 1; height: 1px; background: var(--navy); }
.reply-cta__line span::after { content: ""; position: absolute; top: -2px; width: 5px; height: 5px; background: var(--navy); rotate: 45deg; }
.reply-cta__line span:first-child::after { left: -2px; }
.reply-cta__line span:last-child::after { right: -2px; }
.reply-cta__text { font-size: 1.15rem; font-style: italic; color: var(--muted); }
.reply-cta__text b { font-style: normal; font-weight: 600; color: var(--navy); }
.reply-cta .btn { margin-top: 6px; }

/* =====================================================
 * 3. The day — schedule and countdown, on celadon
 * ===================================================== */
.day { background: var(--buti) 0 0 / 120px auto, radial-gradient(ellipse at 50% 20%, #e3eeed, var(--celadon) 70%); }
.day .kicker { color: var(--celadon-ink); }

.timeline {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 8px 0;
  list-style: none;
  display: grid;
  gap: clamp(14px, 3vw, 22px);
}
/* The vine the moments hang from. */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 40px;
  translate: -50% 0;
  background: var(--vine) 50% 0 / 40px auto repeat-y;
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 4vw, 28px);
}
.timeline time {
  justify-self: end;
  font: 600 clamp(.9rem, 3.4vw, 1.08rem)/1 var(--serif);
  letter-spacing: .18em;
  color: var(--navy);
  white-space: nowrap;
}
.timeline img { width: clamp(52px, 13vw, 64px); height: auto; filter: drop-shadow(0 4px 8px rgba(40, 74, 72, .18)); }
.timeline span { font: italic 500 clamp(1.2rem, 4.4vw, 1.5rem)/1.2 var(--serif); color: var(--ink); }
.timeline .is-main span { font: normal 400 clamp(1.7rem, 6.4vw, 2.2rem)/1.1 var(--script); color: var(--navy); }
.timeline .is-main img { width: clamp(64px, 16vw, 80px); }
.timeline .is-prayer span { color: var(--celadon-ink); }
/* Date plaques hung on the vine. */
.timeline .timeline__day { grid-template-columns: 1fr; justify-items: center; margin: 6px 0; }
.timeline__day span {
  position: relative;
  padding: .5em 1.3em;
  background: #fbf8ef;
  border: 1px solid var(--gold);
  outline: 1px solid rgba(174, 146, 84, .55);
  outline-offset: 3px;
  border-radius: 2px;
  font: 600 .74rem/1 var(--serif);
  letter-spacing: .24em;
  text-indent: .24em;
  text-transform: uppercase;
  color: var(--navy);
}
.timeline .timeline__day + li { margin-top: 2px; }

.count { margin-top: clamp(56px, 9vw, 84px); text-align: center; }
.count__script { font: clamp(2rem, 7vw, 2.8rem)/1.2 var(--script); color: var(--navy); }
.count__caps { margin-top: 4px; font: 600 .78rem/1 var(--serif); letter-spacing: .32em; text-indent: .32em; text-transform: uppercase; color: var(--celadon-ink); }
.count__grid { margin-top: 30px; padding-bottom: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(8px, 3vw, 28px); }
.shamsa {
  position: relative;
  width: clamp(76px, 20vw, 124px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.shamsa img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 12px rgba(40, 74, 72, .2)); }
.shamsa b { position: relative; font: 500 clamp(1.6rem, 6vw, 2.6rem)/1 var(--serif); color: var(--navy); font-variant-numeric: lining-nums tabular-nums; }
.shamsa span { position: absolute; top: calc(100% + 10px); left: 0; right: 0; font: 600 clamp(.55rem, 1.8vw, .68rem)/1 var(--serif); letter-spacing: .2em; text-indent: .2em; text-transform: uppercase; color: var(--celadon-ink); }

/* =====================================================
 * 4. RSVP
 * ===================================================== */
.rsvp__card {
  position: relative;
  isolation: isolate;
  max-width: 620px;
  margin: 0 auto;
  padding: var(--pad-top, 150px) var(--pad-x, 70px) var(--pad-bottom, 130px);
}
.rsvp__frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; filter: drop-shadow(0 20px 34px rgba(28, 42, 85, .16)); }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field__label { font: 600 .74rem/1.3 var(--serif); letter-spacing: .2em; text-transform: uppercase; color: var(--navy); }
.field__label em { font-style: italic; font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  padding: 10px 2px 8px;
  border: 0;
  border-bottom: 1px solid #b9ae88;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 1.15rem/1.35 var(--serif);
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 84px; border: 1px solid #cfc5a3; padding: 10px 12px; border-radius: 4px; background: rgba(255, 255, 255, .45); }
.field input::placeholder { color: #9aa0b2; font-style: italic; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
/* Replies are by invitation: the plain link shows the gate, invitations the form. */
.gate { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 6px 0 10px; }
.gate__title { font: clamp(1.9rem, 6vw, 2.4rem)/1.2 var(--script); color: var(--navy); }
.gate__text { max-width: 30ch; font-style: italic; color: var(--muted); }
.has-guest .gate { display: none; }
html:not(.has-guest) #rsvpForm, html:not(.has-guest) #rsvpDone { display: none !important; }
.reply { border: 0; margin: 0; padding: 18px 0 4px; border-top: 1px solid #ddd2b0; display: grid; gap: 12px; }
.reply__head { display: grid; gap: 2px; padding: 0; margin-bottom: 12px; }
.reply__event { font: clamp(1.6rem, 5.4vw, 2rem)/1.15 var(--script); color: var(--navy); }
.reply__when { font: italic 500 1rem/1.3 var(--serif); color: var(--muted); }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block;
  padding: 12px 16px;
  border: 1px solid #cfc5a3;
  border-radius: 999px;
  text-align: center;
  font: italic 500 1.15rem/1.2 var(--serif);
  color: var(--navy);
  background: rgba(255, 255, 255, .45);
  transition: background .2s, color .2s, border-color .2s;
}
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #f8f1dc; }
.choice input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }
.guests { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.guests .field__label { flex-basis: 100%; }
.guests__max { font-style: italic; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; gap: 16px; }
.stepper button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--navy);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  font: 500 1.4rem/1 var(--serif);
  cursor: pointer;
}
.stepper button:hover { background: rgba(31, 53, 112, .07); }
.stepper output { min-width: 2ch; text-align: center; font: 500 1.8rem/1 var(--serif); color: var(--navy); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { min-height: 1.4em; text-align: center; font-style: italic; color: #8a3b2c; }
.done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 20px 0; }
.done__title { font: clamp(2rem, 7vw, 2.8rem)/1.2 var(--script); color: var(--navy); }
.done__text { font-size: 1.2rem; font-style: italic; color: var(--muted); max-width: 30ch; }
.done__list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; width: min(100%, 340px); }
.done__list li { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid #ddd2b0; border-radius: 4px; background: rgba(255, 255, 255, .5); }
.done__list b { font: 1.4rem/1.2 var(--script); font-weight: 400; color: var(--navy); }
.done__list span { font-style: italic; color: var(--muted); }
.done .btn { margin-top: 10px; }

/* =====================================================
 * 5. Footer
 * ===================================================== */
.foot { text-align: center; }
.foot__inner { padding: clamp(56px, 9vw, 96px) 16px clamp(64px, 10vw, 110px); display: grid; justify-items: center; gap: 12px; }
.foot__dua { max-width: 22em; font: 400 clamp(1.7rem, 5.8vw, 2.6rem)/2.1 'IndoPak', var(--arabic); color: var(--navy); direction: rtl; text-wrap: balance; }
.foot__tr { max-width: 36ch; font-size: 1.2rem; font-style: italic; color: var(--muted); }
.foot__sig { margin-top: 12px; font: clamp(1.7rem, 5.5vw, 2.3rem)/1.3 var(--script); color: var(--blue); }

/* "More below": pinned to the bottom of the screen until the end of the page. */
.more {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 28px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(243, 237, 221, 0), rgba(243, 237, 221, .82) 55%, rgba(243, 237, 221, .95));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
.more.is-shown { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.more__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 8px 20px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--paper-hi);
  box-shadow: 0 0 0 3px var(--paper-hi), 0 0 0 4px rgba(174, 146, 84, .45), 0 6px 16px rgba(28, 42, 85, .12);
  color: var(--navy);
  font: italic 600 1rem/1 var(--serif);
  letter-spacing: .04em;
  cursor: pointer;
  pointer-events: auto;
  transition: background .2s ease, transform .2s ease;
}
.more__btn:hover { background: #fff; transform: translateY(-1px); }
.more__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.more__btn i {
  width: 9px;
  height: 9px;
  margin-top: -5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: 45deg;
  animation: bob 1.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .more, .more.is-shown { transition: none; }
  .more__btn i { animation: none; }
  .card__border, .card__field { --grow: 0%; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cue i { animation: none; }
}
