/* Decorative motion for the landing page. All essential content works without it. */
.hero{--pointer-x:0px;--pointer-y:0px}
.hero .hero-art{animation:hero-breathe 18s ease-in-out infinite alternate;transform-origin:70% 45%}
.hero .scene-party{transform:translate3d(var(--pointer-x),var(--pointer-y),0);transition:transform .45s ease-out}
.hero .scene-party .party-jester{animation:party-float 5.4s ease-in-out infinite}
.hero .scene-party .party-mage{animation:party-float 6.2s ease-in-out -1.7s infinite}
.hero .scene-party .party-warrior{animation:party-float 5.8s ease-in-out -3.1s infinite}
.hero .game-logo{animation:logo-arrive .95s cubic-bezier(.2,.8,.2,1) both,logo-glow 5s ease-in-out 1s infinite alternate}
.hero .hero-copy h1,.hero .hero-subtitle,.hero .hero-description,.hero .hero-actions{animation:copy-arrive .7s ease-out both}
.hero .hero-subtitle{animation-delay:.15s}.hero .hero-description{animation-delay:.27s}.hero .hero-actions{animation-delay:.39s}
.hero .register-button{position:relative;overflow:hidden;isolation:isolate;box-shadow:0 5px 0 #0864a5,0 13px 28px #009bef55,inset 0 1px 1px #fff8}
.hero .register-button:after{content:'';position:absolute;inset:-30% auto -30% -75%;width:42%;transform:skewX(-22deg);background:linear-gradient(90deg,transparent,#fff9,transparent);animation:button-shine 5s ease-in-out 1.4s infinite;pointer-events:none}
.hero .button:hover{box-shadow:0 8px 22px #1686cc44,0 3px 0 #0864a5}
.hero-effects{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.hero-ray{position:absolute;right:-20%;top:-36%;width:65%;height:100%;transform-origin:top center;background:linear-gradient(90deg,transparent,#ffffff48 50%,transparent);filter:blur(18px);opacity:.6;animation:ray-sway 12s ease-in-out infinite alternate}
.hero-ray.ray-two{right:11%;width:28%;opacity:.35;animation-delay:-6s}
.magic-ring{position:absolute;right:13%;top:24%;width:min(440px,33vw);aspect-ratio:1;border:1px solid #e6fcff70;border-radius:50%;box-shadow:0 0 20px #6ee6ff46,inset 0 0 30px #7fe6ff19;animation:ring-turn 25s linear infinite}
.magic-ring:before,.magic-ring:after{content:'✦';position:absolute;color:#fff;filter:drop-shadow(0 0 5px #7bddff);font-size:21px;top:-12px;left:50%}
.magic-ring:after{top:auto;bottom:-12px;left:14%}
.ring-two{right:16%;top:28%;width:min(350px,26vw);border-style:dashed;opacity:.65;animation-direction:reverse;animation-duration:32s}
.magic-star{position:absolute;color:#fff;text-shadow:0 0 8px #4fd3ff,0 0 20px #009ae5;font-size:clamp(15px,1.6vw,28px);animation:star-twinkle 3.4s ease-in-out infinite}
.star-one{top:19%;right:12%}.star-two{top:32%;right:49%;animation-delay:-.9s}.star-three{top:61%;right:8%;animation-delay:-2.1s}.star-four{top:75%;right:44%;animation-delay:-1.7s}.star-five{top:9%;right:31%;animation-delay:-2.8s}.star-six{top:48%;right:31%;animation-delay:-.4s}
.magic-trigger{position:absolute;z-index:4;right:4.5%;top:52%;width:52px;height:52px;border-radius:50%;border:1px solid #c7f4ff;background:radial-gradient(circle at 34% 28%,#fff,#c6edff 54%,#56b5ee);color:#137cc4;font-size:30px;line-height:1;cursor:pointer;box-shadow:0 0 0 5px #ffffff8c,0 4px 20px #0e80ce66,inset 0 2px 3px #fff;animation:charm-pulse 3.6s ease-in-out infinite;transition:transform .25s,filter .25s}
.magic-trigger:hover,.magic-trigger:focus-visible{transform:scale(1.15) rotate(18deg);filter:brightness(1.1)}
.magic-trigger:focus-visible,.journey-play:focus-visible{outline:3px solid #0579c2;outline-offset:4px}
.magic-burst{position:absolute;z-index:3;left:var(--burst-x);top:var(--burst-y);font-size:var(--burst-size);color:#fff;text-shadow:0 0 9px #17b8ff,0 0 24px #0b77d4;pointer-events:none;animation:burst-fly .95s ease-out forwards}
.scroll-progress{position:fixed;z-index:30;left:0;right:0;top:0;height:3px;pointer-events:none}
.scroll-progress span{display:block;height:100%;width:var(--scroll-percent,0%);background:linear-gradient(90deg,#6bdcf5,#0a85d7,#ff81b8);box-shadow:0 1px 8px #17a5e9}
.class-stage{--class-accent:#6eb8ef}
.class-stage:before{content:'';position:absolute;right:6%;top:6%;width:48%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,var(--class-accent) 0,transparent 65%);opacity:.14;filter:blur(20px);pointer-events:none;transition:background .4s}
.class-stage .class-portrait{position:relative;animation:portrait-breathe 5s ease-in-out infinite}
.class-stage.is-changing .class-portrait{animation:portrait-switch .58s cubic-bezier(.16,.78,.28,1) both}
.class-stage.is-changing .class-ribbon,.class-stage.is-changing .class-copy h3,.class-stage.is-changing .class-description{animation:story-swap .5s ease-out both}
.class-stage.is-changing .class-copy h3{animation-delay:.07s}.class-stage.is-changing .class-description{animation-delay:.12s}
.class-tab.active .medallion{animation:medallion-glow 2.9s ease-in-out infinite}
.classes .section-caption span{background:linear-gradient(90deg,transparent,#8acbeb,#c0e8f7);background-size:200% 100%;animation:line-glimmer 5s linear infinite}
.journey-heading-row{display:flex;align-items:center;justify-content:space-between;gap:18px}
.journey-play{flex-shrink:0;border:1px solid #84c6e8;background:#fffdf4df;color:#2578a5;border-radius:999px;padding:8px 14px;font:600 12px/1.5 'Noto Sans Thai',sans-serif;cursor:pointer;box-shadow:0 3px 12px #477a9b21;transition:transform .2s,background .2s}
.journey-play:hover{transform:translateY(-2px);background:white}
.journey-play[aria-pressed=true]:before{content:'';display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:#2bc7e8;box-shadow:0 0 0 3px #2bc7e838;animation:charm-pulse 2s ease-in-out infinite}
.journey.is-changing .postcard{animation:postcard-turn .65s cubic-bezier(.2,.7,.2,1) both}
.journey.is-changing .journey-text{animation:story-swap .55s ease-out both}
.journey .timeline-step.active .timeline-dot{animation:medallion-glow 2.8s ease-in-out infinite}
.journey .journey-scenery{animation:map-drift 22s ease-in-out infinite alternate}
.effects-ready .section-caption,.effects-ready .class-stage,.effects-ready .class-tabs,.effects-ready .journey-heading-row,.effects-ready .journey-story,.effects-ready .timeline{opacity:0;transform:translateY(26px);transition:opacity .8s ease,transform .8s cubic-bezier(.16,.8,.2,1)}
.effects-ready .is-visible{opacity:1;transform:translateY(0)}
@keyframes hero-breathe{from{transform:scale(1)}to{transform:scale(1.045)}}
@keyframes party-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
@keyframes logo-arrive{from{opacity:0;transform:translateY(-22px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes logo-glow{from{filter:drop-shadow(0 7px 6px #4e88c017)}to{filter:drop-shadow(0 8px 17px #55bdf07a)}}
@keyframes copy-arrive{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@keyframes button-shine{0%,70%,100%{left:-75%}84%{left:140%}}
@keyframes ray-sway{from{transform:rotate(-10deg)}to{transform:rotate(13deg)}}
@keyframes ring-turn{to{transform:rotate(360deg)}}
@keyframes star-twinkle{0%,100%{opacity:.35;transform:scale(.7) rotate(0)}50%{opacity:1;transform:scale(1.25) rotate(30deg)}}
@keyframes charm-pulse{0%,100%{box-shadow:0 0 0 5px #ffffff8c,0 4px 20px #0e80ce66}50%{box-shadow:0 0 0 9px #ffffff55,0 5px 28px #0e80ceaa}}
@keyframes burst-fly{from{opacity:1;transform:translate(0,0) scale(.4) rotate(0)}to{opacity:0;transform:translate(var(--burst-dx),var(--burst-dy)) scale(1.35) rotate(100deg)}}
@keyframes portrait-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes portrait-switch{from{opacity:.3;transform:translateX(35px) scale(.94)}to{opacity:1;transform:translateX(0) scale(1)}}
@keyframes story-swap{from{opacity:.2;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes postcard-turn{from{opacity:.45;transform:rotate(5deg) translateY(18px) scale(.95)}to{opacity:1;transform:rotate(-2deg) translateY(0) scale(1)}}
@keyframes medallion-glow{0%,100%{filter:brightness(1)}50%{filter:brightness(1.18) drop-shadow(0 0 8px #66caff)}}
@keyframes line-glimmer{to{background-position:-200% 0}}
@keyframes map-drift{from{transform:scale(1)}to{transform:scale(1.035)}}
@media(max-width:760px){
  .hero .hero-art{transform-origin:center top;animation-duration:24s}
  .hero .scene-party{transform:none}
  .hero-effects{height:390px}
  .magic-ring{width:210px;right:10%;top:26%}.ring-two{width:150px;right:17%;top:34%}
  .hero-ray{top:-45%;right:-30%;width:95%}
  .magic-trigger{top:296px;right:16px;width:43px;height:43px;font-size:25px}
  .star-one{right:10%;top:17%}.star-two{right:70%;top:35%}.star-three{right:8%;top:73%}.star-four{right:56%;top:69%}.star-five{right:37%;top:15%}.star-six{right:35%;top:49%}
  .journey-heading-row{flex-direction:column;gap:9px}.journey-play{padding:6px 12px;font-size:11px}
  .class-stage:before{width:80%;right:10%;top:1%}
}
@media(prefers-reduced-motion:reduce){
  .hero .hero-art,.hero .scene-party img,.hero .game-logo,.hero .hero-copy h1,.hero .hero-subtitle,.hero .hero-description,.hero .hero-actions,.hero .register-button:after,.hero-ray,.magic-ring,.magic-star,.magic-trigger,.class-stage .class-portrait,.class-tab.active .medallion,.journey .journey-scenery,.journey .timeline-step.active .timeline-dot{animation:none!important}
  .effects-ready .section-caption,.effects-ready .class-stage,.effects-ready .class-tabs,.effects-ready .journey-heading-row,.effects-ready .journey-story,.effects-ready .timeline{opacity:1;transform:none}
}
