/* =========================================================
   MOTION LAYER for claude.forgemind.in (live since 28 Oct 2026)
   Sits on top of the page's own tokens (--red, --ink, --surface...),
   so light and dark both follow. Everything here is decoration on a
   page that already works: with JS off or reduced motion on, the page
   is the same page, fully visible.
   ========================================================= */
:root{
  --mo-ease:cubic-bezier(.22,1,.36,1);
  --mo-spring:cubic-bezier(.34,1.56,.64,1);
  --mo-glow:color-mix(in srgb, var(--red) 22%, transparent);
}

/* ---------- scroll progress on the header ---------- */
.mo-progress{position:absolute; left:0; right:0; bottom:-1px; height:2px; pointer-events:none}
.mo-progress i{display:block; height:100%; width:100%; background:var(--red); transform-origin:0 50%; transform:scaleX(var(--mo-p, 0))}

/* ---------- hero: a red spotlight that follows the pointer ---------- */
.mo-js .landing::after{
  content:""; position:absolute; z-index:-1; inset:-40px 0 auto; height:720px; pointer-events:none;
  background:radial-gradient(420px 320px at var(--mo-x, 50%) var(--mo-y, 30%), var(--mo-glow), transparent 70%);
  transition:opacity .6s ease; opacity:.9
}

/* ---------- hero: the entrance ----------
   Plays once on load from a visible end state (animation fill "both"
   only during the first second), never waits for scrolling. */
@keyframes moRise{from{opacity:0; transform:translateY(22px)}to{opacity:1; transform:none}}
@keyframes moPop{0%{opacity:0; transform:translateY(26px) scale(.94)} 100%{opacity:1; transform:none}}
@keyframes moWord{from{opacity:0; transform:translateY(.55em) rotate(2deg); filter:blur(6px)}to{opacity:1; transform:none; filter:none}}
.mo-js .landing .ld-eyebrow{animation:moRise .6s var(--mo-ease) .05s both}
.mo-js .landing .hero-vid{animation:moPop .8s var(--mo-ease) .12s both}
.mo-js .landing .b3{animation:moRise .6s var(--mo-ease) .32s both}
.mo-js .landing h1 .mo-w{display:inline-block; animation:moWord .7s var(--mo-ease) both; animation-delay:calc(.42s + var(--i) * .08s)}
.mo-js .landing .ld-format{animation:moRise .6s var(--mo-ease) .78s both}
.mo-js .landing .ld-sub{animation:moRise .6s var(--mo-ease) .86s both}
.mo-js .landing .ld-stats{animation:moRise .6s var(--mo-ease) .94s both}

/* "Claude" gets a hand-drawn swash that writes itself in */
.landing h1 .grad{position:relative; white-space:nowrap}
.mo-swash{position:absolute; left:-2%; right:-2%; bottom:-.16em; width:104%; height:.32em; overflow:visible; pointer-events:none}
.mo-swash path{fill:none; stroke:var(--red); stroke-width:5; stroke-linecap:round; stroke-dasharray:420; stroke-dashoffset:0}
.mo-js .mo-swash path{animation:moDraw 1s var(--mo-ease) 1.05s both}
@keyframes moDraw{from{stroke-dashoffset:420}to{stroke-dashoffset:0}}

/* ---------- hero video: tilt, glare, breathing ---------- */
.landing .hero-vid{transform-style:preserve-3d; will-change:transform}
.mo-glare{
  position:absolute; inset:0; z-index:3; pointer-events:none; border-radius:inherit; opacity:0; transition:opacity .35s ease;
  background:radial-gradient(380px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.28), transparent 55%)
}
.hero-vid.mo-hot .mo-glare{opacity:1}
.hero-vid.mo-hot{box-shadow:0 26px 60px -18px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent)}
/* the play button answers the pointer */
.mo-js .hv-play{transition:transform .35s var(--mo-spring)}
.hero-vid.mo-hot .hv-play{transform:translate(-50%,-50%) scale(1.12)}
/* a light sweep across the poster every few seconds */
.mo-sweep{position:absolute; inset:0; z-index:2; pointer-events:none; overflow:hidden; border-radius:inherit}
.mo-sweep::before{
  content:""; position:absolute; top:-20%; bottom:-20%; width:28%; left:-40%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); transform:skewX(-14deg);
  animation:moSweep 5.5s ease-in-out 2s infinite
}
@keyframes moSweep{0%{left:-40%} 22%,100%{left:130%}}

/* ---------- stats: numbers count, the strip lifts on hover ---------- */
.ld-stats li{transition:transform .3s var(--mo-ease)}
@media (hover:hover){ .ld-stats li:hover{transform:translateY(-3px)} }
.ld-stats b{font-variant-numeric:tabular-nums}

/* ---------- bonus: the robot waves ---------- */
.mo-js .ld-bonus .perk-ic svg{transform-origin:50% 80%; animation:moBot 3.6s ease-in-out 1.6s infinite}
@keyframes moBot{0%,70%,100%{transform:rotate(0)} 76%{transform:rotate(-10deg)} 82%{transform:rotate(9deg)} 88%{transform:rotate(-5deg)} 94%{transform:rotate(0)}}

/* ---------- landing photos: ken-burns + hover ---------- */
.ld-proof-grid .ph img, .lab-grid .ph img{transition:transform .9s var(--mo-ease)}
.mo-js .ld-proof-grid .ph:first-child img{animation:moKen 14s ease-in-out infinite alternate}
@keyframes moKen{from{transform:scale(1)}to{transform:scale(1.09) translate(-1.5%, -1%)}}
@media (hover:hover){
  .ld-proof-grid .ph:hover img, .lab-grid .ph:hover img{transform:scale(1.06)}
}

/* ---------- unlock box: the padlock opens on intent ---------- */
.unlock-badge svg path:first-of-type{transform-box:fill-box; transform-origin:100% 100%; transition:transform .45s var(--mo-spring)}
.unlock.mo-open .unlock-badge svg path:first-of-type{transform:rotate(-28deg) translate(-2px,-2px)}
.unlock-badge{transition:transform .45s var(--mo-spring)}
.unlock.mo-open .unlock-badge{transform:translate(-50%, 0) scale(1.08)}
.mo-js .unlock-badge::after{
  content:""; position:absolute; inset:-6px; border-radius:50%; border:2px solid var(--red); opacity:0; animation:moRing 2.4s ease-out 1.4s infinite
}
@keyframes moRing{0%{opacity:.7; transform:scale(.85)} 100%{opacity:0; transform:scale(1.35)}}
/* magnetic main button + click ripple */
.cta-watch{position:relative; overflow:hidden; transition:transform .25s var(--mo-ease), background .2s ease, box-shadow .25s ease}
@media (hover:hover){ .cta-watch:hover{box-shadow:0 14px 32px -12px color-mix(in srgb, var(--red) 75%, transparent)} }
.mo-ripple{position:absolute; border-radius:50%; background:rgba(255,255,255,.45); transform:scale(0); pointer-events:none; animation:moRipple .6s ease-out forwards}
@keyframes moRipple{to{transform:scale(4); opacity:0}}
.cta-play{transition:transform .35s var(--mo-spring)}
@media (hover:hover){ .cta-watch:hover .cta-play{transform:scale(1.15) rotate(-8deg)} }

/* ---------- scroll reveals (landing below the fold + course page) ----------
   Only elements that start below the fold are held back, and only once JS
   has confirmed it can reveal them. */
.mo-rv{opacity:0; transform:translateY(26px); transition:opacity .7s var(--mo-ease), transform .7s var(--mo-ease); transition-delay:var(--d, 0s)}
.mo-rv.mo-seen{opacity:1; transform:none}
.mo-rv-x{clip-path:inset(0 0 100% 0 round 14px); transition:clip-path 1s var(--mo-ease); transition-delay:var(--d, 0s)}
.mo-rv-x.mo-seen{clip-path:inset(0 0 0 0 round 14px)}

/* ---------- course page ---------- */
/* check marks draw themselves */
.includes li svg path{stroke-dasharray:30; stroke-dashoffset:0}
.includes li.mo-seen svg path{animation:moCheck .6s var(--mo-ease) both; animation-delay:calc(var(--d, 0s) + .25s)}
@keyframes moCheck{from{stroke-dashoffset:30}to{stroke-dashoffset:0}}

/* countdown digits flip when they change */
.cd div{perspective:300px}
.cd b{transform-origin:50% 100%}
.cd b.mo-flip{animation:moFlip .5s var(--mo-ease)}
@keyframes moFlip{0%{transform:rotateX(70deg); opacity:.2} 100%{transform:none; opacity:1}}
.cd div{transition:transform .3s var(--mo-ease)}
@media (hover:hover){ .cd div:hover{transform:translateY(-3px)} }

/* proof tiles */
.proof-tile{transition:transform .35s var(--mo-ease), box-shadow .35s ease}
@media (hover:hover){ .proof-tile:hover{transform:translateY(-4px); box-shadow:0 16px 30px -18px rgba(0,0,0,.35)} }
.proof-tile b{font-variant-numeric:tabular-nums}

/* seat pass: tilt, holographic sheen, seal stamps in */
.pass-wrap{perspective:1200px}
.pass{transform-style:preserve-3d; transition:transform .5s var(--mo-ease), box-shadow .5s ease; will-change:transform}
.pass.mo-hot{box-shadow:0 30px 60px -28px rgba(0,0,0,.45)}
.mo-holo{
  position:absolute; inset:0; z-index:4; pointer-events:none; mix-blend-mode:soft-light; opacity:0; transition:opacity .4s ease;
  background:
    radial-gradient(500px circle at var(--gx,50%) var(--gy,30%), rgba(255,255,255,.55), transparent 45%),
    linear-gradient(115deg, transparent 20%, color-mix(in srgb, var(--red) 40%, transparent) 40%, rgba(80,160,255,.35) 55%, rgba(255,220,90,.35) 68%, transparent 85%);
  background-size:100% 100%, 260% 260%; background-position:0 0, var(--hx, 50%) 50%
}
.pass.mo-hot .mo-holo{opacity:.85}
.seal{transition:transform .3s ease}
.pass.mo-seen .seal{animation:moStamp .7s var(--mo-spring) .35s both}
@keyframes moStamp{0%{transform:scale(2.2) rotate(-25deg); opacity:0} 60%{opacity:1} 100%{transform:none}}
.btn-wa{position:relative; overflow:hidden; transition:transform .25s var(--mo-ease), background .2s ease, box-shadow .25s ease}
.btn-wa::after{
  content:""; position:absolute; top:0; bottom:0; width:30%; left:-40%; transform:skewX(-14deg);
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); animation:moSweep 4.5s ease-in-out 1s infinite; pointer-events:none
}
@media (hover:hover){ .btn-wa:hover{transform:translateY(-2px); box-shadow:0 14px 30px -12px color-mix(in srgb, var(--wa) 80%, transparent)} }

/* reviews + photos lift */
.rv{transition:transform .35s var(--mo-ease), box-shadow .35s ease}
@media (hover:hover){ .rv:hover{transform:translateY(-4px); box-shadow:0 18px 34px -22px rgba(0,0,0,.4)} }
.rv-score .rv-stars{display:inline-block}
.rv-score.mo-seen .rv-stars{background:linear-gradient(90deg, #F5A524 50%, var(--line) 50%); background-size:200% 100%; background-position:100% 0; -webkit-background-clip:text; background-clip:text; color:transparent; animation:moStars 1.2s var(--mo-ease) .2s forwards}
@keyframes moStars{to{background-position:0 0}}

/* who-it's-for chips pop in one after another */
.who li{transition:transform .3s var(--mo-spring), background .2s ease}
@media (hover:hover){ .who li:hover{transform:translateY(-3px) scale(1.04)} }
.who.mo-rv li{opacity:0; transform:scale(.8); transition:opacity .4s ease, transform .5s var(--mo-spring); transition-delay:calc(var(--i, 0) * 45ms)}
.who.mo-rv.mo-seen li{opacity:1; transform:none}
.who.mo-rv{opacity:1; transform:none}

/* certificate: tilt + sheen like the pass */
.cert{position:relative; transition:transform .5s var(--mo-ease); transform-style:preserve-3d}
.cert .mo-holo{border-radius:inherit}
.cert.mo-hot .mo-holo{opacity:.7}

/* tutor */
.tutor img{transition:transform .5s var(--mo-spring)}
@media (hover:hover){ .tutor:hover img{transform:rotate(-4deg) scale(1.06)} }

/* =========================================================
   THE UNLOCK MOMENT: form done -> padlock opens -> course page
   ========================================================= */
.mo-unlock{
  position:fixed; inset:0; z-index:80; display:grid; place-items:center; pointer-events:none;
  background:color-mix(in srgb, var(--paper) 72%, transparent); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  animation:moFadeOut .5s ease 1.25s forwards
}
.mo-unlock-card{display:grid; justify-items:center; gap:14px; animation:moPop .5s var(--mo-spring) both}
.mo-unlock-badge{
  position:relative; width:92px; height:92px; border-radius:50%; background:var(--red); color:#fff; display:grid; place-items:center;
  box-shadow:0 18px 40px -12px color-mix(in srgb, var(--red) 70%, transparent)
}
.mo-unlock-badge svg .shackle{transform-box:fill-box; transform-origin:100% 100%; animation:moShackle .5s var(--mo-spring) .35s both}
@keyframes moShackle{from{transform:none}to{transform:rotate(-32deg) translate(-3px,-3px)}}
.mo-unlock-badge::before, .mo-unlock-badge::after{content:""; position:absolute; inset:0; border-radius:50%; border:3px solid var(--red); animation:moBurst .9s ease-out .45s both}
.mo-unlock-badge::after{animation-delay:.6s}
@keyframes moBurst{from{transform:scale(1); opacity:.8}to{transform:scale(2.4); opacity:0}}
.mo-unlock-t{font-family:var(--display); font-weight:800; font-size:24px; color:var(--ink)}
.mo-spark{position:absolute; width:8px; height:8px; border-radius:2px; left:50%; top:50%; background:var(--c, var(--red)); animation:moSpark .9s var(--mo-ease) .45s both}
@keyframes moSpark{from{transform:translate(-50%,-50%) scale(.4); opacity:1}to{transform:translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--r)) scale(1); opacity:0}}
@keyframes moFadeOut{to{opacity:0; visibility:hidden}}

/* ---------- reduced motion: keep the page, drop the movement ---------- */
@media (prefers-reduced-motion: reduce){
  .mo-js .landing *, .mo-swash path, .mo-sweep::before, .btn-wa::after, .mo-js .unlock-badge::after,
  .mo-js .ld-proof-grid .ph:first-child img, .mo-js .ld-bonus .perk-ic svg{animation:none !important}
  .mo-rv, .mo-rv-x, .who.mo-rv li{opacity:1 !important; transform:none !important; clip-path:none !important; transition:none !important}
  .mo-unlock{display:none}
}
.cert .mo-holo{border-radius:12px}
