/* Canonical homepage word-lighting and media handoff. Shared by every
   wordscroll section so its scroll thresholds, motion, and responsive
   behavior stay identical. The static base is readable without JavaScript;
   .ws-ready opts a section into the original scroll-scrubbed treatment. */
.wordscroll {
  position: relative;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, #000 12%, #000 88%, rgba(0,0,0,0) 100%);
}
.wordscroll__stage {
  position: static;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible;
  --ws-enter: 1;
  --ws-glow: 0.6;
  --ws-copy: 1;
  --ws-demo: 1;
  --ws-bloom: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 96px 0;
}
.wordscroll.ws-ready { height: 500vh; }
.wordscroll.ws-ready .wordscroll__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  --ws-enter: 0;
  --ws-glow: 0;
  --ws-copy: 1;
  --ws-demo: 0;
  --ws-bloom: 0;
  display: block;
  padding: 0;
}
/* Gated fully on the enter ramp: the ramp only runs while the stage is
   pinned, so the gradient's hard cutoff at the stage boundary stays hidden. */
.wordscroll__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(46% 36% at 50% 8%, rgba(10,132,255,0.16), rgba(10,132,255,0) 70%);
  opacity: var(--ws-enter, 0);
}
.wordscroll__bloom {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 140vmax;
  height: 140vmax;
  transform: translate(-50%, -50%) scale(calc(0.62 + 0.38 * var(--ws-bloom, 0)));
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(150,195,255,0.10), rgba(150,195,255,0) 62%);
  opacity: var(--ws-bloom, 0);
}
.wordscroll__copy {
  position: static;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3.4vh, 36px);
  opacity: 1;
}
.wordscroll.ws-ready .wordscroll__copy {
  position: absolute;
  inset: 0;
  opacity: var(--ws-copy);
  transform: scale(calc(0.96 + 0.04 * var(--ws-copy)));
}
.wordscroll__icon-wrap { position: relative; }
.wordscroll__icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 96px;
  height: 96px;
  opacity: calc(0.3 + 0.7 * var(--ws-enter, 0));
  transform: scale(calc(0.94 + 0.06 * var(--ws-enter, 0)));
}
.wordscroll__demo {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  opacity: 1;
  pointer-events: auto;
}
.wordscroll.ws-ready .wordscroll__demo {
  position: absolute;
  inset: 0;
  opacity: var(--ws-demo);
  transform: scale(calc(0.955 + 0.045 * var(--ws-demo)));
  pointer-events: none;
}
.wordscroll.ws-ready .wordscroll__stage.ws-demo-active .wordscroll__demo { pointer-events: auto; }
.wordscroll__demo-video {
  width: min(1040px, 86vw);
  max-height: 76vh;
  aspect-ratio: 1526 / 1028;
  object-fit: cover;
  border: 0;
  border-radius: clamp(14px, 1.8vw, 24px);
  background: #000;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}
.wordscroll__text {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 20ch;
  text-align: center;
  font-family: "Inter Tight", var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(30px, 4.7vw, 58px);
  line-height: 1.16;
  color: #f5f7fa;
}
.wordscroll.ws-ready .wordscroll__text { color: rgba(235,237,240,0.15); }
.wordscroll__ask { font-size: clamp(24px, 3.4vw, 42px); max-width: 24ch; }
.wordscroll__text .w { position: relative; display: inline-block; white-space: pre; }
.wordscroll__text .w-lit { position: absolute; inset: 0; color: #f5f7fa; opacity: 0; }
.wordscroll__text .w-glo {
  position: absolute;
  inset: 0;
  color: transparent;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(190, 215, 255, 0.7), 0 0 26px rgba(10, 132, 255, 0.45);
}
.wordscroll__sparks { position: absolute; inset: 0 0 55% 0; pointer-events: none; }
.wordscroll__sparks span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: ws-twinkle 4.5s ease-in-out infinite;
}
.wordscroll__sparks span:nth-child(1) { top: 12%; left: 22%; animation-delay: 0.1s; }
.wordscroll__sparks span:nth-child(2) { top: 28%; left: 68%; width: 3px; height: 3px; animation-delay: 0.6s; }
.wordscroll__sparks span:nth-child(3) { top: 8%; left: 52%; animation-delay: 1.1s; }
.wordscroll__sparks span:nth-child(4) { top: 34%; left: 40%; animation-delay: 1.6s; }
.wordscroll__sparks span:nth-child(5) { top: 18%; left: 78%; width: 3px; height: 3px; animation-delay: 2.1s; }
.wordscroll__sparks span:nth-child(6) { top: 40%; left: 16%; animation-delay: 2.6s; }
.wordscroll__sparks span:nth-child(7) { top: 6%; left: 34%; animation-delay: 3.1s; }
.wordscroll__sparks span:nth-child(8) { top: 24%; left: 88%; animation-delay: 3.6s; }
.wordscroll__sparks span:nth-child(9) { top: 44%; left: 60%; width: 3px; height: 3px; animation-delay: 4s; }
.wordscroll__sparks span:nth-child(10) { top: 15%; left: 8%; animation-delay: 0.9s; }
@keyframes ws-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 0.5; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .wordscroll__sparks span { animation: none; opacity: 0; }
  .wordscroll.ws-reduced-motion .w-lit { opacity: 1 !important; }
}
.wordscroll.ws-reduced-motion { height: auto; }
.wordscroll.ws-reduced-motion .wordscroll__stage {
  position: static;
  height: auto;
  min-height: 0;
  --ws-enter: 1;
  --ws-copy: 1;
  --ws-demo: 1;
  --ws-glow: 0.6;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 96px 0;
  overflow: visible;
}
.wordscroll.ws-reduced-motion .wordscroll__copy,
.wordscroll.ws-reduced-motion .wordscroll__demo { position: static; }
.wordscroll.ws-reduced-motion .wordscroll__copy { transform: none; }
.wordscroll.ws-reduced-motion .wordscroll__demo { pointer-events: auto; transform: none; }
.wordscroll.ws-reduced-motion .wordscroll__text { color: rgba(235,237,240,0.15); }
.wordscroll.ws-reduced-motion .w-lit { opacity: 1 !important; }
@media (max-width: 720px) {
  .wordscroll.ws-ready { height: 420vh; }
  .wordscroll__icon { width: 72px; height: 72px; }
  .wordscroll__demo-video { width: 92vw; }
}
