/* SchoolPlus website motion layer. Everything here is decoration: the page works and reads the same without it,
   and prefers-reduced-motion switches it all off. */

/* Scroll progress bar */
.mo-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(var(--mo-p, 0));
    background: linear-gradient(90deg, var(--brand), #ffb74d, var(--brand)); background-size: 200% 100%; animation: mo-slide 4s linear infinite; }
@keyframes mo-slide { to { background-position: -200% 0; } }

/* Header lifts once the page scrolls */
.sp-header { transition: box-shadow .3s, background-color .3s; }
.sp-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(21,36,77,.45); }

/* Hero aurora */
.sp-hero { position: relative; isolation: isolate; }
.mo-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.mo-aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; will-change: transform; }
.mo-aurora i:nth-child(1) { width: 520px; height: 520px; right: -120px; top: -160px; background: color-mix(in srgb, var(--brand) 60%, #fff); animation: mo-drift-a 16s ease-in-out infinite alternate; }
.mo-aurora i:nth-child(2) { width: 420px; height: 420px; left: -160px; bottom: -200px; background: #c3d0ff; animation: mo-drift-b 19s ease-in-out infinite alternate; }
.mo-aurora i:nth-child(3) { width: 260px; height: 260px; left: 42%; top: 30%; background: #ffe0b3; opacity: .55; animation: mo-drift-a 13s ease-in-out -6s infinite alternate; }
@keyframes mo-drift-a { to { transform: translate(-70px, 60px) scale(1.15); } }
@keyframes mo-drift-b { to { transform: translate(90px, -50px) scale(1.2); } }

/* Headline: words rise in one after another (spans added by site-motion.js) */
.mo-words .mo-w { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(2deg); filter: blur(6px);
    animation: mo-word .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--w) * 70ms + 80ms); }
@keyframes mo-word { to { opacity: 1; transform: none; filter: none; } }
.mo-ready .sp-lead, .mo-ready .sp-hero__cta, .mo-ready .sp-try { animation: mo-up .8s cubic-bezier(.2,.8,.2,1) both; }
.mo-ready .sp-lead { animation-delay: .55s; }
.mo-ready .sp-hero__cta { animation-delay: .7s; }
.mo-ready .sp-try { animation-delay: .85s; }
@keyframes mo-up { from { opacity: 0; transform: translateY(22px); } }

/* Phone: floats, tilts towards the pointer, tiles pop in */
.sp-hero__device[data-tilt] { perspective: 1100px; }
.sp-hero__device .sp-phone { transform: rotateY(var(--ry, -8deg)) rotateX(var(--rx, 4deg)); transition: transform .4s cubic-bezier(.2,.8,.2,1); animation: mo-float 6s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes mo-float { 50% { translate: 0 -14px; } }
.mo-ready .sp-tile { animation: mo-pop .55s cubic-bezier(.3,1.5,.5,1) both; }
.mo-ready .sp-tile:nth-child(1) { animation-delay: .9s; } .mo-ready .sp-tile:nth-child(2) { animation-delay: .98s; }
.mo-ready .sp-tile:nth-child(3) { animation-delay: 1.06s; } .mo-ready .sp-tile:nth-child(4) { animation-delay: 1.14s; }
.mo-ready .sp-tile:nth-child(5) { animation-delay: 1.22s; } .mo-ready .sp-tile:nth-child(6) { animation-delay: 1.3s; }
@keyframes mo-pop { from { opacity: 0; transform: scale(.4); } }
.mo-ready .sp-app__notice { animation: mo-up .6s 1.45s cubic-bezier(.2,.8,.2,1) both; }

/* Notification chips around the phone */
.mo-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 9px; border-radius: 999px;
    background: rgba(255,255,255,.92); backdrop-filter: blur(6px); box-shadow: 0 18px 40px -18px rgba(21,36,77,.5), 0 0 0 1px var(--rule);
    font: 600 .85rem var(--body); color: var(--ink); white-space: nowrap; opacity: 0; }
.mo-chip b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .8rem; }
.mo-chip--a { left: -6%; top: 16%; } .mo-chip--a b { background: var(--ok); }
.mo-chip--b { right: -8%; top: 46%; } .mo-chip--b b { background: #5b6cff; }
.mo-chip--c { left: -10%; bottom: 2%; } .mo-chip--c b { background: var(--brand); }
.mo-ready .mo-chip { animation: mo-chip-in .7s cubic-bezier(.3,1.4,.5,1) forwards, mo-bob 5s ease-in-out infinite; }
.mo-ready .mo-chip--a { animation-delay: 1.6s, 2.3s; } .mo-ready .mo-chip--b { animation-delay: 2.1s, 2.8s; } .mo-ready .mo-chip--c { animation-delay: 2.6s, 3.3s; }
@keyframes mo-chip-in { from { opacity: 0; transform: translateY(16px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes mo-bob { 50% { translate: 0 -8px; } }

/* Module strip */
.mo-marquee { overflow: hidden; background: var(--ink); color: #fff; padding: 16px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mo-marquee__track { display: flex; gap: 14px; width: max-content; animation: mo-marquee 60s linear infinite; }
.mo-marquee:hover .mo-marquee__track { animation-play-state: paused; }
.mo-marquee span { display: inline-flex; align-items: center; gap: 14px; font: 700 1rem var(--display); white-space: nowrap; }
.mo-marquee span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
@keyframes mo-marquee { to { transform: translateX(-50%); } }

/* Scroll reveal (class added by site-motion.js only when motion is allowed) */
.mo-on [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--rd, 0) * 70ms); }
.mo-on [data-reveal].is-in { opacity: 1; transform: none; }
.mo-on [data-reveal="zoom"] { transform: scale(.92); }
.mo-on [data-reveal="left"] { transform: translateX(-40px); }

/* Feature tiles: spotlight follows the pointer */
.sp-features__grid li { position: relative; transition: background-color .3s, transform .3s; }
.sp-features__grid li::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%); }
.sp-features__grid li:hover::before { opacity: 1; }
.sp-features__grid li:hover img { transform: scale(1.18) rotate(-6deg); }
.sp-features__grid li img { transition: transform .35s cubic-bezier(.3,1.5,.5,1); }

/* Steps: dashed connector draws itself */
.mo-on .sp-steps__list li:not(:last-child)::after { transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s .4s ease; }
.mo-on .sp-steps__list li.is-in:not(:last-child)::after { transform: scaleX(1); }
.mo-on .sp-steps__list li::before { transition: transform .6s cubic-bezier(.3,1.6,.5,1); }
.mo-on .sp-steps__list li:not(.is-in)::before { transform: scale(0); }

/* Pricing: lift on hover, animated border on the highlighted plan */
.sp-plan { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.sp-plan:hover { transform: translateY(-8px); box-shadow: 0 30px 50px -28px rgba(21,36,77,.45); }
.sp-plan--pick { position: relative; border-color: transparent !important; background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from var(--mo-a, 0deg), var(--brand), #ffb74d, #5b6cff, var(--brand)) border-box; animation: mo-spin 6s linear infinite; }
@property --mo-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes mo-spin { to { --mo-a: 360deg; } }

/* Buttons: shine sweep and a small press */
.sp-btn { position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, background-color .2s; }
.sp-btn:not(.sp-btn--ghost)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.38) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s; }
.sp-btn:not(.sp-btn--ghost):hover::after { transform: translateX(120%); }
.sp-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px color-mix(in srgb, var(--brand) 80%, transparent); }
.sp-btn:active { transform: translateY(0) scale(.98); }

/* Footer CTA glow */
.sp-footer__cta { position: relative; }
.sp-footer__cta::before { content: ""; position: absolute; width: 380px; height: 380px; right: 5%; top: -160px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 45%, transparent), transparent 65%); opacity: .35; animation: mo-drift-a 12s ease-in-out infinite alternate; }

@media (max-width: 920px) {
    .mo-chip { font-size: .78rem; }
    .mo-chip--a { left: 0; } .mo-chip--b { right: 0; } .mo-chip--c { left: 4%; }
}
@media (prefers-reduced-motion: reduce) {
    .mo-aurora i, .mo-marquee__track, .sp-phone, .mo-chip, .mo-progress, .sp-plan--pick, .sp-footer__cta::before { animation: none !important; }
    .mo-chip { opacity: 1; }
    .mo-words .mo-w { opacity: 1; transform: none; filter: none; animation: none; }
}
