/* Scroll story: continuous vermilion ink, question focus, then a margin hint.
   Everything is readable in the static / reduced-motion fallback.
   The gradient below is an alpha mask for the ink edge, not a surface fill. */
.scroll-story {
  --scroll-pin-height: 100vh;
  --scroll-distance: 90vh;
  grid-column: 1 / -1;
  position: relative;
  min-width: 0;
  width: 100%;
  align-self: stretch;
}
.scroll-ink { margin-top: 64px; padding: 100px 0; }
.scroll-study { --scroll-distance: 120vh; padding: 36px 0 64px; }
.scroll-pin { display: flex; align-items: center; width: 100%; }
.scroll-stage { width: 100%; }
.scroll-eyebrow {
  margin: 0 0 28px;
  color: var(--graphite);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
}
.scroll-ink-heading {
  max-width: 20ch;
  font: 600 clamp(36px, 7vw, 88px)/1.1 var(--sans);
  letter-spacing: -.055em;
  color: var(--vermilion);
}
.scroll-ink-heading > span { display: block; }
.scroll-ink-heading > span + span { margin-top: .12em; }
.scroll-ink-word { display: inline-block; position: relative; white-space: nowrap; }
.scroll-ink-fill {
  position: absolute;
  inset: 0;
  color: var(--vermilion);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--ink-sweep, 10000px) - 28px), transparent var(--ink-sweep, 10000px));
  mask-image: linear-gradient(90deg, #000 calc(var(--ink-sweep, 10000px) - 28px), transparent var(--ink-sweep, 10000px));
}
.scroll-study-head { margin-bottom: 28px; }
.scroll-study-head .scroll-eyebrow { margin-bottom: 12px; }
.scroll-study-title { font-size: clamp(26px, 3.5vw, 40px); line-height: 1.12; }
.scroll-study-figure { margin: 0; }
.scroll-study-page {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--hairline);
  background: var(--porcelain);
  overflow: clip;
}
.scroll-focus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  transform: scale(var(--focus-scale, 1));
  transform-origin: 32% 50%;
}
.scroll-study-work { min-width: 0; }
.scroll-neighbor {
  font-size: 15px;
  line-height: 1.4;
  color: var(--graphite);
  opacity: var(--neighbor-opacity, .6);
}
.scroll-neighbor:first-child { margin-bottom: 28px; }
.scroll-neighbor:last-child { margin-top: 28px; }
.scroll-selected { border-left: 2px solid var(--vermilion); padding-left: 20px; }
.scroll-question-meta { margin-bottom: 14px; font-size: 11px; letter-spacing: .08em; color: var(--graphite); }
.scroll-question { max-width: 34ch; font-size: clamp(18px, 1.8vw, 23px); line-height: 1.45; letter-spacing: -.018em; }
.scroll-key { position: relative; display: inline-block; }
.scroll-key::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--vermilion);
  transform: scaleX(var(--key-fill, 1));
  transform-origin: left;
}
.scroll-student { margin-top: 18px; font: 500 30px/1.2 var(--hand); color: var(--ink); }
.scroll-student-next {
  margin-top: 12px;
  opacity: var(--student-opacity, 1);
  transform: translate3d(0, var(--student-y, 0px), 0);
}
.scroll-margin {
  padding: 16px 0 16px 24px;
  border-left: 1px solid var(--vermilion);
  color: var(--vermilion);
  opacity: var(--hint-opacity, 1);
  transform: translate3d(0, var(--hint-y, 0px), 0);
}
.scroll-voice { margin-bottom: 14px; font-size: 11px; font-weight: 500; letter-spacing: .07em; }
.scroll-hint { max-width: 18ch; font: italic 400 clamp(26px, 3vw, 38px)/1.2 var(--voice); }
.scroll-study-caption { margin-top: 16px; font-size: 12px; line-height: 1.45; color: var(--graphite); }

@supports (height: 100svh) {
  .scroll-story { --scroll-pin-height: 100svh; --scroll-distance: 90svh; }
  .scroll-study { --scroll-distance: 120svh; }
}
@supports (overflow-x: clip) {
  /* A hidden horizontal overflow would create a non-scrolling sticky ancestor. */
  body.conversion-home.has-scroll-stories:not(.signup-modal-open) { overflow-x: clip; }
}
.scroll-story.is-scroll-ready { height: calc(var(--scroll-pin-height) + var(--scroll-distance)); padding: 0; }
.scroll-story.is-scroll-ready .scroll-pin { position: sticky; top: 0; height: var(--scroll-pin-height); }
.scroll-ink.is-scroll-ready .scroll-ink-word { color: color-mix(in srgb, var(--ink) 52%, var(--paper)); }

@media (max-width: 719px) {
  .scroll-story { --scroll-pin-height: calc(100vh - 84px); --scroll-distance: 70vh; }
  .scroll-study { --scroll-distance: 100vh; }
  .scroll-ink { margin-top: 32px; padding: 72px 0; }
  .scroll-ink-heading { font-size: clamp(34px, 7.5vw, 54px); letter-spacing: -.045em; }
  .scroll-eyebrow { margin-bottom: 22px; }
  .scroll-study-head { margin-bottom: 20px; }
  .scroll-study-title { font-size: 26px; }
  .scroll-study-page { padding: 20px; }
  .scroll-focus-layout { grid-template-columns: minmax(0, 1fr); gap: 0; transform: none; }
  .scroll-neighbor { font-size: 13px; }
  .scroll-neighbor:first-child { margin-bottom: 18px; }
  .scroll-neighbor:last-child { margin-top: 18px; }
  .scroll-selected { padding-left: 12px; }
  .scroll-question-meta { margin-bottom: 10px; font-size: 10px; }
  .scroll-question { font-size: 17px; line-height: 1.4; }
  .scroll-student { margin-top: 12px; font-size: 25px; }
  .scroll-student-next { margin-top: 8px; }
  .scroll-margin { margin: 20px 0 0 14px; padding: 0 0 0 12px; }
  .scroll-voice { margin-bottom: 8px; font-size: 10px; }
  .scroll-hint { max-width: 24ch; font-size: 25px; }
  .scroll-study-caption { margin-top: 12px; font-size: 11px; }
}
@supports (height: 100svh) {
  @media (max-width: 719px) {
    .scroll-story { --scroll-pin-height: calc(100svh - 84px); --scroll-distance: 70svh; }
    .scroll-study { --scroll-distance: 100svh; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-story.is-scroll-ready { height: auto; padding: 64px 0; }
  .scroll-story.is-scroll-ready .scroll-pin { position: static; height: auto; }
  .scroll-ink.is-scroll-ready .scroll-ink-word { color: var(--vermilion); }
  .scroll-ink-fill { -webkit-mask-image: none; mask-image: none; }
  .scroll-focus-layout, .scroll-margin, .scroll-student-next { transform: none; }
  .scroll-margin, .scroll-student-next { opacity: 1; }
  .scroll-key::after { transform: none; }
}
