/* ============================================================================
   SITE MOTION, the static half. site-motion.js adds .sm to <html>, .ready once
   the intro has lifted, and .in to whatever is on screen; everything here
   keys off those, so with JavaScript off the page is simply finished.
   .sm-still (reduced motion) shows the end state of every piece.
   Entrances use opacity and the translate / scale properties, which leaves
   transform free for the tilt under the mouse.
   ============================================================================ */

/* ---- the intro curtain ---- */
html.intro-pre::before{content:"";position:fixed;inset:0;z-index:300;background:#060D2E}
.curtain{position:fixed;inset:0;z-index:301;display:grid;place-items:center;overflow:hidden;isolation:isolate;
  background:linear-gradient(160deg,#050B2B,#0A1E5C 55%,#1636A8);transition:transform .9s cubic-bezier(.76,0,.24,1)}
.curtain.up{transform:translate3d(0,-100%,0)}
.curtain .aur{animation-play-state:running}
.cu-in{position:relative;text-align:center;color:#fff;transition:transform .6s ease,opacity .4s ease}
.curtain.up .cu-in{transform:translate3d(0,-50px,0);opacity:0}
.cu-w{display:flex;justify-content:center;overflow:hidden;padding:0 0 .08em;font:800 clamp(48px,9vw,108px)/1.05 var(--font);letter-spacing:-.045em}
.cu-w i{display:inline-block;font-style:normal;transform:translate3d(0,110%,0);animation:cu-up .75s cubic-bezier(.2,.9,.3,1) calc(var(--i) * 45ms) forwards}
@keyframes cu-up{ to{transform:none} }
.cu-bars{display:flex;justify-content:center;gap:9px;margin:18px 0 16px}
.cu-bars b{width:48px;height:5px;border-radius:3px;background:#fff;transform:scaleX(0);transform-origin:left;animation:cu-bar .5s var(--ease) forwards}
.cu-bars b:nth-child(1){animation-delay:.45s}.cu-bars b:nth-child(2){animation-delay:.55s;background:#4F8BFF}.cu-bars b:nth-child(3){animation-delay:.65s;background:#FFB52E}
@keyframes cu-bar{ to{transform:scaleX(1)} }
.curtain small{display:block;font:700 12px var(--font);letter-spacing:.22em;text-transform:uppercase;color:rgb(255 255 255 / .62);opacity:0;animation:cu-fade .5s ease .75s forwards}
@keyframes cu-fade{ to{opacity:1} }

/* ---- words, split into letters ---- */
.wd{display:inline-block;white-space:nowrap}
.ch{display:inline-block}
.ch.gc{color:var(--c)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- the hero assembles once the curtain has lifted ---- */
.sm:not(.sm-still) .hero h1 .wd{perspective:700px}
.sm:not(.sm-still) .hero h1 .ch{opacity:0;transform:translate3d(0,.55em,0) rotateX(-75deg);transform-origin:50% 100%;
  transition:opacity .5s ease calc(min(var(--i) * 24ms, 800ms) + .1s),transform 1s cubic-bezier(.2,.9,.25,1.1) calc(min(var(--i) * 24ms, 800ms) + .1s)}
.sm.ready .hero h1 .ch{opacity:1;transform:none}
.sm:not(.ready) .hero h1 :is(.hw,.u){animation-play-state:paused}
.sm:not(.sm-still) .hero :is(.aud,.sub,.chips,.note){opacity:0;translate:0 24px;transition:opacity .8s ease,translate 1s var(--ease)}
.sm:not(.sm-still) .hero .cta{opacity:0;scale:.85;transition:opacity .6s ease .9s,scale .8s cubic-bezier(.2,1.5,.4,1) .9s,transform .16s,translate .4s var(--ease)}
.sm.ready .hero .aud{transition-delay:.05s}.sm.ready .hero .sub{transition-delay:.55s}.sm.ready .hero .chips{transition-delay:.7s}.sm.ready .hero .note{transition-delay:1s}
.sm.ready .hero :is(.aud,.sub,.chips,.note){opacity:1;translate:none}
.sm.ready .hero .cta{opacity:1;scale:1}
/* the hero button glints every few seconds */
.hero .cta::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;
  background:linear-gradient(110deg,transparent 35%,rgb(255 255 255 / .4) 50%,transparent 65%);transform:translateX(-120%)}
.sm.ready:not(.sm-still) .hero .cta::before{animation:glint 4.5s ease-in-out 2.4s infinite}
@keyframes glint{ 0%,70%{transform:translateX(-120%)} 100%{transform:translateX(120%)} }

/* ---- headings: the badge or tile flips in, the letters rise in faint, then
   fill with ink as you read down to them; the bars draw ---- */
.sm:not(.sm-still) :is(.sec-head,.kh,.sub-h) :is(.sec-ic,.kn){transform:perspective(400px) rotateX(90deg);opacity:0;
  transition:transform .8s cubic-bezier(.2,1.4,.4,1),opacity .4s ease}
.sm:not(.sm-still) :is(.sec-head,.kh,.fq-side,.sub-h) :is(h2,h3) .ch{opacity:0;transform:translate3d(0,.55em,0) rotate(5deg);
  transition:opacity .45s ease calc(min(var(--i) * 16ms, 600ms) + .1s),transform .8s cubic-bezier(.2,.9,.25,1.1) calc(min(var(--i) * 16ms, 600ms) + .1s),color .35s ease}
.sm:not(.sm-still) :is(.sec-head,.kh,.fq-side) h2::after{transform:scaleX(0);transform-origin:left;transition:transform .9s var(--ease) .5s}
.sm:not(.sm-still) :is(.sec-head,.kh) .lede{opacity:0;translate:0 14px;transition:opacity .7s ease .35s,translate .9s var(--ease) .35s}
.sm :is(.sec-head,.kh,.sub-h).in :is(.sec-ic,.kn){opacity:1;transform:none}
.sm :is(.sec-head,.kh,.fq-side,.sub-h).in :is(h2,h3) .ch{opacity:1;transform:none}
.sm :is(.sec-head,.kh,.fq-side).in h2::after{transform:scaleX(1)}
.sm :is(.sec-head,.kh).in .lede{opacity:1;translate:none}
/* the ink fill */
.sm:not(.sm-still) .fill .ch{transition-property:opacity,transform,color}
.sm:not(.sm-still) .fill .ch:not(.on){color:rgb(11 20 55 / .18)}
.sm:not(.sm-still) .fill.on-dark .ch:not(.on){color:rgb(255 255 255 / .22)}
.mp h3 .ch{transition:color .35s ease}

/* ---- cards arrive in a wave ---- */
.sm:not(.sm-still) .wv > *{opacity:0;translate:0 34px;scale:.96;
  transition:opacity .6s ease calc(var(--d,0) * 85ms),translate .9s var(--ease) calc(var(--d,0) * 85ms),scale .9s var(--ease) calc(var(--d,0) * 85ms),
             transform .5s var(--ease),box-shadow .35s ease}
.sm .wv.in > *{opacity:1;translate:none;scale:1}
.sm:not(.sm-still) .rise{opacity:0;translate:0 44px;transition:opacity .7s ease,translate 1s var(--ease),transform .5s var(--ease)}
.sm .rise.in{opacity:1;translate:none}
.lean{transition:transform .25s linear;will-change:transform}

/* ---- the wipe: an electric-blue panel slides off to uncover the block ---- */
.wipe{position:absolute;inset:0;z-index:7;pointer-events:none;border-radius:inherit;
  background:linear-gradient(120deg,#22B8F0,#2F6BFF 45%,#1C3FD0);transform-origin:right;transform:scaleX(1);
  transition:transform 1.1s cubic-bezier(.77,0,.18,1) .1s}
.in > .wipe{transform:scaleX(0)}
.sm-still .wipe{display:none}

/* ---- aurora and spotlight on dark panels ---- */
/* clip, not hidden: hidden would break the sticky price card inside the price panel */
.aurora{position:relative;isolation:isolate;overflow:clip}
.aur{position:absolute;z-index:-1;width:55%;aspect-ratio:1;border-radius:50%;pointer-events:none;filter:blur(50px);opacity:.55;will-change:transform;
  animation:aur-a 18s ease-in-out infinite alternate;animation-play-state:paused}
.aur.a1{left:-10%;top:-30%;background:radial-gradient(circle,#22B8F0,transparent 65%)}
.aur.a2{right:-12%;bottom:-35%;background:radial-gradient(circle,#4F6BFF,transparent 65%);animation-name:aur-b;animation-duration:22s}
.aurora.in > .aur{animation-play-state:running}
.hero-wrap .aur{opacity:.22}
.hero-wrap .aur.a2{background:radial-gradient(circle,#FFB52E,transparent 65%);opacity:.14}
.aud-panel .aur,.wy-c.s6 .aur{opacity:.4}
@keyframes aur-a{ to{transform:translate3d(40%,25%,0) scale(1.15)} }
@keyframes aur-b{ to{transform:translate3d(-35%,-20%,0) scale(.9)} }
.cspot{position:absolute;left:0;top:0;z-index:-1;width:600px;height:600px;border-radius:50%;pointer-events:none;opacity:0;
  background:radial-gradient(closest-side,rgb(96 165 250 / .28),rgb(34 184 240 / .08) 50%,transparent);transition:opacity .5s ease;will-change:transform}
.aurora:hover > .cspot{opacity:1}

/* ---- the turning gradient border ---- */
.pr-card,.cert-doc,.sb-big{position:relative}
.gbr{position:absolute;inset:0;z-index:6;border-radius:inherit;padding:1.5px;pointer-events:none;overflow:hidden;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
.gbr i{position:absolute;left:50%;top:50%;width:250%;aspect-ratio:1;translate:-50% -50%;will-change:transform;
  background:conic-gradient(from 0deg,transparent 0 58%,#22B8F0 70%,#2F6BFF 80%,#FFB52E 90%,transparent 100%);
  animation:gb-spin 7s linear infinite;animation-play-state:paused}
.in > .gbr i{animation-play-state:running}
@keyframes gb-spin{ to{transform:rotate(360deg)} }
.sm-still .gbr i{animation:none}

/* ---- tilt and glow under the mouse ---- */
.tilt{transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .5s var(--ease)}
.glow{background-image:radial-gradient(300px circle at var(--gx,-400px) var(--gy,-400px),rgb(47 107 255 / .1),transparent 65%)}
:is(.aud-c,.cap-c).glow{background-image:radial-gradient(300px circle at var(--gx,-400px) var(--gy,-400px),rgb(255 255 255 / .1),transparent 65%)}

/* ---- the odometer ---- */
/* equal-width digits, so a narrow "1" doesn't sit in a wide column and read as "1 3" */
.odo{display:inline-flex;vertical-align:top;line-height:1;font-variant-numeric:tabular-nums}
.od-c span{text-align:center}
.od{display:inline-block;height:1em;overflow:hidden}
.od-c{display:flex;flex-direction:column;transform:translate3d(0,0,0);transition:transform 1.8s cubic-bezier(.16,1,.3,1) calc(var(--k) * 120ms + .15s)}
.od-c span{display:block;height:1em;line-height:1em}
.odo.in .od-c{transform:translate3d(0,calc(var(--n) * -1em),0)}

/* ---- the hero chips light up one after another ---- */
.chip{position:relative}
.chip::after{content:"";position:absolute;inset:-3px;border-radius:12px;pointer-events:none;opacity:0;
  box-shadow:0 0 0 2px var(--cta),0 12px 26px -10px rgb(47 107 255 / .6)}
.chip.lit{animation:chip-pop 1.3s var(--ease)}
.chip.lit::after{animation:chip-ring 1.3s ease}
@keyframes chip-pop{ 30%{transform:translateY(-4px) scale(1.05)} to{transform:none} }
@keyframes chip-ring{ 25%{opacity:1} to{opacity:0} }

/* ---- buttons lean towards the cursor ---- */
.mag{translate:var(--tx,0px) var(--ty,0px);transition:transform .16s,filter .3s ease,translate .4s var(--ease)}

/* ======================================================================
   THE REVIEW WALL (course page): two rows drifting in opposite directions
   ====================================================================== */
.wall{display:grid;gap:18px;margin:0 -32px;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
.wall-row{overflow:hidden}
.wall-track{list-style:none;display:flex;gap:18px;width:max-content;margin:0;padding:8px 0 14px;will-change:transform}
.wall .bq{flex:none;width:330px;text-align:left}
@media (max-width:760px){
  .wall{margin:0 -16px;-webkit-mask-image:none;mask-image:none}
  .wall-row{overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:0 16px}
  .wall-row::-webkit-scrollbar{display:none}
  .wall .bq{width:272px;scroll-snap-align:center}
  .wall-track [aria-hidden="true"]{display:none}
}
.sm-still .wall-row{overflow-x:auto}
.sm-still .wall-track [aria-hidden="true"]{display:none}

@media (prefers-reduced-motion:reduce){ .curtain{display:none} .aur{animation:none!important} .lean{transform:none!important} }
