/* Scroll handoffs remain continuous in position, scale, type and frost. */
.avatar-float{rotate:var(--companion-turn,0deg)}
.chapter>.inner,.tail>.inner{translate:0 calc((1 - var(--section-visibility,1))*24px);opacity:calc(.55 + var(--section-visibility,1)*.45);will-change:translate,opacity}
/* ---------------------------------------------------------------------
   Chapter words around the companion.
   Three studies, switchable with ?words=index | constellation | marker.
   Every word is solid black, or solid white on the dark band.
   --------------------------------------------------------------------- */
.keywords a{display:block;color:var(--color-black);font-family:var(--font-heading);font-weight:400;letter-spacing:var(--ls);text-decoration:none;white-space:nowrap;opacity:1;filter:none;line-height:1.2;pointer-events:auto;transition:font-size .6s cubic-bezier(.16,1,.3,1),color .25s}
.dark-section .keywords a{color:var(--color-white)}
.keywords a::before{display:none}
.keywords a::after{content:'';display:block;height:1px;background:currentColor;transform:scaleX(var(--word-focus,0));transition:transform .3s cubic-bezier(.16,1,.3,1)}
/* Hovering a chapter draws in the same rule the chapter in view carries,
   so the hover previews the state the word is about to take. */
.keywords a:hover::after,.keywords a:focus-visible::after{transform:scaleX(1)}
[data-words="marker"] .keywords a:hover::before,[data-words="marker"] .keywords a:focus-visible::before{width:calc(44px + var(--word-focus,0)*20px)}

/* A. Index. A contents list down the left of the scene, right-aligned so
      the chapter in view grows away from the figure. */
[data-words="index"] .keywords li{left:0;top:calc(7% + var(--i)*9.1%);width:36%;transform:translate3d(calc(var(--word-x,0px)*.22),calc(var(--word-y,0px)*.22),0)}
[data-words="index"] .keywords a{width:100%;text-align:right;transform:translateY(-50%);padding:9px 0;font-size:calc(var(--fs-body-s) + var(--word-focus,0)*10px)}
[data-words="index"] .keywords a::after{width:48px;margin:10px 0 0 auto;transform-origin:right;transform:scaleX(var(--word-focus,0))}

/* B. Constellation. The scattered placement, read at a proper size. */
[data-words="constellation"] .keywords li{left:var(--x);top:var(--y);width:auto;transform:translate3d(var(--word-x,0px),var(--word-y,0px),0) rotate(var(--word-turn,0deg))}
[data-words="constellation"] .keywords a{text-align:center;transform:translate(-50%,-50%);padding:10px 8px;font-size:calc(var(--fs-body-s) + var(--word-focus,0)*18px)}
[data-words="constellation"] .keywords a::after{width:36px;margin:11px auto 0;transform-origin:center}

/* C. Marker. A rail of hairline ticks; only the chapter in view is named. */
[data-words="marker"] .keywords li{left:0;top:calc(9% + var(--i)*8.8%);width:auto;transform:none}
[data-words="marker"] .keywords a{display:flex;align-items:center;gap:16px;min-height:34px;transform:translateY(-50%);padding:4px 0;font-size:calc(var(--word-focus,0)*clamp(22px,2.4vw,34px))}
[data-words="marker"] .keywords a::before{content:'';display:block;flex:none;height:1px;width:calc(20px + var(--word-focus,0)*44px);background:currentColor;transition:width .6s cubic-bezier(.16,1,.3,1)}
[data-words="marker"] .keywords a::after{display:none}

/* The scene caption is the design system tertiary CTA. */
.scene-caption{position:absolute;bottom:-5%;left:50%;display:inline-flex;align-items:center;gap:8px;transform:translateX(-50%);pointer-events:auto;border:0;border-radius:12px;background:transparent;color:inherit;font-family:var(--font-body);font-weight:400;font-size:var(--fs-cta);line-height:var(--lh);letter-spacing:var(--ls);text-transform:uppercase;white-space:nowrap;padding:12px 4px;cursor:pointer;opacity:1;transition:gap 150ms var(--emraude-ease)}
.scene-caption:hover,.scene-caption:focus-visible{gap:12px}
.scene-caption-text{border-bottom:1px solid currentColor;padding-bottom:6px}
.traveling .keywords{opacity:1}
.has-response .scene-caption{visibility:hidden;pointer-events:none}
.at-demo .scene-caption{display:none}
/* A chapter with no action hides its caption. Both of these carry an
   explicit display, so [hidden] alone would not have taken. */
.scene-caption[hidden],.response-action[hidden]{display:none}
/* The caption used to hide here, on .traveling, which is set whenever she has
   moved more than 0.3% of the viewport. In practice that is any scroll at all:
   scroll on and you never saw it, stop and it popped in, ease along and it
   blinked. It belongs to the chapter you are in, not to whether she happens to
   be still, so it stays put and fades once per chapter change instead — the
   same half second however fast you are going. */
.scene-caption.is-swapping{animation:caption-swap .42s var(--emraude-ease) both}
/* Under the word for the chapter you are in. The words are centred on their
   own --x/--y, so the caption takes the same x and drops below the y by half
   an active word plus a gap. Only in the constellation, where those
   coordinates mean what they say; the index layout stacks them down one side
   and keeps the caption at the foot. The drop clears half an active word plus
   room for the word's own idle drift, which the caption does not follow. */
/* Turned round where the copy is on the left, so the arrow points back at
   what it acts on — and, where the word sits near the right edge of the
   scene, so the caption runs inward rather than off the screen. */
.caption-flip .scene-caption{flex-direction:row-reverse}
.caption-flip .scene-caption .ds-arrow{transform:rotate(180deg)}
[data-words="constellation"] .scene-caption{left:var(--cap-x,50%);top:calc(var(--cap-y,100%) + 53px);bottom:auto;
  transform:translate(calc(var(--cap-align,-50%) + var(--cap-drift-x,0px)),var(--cap-drift-y,0px));
  transition:left .6s cubic-bezier(.16,1,.3,1),top .6s cubic-bezier(.16,1,.3,1),gap 150ms var(--emraude-ease)}
@keyframes caption-swap{from{opacity:0}to{opacity:1}}

/* The CTA is the design system glass button; its base rules live in the
   page head. Only the states this page adds are kept here. */
.btn-glass{box-shadow:0 8px 22px -15px #00000099;isolation:isolate}
.btn-glass:active{transform:scale(.985)}
.avatar-speech.btn-glass{padding:0;border:0;background:transparent;border-radius:8px;box-shadow:0 8px 24px #00000012}
.avatar-speech.btn-glass .btn-glass__wrapper{min-width:0;padding:13px 18px}
@media(max-width:1100px) and (min-width:761px){[data-words="index"] .keywords li{width:40%}[data-words="index"] .keywords a{font-size:calc(var(--fs-body-s) + var(--word-focus,0)*7px)}[data-words="constellation"] .keywords a{font-size:calc(var(--fs-body-s) + var(--word-focus,0)*12px)}}
@media(max-width:760px){
 /* The caption is placed inside the dock by experience.css; this sheet only
    sizes its text. bottom:-58px here hung it below the dock entirely. */
 .scene-caption{padding:10px 3px;min-height:34px;white-space:normal;line-height:var(--lh)}
 /* One word at a time on a phone: the chapter in view, and the first step
    out of the hero. Every other label is removed, not stacked. */
 [data-words] .keywords li{left:50%!important;top:86%!important;width:100%;transform:none}
 [data-words] .keywords a{display:none;width:100%;text-align:center;transform:translate(-50%,-50%);font-size:var(--fs-body-l);min-height:0;padding:6px 4px;white-space:normal}
 [data-words] .keywords a[aria-current="location"],[data-words] .companion-scene[data-chapter="hero"] .keywords a[href="#companion"]{display:block}
 [data-words] .keywords a::before{display:none}
 [data-words] .keywords a::after{width:15px;margin:6px auto 0;transform-origin:center;transform:scaleX(1)}
 .btn-glass .btn-glass__wrapper{min-width:0;padding:13px 16px}
 .avatar-speech.btn-glass{width:auto}
 .avatar-speech.btn-glass .btn-glass__wrapper{padding:12px 8px}
}

