/* ==========================================================================
   naqsh.css — "Geometry, drawn by compass"

   One idea: Islamic star patterns are struck with a compass and a straight
   edge. This page performs that construction as you scroll — guide circles
   swing out, chords cross, and the star emerges from the intersections before
   the construction lines fade and leave the finished figure behind.
   ========================================================================== */

:root {
  --paper: #f8f3e7;
  --paper-deep: #efe6d3;
  --ink: #26271f;
  --ink-soft: rgba(38, 39, 31, .66);
  --j-accent: #9c7434;
  --gold-deep: #7b5a26;
  --j-hairline: rgba(156, 116, 52, .3);
  --j-sheen: rgba(255, 244, 214, .8);
  --j-card-edge: rgba(156, 116, 52, .28);
  --j-map-bg: rgba(38, 39, 31, .05);
  --j-map-bar: rgba(38, 39, 31, .04);
  --j-map-filter: saturate(.6) contrast(.96) sepia(.2);
  --gp: 0;
}

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

/* Laid paper, warming very slightly as the journey progresses. */
.paper {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(120% 78% at 50% calc(-8% + var(--gp) * 22%),
      #fffdf7 0%, var(--paper) 46%, var(--paper-deep) 100%);
}

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

/* --------------------------------------------------------------------------
   The construction
   -------------------------------------------------------------------------- */

.construct {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  color: var(--j-accent);
}

/* Guide work: thin, dashed, and honest about being scaffolding. It draws
   first, then dims once the figure it produced can stand on its own. */
.guide {
  fill: none;
  stroke: currentColor;
  stroke-width: .7;
  stroke-dasharray: 3 5;
  vector-effect: non-scaling-stroke;
  opacity: calc(.34 * var(--in) * (1 - var(--p) * .74));
}

.guide-solid {
  fill: none;
  stroke: currentColor;
  stroke-width: .7;
  vector-effect: non-scaling-stroke;
  opacity: calc(.3 * var(--in) * (1 - var(--p) * .7));
}

/* The finished figure. Draws after the guides and stays. */
.figure {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: calc(.42 + var(--in) * .32);
}

/* Compass point: the pivot each arc was struck from. */
.pivot {
  fill: currentColor;
  opacity: calc(var(--in) * .5 * (1 - var(--p)));
}

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

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  margin: 0;
  letter-spacing: 0;
}

.hero-title { font-size: clamp(2.5rem, 12vw, 5rem); line-height: 1.04; }
.hero-title em { display: block; font-style: italic; }

.couple {
  font-size: clamp(2.6rem, 13vw, 5.4rem);
  line-height: 1.06;
}

.couple .amp {
  display: block;
  font-size: .3em;
  font-style: italic;
  letter-spacing: .12em;
  color: var(--ink-soft);
  margin: .3rem 0;
}

.gilt {
  background-image: linear-gradient(170deg, #c8a55f 0%, var(--j-accent) 30%, var(--gold-deep) 62%, var(--j-accent) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--j-accent);
}

.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;
}

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

.lead {
  max-width: 32ch;
  margin: 1.5rem auto 0;
  color: var(--ink-soft);
}

.datemark {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 0 1rem;
  padding: 1.15rem 1.7rem;
  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: 'Cormorant Garamond', serif;
  font-size: clamp(3.2rem, 16vw, 5.4rem);
  font-weight: 300;
  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-size: clamp(1rem, 4.4vw, 1.3rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.6;
}

.venue small {
  display: block;
  margin-top: .5rem;
  font-size: .74rem;
  letter-spacing: .24em;
  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: var(--ink-soft); }

.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(38, 39, 31, .8);
}

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

.j-safe { text-align: center; }
.stack > * + * { margin-top: 1.5rem; }

.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(--gold-deep); }
.j-btn:hover { background: rgba(156, 116, 52, .1); border-color: var(--j-accent); }

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

.j-badge {
  background: rgba(38, 39, 31, .72);
  border-color: rgba(255, 255, 255, .18);
}

.j-progress { background: color-mix(in srgb, var(--j-accent) 20%, transparent); }

.j-lightbox { background: rgba(28, 26, 20, .95); }

@media (prefers-reduced-motion: reduce) {
  .guide, .guide-solid { opacity: .22; }
  .pivot { opacity: .3; }
  .figure { opacity: .62; }
}
