/* Line geometry. Each page's title carries an engraved crest in the site blue, drawn in on load,
   with one slow motion of its own. Same vocabulary as the home stage: thin rules, rings, rays, keystone diamonds. */
.has-crest{position:relative}
.has-crest>:not(.crest){position:relative;z-index:1}
.crest{position:absolute;z-index:0;top:var(--crest-top,clamp(8px,2.4vw,34px));
  right:clamp(-120px,calc(50% - 50vw + 3vw),0px);width:var(--crest-w,clamp(280px,31vw,430px));height:auto;
  color:var(--sea);overflow:visible;pointer-events:none;--sw:1}
.crest-portal{--crest-w:clamp(250px,26vw,360px)}
.crest-seed{--crest-w:clamp(300px,34vw,470px);--crest-top:clamp(40px,5vw,72px)}
.crest-orbits{--crest-top:clamp(-70px,-4vw,-20px)}
.crest-dial{--crest-w:clamp(260px,28vw,400px)}

.crest path,.crest circle{fill:none;stroke:currentColor;stroke-width:var(--sw);stroke-linecap:round;stroke-linejoin:round}
.crest .s{stroke-width:calc(var(--sw)*1.7)}
.crest .f{fill:currentColor;stroke:none}
.crest .pf{fill:var(--paper)}
.crest .dash{stroke-dasharray:2 5}
.crest .o1{opacity:.16}.crest .o2{opacity:.3}.crest .o3{opacity:.5}.crest .o4{opacity:.75}

/* Drawn in: each stroke runs from its start to its end, staggered by --d. Filled parts fade in after. */
.crest .draw{stroke-linecap:butt;stroke-dasharray:1;stroke-dashoffset:1;
  animation:crest-draw var(--dur,2.2s) var(--d,.2s) cubic-bezier(.6,0,.2,1) forwards}
.crest .fade{animation:crest-fade 1.2s var(--d,.8s) ease-out backwards}
@keyframes crest-draw{to{stroke-dashoffset:0}}
@keyframes crest-fade{from{opacity:0}}

/* The slow motions */
.crest .spin{transform-origin:200px 200px;animation:crest-spin var(--t,200s) linear infinite}
@keyframes crest-spin{to{transform:rotate(360deg)}}
.crest .hand{transform-origin:200px 200px;animation:crest-spin 60s linear infinite}
.crest .needle{transform-origin:200px 200px;transform:rotate(-24deg);animation:crest-seek 17s ease-in-out infinite}
@keyframes crest-seek{0%,100%{transform:rotate(-24deg)}22%{transform:rotate(19deg)}41%{transform:rotate(-8deg)}63%{transform:rotate(33deg)}82%{transform:rotate(6deg)}}
.crest .precess{transform-origin:200px 200px;transform:rotate(var(--a));animation:crest-precess var(--t) linear infinite var(--dir,normal)}
@keyframes crest-precess{from{transform:rotate(var(--a))}to{transform:rotate(calc(var(--a) + 360deg))}}
.crest-broadcast .wave{animation:crest-draw var(--dur,2.2s) var(--d,.2s) cubic-bezier(.6,0,.2,1) forwards,crest-wave 6s calc(2.6s + var(--k)*.5s) ease-in-out infinite backwards}
.crest-broadcast .dash.wave{animation:crest-wave 6s calc(2.6s + var(--k)*.5s) ease-in-out infinite backwards}
@keyframes crest-wave{0%,100%{opacity:.45}50%{opacity:1}}
.crest .pulse{animation:crest-pulse 5s 3.6s ease-out infinite backwards}
@keyframes crest-pulse{0%{transform:scale(.5);opacity:0}25%{opacity:1}100%{transform:scale(2.4);opacity:0}}

/* Consulting: one segment per question. The page marks the one you're on and the ones you've answered. */
.crest-eight .seg{fill:currentColor;fill-opacity:0;opacity:.28;transition:opacity .4s ease,fill-opacity .6s ease;
  animation:crest-fade .8s calc(1.2s + var(--j)*.08s) ease-out backwards}
.crest-eight .seg.now{opacity:.9}
.crest-eight .seg.done{opacity:.8;fill-opacity:.3}

/* Essay pages: a keystone rule under the heading */
.keyrule{display:block;width:min(320px,72%);height:auto;margin-top:34px;color:var(--sea);opacity:.7}
.keyrule path{fill:none;stroke:currentColor;stroke-width:1}
.keyrule .f{fill:currentColor;stroke:none}

.crest-away *{animation-play-state:paused}
.crest-away .hand{animation-play-state:running}

@media (max-width:1000px){.crest{opacity:.75}}
@media (max-width:760px){
  /* The crest bleeds off the right edge; clip it there so the page never scrolls sideways. */
  .has-crest{overflow:hidden}
  @supports (overflow:clip){.has-crest{overflow:visible;overflow-x:clip}}
  .crest{--crest-w:clamp(190px,54vw,260px);--crest-top:-6px;right:-15vw;opacity:.6;--sw:1.6}
  .crest-portal{--crest-w:clamp(150px,40vw,200px);right:-6vw}
  .crest-seed{--crest-w:clamp(200px,58vw,280px);--crest-top:0px;right:-8vw}
  .crest-eight{--crest-top:46px}
}

/* Motion off: everything drawn and still. */
.motion-paused .crest *{animation:none!important}
.motion-paused .crest .draw{stroke-dashoffset:0}
@media (prefers-reduced-motion:reduce){
  .crest *{animation:none!important}
  .crest .draw{stroke-dashoffset:0}
}
