/* Native 3D and scroll effects. The page stays readable without motion.js. */
:root {
  --reading-progress: 0;
  --cursor-x: -500px;
  --cursor-y: -500px;
  --hero-progress: 0;
}
.reading-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 45; pointer-events: none; }
.reading-progress i { display: block; height: 100%; transform: scaleX(var(--reading-progress)); transform-origin: left; background: linear-gradient(90deg, #ff791a, #ffc898); box-shadow: 0 0 12px #ff791a; }
.pointer-glow { position: fixed; left: 0; top: 0; width: 400px; height: 400px; border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; background: radial-gradient(circle, rgba(255, 121, 26, .08), transparent 66%); transform: translate3d(var(--cursor-x), var(--cursor-y), 0); transition: opacity .5s; }
.motion-enabled.pointer-active .pointer-glow { opacity: 1; }
.hero-wire-grid { position: absolute; pointer-events: none; width: 1500px; height: 750px; left: 50%; top: 460px; opacity: .4; background-image: linear-gradient(rgba(255, 148, 69, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 148, 69, .13) 1px, transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(ellipse at 50% 40%, black, transparent 67%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black, transparent 67%); transform-origin: 50% 0; transform: translateX(-50%) perspective(650px) rotateX(65deg); }
.motion-enabled .hero-wire-grid { background-position: 0 calc(var(--hero-progress) * 220px); }
.hero-title-line { display: inline-block; }
.motion-enabled .hero-title-line { animation: title-emerge .95s cubic-bezier(.2, .75, .2, 1) both; }
.motion-enabled .hero-title-line.orange-text { background-size: 200% auto; animation: title-emerge .95s .12s cubic-bezier(.2, .75, .2, 1) both, title-light 9s ease-in-out infinite; }
.scroll-guide { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; color: #8d8d97; font-size: 9px; letter-spacing: .045em; }
.scroll-guide:hover { color: var(--orange-soft); }
.scroll-mouse { display: inline-flex; justify-content: center; width: 13px; height: 21px; border: 1px solid #85818a; border-radius: 10px; padding-top: 4px; }
.scroll-mouse i { width: 2px; height: 4px; border-radius: 2px; background: var(--orange-soft); }
.motion-enabled .scroll-mouse i { animation: scroll-hint 1.9s ease-in-out infinite; }
[data-motion-scene] { --scene-progress: 0; --scene-x: 0; --scene-y: 0; --wheel-drive: 0; }
.hero-stage { perspective: 1300px; isolation: isolate; }
.cube-rig { --cube-size: 124px; --cube-half: 62px; position: absolute; width: var(--cube-size); height: var(--cube-size); right: 104px; top: 4px; z-index: 1; pointer-events: none; perspective: 700px; }
.cube-rig::before { content: ''; position: absolute; width: 170%; height: 40%; left: -35%; bottom: -38%; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 104, 20, .27), transparent 67%); filter: blur(7px); }
.cube-float { width: 100%; height: 100%; transform-style: preserve-3d; }
.kinetic-cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(-23deg) rotateY(30deg) rotateZ(-12deg); }
.cube-face { position: absolute; inset: 0; display: grid; place-items: center; border: 1px solid rgba(255, 207, 163, .74); border-radius: 12px; background: linear-gradient(135deg, rgba(255, 194, 141, .68), rgba(255, 121, 26, .83) 48%, rgba(146, 49, 9, .87)); box-shadow: inset 0 0 26px rgba(255, 184, 125, .12); backface-visibility: hidden; }
.cube-face::after { content: ''; position: absolute; inset: 11px; border: 1px solid rgba(255, 216, 189, .3); border-radius: 5px; }
.cube-front { transform: translateZ(var(--cube-half)); }
.cube-back { transform: rotateY(180deg) translateZ(var(--cube-half)); }
.cube-right { transform: rotateY(90deg) translateZ(var(--cube-half)); background: linear-gradient(145deg, #e97022, #9b370f); }
.cube-left { transform: rotateY(-90deg) translateZ(var(--cube-half)); }
.cube-top { transform: rotateX(90deg) translateZ(var(--cube-half)); background: linear-gradient(145deg, #ffd3b1, #ff9041); }
.cube-bottom { transform: rotateX(-90deg) translateZ(var(--cube-half)); }
.cube-front img { width: 42px; height: auto; mix-blend-mode: screen; }
.motion-enabled .cube-rig { transform: translate3d(calc(var(--scene-x) * 26px), calc(var(--scene-progress) * -105px), 0); }
.motion-enabled .cube-float { animation: cube-hover 7s ease-in-out infinite; }
.motion-enabled .kinetic-cube { animation: cube-turn 28s linear infinite; }
.kinetic-halo { position: absolute; left: 36px; top: 8px; width: 150px; height: 150px; pointer-events: none; perspective: 700px; z-index: 1; }
.halo-system { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(32deg) rotateY(-25deg); }
.halo-ring { position: absolute; inset: 0; border: 1px solid rgba(255, 160, 83, .53); border-radius: 50%; box-shadow: 0 0 16px rgba(255, 121, 26, .06), inset 0 0 12px rgba(255, 121, 26, .08); }
.halo-ring:nth-child(2) { transform: rotateY(66deg); border-color: rgba(255, 237, 218, .24); }
.halo-ring:nth-child(3) { transform: rotateX(67deg); }
.halo-ring::after { content: ''; position: absolute; top: 50%; left: -3px; width: 5px; height: 5px; border-radius: 50%; background: #ffc28f; box-shadow: 0 0 10px #ff791a; }
.halo-core { position: absolute; inset: 40%; border-radius: 6px; border: 1px solid #ffa15e; background: linear-gradient(135deg, rgba(255, 203, 162, .4), rgba(255, 121, 26, .1)); transform: rotate(45deg); box-shadow: 0 0 35px rgba(255, 121, 26, .23); }
.motion-enabled .kinetic-halo { transform: translate3d(calc(var(--scene-x) * -22px), calc(var(--scene-progress) * 65px), 0); }
.motion-enabled .halo-system { animation: halo-turn 19s linear infinite; }
.elevation-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.trail-base { stroke: url(#trail-light); stroke-width: 1; opacity: .38; }
.trail-current { stroke: #ffb177; stroke-width: 1.5; stroke-dasharray: 80 1350; stroke-dashoffset: 200; opacity: .6; }
.motion-enabled .trail-current { animation: signal-flow 8s linear infinite; }
.motion-dust { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.motion-dust i { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: #ffc591; box-shadow: 0 0 14px #ff791a; opacity: .35; }
.motion-enabled .motion-dust i { animation: dust-rise 7s var(--delay) ease-in-out infinite; }
.motion-enabled .classroom-window { transform: translate3d(calc(var(--scene-x) * 12px), calc(var(--scene-progress) * -52px), 24px) rotateX(calc(-4deg + var(--scene-progress) * 13deg - var(--scene-y) * 3deg)) rotateY(calc(var(--scene-x) * -5deg)) rotateZ(calc(-2deg + var(--wheel-drive) * -2deg)); transition: box-shadow .35s; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 35px 85px rgba(0,0,0,.55), 0 0 60px rgba(255, 121, 26, .045); }
.motion-enabled .classroom-window:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 40px 95px rgba(0,0,0,.55), 0 0 65px rgba(255, 121, 26, .11); }
.motion-enabled .float-note { translate: calc(var(--scene-x) * -18px) calc(var(--scene-progress) * -85px); }
.motion-enabled .float-progress { translate: calc(var(--scene-x) * 22px) calc(var(--scene-progress) * 34px); }
.motion-enabled .orbit-one { transform: rotateX(calc(15deg + var(--scene-progress) * 30deg)) rotateZ(calc(-13deg + var(--scene-progress) * 48deg + var(--wheel-drive) * 4deg)); border-color: rgba(255, 169, 111, .13); }
.motion-enabled .orbit-two { transform: rotateX(calc(-12deg - var(--scene-progress) * 24deg)) rotateZ(calc(9deg - var(--scene-progress) * 34deg)); }
.motion-enabled [data-tilt] { --tilt-x: 0deg; --tilt-y: 0deg; --tilt-lift: 0px; --shine-x: 50%; --shine-y: 50%; transform: perspective(1000px) translateY(var(--tilt-lift)) rotateX(var(--tilt-y)) rotateY(var(--tilt-x)); transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .25s; }
.motion-enabled [data-tilt].is-tilting { --tilt-lift: -5px; transition: border-color .25s, box-shadow .25s; z-index: 3; box-shadow: 0 24px 50px rgba(0,0,0,.32), 0 0 30px rgba(255,121,26,.035); }
.motion-enabled .course-card[data-tilt]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; background: radial-gradient(circle at var(--shine-x) var(--shine-y), rgba(255,227,198,.11), transparent 54%); }
.motion-enabled .course-card.is-tilting::after { opacity: 1; }
.story-art { perspective: 900px; }
.story-orbits { transform-style: preserve-3d; }
.story-orbits i { width: 83%; height: auto; aspect-ratio: 1; border-color: rgba(255, 173, 110, .22); transform: rotateX(62deg); }
.story-orbits i:nth-child(2) { width: 83%; height: auto; transform: rotateY(64deg) rotateX(-16deg); border-color: rgba(255,255,255,.13); }
.story-orbits i:nth-child(3) { width: 83%; height: auto; transform: rotateY(-52deg) rotateX(20deg); }
.story-orbits i::after { content: ''; position: absolute; top: 50%; left: -3px; width: 6px; height: 6px; border-radius: 50%; background: #ffb170; box-shadow: 0 0 16px #ff791a; }
.motion-enabled .story-orbits { animation: globe-turn 30s linear infinite; }
.motion-enabled .brand-sphere { transform: translate3d(calc(var(--scene-x) * 10px), calc((var(--scene-progress) - .5) * -30px), 30px) rotateX(calc(var(--scene-y) * -5deg)) rotateY(calc((var(--scene-progress) - .5) * 32deg)) rotateZ(-9deg); box-shadow: inset 8px 8px 22px rgba(255,255,255,.04), inset -8px -8px 28px rgba(0,0,0,.2), 0 24px 60px rgba(0,0,0,.25), 0 0 60px rgba(255,121,26,.08); }
.motion-enabled .contact-star { transform: rotate(calc(15deg + var(--scene-progress) * 110deg + var(--wheel-drive) * 6deg)) scale(calc(.9 + var(--scene-progress) * .12)); }
.motion-enabled .contact-aura { translate: calc(var(--scene-x) * 18px) calc(var(--scene-y) * 12px); }
.reveal-enabled [data-motion-reveal] { opacity: 0; translate: 0 30px; transition: opacity .75s var(--reveal-delay,0ms), translate .75s var(--reveal-delay,0ms) cubic-bezier(.2,.7,.2,1); }
.reveal-enabled [data-motion-reveal].is-visible { opacity: 1; translate: 0 0; }
.motion-toggle { position: fixed; right: 22px; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 35; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 100px; font-size: 9px; color: #cac5c1; background-color: rgba(15,15,18,.84); box-shadow: 0 8px 25px rgba(0,0,0,.24); }
.motion-toggle[hidden] { display: none; }
.motion-toggle .icon { width: 13px; height: 13px; color: var(--orange-soft); }
.motion-status { width: 4px; height: 4px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px rgba(255,121,26,.5); }
.motion-toggle[aria-pressed="true"] .motion-status { background: #82818b; box-shadow: none; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after,
.motion-suspended *, .motion-suspended *::before, .motion-suspended *::after,
.dialog-open *, .dialog-open *::before, .dialog-open *::after { animation-play-state: paused !important; }
.motion-enabled [data-motion-scene]:not(.scene-in-view) *,
.motion-enabled [data-motion-scene]:not(.scene-in-view) *::before,
.motion-enabled [data-motion-scene]:not(.scene-in-view) *::after { animation-play-state: paused !important; }
.motion-paused .pointer-glow, .dialog-open .pointer-glow { opacity: 0; }
@keyframes title-emerge { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes title-light { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes scroll-hint { 0%,100% { transform: translateY(0); opacity: .4; } 45% { transform: translateY(6px); opacity: 1; } 80% { transform: translateY(6px); opacity: 0; } }
@keyframes cube-hover { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes cube-turn { from { transform: rotateX(calc(-23deg + var(--scene-y) * 8deg)) rotateY(calc(30deg + var(--scene-progress) * 170deg + var(--wheel-drive) * 20deg)) rotateZ(-12deg); } to { transform: rotateX(calc(-23deg + var(--scene-y) * 8deg)) rotateY(calc(390deg + var(--scene-progress) * 170deg + var(--wheel-drive) * 20deg)) rotateZ(-12deg); } }
@keyframes halo-turn { from { transform: rotateX(32deg) rotateY(calc(-25deg + var(--scene-progress) * 90deg)) rotateZ(0deg); } to { transform: rotateX(32deg) rotateY(calc(-25deg + var(--scene-progress) * 90deg)) rotateZ(360deg); } }
@keyframes globe-turn { from { transform: rotateX(-12deg) rotateY(calc(var(--scene-progress) * 65deg)) rotateZ(0deg); } to { transform: rotateX(-12deg) rotateY(calc(var(--scene-progress) * 65deg)) rotateZ(360deg); } }
@keyframes signal-flow { to { stroke-dashoffset: -1230; } }
@keyframes dust-rise { 0%,100% { transform: translateY(0); opacity: .15; } 50% { transform: translateY(-24px); opacity: .7; } }
@media (max-width: 1100px) { .cube-rig { right: 48px; top: 10px; --cube-size: 104px; --cube-half: 52px; } .kinetic-halo { left: 18px; width: 125px; height: 125px; } }
@media (max-width: 700px) {
  .hero-wire-grid { top: 440px; width: 1000px; opacity: .25; }
  .cube-rig { --cube-size: 72px; --cube-half: 36px; right: 10px; top: -8px; }
  .cube-face { border-radius: 7px; }
  .cube-face::after { inset: 7px; border-radius: 3px; }
  .cube-front img { width: 25px; }
  .kinetic-halo { left: -12px; top: 5px; width: 85px; height: 85px; }
  .scroll-guide { font-size: 8px; margin-top: 16px; }
  .motion-dust i:nth-child(2n) { display: none; }
  .motion-enabled .classroom-window { transform: translateY(calc(var(--scene-progress) * -20px)) rotateX(calc(-2deg + var(--scene-progress) * 5deg)) rotateZ(-2deg); }
  .motion-enabled .cube-rig { transform: translateY(calc(var(--scene-progress) * -35px)); }
  .motion-enabled .float-progress { translate: 0 calc(var(--scene-progress) * 12px); }
  .motion-enabled .kinetic-halo { transform: translateY(calc(var(--scene-progress) * 20px)); }
  .motion-toggle { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); padding: 9px 12px; font-size: 8px; }
}
@media (hover: none), (pointer: coarse) { .pointer-glow { display: none; } .motion-enabled [data-tilt], .motion-enabled [data-tilt].is-tilting { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pointer-glow { display: none; }
  .hero-wire-grid { background-position: 0 0; }
  .hero-title-line { opacity: 1; transform: none; }
  .reveal-enabled [data-motion-reveal] { opacity: 1; translate: none; }
  .motion-enabled .classroom-window, .motion-enabled [data-tilt], .motion-enabled .contact-star { transform: none; }
}
