/* ==========================================================================
   Riwayat · The Jharokha
   A couture wedding invitation: ivory card stock and jewel silks (wine,
   emerald, burgundy), antique gold foil, zardozi bead borders, paisley,
   roses, jhumkas and onion-arched jharokha windows.
   ========================================================================== */

@font-face {
  font-family: "Great Vibes";
  src: url("../fonts/great-vibes-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-italic-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
/* Subset to the letters of the Bismillah only. */
@font-face {
  font-family: "Aref Ruqaa";
  src: url("../fonts/aref-ruqaa-bismillah.woff2") format("woff2");
  font-weight: 700;
  font-display: block;
}

:root {
  /* Paper */
  --ivory: #fbf5ea;
  --ivory-2: #f6ecd9;
  --champagne: #f0e1c5;
  --champagne-2: #e6d2ad;
  /* Silks */
  --wine: #6d1530;
  --wine-2: #8c1c3d;
  --wine-deep: #4a0c1f;
  --burgundy: #3a0816;
  --emerald: #0f5a45;
  --emerald-2: #1a6e54;
  --emerald-deep: #083a2c;
  /* Flowers (used only inside the florals and small accents) */
  --coral: #d9826c;
  --rose: #b9475a;
  /* Gold */
  --gold: #c99a4b;
  --gold-hi: #f3dfa5;
  --gold-mid: #d4ad62;
  --gold-deep: #8a6526;
  --gold-line: rgba(212, 173, 98, 0.55);
  /* Ink */
  --ink: #3f0d1d;
  --ink-soft: #6b3f45;

  --foil-ink: linear-gradient(100deg, #6f4c1a 0%, #a77b33 18%, #8a6526 32%, #c99d4e 46%, #f0d896 52%, #b8893f 60%, #7a5520 78%, #a87a32 100%);
  --foil-bright: linear-gradient(100deg, #b8893f 0%, #f3dfa5 22%, #c9a256 42%, #fbeec4 54%, #a97d33 74%, #e2c17a 100%);

  --font-script: "Great Vibes", "Snell Roundhand", cursive;
  --font-caps: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --font-serif: "Bodoni Moda", "Bodoni 72", "Didot", "Times New Roman", serif;
  --font-arabic: "Aref Ruqaa", "Amiri", "Traditional Arabic", serif;

  --gutter: clamp(1rem, 5vw, 2.5rem);
  --section-y: clamp(4.5rem, 14vw, 8rem);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --brocade: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='104'%3E%3Cg fill='none' stroke='%23e5c784' stroke-width='1.6'%3E%3Cpath transform='translate(10 6) scale(.52)' d='M20 62C6 56 0 40 4 28C8 14 22 6 32 8C40 10 42 20 35 23C38 34 34 50 20 62Z M35 23C30 25 27 20 30 17 M19 50C12 46 10 38 13 32'/%3E%3Cpath transform='translate(74 58) scale(-.52 .52)' d='M20 62C6 56 0 40 4 28C8 14 22 6 32 8C40 10 42 20 35 23C38 34 34 50 20 62Z M35 23C30 25 27 20 30 17 M19 50C12 46 10 38 13 32'/%3E%3C/g%3E%3Cg fill='%23e5c784'%3E%3Ccircle cx='42' cy='26' r='1.6'/%3E%3Ccircle cx='0' cy='78' r='1.6'/%3E%3Ccircle cx='84' cy='78' r='1.6'/%3E%3Ccircle cx='20' cy='52' r='1'/%3E%3Ccircle cx='62' cy='0' r='1'/%3E%3Ccircle cx='62' cy='104' r='1'/%3E%3C/g%3E%3C/svg%3E");
  --damask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='104'%3E%3Cg fill='none' stroke='%23b08a4a' stroke-width='1.2'%3E%3Cpath transform='translate(10 6) scale(.52)' d='M20 62C6 56 0 40 4 28C8 14 22 6 32 8C40 10 42 20 35 23C38 34 34 50 20 62Z M35 23C30 25 27 20 30 17'/%3E%3Cpath transform='translate(74 58) scale(-.52 .52)' d='M20 62C6 56 0 40 4 28C8 14 22 6 32 8C40 10 42 20 35 23C38 34 34 50 20 62Z M35 23C30 25 27 20 30 17'/%3E%3C/g%3E%3Cg fill='%23b08a4a'%3E%3Ccircle cx='42' cy='26' r='1.4'/%3E%3Ccircle cx='0' cy='78' r='1.4'/%3E%3Ccircle cx='84' cy='78' r='1.4'/%3E%3C/g%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .15 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Base --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--burgundy);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}
main { display: block; overflow-x: clip; }
p, h1, h2, h3, h4, ol, ul, figure { margin: 0; }
ol, ul { list-style: none; padding: 0; }
svg { display: block; overflow: visible; }
a { color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Gold foil text, with a sheen that passes across it now and then. */
.foil {
  color: var(--gold-deep);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .foil {
    background-image: var(--foil-ink);
    background-size: 260% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .foil--bright { background-image: var(--foil-bright); }
}

/* Silk grounds: a jewel colour, a woven paisley brocade, a soft sheen. */
.silk {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.silk::before {
  content: "";
  position: absolute;
  inset: -110px 0;
  background-image: var(--brocade);
  background-size: 84px 104px;
  opacity: 0.13;
  translate: 0 var(--silk-shift, 0px);
}
.silk::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 236, 200, 0.07) 45%, transparent 60%),
    radial-gradient(ellipse 120% 80% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.32) 100%);
}
.silk--wine { background: radial-gradient(ellipse 90% 70% at 50% 42%, var(--wine-2) 0%, var(--wine) 45%, var(--wine-deep) 100%); }
.silk--emerald { background: radial-gradient(ellipse 90% 70% at 50% 40%, var(--emerald-2) 0%, var(--emerald) 45%, var(--emerald-deep) 100%); }
.silk--burgundy { background: radial-gradient(ellipse 90% 70% at 50% 35%, #5c1027 0%, var(--wine-deep) 45%, var(--burgundy) 100%); }

/* Ivory card stock with a whisper of damask. */
.paper {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, #fffaf1 0%, transparent 70%),
    var(--ivory);
  pointer-events: none;
}
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--damask);
  background-size: 84px 104px;
  opacity: 0.09;
}
.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.22;
  mix-blend-mode: multiply;
}

/* Arch layers (drawn by main.js to each element's real size). */
.a-edge  { fill: url(#g-gold); }
.a-paper { fill: var(--ivory); }
.a-band  { fill: none; stroke: var(--emerald); stroke-width: 3; }
.a-band--wine { stroke: var(--wine); }
.a-beads { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-dasharray: 0 6.5; stroke-linecap: round; }
.a-line  { fill: none; stroke: var(--gold-mid); stroke-width: 0.9; }

.divider { width: 13rem; height: 1.7rem; margin-inline: auto; }
.divider--sm { width: 9.5rem; height: 1.25rem; }
.divider--xs { width: 7.5rem; height: 1rem; }

.corner { position: absolute; z-index: 1; width: clamp(5.5rem, 22vw, 9.5rem); height: clamp(5.5rem, 22vw, 9.5rem); pointer-events: none; }
.corner--sm { width: clamp(4.5rem, 16vw, 7.5rem); height: clamp(4.5rem, 16vw, 7.5rem); }
.corner--tl { top: 0.6rem; left: 0.6rem; }
.corner--tr { top: 0.6rem; right: 0.6rem; transform: scaleX(-1); }
.corner--bl { bottom: 0.6rem; left: 0.6rem; transform: scaleY(-1); }
.corner--br { bottom: 0.6rem; right: 0.6rem; transform: scale(-1, -1); }

.eyebrow {
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  margin-right: -0.42em;
  text-transform: uppercase;
  color: var(--emerald);
}

/* ==========================================================================
   1 · THE COVER
   ========================================================================== */

.cover {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(3.4rem + env(safe-area-inset-top)) 0.7rem 1rem;
  overflow: hidden;
  perspective: 1400px;
}

.pillar { display: none; }

.card {
  --w: min(94vw, 31rem);
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.36) calc(var(--w) * 0.09) calc(var(--w) * 0.2);
  text-align: center;
  transform: rotateX(calc(var(--ty, 0) * 1deg)) rotateY(calc(var(--tx, 0) * 1deg));
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease-out);
}
.card__arch {
  --rise: 0.5;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: drop-shadow(0 1.6rem 2rem rgba(20, 0, 8, 0.55)) drop-shadow(0 0.3rem 0.5rem rgba(20, 0, 8, 0.35));
}
.card__finial {
  position: absolute;
  left: 50%;
  top: calc(var(--w) * -0.075);
  width: calc(var(--w) * 0.19);
  height: calc(var(--w) * 0.19);
  translate: -50% 0;
  filter: drop-shadow(0 0.4rem 0.5rem rgba(20, 0, 8, 0.45));
  animation: turn 120s linear infinite;
}
.jhumka {
  position: absolute;
  top: calc(var(--w) * -0.02);
  width: calc(var(--w) * 0.085);
  height: calc(var(--w) * 0.2);
  transform-origin: 50% 0;
  filter: drop-shadow(0 0.4rem 0.4rem rgba(20, 0, 8, 0.4));
}
.jhumka--l { left: calc(var(--w) * 0.13); }
.jhumka--r { right: calc(var(--w) * 0.13); }

.card__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  translate: calc(var(--tx, 0) * -1.4px) calc(var(--ty, 0) * 1.4px);
}

.bismillah {
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: clamp(1.75rem, 8.2vw, 2.55rem);
  line-height: 1.5;
  color: var(--wine);
}
.card .divider--sm { margin-top: 0.2rem; }
.card__eyebrow {
  margin-top: 0.75rem;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: clamp(0.62rem, 2.7vw, 0.8rem);
  letter-spacing: 0.46em;
  margin-right: -0.46em;
  text-transform: uppercase;
  color: var(--emerald);
}

.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.45rem 0 0.2rem;
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1;
}
.names__name {
  display: block;
  padding: 0.12em 0.32em 0.2em;
  margin: 0 -0.32em;
  font-size: clamp(3.5rem, 17.2vw, 5.1rem);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.7));
}
.names__amp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: -0.55em 0 -0.45em;
  font-size: clamp(2.3rem, 10.5vw, 3.2rem);
  line-height: 1;
  color: var(--wine);
}
.names__amp > span[aria-hidden] { padding-top: 0.15em; }
.names__paisley { width: 1.2rem; height: 1.6rem; transform: rotate(-90deg); }
.names__paisley--r { transform: rotate(90deg) scaleX(-1); }

.cartouche {
  position: relative;
  margin-top: 0.9rem;
  padding: 0.65rem 1.2rem 0.6rem;
}
.cartouche::before,
.cartouche::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
}
.cartouche::before { top: 0; }
.cartouche::after { bottom: 0; }
.cartouche__dates {
  font-style: italic;
  font-size: clamp(1rem, 4.5vw, 1.3rem);
  line-height: 1.3;
  color: var(--ink);
}
.cartouche__place {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: clamp(0.78rem, 3.4vw, 0.95rem);
  letter-spacing: 0.5em;
  margin-right: -0.5em;
  text-transform: uppercase;
  color: var(--wine);
}
.cartouche__place::before,
.cartouche__place::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.cartouche__place::after { margin-left: -0.5em; }

/* ---- Countdown: four gold-set emeralds ---- */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(0.45rem, 2.4vw, 0.8rem);
  margin-top: 1.15rem;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.countdown__gem {
  --cut: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%);
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(3.2rem, 14vw, 3.9rem);
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f6e6b4, #c99a4b 40%, #8a6526 70%, #e5c784);
  clip-path: var(--cut);
}
.countdown__gem::before {
  content: "";
  position: absolute;
  inset: 3px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.28), transparent 45%),
    radial-gradient(circle at 50% 50%, var(--emerald-2), var(--emerald-deep));
  clip-path: var(--cut);
}
.countdown__num {
  position: relative;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 5.2vw, 1.45rem);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--gold-hi);
}
.countdown__num.is-tick { animation: tick 0.6s var(--ease-out); }
.countdown__label {
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  margin-right: -0.22em;
  text-transform: uppercase;
  color: var(--wine);
}
.countdown.is-complete .countdown__gem::before { background: radial-gradient(circle, var(--wine-2), var(--wine-deep)); }

.card__spray {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * -0.05);
  width: calc(var(--w) * 0.86);
  height: calc(var(--w) * 0.24);
  translate: -50% 0;
  filter: drop-shadow(0 0.3rem 0.35rem rgba(40, 10, 10, 0.3));
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2.6rem;
  padding: 0.4rem 1rem;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.45em;
  margin-right: -0.45em;
  text-transform: uppercase;
  color: var(--gold-hi);
}
.scroll-cue__drop { width: 1rem; height: 1.35rem; }
.scroll-cue:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 3px; }

/* ==========================================================================
   2 · THE DU'A
   ========================================================================== */

.dua {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--section-y) var(--gutter);
}
.portal {
  --w: min(94vw, 44rem);
  position: relative;
  width: var(--w);
  margin: 0 auto;
  padding: calc(var(--w) * 0.34) calc(var(--w) * 0.1) calc(var(--w) * 0.24);
  text-align: center;
}
.portal__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: drop-shadow(0 1rem 1.5rem rgba(60, 20, 10, 0.18));
}
.p-field { fill: url(#g-emerald); }
.p-arch-fill { fill: var(--ivory); }
.p-rect { fill: none; stroke: url(#g-gold); stroke-width: 3; }
.p-rect-in { fill: none; stroke: var(--gold-mid); stroke-width: 0.9; }
.p-arch { fill: none; stroke: url(#g-gold); stroke-width: 3.2; }
.p-arch-beads { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-dasharray: 0 6.5; stroke-linecap: round; }
.p-arch-in { fill: none; stroke: var(--wine); stroke-width: 1; }

.portal__rosette {
  position: absolute;
  top: calc(var(--w) * 0.035);
  width: calc(var(--w) * 0.17);
  height: calc(var(--w) * 0.17);
  filter: drop-shadow(0 0.3rem 0.4rem rgba(0, 0, 0, 0.35));
}
.portal__rosette--l { left: calc(var(--w) * 0.035); }
.portal__rosette--r { right: calc(var(--w) * 0.035); }
.portal__paisley {
  position: absolute;
  top: calc(var(--w) * 0.25);
  width: calc(var(--w) * 0.06);
  height: calc(var(--w) * 0.085);
}
.portal__paisley--l { left: calc(var(--w) * 0.09); transform: rotate(-30deg); }
.portal__paisley--r { right: calc(var(--w) * 0.09); transform: rotate(30deg) scaleX(-1); }

.portal__crown { width: 3.4rem; height: 3.4rem; margin: 0 auto 1.4rem; }
.blessing {
  font-style: italic;
  font-size: clamp(0.98rem, 4.1vw, 1.2rem);
  line-height: 1.72;
  color: var(--ink);
}
.blessing .line,
.request .line { display: block; text-wrap: balance; }
.blessing .line--emphasis {
  margin-top: 0.9rem;
  font-family: var(--font-caps);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(0.98rem, 4.3vw, 1.3rem);
  line-height: 1.45;
  letter-spacing: 0.06em;
  color: var(--wine);
}
.blessing .line--cont { margin-top: 0; }
.dua .divider { margin: 1.7rem auto 1.5rem; }
.request {
  font-size: clamp(1.15rem, 5vw, 1.55rem);
  line-height: 1.42;
  color: var(--ink);
}
.request .line:last-child {
  margin-top: 0.15rem;
  font-family: var(--font-script);
  font-size: 1.45em;
  line-height: 1.2;
  color: var(--emerald);
}
.portal__spray {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * 0.035);
  width: calc(var(--w) * 0.66);
  height: calc(var(--w) * 0.18);
  translate: -50% 0;
}

/* ==========================================================================
   3 · THE COUPLE
   ========================================================================== */

.couple {
  position: relative;
  isolation: isolate;
  padding: calc(var(--section-y) * 1.05) var(--gutter) var(--section-y);
  text-align: center;
  overflow: hidden;
}
.couple .corner--tl, .couple .corner--tr { top: 0.8rem; }

.union {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.garland { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

.niche {
  --w: min(84vw, 21rem);
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.4) calc(var(--w) * 0.1) calc(var(--w) * 0.28);
}
.niche__arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: drop-shadow(0 1.2rem 1.4rem rgba(0, 20, 12, 0.5));
}
.niche__finial {
  position: absolute;
  left: 50%;
  top: calc(var(--w) * -0.08);
  width: calc(var(--w) * 0.2);
  height: calc(var(--w) * 0.2);
  translate: -50% 0;
}
.niche__name {
  padding: 0.12em 0.3em 0.2em;
  margin: 0 -0.3em;
  font-family: var(--font-script);
  font-size: clamp(3rem, 14vw, 3.9rem);
  line-height: 1;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.7));
}
.niche .divider--xs { margin: 0.35rem auto 0.6rem; }
.niche__parents {
  max-width: 14rem;
  margin: 0 auto;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
  text-wrap: balance;
}
.niche__spray {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * -0.03);
  width: calc(var(--w) * 0.84);
  height: calc(var(--w) * 0.23);
  translate: -50% 0;
}

/* The knot: a wreath of roses binding the two families. */
.knot {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 9.5rem;
  height: 9.5rem;
  margin: -0.4rem 0 0.9rem;
}
.knot__wreath { position: absolute; inset: 0; width: 100%; height: 100%; }
.knot__and {
  position: relative;
  font-family: var(--font-script);
  font-size: 2.5rem;
  line-height: 1;
  padding-top: 0.12em;
  color: var(--gold-hi);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.knot__medal { display: none; }

.couple__closing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  max-width: 34rem;
  margin: 3.2rem auto 0;
  font-style: italic;
  font-size: clamp(1.2rem, 5.2vw, 1.6rem);
  line-height: 1.4;
  color: var(--ivory);
  text-wrap: balance;
}
.couple__paisley { flex: none; width: 1.5rem; height: 2rem; transform: rotate(-90deg); }
.couple__paisley--r { transform: rotate(90deg) scaleX(-1); }

/* ==========================================================================
   4 · THE CEREMONIES
   ========================================================================== */

.ceremonies { position: relative; }
.ceremonies__head {
  position: relative;
  isolation: isolate;
  padding: calc(var(--section-y) * 0.9) var(--gutter) 2.6rem;
  text-align: center;
}
.ceremonies__title {
  margin: 0.4rem 0 0.9rem;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: clamp(2.2rem, 10.5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wine);
}
.ceremonies__script {
  display: block;
  margin-bottom: -0.3em;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 0.8em;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}

/* ---- Shared day anatomy ---- */
.day {
  position: relative;
  isolation: isolate;
  padding: calc(var(--section-y) * 0.85) var(--gutter);
  text-align: center;
}
.day__inner { position: relative; max-width: 66rem; margin: 0 auto; }

.seal {
  --s: clamp(9rem, 42vw, 12.5rem);
  position: relative;
  display: grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  margin: 0 auto 1.4rem;
}
.seal__ring { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0.6rem 0.9rem rgba(20, 0, 8, 0.35)); }
.seal__ring .sr-rim { fill: url(#g-gold); }
.seal__ring .sr-beads { fill: none; stroke: var(--ivory); stroke-width: 1.6; stroke-dasharray: 0 3.4; stroke-linecap: round; }
.seal__ring .sr-disc { fill: var(--seal, var(--emerald)); stroke: var(--gold-hi); stroke-width: 0.6; }
.seal__ring .sr-crown { fill: var(--seal-crown, #c99a4b); stroke: var(--gold-hi); stroke-width: 0.45; }
.seal__ring .sr-inner { fill: none; stroke: var(--gold-hi); stroke-width: 0.6; }
.seal__text { position: relative; display: flex; flex-direction: column; align-items: center; color: var(--gold-hi); }
.seal__num {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: calc(var(--s) * 0.3);
  line-height: 0.9;
  font-variant-numeric: lining-nums;
  font-variation-settings: "opsz" 96;
}
.seal__month {
  margin-top: 0.2rem;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: calc(var(--s) * 0.055);
  letter-spacing: 0.16em;
  margin-right: -0.16em;
  text-transform: uppercase;
}

.day__title { display: flex; flex-direction: column; align-items: center; font-weight: 400; }
.day__weekday {
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.44em;
  margin-right: -0.44em;
  text-transform: uppercase;
  color: var(--day-accent, var(--emerald));
}
.day__date {
  margin-top: 0.15rem;
  font-family: var(--font-script);
  font-size: clamp(2.5rem, 11vw, 3.4rem);
  line-height: 1.15;
  color: var(--day-script, var(--wine));
}
.day__hijri {
  font-style: italic;
  font-size: 0.98rem;
  color: var(--day-soft, var(--ink-soft));
}

/* ---- Event anatomy (shared) ---- */
.ev { position: relative; text-align: center; }
.ev__name {
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: clamp(1.3rem, 6vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--ev-name, var(--wine));
  text-wrap: balance;
}
.ev__time {
  margin-top: 0.3rem;
  font-style: italic;
  font-size: clamp(1.15rem, 5vw, 1.35rem);
  line-height: 1.3;
  color: var(--ev-time, var(--emerald));
}
.ev__venue {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ev-venue, var(--ink-soft));
  text-wrap: balance;
}
.ev__venue svg { flex: none; width: 0.9rem; height: 0.9rem; margin-top: 0.22em; color: var(--gold); }
.ev__map {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 0.4em;
}
.ev .divider--xs { margin: 0.55rem auto 0.4rem; }

/* ---- Day 1 · Henna: ivory, henna vines, a couture tablet ---- */
.day--henna { padding-top: calc(var(--section-y) * 0.65); padding-bottom: calc(var(--section-y) * 0.8); }
.day--henna .paper::before { opacity: 0.06; }
.henna-band { position: absolute; left: 0; width: 100%; height: 40px; z-index: -1; }
.henna-band--top { top: 0; }
.henna-band--bottom { bottom: 0; transform: scaleY(-1); }
.day--henna .seal { --seal: url(#g-emerald); }
.tablet {
  position: relative;
  max-width: 30rem;
  margin: 1.8rem auto 0;
  padding: 2.6rem 2.6rem 2.4rem;
  background:
    radial-gradient(ellipse at 50% 0%, #fffaf1, transparent 70%),
    var(--ivory);
  clip-path: polygon(1.2rem 0, calc(100% - 1.2rem) 0, 100% 1.2rem, 100% calc(100% - 1.2rem), calc(100% - 1.2rem) 100%, 1.2rem 100%, 0 calc(100% - 1.2rem), 0 1.2rem);
  box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 6px var(--ivory), inset 0 0 0 7px var(--emerald), inset 0 0 0 11px var(--ivory), inset 0 0 0 12px var(--gold-line);
}
.tablet__corner { position: absolute; width: clamp(2.6rem, 11vw, 3.6rem); height: clamp(2.6rem, 11vw, 3.6rem); }
.tablet__corner--tl { top: 0.9rem; left: 0.9rem; }
.tablet__corner--tr { top: 0.9rem; right: 0.9rem; transform: scaleX(-1); }
.tablet__corner--bl { bottom: 0.9rem; left: 0.9rem; transform: scaleY(-1); }
.tablet__corner--br { bottom: 0.9rem; right: 0.9rem; transform: scale(-1); }
.tablet .ev__name { font-size: clamp(1.6rem, 7.6vw, 2.1rem); }

/* ---- Day 2 · Jali: wine silk, three jharokha niches ---- */
.day--jali {
  --day-accent: var(--gold-hi);
  --day-script: var(--gold-hi);
  --day-soft: rgba(251, 245, 234, 0.75);
  color: var(--ivory);
}
.day--jali .seal { --seal: url(#g-emerald); }
.jali-strip {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(1.4rem, 6vw, 4.5rem);
  height: 100%;
  z-index: -1;
  opacity: 0.35;
  border-left: 1px solid var(--gold-line);
  border-right: 1px solid var(--gold-line);
}
.jali-strip--l { left: clamp(0.4rem, 2vw, 2rem); }
.jali-strip--r { right: clamp(0.4rem, 2vw, 2rem); }
.niches {
  display: grid;
  gap: 1.6rem;
  justify-items: center;
  margin-top: 2.2rem;
}
.niches .ev {
  --w: min(80vw, 19rem);
  width: var(--w);
  padding: calc(var(--w) * 0.36) calc(var(--w) * 0.1) calc(var(--w) * 0.14);
}
.ev__arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: drop-shadow(0 0.9rem 1.1rem rgba(20, 0, 8, 0.45));
}
.ev__finial {
  position: absolute;
  left: 50%;
  top: calc(var(--w) * -0.06);
  width: calc(var(--w) * 0.15);
  height: calc(var(--w) * 0.15);
  translate: -50% 0;
}

/* ---- Day 3 · Grand: champagne, one great arch, the Nikkah ---- */
.day--grand { padding-top: calc(var(--section-y) * 1.1); }
.day--grand .paper { background: radial-gradient(ellipse 80% 60% at 50% 45%, #f8eedb 0%, var(--champagne) 60%, var(--champagne-2) 100%); }
.day--grand .seal { --seal: url(#g-wine); }
.grand {
  --w: min(94vw, 52rem);
  position: relative;
  width: var(--w);
  margin: 0 auto;
  padding: calc(var(--w) * 0.3) calc(var(--w) * 0.1) calc(var(--w) * 0.22);
}
.grand .seal {
  position: absolute;
  left: 50%;
  top: calc(var(--s) * -0.42);
  translate: -50% 0;
  margin: 0;
}
.grand__arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: drop-shadow(0 1.4rem 1.8rem rgba(70, 20, 10, 0.3));
}
.grand__pair { display: grid; gap: 1.2rem; margin-top: 1.6rem; }
.grand__sep { display: flex; justify-content: center; align-items: center; }
.grand__sep-mark { width: 1.3rem; height: 1.75rem; }
.grand .ev__name { font-size: clamp(1.45rem, 6.6vw, 1.9rem); }
.grand__spray {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * -0.04);
  width: calc(var(--w) * 0.78);
  height: calc(var(--w) * 0.22);
  translate: -50% 0;
}
.day--grand .corner { width: clamp(4.5rem, 16vw, 8rem); height: clamp(4.5rem, 16vw, 8rem); }

/* ==========================================================================
   5 · FINALE
   ========================================================================== */

.finale {
  position: relative;
  isolation: isolate;
  padding: calc(var(--section-y) * 1.1) var(--gutter) calc(2.2rem + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ivory);
  overflow: hidden;
}
.finale .corner { width: clamp(4.5rem, 16vw, 8rem); height: clamp(4.5rem, 16vw, 8rem); }
.finale__jhumka {
  position: absolute;
  top: -0.4rem;
  width: clamp(2.2rem, 8vw, 3.2rem);
  height: clamp(5rem, 18vw, 7.4rem);
  transform-origin: 50% 0;
  filter: drop-shadow(0 0.4rem 0.4rem rgba(0, 0, 0, 0.4));
}
.finale__jhumka--l { left: 22%; }
.finale__jhumka--r { right: 22%; }
.letter {
  position: relative;
  max-width: 30rem;
  margin: 0 auto;
  padding: 4.2rem 2rem 2.6rem;
  background:
    radial-gradient(ellipse at 50% 0%, #fffaf1, transparent 70%),
    var(--ivory);
  clip-path: polygon(1.6rem 0, calc(100% - 1.6rem) 0, 100% 1.6rem, 100% calc(100% - 1.6rem), calc(100% - 1.6rem) 100%, 1.6rem 100%, 0 calc(100% - 1.6rem), 0 1.6rem);
  box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 8px var(--ivory), inset 0 0 0 10px var(--wine), inset 0 0 0 14px var(--ivory), inset 0 0 0 15px var(--gold-line);
  color: var(--ink);
}
.letter__corner { position: absolute; width: 4.6rem; height: 4.6rem; }
.letter__corner--tl { top: 1.1rem; left: 1.1rem; }
.letter__corner--tr { top: 1.1rem; right: 1.1rem; transform: scaleX(-1); }
.letter__corner--bl { bottom: 1.1rem; left: 1.1rem; transform: scaleY(-1); }
.letter__corner--br { bottom: 1.1rem; right: 1.1rem; transform: scale(-1); }
.letter__seal { width: 4.2rem; height: 4.2rem; margin: -1.8rem auto 1rem; }
.letter__regards {
  padding: 0.1em 0.3em 0.2em;
  font-family: var(--font-script);
  font-size: clamp(2.7rem, 12vw, 3.5rem);
  line-height: 1.05;
}
.letter__family {
  margin-top: 0.5rem;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: clamp(1.02rem, 4.6vw, 1.3rem);
  line-height: 1.45;
  letter-spacing: 0.06em;
  color: var(--wine);
  text-wrap: balance;
}
.letter .divider--sm { margin: 1rem auto 0.7rem; }
.letter__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--emerald);
}
.letter__dot { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }

.share {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  margin-top: 2.6rem;
  padding: 0.5rem 1.6rem;
  border: 1px solid var(--gold-mid);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(243, 223, 165, 0.12), rgba(243, 223, 165, 0.02));
  color: var(--gold-hi);
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.share__icon { width: 1rem; height: 1rem; }
@media (hover: hover) {
  .share:hover { background: var(--gold-hi); color: var(--wine-deep); box-shadow: 0 0 0 4px rgba(243, 223, 165, 0.15); }
}
.share:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 4px; }
.share-status {
  min-height: 1.4em;
  margin-top: 0.6rem;
  font-family: var(--font-caps);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--gold-hi);
}

.credit {
  margin-top: 1.6rem;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(251, 245, 234, 0.55);
}
.credit a {
  display: inline-block;
  padding: 0.7rem 0.1rem;
  margin: -0.7rem 0 -0.7rem 0.25em;
  font-family: var(--font-caps);
  font-style: normal;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-hi);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 0.55rem) / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
@media (hover: hover) {
  .credit a:hover { background-size: calc(100% - 0.3em) 1px; }
}
.credit a:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 2px; }

.noscript {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  background: var(--wine);
  color: var(--ivory);
}

/* ==========================================================================
   Larger screens
   ========================================================================== */

@media (min-width: 700px) {
  .card { --w: min(80vw, 36rem); }
  .niches .ev { --w: 19rem; }
}

@media (min-width: 1000px) {
  .cover { padding-top: 5.2rem; padding-bottom: 0.6rem; }
  .card {
    --w: min(62rem, 66vw, 118svh);
    padding: calc(var(--w) * 0.19) calc(var(--w) * 0.1) calc(var(--w) * 0.12);
  }
  .card__arch { --rise: 0.3; }
  .card__finial { top: calc(var(--w) * -0.05); width: calc(var(--w) * 0.11); height: calc(var(--w) * 0.11); }
  .jhumka { top: calc(var(--w) * -0.04); width: calc(var(--w) * 0.05); height: calc(var(--w) * 0.12); }
  .jhumka--l { left: calc(var(--w) * 0.2); }
  .jhumka--r { right: calc(var(--w) * 0.2); }
  .bismillah { font-size: min(2.6rem, 4.6svh); }
  .names { flex-direction: row; align-items: center; gap: 0.06em; margin: 0.3rem 0 0.1rem; }
  .names__name { font-size: min(7rem, 6.3vw, 11.5svh); }
  .names__amp { margin: 0; padding: 0 0.15em; font-size: min(4.2rem, 3.8vw, 7svh); }
  .names__paisley { display: none; }
  .cartouche { margin-top: 0.4rem; }
  .countdown { margin-top: 0.9rem; }
  .card__spray { width: calc(var(--w) * 0.5); height: calc(var(--w) * 0.14); bottom: calc(var(--w) * -0.035); }
  .scroll-cue { margin-top: 1.6rem; }

  .pillar {
    position: absolute;
    top: 14svh;
    bottom: 12svh;
    display: block;
    width: min(13vw, 12rem);
  }
  .pillar--l { left: 6vw; }
  .pillar--r { right: 6vw; }
  /* Hanging strings of gold beads, each ending in a rose spray. */
  .pillar__string {
    position: absolute;
    top: 4.6rem;
    bottom: 3.2rem;
    left: 50%;
    width: 2.4rem;
    translate: -50% 0;
    background:
      radial-gradient(circle, #f3dfa5 0 2.2px, #b08636 2.6px, transparent 3.2px) 50% 0 / 100% 14px repeat-y,
      radial-gradient(circle, #e5c784 0 1.4px, transparent 1.9px) 0 7px / 50% 14px repeat-y,
      linear-gradient(var(--gold-line), var(--gold-line)) 50% 0 / 1px 100% no-repeat;
    -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent);
    mask-image: linear-gradient(180deg, #000 85%, transparent);
  }
  .pillar__cap { position: absolute; top: 0; left: 50%; width: 5rem; height: 5rem; translate: -50% 0; }
  .pillar__spray { position: absolute; bottom: 0; left: 50%; width: 15rem; height: 4.2rem; translate: -50% 0; }

  .couple { padding-top: calc(var(--section-y) * 1.25); }
  .union { flex-direction: row; justify-content: center; align-items: flex-start; gap: 0; }
  .niche { --w: min(27rem, 31vw); }
  .knot { width: 11rem; height: 11rem; margin: calc(min(27rem, 31vw) * 0.22) -1.6rem 0; }
  .knot__and { font-size: 3rem; }

  .day--henna .day__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 4rem;
    max-width: 58rem;
  }
  .day--henna .seal { --s: 15rem; grid-row: 1 / span 2; margin: 0; }
  .day--henna .day__title { align-items: flex-start; text-align: left; }
  .day--henna .tablet { margin: 1.6rem 0 0; max-width: none; padding: 3rem 2.4rem 2.8rem; }
  .day--henna .tablet .ev__name { font-size: 2.4rem; }
  .day--henna .tablet .ev__time { font-size: 1.5rem; }
  .day--henna .tablet .ev__venue { font-size: 1.08rem; }
  .day--henna .day__date { font-size: 3.6rem; }
  .finale__jhumka--l { left: calc(50% - 22rem); }
  .finale__jhumka--r { right: calc(50% - 22rem); }
  .letter { max-width: 34rem; }

  .day--jali .day__head { display: flex; align-items: center; justify-content: center; gap: 3rem; }
  .day--jali .seal { margin: 0; order: 2; }
  .day--jali .day__title { align-items: flex-end; text-align: right; }
  .niches { grid-template-columns: repeat(3, 19rem); justify-content: center; align-items: end; margin-top: 3.4rem; }

  .grand__pair { grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; }
  .grand__sep { flex-direction: column; gap: 0.6rem; align-self: stretch; }
  .grand__sep::before, .grand__sep::after { content: ""; flex: 1; width: 1px; background: var(--gold-line); }
}

/* ==========================================================================
   Motion
   ========================================================================== */

@keyframes turn { to { transform: rotate(360deg); } }
@keyframes tick { from { opacity: 0.3; transform: translateY(-0.2em); } }
@keyframes sway {
  0%, 100% { transform: rotate(2.6deg); }
  50% { transform: rotate(-2.6deg); }
}
@keyframes sheen {
  0%, 62% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (prefers-reduced-motion: no-preference) {

  .foil { animation: sheen 9s var(--ease-io) infinite; }
  .jhumka { animation: sway 4.6s ease-in-out infinite; }
  .jhumka--r { animation-delay: -2.3s; }
  .finale__jhumka { animation: sway 5.2s ease-in-out infinite; }
  .finale__jhumka--r { animation-delay: -2.6s; }
  .scroll-cue__drop { animation: bob 2.4s ease-in-out infinite; }

  /* ---- Opening ---- */
  .js:not(.is-ready) .card,
  .js:not(.is-ready) .card__finial,
  .js:not(.is-ready) .jhumka,
  .js:not(.is-ready) .card__spray,
  .js:not(.is-ready) .card__content > *,
  .js:not(.is-ready) .corner,
  .js:not(.is-ready) .pillar,
  .js:not(.is-ready) .scroll-cue { opacity: 0; }
  .js:not(.is-ready) .cover .silk { opacity: 0; }

  .is-ready .cover .silk { animation: fade 1.6s var(--ease) both; }
  .is-ready .card { animation: lift 1.6s var(--ease-out) 0.25s both; }
  .is-ready .card__arch .a-band,
  .is-ready .card__arch .a-line { stroke-dasharray: 1 1; animation: draw 2.2s var(--ease-io) 0.7s both; }
  .is-ready .card__finial { animation: crown 1.6s var(--ease-out) 1s both, turn 120s linear 2.6s infinite; }
  .is-ready .jhumka { animation: drop 1.4s var(--ease-out) 1.6s both, sway 4.6s ease-in-out 3s infinite; }
  .is-ready .jhumka--r { animation: drop 1.4s var(--ease-out) 1.75s both, sway 4.6s ease-in-out 0.7s infinite; }
  .is-ready .card__spray { animation: bloom 1.5s var(--ease-out) 1.4s both; }
  .is-ready .corner { animation: bloom-corner 1.6s var(--ease-out) 1.2s both; }
  .is-ready .pillar { animation: fade 2s var(--ease) 1.4s both; }
  .is-ready .bismillah { animation: rise 1.3s var(--ease-out) 0.9s both; }
  .is-ready .card .divider--sm { animation: rise 1.2s var(--ease-out) 1.1s both; }
  .is-ready .card__eyebrow { animation: rise 1.2s var(--ease-out) 1.25s both; }
  .is-ready .names { animation: ink 1.8s var(--ease-out) 1.45s both; }
  .is-ready .names .foil { animation: sheen 9s var(--ease-io) 1.6s infinite; }
  .is-ready .cartouche { animation: rise 1.2s var(--ease-out) 2.2s both; }
  .is-ready .countdown { animation: rise 1.2s var(--ease-out) 2.45s both; }
  .is-ready .scroll-cue { animation: fade 1.2s var(--ease) 2.9s both; }

  .corner--tr.corner { --flip: scaleX(-1); }
  .corner--bl.corner { --flip: scaleY(-1); }
  .corner--br.corner { --flip: scale(-1, -1); }

  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes lift {
    from { opacity: 0; transform: translateY(2.4rem) scale(0.96); }
    to { opacity: 1; }
  }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes crown {
    from { opacity: 0; transform: rotate(-120deg) scale(0.4); }
    to { opacity: 1; transform: none; }
  }
  @keyframes drop {
    from { opacity: 0; transform: translateY(-2.2rem) rotate(8deg); }
    60% { opacity: 1; transform: translateY(0.2rem) rotate(-4deg); }
    to { opacity: 1; transform: rotate(2.6deg); }
  }
  @keyframes bloom {
    from { opacity: 0; transform: scale(0.6); filter: blur(4px); }
    to { opacity: 1; transform: none; filter: none; }
  }
  @keyframes bloom-corner {
    from { opacity: 0; transform: var(--flip, scale(1)) scale(0.7); }
    to { opacity: 1; transform: var(--flip, scale(1)); }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(0.9rem); }
    to { opacity: 1; transform: none; }
  }
  @keyframes ink {
    from { opacity: 0; -webkit-mask-position: 100% 0; mask-position: 100% 0; }
    15% { opacity: 1; }
    to { opacity: 1; -webkit-mask-position: 0% 0; mask-position: 0% 0; }
  }
  .names {
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 58%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 58%, transparent 100%);
    -webkit-mask-size: 260% 100%;
    mask-size: 260% 100%;
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }

  /* ---- Scroll reveals ---- */
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(1.8rem);
    transition: opacity 1.3s var(--ease-out), transform 1.3s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 120ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* Arch borders draw themselves as their niche arrives. */
  .js [data-reveal] .a-band,
  .js [data-reveal] .a-line,
  .js [data-reveal] .p-rect,
  .js [data-reveal] .p-arch { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease-io) 0.3s; }
  .js [data-reveal].is-in .a-band,
  .js [data-reveal].is-in .a-line,
  .js [data-reveal].is-in .p-rect,
  .js [data-reveal].is-in .p-arch { stroke-dashoffset: 0; }

  /* Medallions turn into place; florals bloom. */
  .js [data-reveal] .portal__rosette,
  .js [data-reveal] .niche__finial,
  .js [data-reveal] .ev__finial,
  .js [data-reveal] .letter__seal,
  .js [data-reveal] .seal__ring,
  .js [data-reveal] .portal__crown { transform: rotate(-90deg) scale(0.6); opacity: 0; transition: transform 1.6s var(--ease-out) 0.5s, opacity 1s var(--ease) 0.5s; }
  .js [data-reveal].is-in .portal__rosette,
  .js [data-reveal].is-in .niche__finial,
  .js [data-reveal].is-in .ev__finial,
  .js [data-reveal].is-in .letter__seal,
  .js [data-reveal].is-in .seal__ring,
  .js [data-reveal].is-in .portal__crown { transform: none; opacity: 1; }
  .js [data-reveal] .portal__spray,
  .js [data-reveal] .niche__spray,
  .js [data-reveal] .grand__spray { opacity: 0; transform: scale(0.7); transform-origin: 50% 80%; transition: transform 1.6s var(--ease-out) 0.9s, opacity 1.2s var(--ease) 0.9s; }
  .js [data-reveal].is-in .portal__spray,
  .js [data-reveal].is-in .niche__spray,
  .js [data-reveal].is-in .grand__spray { opacity: 1; transform: none; }

  /* Wreath flowers open one after another. */
  .js .knot__wreath .w-item { opacity: 0; transform: scale(0.3); transform-box: fill-box; transform-origin: center; transition: opacity 0.7s var(--ease), transform 0.9s var(--ease-out); transition-delay: calc(0.6s + var(--k, 0) * 45ms); }
  .js .knot.is-in .knot__wreath .w-item { opacity: 1; transform: none; }

  /* Garland: the cord draws, then the flowers appear along it. */
  .js .garland .g-cord { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--ease-io) 0.6s; }
  .js .garland.is-in .g-cord { stroke-dashoffset: 0; }
  .js .garland .g-item { opacity: 0; transform: scale(0.3); transform-box: fill-box; transform-origin: center; transition: opacity 0.6s var(--ease), transform 0.8s var(--ease-out); transition-delay: calc(1s + var(--k, 0) * 60ms); }
  .js .garland.is-in .g-item { opacity: 1; transform: none; }

  /* Pointer depth on the cover. */
  .jhumka { translate: calc(var(--tx, 0) * 2.2px) calc(var(--ty, 0) * -2.2px); }
  .card__finial, .card__spray { translate: calc(-50% + var(--tx, 0) * 2.2px) calc(var(--ty, 0) * -2.2px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
