/* ==========================================================================
   Bijan & Parisa — "Lajvard & Zar" (lapis & gold)
   A modern Persian-garden wedding invitation. RTL, Farsi.
   ========================================================================== */

:root {
  /* palette */
  --ink: #0C1633;
  --ink-2: #132250;
  --ink-3: #1C2E66;
  --ink-deep: #070D22;
  --paper: #F5EDE0;
  --paper-2: #EDE2CF;
  --paper-card: #FBF6EC;
  --gold: #D4B062;
  --gold-hi: #F1DC9E;
  --gold-lo: #8C6A22;
  --gold-text: #7A5A17;           /* gold for text on paper — 5.4:1 */
  --anar: #9B2335;                /* pomegranate */
  --text: #1A2244;
  --text-soft: #4A5378;           /* 6.4:1 on paper */
  --on-ink: #EDE6D6;
  --on-ink-soft: #B9B6C8;         /* 9:1 on ink */
  --line-paper: rgba(26, 34, 68, .14);
  --line-ink: rgba(212, 176, 98, .28);

  --foil: linear-gradient(100deg, #8C6A22 0%, #E6C77A 20%, #FFF1C4 36%, #C9A04A 52%, #F1DC9E 68%, #9A7729 84%, #D9B865 100%);

  /* type */
  --f-nastaliq: "Noto Nastaliq Urdu", "Vazirmatn", serif;
  --f-display: "Markazi Text", "Vazirmatn", serif;
  --f-body: "Vazirmatn", Tahoma, system-ui, sans-serif;

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* layout */
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --nav-h: 72px;

  /* patterns (girih / khatam tile) */
  --girih-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23D4B062' stroke-width='1'%3E%3Cpolygon points='64,40 56.97,47.03 56.97,56.97 47.03,56.97 40,64 32.97,56.97 23.03,56.97 23.03,47.03 16,40 23.03,32.97 23.03,23.03 32.97,23.03 40,16 47.03,23.03 56.97,23.03 56.97,32.97'/%3E%3Cpath d='M64 40H80M16 40H0M40 64V80M40 16V0M56.97 56.97L80 80M23.03 23.03L0 0M56.97 23.03L80 0M23.03 56.97L0 80'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3C/g%3E%3C/svg%3E");
  --arch-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C0 12 28 5 40 0C52 5 80 12 80 22V40Z'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--f-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::after { /* paper grain */
  content: ""; position: fixed; inset: 0; z-index: 900; pointer-events: none;
  background-image: var(--grain); opacity: .07;
}
html.js:not(.gate-done) body { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold); color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: fixed; top: 12px; inset-inline-start: 12px; z-index: 2000;
  padding: 10px 18px; border-radius: 999px; background: var(--gold); color: var(--ink);
  text-decoration: none; font-weight: 600; transform: translateY(-200%); transition: transform .2s var(--ease-out);
}
.skip:focus { transform: none; }
html.js:not(.gate-done) .skip { display: none; }
#main:focus { outline: none; }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.star8 { width: 14px; height: 14px; fill: currentColor; flex: none; }

/* ---------- shared ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 860px; }

.foil {
  background: var(--foil); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  /* Nastaliq ink overflows its advance box; pad so the clipped gradient covers every stroke */
  padding: .15em .35em; margin-inline: -.35em;
  animation: foil 9s ease-in-out infinite alternate;
}
@keyframes foil { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.nastaliq { font-family: var(--f-nastaliq); font-weight: 500; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-display); font-weight: 500; font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); line-height: 1.6;
  color: var(--gold-text);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--flank::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .7; }

.s-head { text-align: center; margin-bottom: clamp(48px, 7vw, 96px); }
.s-head--start { text-align: start; }
.s-title {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.6rem); line-height: 1.25;
  color: var(--ink); margin-top: 6px; text-wrap: balance;
}

.media {
  position: relative; display: block; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 28%, #24377A 0%, var(--ink-2) 62%, var(--ink) 100%);
}
.media::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--girih-gold); background-size: 64px; opacity: .13;
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media.is-missing img { display: none; }
.arch { clip-path: url(#arch); }
.arch-wide { clip-path: url(#arch-wide); }

.arch-frame { position: relative; margin: 0; }
.arch-frame .media { width: 100%; height: 100%; }
.arch-line {
  position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px);
  fill: none; stroke: var(--gold); opacity: .75; overflow: visible; pointer-events: none;
}
.arch-line path { vector-effect: non-scaling-stroke; stroke-width: 1; }
.arch-line--inner { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); stroke: rgba(255, 241, 196, .5); }

/* arcade divider — row of pointed arches rising into the section above */
.arches {
  position: absolute; inset-inline: 0; bottom: -1px; z-index: 3; pointer-events: none;
  height: clamp(26px, 3.4vw, 42px);
  background: var(--arch-color, var(--paper));
  -webkit-mask: var(--arch-mask) repeat-x center bottom / clamp(52px, 6.6vw, 84px) 100%;
          mask: var(--arch-mask) repeat-x center bottom / clamp(52px, 6.6vw, 84px) 100%;
}

.rosette { color: var(--gold); pointer-events: none; }
.rosette svg { display: block; width: 100%; height: 100%; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: .98rem; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; touch-action: manipulation;
  transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s, transform .2s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn--ghost { border-color: rgba(212, 176, 98, .55); color: var(--gold-hi); background: rgba(12, 22, 51, .2); }
.btn--ghost:hover { background: rgba(212, 176, 98, .14); border-color: var(--gold); }
.btn--primary { background: var(--ink); color: var(--gold-hi); box-shadow: 0 12px 26px -14px rgba(12, 22, 51, .7); }
.btn--primary:hover { background: var(--ink-3); }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border-radius: 50%; border: 1px solid var(--line-ink); background: rgba(12, 22, 51, .25);
  color: var(--gold-hi); cursor: pointer; touch-action: manipulation;
  transition: background-color .25s, border-color .25s, transform .2s var(--ease-out);
}
.icon-btn:hover { background: rgba(212, 176, 98, .16); border-color: var(--gold); }
.icon-btn:active { transform: scale(.94); }
#musicBtn[aria-pressed="true"] { background: rgba(212, 176, 98, .2); border-color: var(--gold); }
#musicBtn[aria-pressed="true"] .ico { animation: bob 1.6s var(--ease-in-out) infinite; }
@keyframes bob { 50% { transform: translateY(-2px) rotate(-6deg); } }

.link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  color: var(--gold-text); font-size: .95rem; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 7px;
}
.link:hover { color: var(--ink); }

/* ==========================================================================
   Gate (opening doors)
   ========================================================================== */
.gate { position: fixed; inset: 0; z-index: 1000; display: none; place-items: center; }
.js .gate { display: grid; }
.gate-done .gate { display: none; }

.gate__leaf {
  position: absolute; top: 0; bottom: 0; width: 50.2%; overflow: hidden;
  background: radial-gradient(130% 70% at 50% 42%, #1A2D66 0%, var(--ink) 58%, var(--ink-deep) 100%);
  transition: transform 1.5s cubic-bezier(.7, 0, .2, 1);
}
.gate__leaf::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--girih-gold); background-size: 88px; opacity: .1;
}
.gate__leaf--start { inset-inline-start: 0; }
.gate__leaf--end { inset-inline-end: 0; }
/* seams (physical sides: in RTL the start leaf sits on the right) */
[dir="rtl"] .gate__leaf--start { box-shadow: inset 26px 0 34px -20px rgba(0, 0, 0, .6); }
[dir="rtl"] .gate__leaf--end { box-shadow: inset -26px 0 34px -20px rgba(0, 0, 0, .6); }
.gate__panel {
  position: absolute; inset: 6vh 12% 6vh; width: 76%; height: 88vh;
  fill: none; stroke: var(--gold); opacity: .38;
}
.gate__panel path { vector-effect: non-scaling-stroke; stroke-width: 1; }

.gate__content {
  position: relative; z-index: 2; text-align: center; color: var(--on-ink);
  padding: 24px; max-width: 560px;
  transition: opacity .5s ease, transform .7s var(--ease-out);
}
.gate__to { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2rem); color: var(--gold-hi); line-height: 1.5; }
.gate__lead { color: var(--on-ink-soft); font-size: 1.02rem; }
.gate__names { font-family: var(--f-nastaliq); font-weight: 500; font-size: clamp(2.4rem, 1.6rem + 4vw, 4.4rem); line-height: 2.2; margin-block: -.1em; }

.seal {
  margin-top: 26px; display: inline-flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 8px 16px; background: none; border: 0; cursor: pointer; color: var(--gold-hi);
  touch-action: manipulation;
}
.seal__wax {
  position: relative; width: 104px; height: 104px; display: grid; place-items: center;
  border-radius: 48% 52% 50% 50% / 51% 47% 53% 49%;
  background: radial-gradient(circle at 34% 30%, #CC4555 0%, #9B2335 46%, #661020 100%);
  box-shadow: 0 16px 34px -10px rgba(0, 0, 0, .7), inset 0 -7px 14px rgba(0, 0, 0, .35), inset 0 5px 9px rgba(255, 170, 170, .25);
  transition: transform .35s var(--ease-out);
}
.seal__wax::before {
  content: ""; position: absolute; inset: 14px; border-radius: 50%;
  border: 2px solid rgba(60, 5, 15, .35);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .3), 0 1px 0 rgba(255, 190, 190, .25);
}
.seal__wax::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid var(--gold); opacity: 0; animation: pulse 2.8s var(--ease-out) infinite;
}
@keyframes pulse { 0% { transform: scale(.88); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }
.seal__mono {
  position: relative; font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; line-height: 1;
  color: #F2C3B4; text-shadow: 0 -1px 0 rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 210, 200, .3);
}
.seal__label { font-size: .98rem; padding-bottom: 4px; border-bottom: 1px solid var(--line-ink); }
.seal:hover .seal__wax { transform: scale(1.05) rotate(-4deg); }
.seal:active .seal__wax { transform: scale(.95); }
.seal:focus-visible { outline-offset: 6px; border-radius: 16px; }

.gate-opening .gate__content { opacity: 0; transform: scale(1.08); pointer-events: none; }
.gate-opening .gate__leaf { transition-delay: .3s; }
[dir="rtl"] .gate-opening .gate__leaf--start { transform: translateX(101%); }
[dir="rtl"] .gate-opening .gate__leaf--end { transform: translateX(-101%); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: var(--on-ink); border-bottom: 1px solid transparent;
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
}
.nav.is-scrolled {
  background: rgba(10, 18, 44, .8);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-ink);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 1.4rem; color: var(--gold-hi);
}
.nav__arch { width: 22px; height: 29px; fill: none; stroke: var(--gold); stroke-width: 5; }
.nav__links { display: none; gap: clamp(18px, 2.6vw, 38px); }
.nav__links a {
  position: relative; display: inline-block; padding: 10px 2px;
  text-decoration: none; color: var(--on-ink-soft); font-size: .95rem; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 6px; height: 1px; background: var(--gold);
  transform: scaleX(0); transition: transform .3s var(--ease-out);
}
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--gold-hi); }
.nav__links a:hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
@media (min-width: 900px) { .nav__links { display: flex; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 20px) var(--gutter) clamp(110px, 12vw, 160px);
  background:
    radial-gradient(60% 55% at 28% 42%, rgba(38, 60, 138, .55) 0%, rgba(38, 60, 138, 0) 70%),
    radial-gradient(120% 90% at 80% 0%, #16275A 0%, var(--ink) 55%, var(--ink-deep) 100%);
  color: var(--on-ink);
}
.hero__pattern {
  position: absolute; inset: 0; z-index: -1;
  background-image: var(--girih-gold); background-size: 96px; opacity: .09;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000 10%, transparent 78%);
          mask-image: radial-gradient(80% 70% at 50% 45%, #000 10%, transparent 78%);
}
.hero__grid {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 4px;
}
.hero__text { position: relative; z-index: 2; text-align: center; }
.hero__art { position: relative; display: grid; justify-items: center; order: -1; padding-top: 18px; }

.names {
  font-family: var(--f-nastaliq); font-weight: 500;
  font-size: clamp(3.2rem, min(1.4rem + 7.4vw, 15.5vh), 8rem); line-height: 1.12;
  margin: -.05em 0 .28em;
  filter: drop-shadow(0 10px 28px rgba(4, 8, 24, .6));
}
.names:focus { outline: none; }
.names__row { display: block; }
.names__and {
  display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%;
  font-family: var(--f-display); font-weight: 500; font-size: .26em; line-height: 1;
  vertical-align: .9em; padding-bottom: .12em;
  border: 1px solid var(--line-ink); color: var(--gold); background: rgba(12, 22, 51, .55);
}

.hero__date {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  font-family: var(--f-display); font-weight: 500; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.8rem); line-height: 1.5;
}
.dot { display: inline-block; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.hero__place { margin-top: 2px; color: var(--on-ink-soft); font-size: 1rem; }

.count { margin-top: clamp(22px, 3.4vw, 40px); }
.count__title { font-size: .9rem; color: var(--gold); margin-bottom: 10px; }
.count__grid {
  display: inline-grid; grid-template-columns: repeat(4, minmax(66px, 1fr));
  border: 1px solid var(--line-ink); border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.count__cell { position: relative; padding: 12px clamp(8px, 1.6vw, 20px) 8px; text-align: center; }
.count__cell + .count__cell::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 24%; bottom: 24%; width: 1px; background: var(--line-ink);
}
.count__num {
  display: block; font-weight: 250; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.2;
  font-variant-numeric: tabular-nums; color: var(--gold-hi);
}
.count__label { font-size: .8rem; color: var(--on-ink-soft); }
.count.is-done .count__grid { display: none; }
.count.is-done .count__title { font-family: var(--f-display); font-size: 1.5rem; color: var(--gold-hi); }

.rosette--hero {
  position: absolute; top: 50%; left: 50%; width: min(140%, 760px); aspect-ratio: 1;
  translate: -50% -52%; opacity: .26; z-index: 0;
  animation: spin 160s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
.arch-frame--hero { width: min(58vw, 300px); aspect-ratio: 5 / 7; z-index: 1; }
.hero__latin {
  margin-top: 26px; font-family: var(--f-display); font-size: .78rem; letter-spacing: .34em;
  color: var(--on-ink-soft); text-align: center; line-height: 1.4; display: none;
}

.scroll-cue {
  position: absolute; left: 50%; bottom: clamp(56px, 6vw, 80px); translate: -50% 0; z-index: 2;
  display: none; flex-direction: column; align-items: center; gap: 6px;
  color: var(--gold); text-decoration: none; font-family: var(--f-display); font-size: 1.15rem; line-height: 1.4;
}
.scroll-cue i {
  display: block; width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent);
  transform-origin: top; animation: cue 2.6s var(--ease-in-out) infinite;
}
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(24px, 4vw, 64px); }
  .hero__text { text-align: start; }
  .hero__art { order: 0; padding-top: 0; }
  .names { margin-top: -.2em; }
  .names__row--two { padding-inline-start: .35em; margin-inline-end: -1.4em; }
  .hero__date { justify-content: flex-start; }
  .arch-frame--hero { width: min(100%, 420px, calc((100svh - 250px) * 5 / 7)); }
  .hero__latin { display: block; }
  .eyebrow--flank.rise { justify-content: flex-start; }
  .hero .eyebrow--flank::after { display: none; }
}
@media (min-width: 960px) and (min-height: 760px) { .scroll-cue { display: flex; } }

.hero .eyebrow { color: var(--gold); }

/* ==========================================================================
   Invite
   ========================================================================== */
.invite { position: relative; text-align: center; padding-block: clamp(80px, 10vw, 140px) clamp(120px, 13vw, 180px); }
.ornament { display: block; width: min(240px, 70%); height: auto; margin: 0 auto 34px; color: var(--gold-lo); overflow: visible; }
.ornament .o-line { fill: none; stroke: currentColor; stroke-width: 1; opacity: .7; }
.ornament .o-star { fill: none; stroke: currentColor; stroke-width: 1.2; }
.ornament .o-core { fill: currentColor; }
.invite .wrap--narrow { max-width: 1040px; }
.beyt p {
  display: grid; gap: 4px 64px;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.15rem); line-height: 1.75; color: var(--ink);
}
.mesra:first-child { text-align: start; }
.mesra:last-child { text-align: end; }
.beyt footer {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 16px;
  color: var(--gold-text); font-size: .95rem;
}
.beyt footer::before, .beyt footer::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.invite__body {
  max-width: 36em; margin: 40px auto 0;
  font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 2.2; color: var(--text-soft); text-wrap: pretty;
}
.invite__sign { margin-top: 30px; display: flex; flex-direction: column; align-items: center; }
.invite__sign .nastaliq { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); line-height: 2.3; color: var(--gold-text); }
.invite__sign span:last-child { margin-top: -.4em; font-size: .95rem; color: var(--text-soft); }
@media (min-width: 1024px) {
  .beyt p { grid-template-columns: 1fr 1fr; }
  .mesra:first-child, .mesra:last-child { text-align: center; white-space: nowrap; }
}

/* ==========================================================================
   Programme
   ========================================================================== */
.program {
  position: relative; isolation: isolate; overflow: clip; color: var(--on-ink);
  padding-block: clamp(90px, 11vw, 160px) clamp(140px, 16vw, 220px);
  background: radial-gradient(70% 60% at 12% 30%, #1A2C66 0%, var(--ink) 70%);
}
.program::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--girih-gold); background-size: 110px; opacity: .06;
}
.program .eyebrow { color: var(--gold); }
.program .s-title { color: var(--on-ink); }
.program__grid { display: grid; gap: clamp(56px, 8vw, 110px); }
.t-item {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 52px);
  padding-block: clamp(20px, 2.8vw, 30px); border-top: 1px solid var(--line-ink);
}
.t-item:last-child { border-bottom: 1px solid var(--line-ink); }
.t-item::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: linear-gradient(to left, rgba(212, 176, 98, .09), rgba(212, 176, 98, 0) 70%);
  transition: opacity .35s;
}
.t-item:hover::after { opacity: 1; }
.t-time {
  min-width: 3.3em; font-weight: 250; font-size: clamp(1.7rem, 1.25rem + 1.8vw, 2.6rem); line-height: 1.25;
  color: var(--gold-hi); font-variant-numeric: tabular-nums;
}
.t-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.35; }
.t-item p { margin-top: 2px; color: var(--on-ink-soft); }
.arch-frame--tall { width: min(78vw, 360px); aspect-ratio: 5 / 7; margin-inline: auto; }
.facts { display: grid; gap: 12px; max-width: 380px; margin: 48px auto 0; }
.facts div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 18px; border: 1px solid var(--line-ink); border-radius: 14px; background: rgba(255, 255, 255, .03);
}
.facts dt { color: var(--gold); font-size: .92rem; }
.facts dd { color: var(--on-ink); font-size: .95rem; text-align: end; }
@media (min-width: 960px) {
  .program__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: start; }
  .program__aside { position: sticky; top: calc(var(--nav-h) + 48px); padding-top: 24px; }
}

/* ==========================================================================
   Venue
   ========================================================================== */
.venue { position: relative; padding-block: clamp(80px, 10vw, 140px) clamp(140px, 16vw, 220px); }
.venue__stage { position: relative; }
.venue__img { width: 100%; aspect-ratio: 4 / 3; }
.venue__card {
  position: relative; z-index: 2; margin: -64px 12px 0; padding: clamp(22px, 3vw, 32px);
  background: var(--paper-card); border: 1px solid var(--line-paper); border-radius: 24px;
  box-shadow: 0 34px 60px -32px rgba(12, 22, 51, .45), 0 2px 6px rgba(12, 22, 51, .05);
}
.venue__addr { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 1.05rem; color: var(--ink); line-height: 1.9; }
.venue__addr .ico { margin-top: .35em; color: var(--gold-lo); }
.venue__facts { margin-top: 10px; display: grid; gap: 2px; }
.venue__facts li { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-size: .95rem; }
.venue__facts li::before { content: ""; width: 5px; height: 5px; background: var(--gold-lo); transform: rotate(45deg); flex: none; }
.venue__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 22px; }
.venue__maps-label { margin: 18px 0 8px; font-size: .85rem; color: var(--text-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-paper); border-radius: 999px; text-decoration: none;
  color: var(--ink); font-size: .92rem; transition: border-color .25s, background-color .25s;
}
.chip .ico { width: 16px; height: 16px; color: var(--gold-lo); }
.chip:hover { border-color: var(--gold-lo); background: rgba(212, 176, 98, .13); }
@media (min-width: 960px) {
  .venue__img { aspect-ratio: 16 / 8; }
  .venue__stage { margin-bottom: 90px; }
  .venue__card { position: absolute; inset-inline-start: 48px; bottom: -90px; width: 440px; margin: 0; }
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery { position: relative; background: var(--paper-2); padding-block: clamp(80px, 10vw, 140px) clamp(140px, 16vw, 220px); }
/* Mobile: wide photo on top, then two rows of arches.
   Desktop: wide + tall on the first row, an arcade of three arches below. */
.g-grid {
  display: grid; gap: clamp(10px, 1.4vw, 18px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "b b" "a c" "d e";
}
.g-item {
  position: relative; display: block; padding: 0; border: 0; background: none;
  border-radius: 16px; overflow: hidden; cursor: zoom-in;
}
.g-item .media { width: 100%; height: 100%; }
.g-item img { transition: transform .9s var(--ease-out); }
.g-item:hover img { transform: scale(1.05); }
.g-item:has(.is-missing) { cursor: default; }
.g-item--wide { aspect-ratio: 16 / 9; }
.g-item--arch, .g-item--tall { aspect-ratio: 4 / 5; border-radius: 0; }
.g-item--arch .media, .g-item--tall .media { clip-path: url(#arch); }
@media (min-width: 768px) {
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "b b a" "c d e"; }
  .g-item--tall { aspect-ratio: auto; border-radius: 16px; }
  .g-item--tall .media { clip-path: none; }
}

/* Lightbox */
.lightbox { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: transparent; color: var(--on-ink); }
.lightbox::backdrop { background: rgba(5, 9, 24, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox__inner { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 72px 16px; }
.lightbox img { max-width: min(92vw, 1200px); max-height: 78dvh; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox__close { position: absolute; top: 16px; inset-inline-end: 16px; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; translate: 0 -50%; }
.lightbox__prev { inset-inline-start: 16px; }
.lightbox__next { inset-inline-end: 16px; }
.lightbox__count { position: absolute; bottom: 20px; left: 50%; translate: -50% 0; font-size: .9rem; color: var(--on-ink-soft); }
.lightbox[open] img { animation: lb-in .35s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } }

/* ==========================================================================
   RSVP
   ========================================================================== */
.rsvp {
  position: relative; isolation: isolate; overflow: clip; color: var(--on-ink);
  padding-block: clamp(90px, 11vw, 160px);
  background: radial-gradient(80% 70% at 85% 20%, #1B2E6A 0%, var(--ink) 62%, var(--ink-deep) 100%);
}
.rosette--rsvp {
  position: absolute; z-index: -1; width: 980px; aspect-ratio: 1; opacity: .1;
  top: -260px; inset-inline-start: -360px; animation: spin 220s linear infinite reverse;
}
.rsvp .eyebrow { color: var(--gold); }
.rsvp .s-title { color: var(--on-ink); }
.rsvp__grid { display: grid; gap: 44px; align-items: start; }
.rsvp__intro > p:not(.eyebrow) { margin-top: 16px; max-width: 28em; color: var(--on-ink-soft); }
@media (min-width: 960px) {
  .rsvp__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(56px, 7vw, 110px); }
  .rsvp__intro { position: sticky; top: calc(var(--nav-h) + 60px); padding-top: 90px; }
}

.card {
  position: relative; color: var(--text); background: var(--paper-card);
  border-radius: 50% 50% 26px 26px / 140px 140px 26px 26px;
  padding: clamp(92px, 10vw, 124px) clamp(20px, 4vw, 52px) clamp(28px, 4vw, 44px);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .7);
}
.card::before {
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid rgba(140, 106, 34, .35);
  border-radius: 50% 50% 18px 18px / 132px 132px 18px 18px;
}
.card__crest { position: absolute; top: 44px; left: 50%; translate: -50% 0; color: var(--gold-lo); line-height: 0; }
.card__crest .star8 { width: 26px; height: 26px; }

.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field label, .field legend, .label { font-weight: 500; font-size: .95rem; color: var(--ink); line-height: 1.7; }
.field legend { margin-bottom: 8px; }
.req { color: var(--anar); margin-inline-start: 2px; }
.hint, .hint-inline { font-size: .85rem; color: var(--text-soft); font-weight: 400; }
.input {
  width: 100%; min-height: 52px; padding: 11px 16px; border-radius: 14px;
  border: 1px solid rgba(26, 34, 68, .2); background: #FFFDF8; font-size: 1rem; line-height: 1.7;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: rgba(74, 83, 120, .55); }
.input:hover { border-color: rgba(26, 34, 68, .34); }
.input:focus { outline: none; border-color: var(--gold-lo); box-shadow: 0 0 0 4px rgba(212, 176, 98, .3); }
.input[aria-invalid="true"] { border-color: var(--anar); box-shadow: 0 0 0 4px rgba(155, 35, 53, .1); }
.input--ltr { text-align: right; }
.input--ltr::placeholder { text-align: right; }
textarea.input { min-height: 104px; resize: vertical; }
.error { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--anar); line-height: 1.6; }
.error:empty { display: none; }
.error::before {
  content: ""; width: 16px; height: 16px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

.choices { display: grid; gap: 10px; }
@media (min-width: 460px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px;
  border: 1px solid rgba(26, 34, 68, .2); border-radius: 14px; background: #FFFDF8;
  font-weight: 500; cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.choice label:hover { border-color: rgba(26, 34, 68, .36); }
.choice__dot {
  width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid rgba(26, 34, 68, .38); transition: border-color .2s, background-color .2s;
}
.choice__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .25s var(--ease-out); }
.choice input:checked + label { border-color: var(--gold-lo); background: #F6ECD6; box-shadow: inset 0 0 0 1px var(--gold-lo); }
.choice input:checked + label .choice__dot { border-color: var(--gold-lo); background: var(--gold-lo); }
.choice input:checked + label .choice__dot::after { transform: scale(1); }
.choice input:focus-visible + label { outline: 2px solid var(--gold-lo); outline-offset: 3px; }
fieldset[aria-invalid="true"] .choice label { border-color: var(--anar); }

.stepper {
  display: inline-flex; align-items: center; justify-self: start;
  border: 1px solid rgba(26, 34, 68, .2); border-radius: 14px; background: #FFFDF8; overflow: hidden;
}
.stepper button {
  width: 52px; height: 52px; display: grid; place-items: center; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; touch-action: manipulation; transition: background-color .2s;
}
.stepper button:hover:not(:disabled) { background: var(--paper-2); }
.stepper button:disabled { opacity: .38; cursor: not-allowed; }
.stepper output { min-width: 52px; text-align: center; font-size: 1.2rem; font-weight: 500; font-variant-numeric: tabular-nums; }

.btn--submit {
  position: relative; overflow: hidden; width: 100%; min-height: 58px; margin-top: 6px;
  border-radius: 16px; background: var(--ink); color: var(--gold-hi); font-size: 1.05rem; font-weight: 600;
}
.btn--submit::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(241, 220, 158, .22) 50%, transparent 70%);
  transition: transform .9s var(--ease-out);
}
.btn--submit:hover { background: var(--ink-3); }
.btn--submit:hover::after { transform: translateX(120%); }
.btn--submit:disabled { cursor: progress; opacity: .85; }
.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(241, 220, 158, .3); border-top-color: var(--gold-hi);
  animation: spin .8s linear infinite;
}
.btn--submit[aria-busy="true"] .spinner { display: block; }
.form-status { margin-top: 14px; text-align: center; color: var(--anar); font-size: .92rem; }
.form-status:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.success { text-align: center; padding-block: 8px 4px; }
.success__check { width: 72px; height: 72px; margin: 0 auto 14px; fill: none; stroke: var(--gold-lo); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.success__check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .8s var(--ease-out) forwards; }
.success__check path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .5s .55s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.5rem); line-height: 1.4; color: var(--ink); }
.success__title:focus { outline: none; }
.success__text { margin: 8px auto 12px; max-width: 26em; color: var(--text-soft); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--ink-deep); color: var(--on-ink-soft); text-align: center; padding: clamp(64px, 8vw, 100px) var(--gutter) 28px; }
.footer__names { font-family: var(--f-nastaliq); font-weight: 500; font-size: clamp(2.3rem, 1.6rem + 3vw, 3.8rem); line-height: 2.2; }
.footer__meta { margin-top: -.3em; font-family: var(--f-display); font-size: 1.3rem; color: var(--on-ink); }
.footer__tag { margin-top: 6px; color: var(--gold); }
.footer__bottom {
  max-width: var(--wrap); margin: 56px auto 0; padding-top: 20px; border-top: 1px solid var(--line-ink);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .85rem;
}
.footer__bottom a { color: var(--gold-hi); text-underline-offset: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.footer__bottom span { display: inline-flex; align-items: center; min-height: 44px; }

/* ==========================================================================
   Motion: entrance choreography + scroll reveals
   ========================================================================== */
.js .rise { opacity: 0; transform: translateY(26px); }
.is-open .rise { animation: rise 1.1s var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + var(--rise-base, 0ms)); }
.via-gate { --rise-base: 900ms; }
@keyframes rise { to { opacity: 1; transform: none; } }

.js [data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .rise, .js [data-reveal] { opacity: 1; transform: none; animation: none !important; }
  .rosette--hero, .rosette--rsvp, .foil, .seal__wax::after, .scroll-cue i { animation: none !important; }
}
