/* Magic UI TextReveal adaptation. Attribution: reality-reveal-SOURCES.md. */
#reality {
  padding-block: clamp(72px, 8vw, 112px);
  overflow: visible;
}

/* Keep the original content visible even if either script fails to load. */
#reality .sec-head {
  max-width: 1000px;
  gap: 0;
  opacity: 1;
  transform: none;
  transition: none;
}

#reality h2 {
  width: 100%;
  max-width: 980px;
  margin: 0 0 32px;
  color: #6533aa;
  font-size: clamp(36px, 5.4vw, 72px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.035em;
}

#reality .reality-accent { color: inherit; }

#reality .reality-word {
  display: inline-block;
  position: relative;
  white-space: pre-wrap;
}

/* Same two visual layers as atelier. A generated ghost avoids duplicating
   original text nodes; the entire visual wrapper is hidden from AT. */
#reality .reality-word::before {
  content: attr(data-word);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: #b6a5c7;
  opacity: .32;
}

/* The heading's ink follows --text-reveal-progress: written on the section by
   reality-gradient.js while the stage is pinned, on the heading itself otherwise. */
#reality.reality-motion .reality-word-ink {
  opacity: clamp(0, calc((var(--text-reveal-progress, 1) - var(--word-start)) * var(--word-count)), 1);
}

#reality .sec-head > p {
  max-width: 65ch;
  margin: 0;
  font-size: clamp(1.0625rem, 1.45vw, 1.25rem);
  line-height: 1.75;
  letter-spacing: 0;
  text-wrap: pretty;
}

#reality .sec-head > .lede {
  color: var(--dim, #655f74);
  font-weight: 400;
}

#reality .sec-head > .reality-warn {
  max-width: 57ch;
  margin-block: 24px;
  color: var(--ink, #211c32);
  font-weight: 600;
}

#reality .sec-head > p:last-child {
  padding-block-start: 24px;
  color: var(--dim, #655f74);
  font-weight: 400;
}

@media (max-width: 600px) {
  #reality { padding-block: 64px; }
  #reality h2 {
    font-size: 37px;
    line-height: 1.45;
    letter-spacing: -.03em;
    margin-block-end: 28px;
  }
  #reality .sec-head > p { max-width: 100%; line-height: 1.7; }
  #reality .sec-head > .reality-warn { margin-block: 22px; }
  #reality .sec-head > p:last-child { padding-block-start: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  #reality .reality-word-ink { opacity: 1 !important; }
}

.a11y-nomotion #reality .reality-word-ink,
.a11y-dark #reality .reality-word-ink,
.a11y-light #reality .reality-word-ink { opacity: 1 !important; }


@media print {
  #reality .reality-word-ink { opacity: 1 !important; }
}
