/* ==========================================================================
   zardozi.css — "Stitched in gold thread"

   One idea: nothing on this page is drawn, it is sewn. A needle travels each
   path as you scroll and lays gold zari behind it — individual stitches, with
   the raised shadow real couching work casts on velvet.
   ========================================================================== */

:root {
  --ink: #f7ecd6;
  --ink-soft: rgba(247, 236, 214, .74);
  --j-accent: #e8c67a;
  --gold-pale: #fbe7b4;
  --gold-deep: #a97a2c;
  --velvet: #3a0b15;
  --j-hairline: rgba(232, 198, 122, .34);
  --j-sheen: rgba(255, 240, 200, .5);
  --j-card-edge: rgba(232, 198, 122, .34);
  --j-map-bg: rgba(255, 255, 255, .05);
  --j-map-bar: rgba(0, 0, 0, .22);
  --j-map-filter: saturate(.72) brightness(.94) sepia(.14);
  --gp: 0;
}

body {
  background: var(--velvet);
  color: var(--ink);
  font-family: 'Josefin Sans', system-ui, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Velvet. A directional nap plus a slow sheen that shifts across the journey,
   the way real velvet catches light as you turn it.
   -------------------------------------------------------------------------- */

.velvet {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(130% 90% at calc(18% + var(--gp) * 64%) 6%,
      rgba(168, 38, 56, .62) 0%, rgba(108, 18, 32, .5) 40%, transparent 74%),
    linear-gradient(168deg, #55101f 0%, #3a0b15 48%, #22050c 100%);
}

.velvet::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23v)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   The embroidery frame
   -------------------------------------------------------------------------- */

.hoop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: visible;
}

/* Individual stitches. The reveal mask underneath makes them appear one run
   at a time instead of all at once. */
.stitch {
  fill: none;
  stroke: url(#zg);
  stroke-linecap: round;
  filter: url(#zraise);
  /* The hoop's viewBox is stretched to reach all four edges; this keeps the
     stitch width and spacing even instead of squashed on one axis. */
  vector-effect: non-scaling-stroke;
}

.needle { transition: opacity .3s ease; }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

h1, h2, h3 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 400;
  margin: 0;
  letter-spacing: .04em;
}

/* Gold bullion: a real gradient across the glyphs plus the dark bed shadow
   that raised metal thread sits in. */
.zari {
  background-image: linear-gradient(
    166deg,
    #fff3d4 0%, var(--j-accent) 26%, var(--gold-deep) 48%,
    var(--j-accent) 68%, #fff0cd 88%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 1px rgba(30, 3, 9, .8));
}

/* Names arrive letter by letter, as if each were stitched in turn. */
.couple {
  font-size: clamp(2.1rem, 10.5vw, 4.4rem);
  line-height: 1.12;
}

/* Each character animates, which makes it its own paint layer — so a gradient
   clipped on the parent would never reach the glyphs. The gold lives on the
   characters instead, and per-character gradients read the way real bullion
   does anyway, each stitch catching the light slightly differently. */
.couple.zari {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--j-accent);
  filter: none;
}

.couple .ch {
  display: inline-block;
  --d: calc(var(--n, 0) * .045);
  --t: clamp(0, calc((var(--in) - var(--d)) / .34), 1);
  opacity: var(--t);
  transform: translate3d(0, calc((1 - var(--t)) * .7rem), 0) scale(calc(.9 + var(--t) * .1));

  background-image: linear-gradient(
    162deg, #fff3d4 0%, var(--j-accent) 28%, var(--gold-deep) 54%,
    var(--j-accent) 78%, #fff0cd 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 1px rgba(30, 3, 9, .8));
}

.couple .amp {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: .3em;
  font-style: italic;
  letter-spacing: .18em;
  text-transform: lowercase;
  color: var(--ink-soft);
  -webkit-text-fill-color: var(--ink-soft);
  background: none;
  filter: none;
  margin: .5rem 0;
}

.bismillah {
  font-family: 'Amiri', serif;
  font-size: clamp(1.5rem, 6.4vw, 2.4rem);
  line-height: 2;
  direction: rtl;
  color: var(--j-accent);
  margin: 0 0 1.75rem;
}

.hero-title {
  font-size: clamp(2rem, 9.5vw, 4rem);
  line-height: 1.14;
}

.hero-title em {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  text-transform: none;
  letter-spacing: .01em;
}

.eyebrow {
  font-size: .66rem;
  font-weight: 400;
  letter-spacing: .36em;
  text-transform: uppercase;
  color: var(--j-accent);
  margin: 0 0 1.25rem;
}

.lead {
  max-width: 32ch;
  margin: 1.5rem auto 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.datemark {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 0 1rem;
  padding: 1.15rem 1.6rem;
  border: 1px solid var(--j-hairline);
}

.datemark span {
  font-size: .68rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--j-accent);
}

.datemark strong {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 15vw, 5rem);
  font-weight: 500;
  line-height: .9;
}

.time {
  margin: 1.5rem 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.9rem, 8vw, 2.8rem);
  color: var(--j-accent);
}

.venue {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 4.3vw, 1.3rem);
  letter-spacing: .12em;
  line-height: 1.6;
}

.venue small {
  display: block;
  margin-top: .5rem;
  font-family: 'Josefin Sans', sans-serif;
  font-size: .74rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.parents {
  margin: 1.5rem 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--ink-soft);
}

.note {
  margin: 1rem 0 0;
  font-size: .78rem;
  font-style: italic;
  color: rgba(247, 236, 214, .6);
}

.dua {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 5.6vw, 1.85rem);
  line-height: 1.65;
  max-width: 26ch;
  margin: 0 auto;
  color: rgba(247, 236, 214, .88);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

/* Content has to clear the stitched frame, which is inset ~6.5% of the
   viewport width, or long lines run out over the gold. */
.j-safe {
  text-align: center;
  padding-inline: clamp(2.4rem, 11vw, 4.5rem);
}

.stack > * + * { margin-top: 1.5rem; }

.parents { text-wrap: balance; }

.pair { display: grid; gap: 1.5rem; width: 100%; }

@media (min-width: 48rem) {
  .pair { grid-template-columns: 1fr 1fr; align-items: center; }
}

.pair .j-card-stage { width: 100%; margin-inline: auto; max-width: 17rem; }

.buttons { margin-top: 2rem; }

.j-btn { border-color: var(--j-hairline); color: var(--ink); }
.j-btn:hover { background: rgba(232, 198, 122, .14); border-color: var(--j-accent); }

.j-rail { color: var(--j-accent); }
.j-badge { border-color: var(--j-hairline); }

.motif { width: 3.6rem; margin: 0 auto 1.25rem; color: var(--j-accent); }
.motif svg { width: 100%; height: auto; overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  .couple .ch { opacity: 1; transform: none; }
  .needle { opacity: 0 !important; }
  .needle { display: none; }
  .velvet { background:
    radial-gradient(130% 90% at 50% 6%, rgba(168,38,56,.62) 0%, rgba(108,18,32,.5) 40%, transparent 74%),
    linear-gradient(168deg, #55101f 0%, #3a0b15 48%, #22050c 100%); }
}
