/* Chapter motion layer: additive to the existing .reveal system. */
.chapter-motion { position:relative; isolation:isolate; }
.chapter-motion > .chapter-atmosphere { position:absolute; z-index:-1; inset:0; overflow:hidden; pointer-events:none; }
.chapter-aura,.chapter-sweep { position:absolute; pointer-events:none; }
.chapter-aura { width:min(62vw,760px); aspect-ratio:1; inset:12% auto auto 50%; border-radius:50%; transform:translate(-50%,-50%); opacity:0; background:radial-gradient(circle,rgba(210,166,83,.16),rgba(210,166,83,.055) 38%,transparent 69%); transition:opacity 1.2s ease; }
.chapter-sweep { top:0; bottom:0; left:0; width:30%; opacity:0; transform:translateX(-150%) skewX(-14deg); background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),rgba(230,192,116,.15),transparent); }
.chapter-motion.chapter-active .chapter-aura { opacity:1; animation:chapter-breathe 7s ease-in-out infinite alternate; }
.chapter-motion.chapter-active .chapter-sweep { opacity:1; animation:chapter-sweep 1.8s cubic-bezier(.2,.65,.25,1) both; }
.chapter-motion .chapter-enter { opacity:0; transform:translate3d(0,26px,0); transition:opacity .72s ease,transform .82s cubic-bezier(.2,.72,.2,1); transition-delay:var(--chapter-delay,0ms); }
.chapter-motion.chapter-active .chapter-enter { opacity:1; transform:none; }
@keyframes chapter-breathe { to { transform:translate(-44%,-46%) scale(1.13); opacity:.72; } }
@keyframes chapter-sweep { to { transform:translateX(440%) skewX(-14deg); } }
@media (prefers-reduced-motion:reduce) { .chapter-aura,.chapter-sweep { display:none; } .chapter-motion .chapter-enter { opacity:1; transform:none; transition:none; } }
html.chapter-reduce .chapter-aura,html.chapter-reduce .chapter-sweep { display:none; }
html.chapter-reduce .chapter-motion .chapter-enter { opacity:1; transform:none; transition:none; }
html.chapter-tab-hidden .chapter-active .chapter-aura,html.chapter-tab-hidden .chapter-active .chapter-sweep { animation-play-state:paused; }

.chapter-motion:not(.chapter-inview) .chapter-aura,.chapter-motion:not(.chapter-inview) .chapter-sweep { animation-play-state:paused; }
.chapter-active h2 .gold-text { animation:chapter-gold-ink 1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes chapter-gold-ink { from { clip-path:inset(0 100% 0 0); } to { clip-path:inset(0); } }
@media (max-width:760px) {
  .chapter-aura { width:min(88vw,440px); background:radial-gradient(circle,rgba(210,166,83,.10),rgba(210,166,83,.035) 38%,transparent 69%); }
  .chapter-motion.chapter-active .chapter-aura { animation:none; }
  .chapter-sweep { width:22%; }
}
@media(prefers-reduced-motion:reduce) { .chapter-active h2 .gold-text { animation:none; } }
