/* /nikkah — intro, language gate, and the invitation story */

/* ================================================================= INTRO
   "Malli": one Madurai jasmine is drawn, opens, and becomes the emblem above
   the sentence. Then a stationery card rises to choose the language. */
#intro {
  position: fixed; inset: 0; z-index: 50; overflow: hidden;
  height: 100vh; height: 100svh;
  background:
    radial-gradient(70% 45% at 85% 8%, rgba(232, 203, 189, .75), transparent 70%),
    radial-gradient(60% 40% at 8% 92%, rgba(220, 179, 162, .55), transparent 70%),
    radial-gradient(120% 90% at 50% 40%, #fbf6f1 0%, #f6ebe3 60%, #efdcd1 100%);
  color: var(--ink);
}
#intro.gone { visibility: hidden; pointer-events: none; }
#intro::before { /* cotton paper */
  content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .42  0 0 0 0 .36  0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}
.composition { position: absolute; inset: 0; transform-origin: 50% 0; }

.bloom { position: absolute; left: 50%; top: 42%; width: min(62vw, 290px); aspect-ratio: 200 / 280; transform: translate(-50%, -50%); overflow: visible; z-index: 2; }
.bloom .ink { fill: none; stroke: var(--ink); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bloom .pt { fill: url(#petalFill); stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bloom .pt-in { fill: url(#petalFill2); }
.bloom .crease { fill: none; stroke: var(--ink); stroke-width: .6; opacity: .3; vector-effect: non-scaling-stroke; }
.bloom .bud { fill: url(#petalFill); stroke: var(--ink); stroke-width: 1.15; vector-effect: non-scaling-stroke; }
.bloom .stamen { fill: var(--gold-400); }
.bloom .heart { fill: none; stroke: var(--gold-500); stroke-width: .8; vector-effect: non-scaling-stroke; }

.sentence {
  position: absolute; left: 0; right: 0; top: 0; padding: 0 22px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; text-align: center; visibility: hidden;
}
.bismillah { font-family: var(--f-arabic); direction: rtl; color: var(--gold-500); font-size: clamp(19px, 5.2vw, 27px); line-height: 1.6; margin: 0 0 1.4svh; }
.names { margin: 0; font-family: var(--f-script); font-weight: 400; color: var(--ink); line-height: 1.12; font-size: clamp(54px, 15.5vw, 104px); }
.names .line { display: block; overflow: hidden; padding: .02em .25em .16em; margin: -.06em 0; }
.names .line > span { display: inline-block; }
.names .amp { display: block; font-family: var(--f-caps); font-size: .2em; letter-spacing: .45em; color: var(--gold-500); margin: .2em 0 .1em; padding-left: .45em; }
.saying { font-family: var(--f-display); font-style: italic; color: var(--ink-soft); font-size: clamp(18px, 4.8vw, 24px); margin: 1.6svh 0 0; }
.qubool { margin: 0; position: relative; }
.qubool .q-ur { display: block; font-family: "Noto Nastaliq Urdu", var(--f-arabic); color: var(--gold-500); font-size: clamp(17px, 4.6vw, 23px); line-height: 2; margin-bottom: -.5em; }
.qubool .q-en {
  display: inline-block; font-family: var(--f-display); font-style: italic; font-weight: 500;
  font-size: clamp(50px, 14.5vw, 100px); line-height: 1.05; padding: 0 .12em;
  background: linear-gradient(100deg, #8c5f4d 0%, #b98670 28%, #f0d4c3 44%, #c8947c 58%, #8c5f4d 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 240% 100%; mask-size: 240% 100%; -webkit-mask-position: 100% 0; mask-position: 100% 0;
}
.date { margin-top: 2.2svh; font-family: var(--f-caps); letter-spacing: .36em; font-size: clamp(11px, 3vw, 14px); color: var(--ink); padding-left: .36em; }
.date .rule { display: block; width: 46px; height: 1px; background: var(--gold-400); margin: 0 auto 14px; }
.d-time { font-family: var(--f-caps); letter-spacing: .3em; font-size: clamp(9.5px, 2.6vw, 12px); color: var(--ink-soft); margin: 8px 0 0; padding-left: .3em; }

.petal { position: absolute; z-index: 4; top: -40px; left: 0; width: 16px; height: 22px; pointer-events: none; will-change: transform; }
.petal svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 4px rgba(106, 75, 62, .18)); }

/* the language card: unmistakably the next step */
.gate {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 6;
  width: min(calc(100% - 24px), 520px); transform: translateX(-50%);
  padding: 22px 18px 18px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, #fffaf6, #f8ece4);
  border: 1px solid rgba(174, 122, 100, .35);
  box-shadow: 0 1px 0 #fff inset, 0 -10px 40px -20px rgba(106, 75, 62, .35), 0 30px 60px -30px rgba(106, 75, 62, .6);
  visibility: hidden;
}
.gate::before { /* a fine inner border, like a printed card */
  content: ""; position: absolute; inset: 7px; border-radius: 16px; border: 1px solid rgba(174, 122, 100, .22); pointer-events: none;
}
.gate .g-title { margin: 0; font-family: var(--f-script); font-size: clamp(30px, 8.4vw, 40px); line-height: 1.15; color: var(--ink); }
.gate .g-sub { margin: 2px 0 14px; font-family: var(--f-caps); font-size: 10px; letter-spacing: .32em; color: var(--gold-500); }
.gate .g-multi { margin: 0 0 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.gate .g-multi span { white-space: nowrap; }
.gate .g-multi [lang="ta"] { font-family: "Noto Serif Tamil", serif; }
.gate .g-multi [lang="ml"] { font-family: "Noto Serif Malayalam", serif; }
.gate .g-multi [lang="ur"] { font-family: "Noto Nastaliq Urdu", serif; letter-spacing: 0; word-spacing: normal; line-height: 1.9; }
.gate .lang-grid { width: 100%; margin: 0 auto; }
.gate .lang-btn { min-height: 74px; }
.gate .hand {
  display: inline-block; margin-left: 6px; animation: nudge 1.6s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: translateY(3px); } }

.skip {
  position: absolute; z-index: 7; top: max(12px, env(safe-area-inset-top)); right: 14px;
  font-family: var(--f-caps); font-size: .64rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-soft); opacity: .75; padding: 10px 6px;
}
.skip[hidden] { display: none; }

/* the iris that opens from the chosen button into the invitation */
.iris {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: var(--paper);
  clip-path: circle(0 at 50% 50%);
}

/* ============================================================== THE STORY */
#main { position: relative; z-index: 1; background: var(--paper); }
#main[hidden] { display: none; }

.sec {
  position: relative; overflow: hidden;
  padding: clamp(84px, 14vh, 150px) var(--gutter);
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.sec--light { background-color: var(--paper); }
.sec--light::before { /* a single hairline between sections */
  content: ""; position: absolute; top: 0; left: 50%; width: min(240px, 40vw); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(169, 127, 54, .45), transparent);
}
.sec--dark {
  color: var(--ink);
  background:
    radial-gradient(70% 50% at 90% 0%, rgba(255, 255, 255, .35), transparent 70%),
    linear-gradient(180deg, #ecd3c6, #e4c1b1);
}
.wrap { position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto; }
.narrow { max-width: 760px; margin-inline: auto; }

.eyebrow {
  display: inline-block; margin: 0 0 22px;
  font-size: .72rem; color: var(--gold-500);
}
.sec--dark .eyebrow { color: var(--gold-600); }
html[lang="ta"] .eyebrow, html[lang="ml"] .eyebrow { font-size: .9rem; }
html[lang="ur"] .eyebrow { font-size: 1rem; }

.wd { display: inline-block; will-change: transform, opacity; }

/* --- ayah ------------------------------------------------------------- */
.pairs { width: min(440px, 86vw); margin: 0 auto clamp(18px, 4vh, 40px); overflow: visible; }
.pairs .ring { fill: none; stroke: var(--gold-400); stroke-width: 1.4; }
.pairs .ring2 { stroke: var(--gold-500); }
.pairs .knot { fill: none; stroke: var(--gold-500); stroke-width: 1; }
.pairs .glow { fill: url(#pairGlow); }

.ayah-ar {
  font-family: var(--f-quran); direction: rtl;
  font-size: clamp(1.9rem, 5.6vw, 3.6rem); line-height: 2.05;
  color: var(--emerald-800); margin: 0 auto .2em; max-width: 18ch;
}
.ayah-ar .orn { color: var(--gold-500); }
.ayah-tr {
  font-family: var(--f-body); font-style: normal;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem); line-height: var(--lh-body);
  color: var(--ink); max-width: 30ch; margin: .4em auto .9em;
}
html[lang="en"] .ayah-tr { font-style: italic; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.4; }
.ayah-ref { font-size: .7rem; color: var(--gold-600); }
html[lang="ta"] .ayah-ref, html[lang="ml"] .ayah-ref { font-size: .85rem; }
html[lang="ur"] .ayah-ref { font-size: .95rem; }
.pairs-line { margin: clamp(28px, 6vh, 56px) auto 0; max-width: 32ch; color: var(--ink-soft); font-size: 1em; }

.scroll-cue {
  position: absolute; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--gold-500); font-size: .62rem;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 38px;
  background: linear-gradient(var(--gold-400), transparent);
  animation: cue 2.2s var(--ease-out) infinite; transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* --- couple ------------------------------------------------------------ */
.bism-small { font-family: var(--f-arabic); direction: rtl; font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--gold-500); margin: 0; line-height: 1.8; }
.bism-mean { font-size: .82em; color: var(--ink-soft); margin: 0 0 clamp(26px, 5vh, 48px); }
.host { font-size: clamp(.9rem, 2.2vw, 1.25rem); color: var(--emerald-800); margin: 0 0 6px; letter-spacing: .26em; }
html[lang="ta"] .host, html[lang="ml"] .host, html[lang="ur"] .host { font-size: clamp(1.1rem, 2.6vw, 1.5rem); letter-spacing: 0; }
.host-biz { font-family: var(--f-caps); font-size: .62rem; letter-spacing: .32em; color: var(--gold-600); margin: 0 0 18px; text-transform: uppercase; }
html:not([lang="en"]) .host-biz { font-family: var(--f-body); letter-spacing: .02em; font-size: .85rem; text-transform: none; }
.invite-line { font-size: clamp(1.1rem, 2.3vw, 1.45rem); font-style: italic; color: var(--ink); max-width: 30ch; margin: 0 auto clamp(36px, 7vh, 70px); }
html:not([lang="en"]) .invite-line { font-style: normal; }

.couple {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: clamp(16px, 4vw, 56px); width: 100%; max-width: 980px; margin: 0 auto;
}
.person { display: flex; flex-direction: column; align-items: center; }
.arch-card { width: min(190px, 48vw); aspect-ratio: 1; margin-bottom: 26px; overflow: visible; }
.arch-card .line { fill: none; stroke: var(--gold-400); stroke-width: 1; vector-effect: non-scaling-stroke; }
.arch-card .line2 { fill: none; stroke: var(--gold-300); stroke-width: .5; opacity: .7; vector-effect: non-scaling-stroke; }
.arch-card .mono { font-family: var(--f-display); font-style: italic; font-weight: 300; font-size: 112px; fill: url(#goldGrad); }
.p-name {
  font-family: var(--f-script); font-weight: 400; margin: 0; line-height: 1.25;
  font-size: clamp(2.6rem, 6.4vw, 4.2rem); color: var(--ink);
}
.p-native { margin: 4px 0 0; font-size: 1.05em; color: var(--gold-600); }
.p-deg { margin: 14px 0 0; font-family: var(--f-sans); font-size: .78rem; letter-spacing: .2em; color: var(--ink-soft); text-transform: uppercase; }
.p-inst { margin: 4px 0 0; font-family: var(--f-caps); font-size: .95rem; letter-spacing: .22em; color: var(--emerald-700); }
html:not([lang="en"]) .p-inst { font-family: var(--f-body); letter-spacing: 0; font-size: 1.05rem; }
.p-parents { margin: 12px auto 0; font-size: .9em; color: var(--ink-soft); max-width: 26ch; }
.with { font-family: var(--f-script); font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--gold-500); line-height: 1; }
html:not([lang="en"]) .with { font-family: var(--f-body); font-size: clamp(1.3rem, 3vw, 1.8rem); }

@media (max-width: 760px) {
  .couple { grid-template-columns: 1fr; gap: 26px; }
  .with { margin: 4px 0; }
}

/* --- when ----------------------------------------------------------------- */
.bigdate { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(14px, 3.5vw, 40px); margin: 6px auto 8px; width: 100%; max-width: 680px; }
.bigdate .side { font-size: clamp(.95rem, 2.4vw, 1.5rem); color: var(--ink); }
.bigdate .side:first-child { text-align: end; }
.bigdate .side:last-child { text-align: start; }
.bigdate .num {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(5.5rem, 20vw, 11rem); line-height: .9;
  padding: 0 clamp(14px, 3.5vw, 36px);
  border-inline: 1px solid rgba(140, 95, 77, .45);
}
.when-time { font-size: clamp(1.05rem, 2.6vw, 1.5rem); color: var(--ink-soft); margin: 18px 0 0; font-style: italic; }
html:not([lang="en"]) .when-time { font-style: normal; }

.countdown { margin: clamp(36px, 7vh, 64px) auto 0; }
.countdown .lbl { font-size: .9rem; color: var(--ink-soft); margin: 0 0 14px; }
.cd { display: flex; justify-content: center; gap: clamp(8px, 2.2vw, 18px); direction: ltr; }
.cd > div {
  width: clamp(66px, 18vw, 104px); padding: 14px 0 10px; border-radius: 14px;
  background: rgba(255, 250, 246, .45);
  border: 1px solid rgba(140, 95, 77, .25);
}
.cd b { display: block; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.cd span { display: block; margin-top: 6px; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-600); }
html:not([lang="en"]) .cd span { letter-spacing: 0; text-transform: none; font-size: .78rem; }
html[lang="ur"] .cd span { font-size: .8rem; line-height: 1.8; }

.venue { margin: clamp(40px, 8vh, 72px) auto 0; }
.venue .vn { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 3.6vw, 2.2rem); margin: 0; color: var(--ink); }
.venue .vp { margin: 4px 0 0; color: var(--ink-soft); }

.actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }
.cal { position: relative; }
.cal-menu {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5;
  min-width: 270px; padding: 8px; border-radius: 18px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  transform: translate(-50%, 8px) scale(.96); opacity: 0; visibility: hidden;
  transition: opacity .3s, transform .4s var(--ease-out), visibility .3s;
}
.cal.open .cal-menu { transform: translate(-50%, 0) scale(1); opacity: 1; visibility: visible; }
.cal-menu a {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px;
  text-decoration: none; font-family: var(--f-sans); font-size: .9rem; text-align: start;
}
.cal-menu a:hover { background: var(--cream-2); }
.cal-menu svg { width: 20px; height: 20px; color: var(--gold-600); flex: none; }

#dust2 { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* --- thanks ----------------------------------------------------------------- */
.babies { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 4vw, 60px); margin: 0 auto clamp(30px, 6vh, 56px); }
.baby { display: flex; flex-direction: column; align-items: center; margin: 0; }
.baby .frame { position: relative; width: clamp(150px, 42vw, 300px); aspect-ratio: 200 / 280; }
.baby .frame svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.baby .halo { fill: url(#babyGrad); }
.baby .line { fill: none; stroke: var(--gold-400); stroke-width: 1; vector-effect: non-scaling-stroke; }
.baby img {
  position: absolute; left: 6%; right: 6%; bottom: 0; width: 88%; height: 90%;
  object-fit: contain; object-position: center bottom;
  filter: drop-shadow(0 18px 22px rgba(42, 35, 24, .25)) sepia(.08) saturate(1.05);
}
.baby .mono-ph {
  position: absolute; inset: 0; display: grid; place-items: center; padding-top: 18%;
  font-family: var(--f-display); font-style: italic; font-size: clamp(4rem, 12vw, 7rem); color: var(--gold-400);
}
.baby .soon { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; font-family: var(--f-caps); font-size: .55rem; letter-spacing: .3em; color: var(--gold-500); }
.baby figcaption { margin-top: 12px; font-size: .88em; font-style: italic; color: var(--ink-soft); }
html:not([lang="en"]) .baby figcaption { font-style: normal; }

.thanks-h {
  font-family: var(--f-script); font-weight: 400; margin: 0; line-height: 1.1;
  font-size: clamp(4rem, 15vw, 8.5rem); padding: 0 .15em;
}
html:not([lang="en"]) .thanks-h { font-family: var(--f-head); font-weight: 600; font-size: clamp(3rem, 11vw, 6rem); line-height: 1.5; }
html[lang="ur"] .thanks-h { line-height: 2.2; }
.thanks-body { max-width: 34ch; margin: 18px auto 0; color: var(--ink); }
.dua { margin: clamp(36px, 7vh, 60px) auto 0; max-width: 640px; }
.dua .ar { font-family: var(--f-arabic); direction: rtl; font-size: clamp(1.4rem, 3.6vw, 2.1rem); line-height: 2; color: var(--emerald-800); margin: 0; }
.dua .mean { font-size: .9em; color: var(--ink-soft); margin: 6px 0 0; font-style: italic; }
html:not([lang="en"]) .dua .mean { font-style: normal; }
.sign { margin-top: clamp(40px, 8vh, 72px); }
.sign .love { font-size: .95em; color: var(--ink-soft); margin: 0; }
.sign .who { font-family: var(--f-script); font-weight: 400; font-size: clamp(2.6rem, 8vw, 4rem); color: var(--ink); margin: 0; line-height: 1.3; }
.sign .who .amp { font-family: var(--f-display); font-style: italic; font-weight: 400; color: var(--gold-500); }
.foot { margin-top: 28px; font-size: .68rem; color: var(--gold-600); }
.foot-links { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn--emerald { color: #fffaf6; background: var(--emerald-700); }
.btn--emerald:hover { background: var(--emerald-700); }

/* ======================================================= reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rays, #rosette .ros { animation: none; }
}

.js-words.pre .wd { opacity: 0; }
