/* ============================================================
   404 — "the cut kite"
   Three fixed layers (stage / string / kite) drift behind and
   over the hero content, which sits at z-index 2.
   ============================================================ */

.nf {
  position: relative;
  z-index: 2;
  min-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(90px, 15vh, 170px) 24px 110px;
}
.nf__inner { position: relative; z-index: 2; max-width: 660px; }

.nf__eyebrow { justify-content: center; margin-bottom: 30px; }

.nf__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(46px, 8.4vw, 92px);
  line-height: 1.03;
  letter-spacing: -0.01em;
  color: var(--ivory);
  margin-bottom: 26px;
}
.nf__title em { font-style: italic; color: var(--champagne-soft); }

.nf__lead {
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.72;
  color: var(--on-dark-mut);
  max-width: 32em;
  margin: 0 auto 42px;
}
.nf__fa {
  font-family: 'Aref Ruqaa', serif;
  color: var(--champagne-soft);
  font-size: 1.12em;
}

.nf__actions {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- layer 0: stage (twinkling dots + ghost numerals) ---- */
.nf-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.nf-stage__ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Aref Ruqaa', serif;
  font-weight: 700;
  font-size: clamp(220px, 40vw, 560px);
  line-height: 1;
  direction: rtl;
  color: rgba(199, 164, 104, 0.05);
  user-select: none;
  white-space: nowrap;
}
.nf-dot {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(199, 164, 104, 0.5);
  animation: nf-twinkle var(--nf-dur, 5s) ease-in-out var(--nf-delay, 0s) infinite;
}
@keyframes nf-twinkle {
  0%, 100% { opacity: 0.12; }
  50%      { opacity: 0.85; }
}

/* ---- layer 1: severed string ---- */
.nf-string {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* ---- layer 3: the kite (floats over the text) ---- */
.nf-kite {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3;
  width: clamp(64px, 8vw, 104px);
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.5));
}

/* Respect reduced-motion: no twinkle, kite rests at its ambient anchor. */
@media (prefers-reduced-motion: reduce) {
  .nf-dot { animation: none; opacity: 0.5; }
}
