/* start.html — the split entry page: students left, teachers right.
   The divider follows the cursor on a spring (assets/start.js sets --split, --ps, --pt, --mx, --my on .st);
   each side is a full-screen layer clipped at the divider, so nothing re-lays out while it moves. */
:root {
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --s-bg: #EAF4FB; --s-ink: #0E0E10; --s-mute: #5A6472;
  --t-bg: #12233F; --t-ink: #F2F5FA; --t-mute: #A9B6CB;
  --orange: #E37239;
  --pad: clamp(24px, 5vw, 72px);
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { overflow: hidden; background: var(--t-bg); font-family: Satoshi, -apple-system, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.st { --split: .5; --ps: 0; --pt: 0; --mx: .5; --my: .5; position: relative; height: 100vh; height: 100dvh; overflow: hidden; cursor: default; }

/* ---------- the two layers ---------- */
.st__side { position: absolute; inset: 0; display: block; text-decoration: none; outline: none; will-change: clip-path; }
.st__side--s { background: var(--s-bg); color: var(--s-ink); clip-path: inset(0 calc((1 - var(--split)) * 100%) 0 0); }
.st__side--t { background: var(--t-bg); color: var(--t-ink); clip-path: inset(0 0 0 calc(var(--split) * 100%)); }

/* light that follows the cursor */
.st__glow { position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.st__side--s .st__glow { background: radial-gradient(520px circle at calc(var(--mx) * 100%) calc(var(--my) * 100%), rgba(227, 114, 57, .2), transparent 62%); }
.st__side--t .st__glow { background: radial-gradient(560px circle at calc(var(--mx) * 100%) calc(var(--my) * 100%), rgba(110, 160, 255, .22), transparent 62%); }
/* student side: soft orbs drifting */
.st__orbs i { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; animation: stdrift 18s ease-in-out infinite alternate; }
.st__orbs i:nth-child(1) { width: 34vmax; height: 34vmax; left: -8vmax; top: -10vmax; background: #FFD9C2; }
.st__orbs i:nth-child(2) { width: 26vmax; height: 26vmax; left: 18vw; bottom: -12vmax; background: #D9E4FF; animation-duration: 23s; }
.st__orbs i:nth-child(3) { width: 18vmax; height: 18vmax; left: 32vw; top: 18vh; background: #D5F5DF; animation-duration: 27s; }
@keyframes stdrift { to { transform: translate(5vmax, 4vmax) scale(1.12); } }
/* teacher side: a slow dotted grid */
.st__grid { position: absolute; inset: -40px; background-image: radial-gradient(rgba(255, 255, 255, .16) 1.2px, transparent 1.3px); background-size: 28px 28px; animation: stgrid 30s linear infinite; -webkit-mask-image: radial-gradient(70% 70% at 70% 45%, #000, transparent); mask-image: radial-gradient(70% 70% at 70% 45%, #000, transparent); }
@keyframes stgrid { to { transform: translate(28px, 28px); } }

/* the seam: a bright line on the divider with a dot that follows the cursor's height */
.st__seam { position: absolute; z-index: 2; top: 0; bottom: 0; left: calc(var(--split) * 100%); width: 0; pointer-events: none; }
.st__seam::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: linear-gradient(transparent, rgba(227, 114, 57, .7) 30%, rgba(227, 114, 57, .7) 70%, transparent); transform-origin: 50% 50%; transition: transform 1.2s var(--ease) .1s; }
.st__seam i { position: absolute; left: -6px; top: calc(var(--my) * 100%); width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 6px rgba(227, 114, 57, .18), 0 0 30px 6px rgba(227, 114, 57, .45); transition: opacity .6s .9s, transform .6s var(--ease) .9s; }

/* ---------- hero: logo + line, moved and tilted by start.js ---------- */
.st__hero { position: absolute; left: 50%; top: 50%; z-index: 3; width: min(680px, 88vw); text-align: center; pointer-events: none; transform: translate(-50%, -54%); will-change: transform; perspective: 900px; }
.st__tilt { transform-style: preserve-3d; will-change: transform; transition: filter 1.1s var(--ease) .25s, opacity 1.1s var(--ease) .25s; }
.st__logo { display: block; width: 100%; height: auto; filter: drop-shadow(0 26px 40px rgba(227, 114, 57, .25)); }
.st__d { display: inline-block; margin-top: 26px; padding: 12px 22px; border-radius: 20px; background: rgba(14, 14, 16, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: clamp(16px, 1.4vw, 19px); font-weight: 600; line-height: 1.45; color: #fff; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); opacity: calc(1 - max(var(--ps), var(--pt)) * 2.2); transform: translateY(calc(max(var(--ps), var(--pt)) * 14px)) translateZ(30px); }
.st__d span { opacity: .65; }

/* ---------- features: each line fades and rises in proportion to how open its side is ---------- */
.st__feat { position: absolute; top: 27%; width: min(500px, 38vw); pointer-events: none; }
.st__side--s .st__feat { left: var(--pad); --p: var(--ps); }
.st__side--t .st__feat { right: var(--pad); text-align: right; --p: var(--pt); }
.st__feat > * { --o: clamp(0, calc(var(--p) * 2.4 - var(--k, 0) * .2), 1); opacity: var(--o); transform: translateY(calc((1 - var(--o)) * 18px)); filter: blur(calc((1 - var(--o)) * 6px)); }
.st__k { display: block; --k: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }
.st__feat ul { list-style: none; padding: 0; margin-top: 14px; display: flex; flex-direction: column; gap: 4px; opacity: 1 !important; transform: none !important; filter: none !important; }
.st__feat li { padding: 11px 0; border-top: 1px solid rgba(14, 14, 16, .1); --o: clamp(0, calc(var(--p) * 2.4 - var(--k) * .2), 1); opacity: var(--o); transform: translateY(calc((1 - var(--o)) * 18px)); filter: blur(calc((1 - var(--o)) * 6px)); }
.st__feat li:nth-child(1) { --k: 1; } .st__feat li:nth-child(2) { --k: 1.6; } .st__feat li:nth-child(3) { --k: 2.2; } .st__feat li:nth-child(4) { --k: 2.8; } .st__feat li:nth-child(5) { --k: 3.4; } .st__feat li:nth-child(6) { --k: 4; }
.st__note { --k: 4.6; }
.st__side--t .st__feat li { border-top-color: rgba(255, 255, 255, .12); }
.st__feat b { display: block; font-size: clamp(16px, 1.3vw, 19px); font-weight: 700; letter-spacing: -0.01em; }
.st__feat li span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--s-mute); }
.st__side--t .st__feat li span { color: var(--t-mute); }
.st__note { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--t-mute); }
.st__note svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the big call to action, with a magnetic arrow ---------- */
.st__cta { position: absolute; bottom: clamp(28px, 6vh, 56px); z-index: 2; display: inline-flex; align-items: center; gap: 14px; font-size: clamp(26px, 3.4vw, 46px); font-weight: 900; letter-spacing: -0.035em; white-space: nowrap; transition: transform 1s var(--ease) .55s, opacity .8s .55s; }
.st__side--s .st__cta { left: var(--pad); }
.st__side--t .st__cta { right: var(--pad); }
.st__cta { scale: calc(1 + var(--p, 0) * .07); transform-origin: left bottom; }
.st__side--s .st__cta { --p: var(--ps); } .st__side--t .st__cta { --p: var(--pt); transform-origin: right bottom; }
.st__cta i { display: grid; place-items: center; width: clamp(44px, 4vw, 58px); height: clamp(44px, 4vw, 58px); border-radius: 50%; background: currentColor; transform: translate(var(--ax, 0px), var(--ay, 0px)); will-change: transform; }
.st__cta svg { width: 45%; height: 45%; fill: none; stroke: var(--s-bg); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.st__side--t .st__cta svg { stroke: var(--t-bg); }
.st__side:hover .st__cta svg, .st__side:focus-visible .st__cta svg { transform: translateX(3px); }
.st__side:focus-visible .st__cta > span { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* ---------- click: a circle of the chosen colour wipes the screen from the click point ---------- */
.st__wipe { position: fixed; inset: 0; z-index: 10; pointer-events: none; clip-path: circle(0 at var(--wx, 50%) var(--wy, 50%)); background: var(--wbg, var(--s-bg)); }
.st.is-go .st__wipe { clip-path: circle(150% at var(--wx, 50%) var(--wy, 50%)); transition: clip-path .75s cubic-bezier(.65, 0, .35, 1); }
.st.is-go .st__wipe::after { content: ""; position: absolute; left: 50%; top: 50%; width: 120px; height: 39px; margin: -20px 0 0 -60px; background: url("logo.svg?v=5") center / contain no-repeat; opacity: 0; animation: stwipe .5s .45s forwards; }
@keyframes stwipe { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

/* ---------- intro: the halves part, the seam draws, the logo comes into focus, the CTAs rise ---------- */
.st__side { transition: transform 1.2s var(--ease), opacity .9s; }
.st.is-intro .st__side--s { transform: translateX(-6%); opacity: 0; }
.st.is-intro .st__side--t { transform: translateX(6%); opacity: 0; }
.st.is-intro .st__seam::before { transform: scaleY(0); }
.st.is-intro .st__seam i { opacity: 0; transform: scale(0); }
.st.is-intro .st__tilt { opacity: 0; filter: blur(16px); }
.st.is-intro .st__cta { opacity: 0; transform: translateY(30px); }

.st__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- phones and touch (owner, 2026-10-29): flat and still. Students on the top half, teachers on the bottom
   half, the logo on the line between them, no scrolling, and a note that a laptop is best. ---------- */
.st__best { display: none; }
@media (max-width: 760px), (hover: none) {
  html, body { overflow: hidden; }
  .st { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
  .st *, .st *::before, .st *::after { transition: none !important; animation: none !important; }
  .st__side { position: relative; inset: auto; flex: 1 1 50%; min-height: 0; clip-path: none !important; transform: none !important; opacity: 1 !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 22px; text-align: center; }
  .st__side--s { justify-content: flex-start; padding-top: 14vh; }
  .st__side--t { justify-content: flex-end; padding-bottom: 12vh; }
  .st__seam, .st__glow, .st__orbs, .st__grid, .st__feat, .st__d { display: none !important; }
  .st__cta, .st__side--t .st__cta { position: static; scale: 1; font-size: clamp(28px, 8vw, 38px); opacity: 1 !important; transform: none !important; }
  .st__cta i { transform: none !important; width: 48px; height: 48px; }
  .st__side::before { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
  .st__side--s::before { content: "For students"; }
  .st__side--t::before { content: "For teachers"; order: 0; }
  .st__side:active { filter: brightness(.97); }
  .st__hero { top: 50%; left: 50%; width: min(300px, 64vw); padding: 16px 24px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px rgba(14, 14, 16, .08); transform: translate(-50%, -50%) !important; perspective: none; }
  .st__tilt { transform: none !important; opacity: 1 !important; filter: none !important; }
  .st__logo { filter: none; }
  .st__best { display: flex; position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 3; justify-content: center; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--t-mute); pointer-events: none; }
  .st__best svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .st.is-go .st__wipe { clip-path: circle(150% at 50% 50%); }
}
@media (prefers-reduced-motion: reduce) {
  .st__side, .st__tilt, .st__cta, .st__seam::before, .st__seam i { transition: none !important; }
  .st__orbs i, .st__grid { animation: none; }
  .st.is-go .st__wipe { transition: none; }
}

/* ============================================================
   Account step: the chosen side springs to fill the screen (start.js drives --split to 0 or 1),
   the logo glides to the top, and the create-account card rises in.
   ============================================================ */
.st.is-acct .st__side { pointer-events: none; }
.st.is-acct .st__feat, .st.is-acct .st__cta, .st.is-acct .st__d { opacity: 0 !important; transition: opacity .35s, transform .5s var(--ease); }
.st.is-acct .st__cta { transform: translateY(24px); }
.st.is-acct .st__seam { opacity: 0; transition: opacity .3s; }
.st__seam { transition: opacity .5s; }

.st__acct { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 120px 20px 40px; overflow-y: auto; }
.st__acct[hidden] { display: none; }
.st__acct.is-t { color: var(--t-ink); }
.st__back { position: absolute; top: clamp(18px, 3vh, 30px); left: clamp(18px, 3vw, 36px); display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: rgba(14, 14, 16, .06); color: inherit; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; opacity: 0; transform: translateX(-10px); transition: opacity .4s .35s, transform .6s var(--ease) .35s, background-color .2s; }
.st__acct.is-t .st__back { background: rgba(255, 255, 255, .1); }
.st__back:hover { background: rgba(14, 14, 16, .1); } .st__acct.is-t .st__back:hover { background: rgba(255, 255, 255, .16); }
.st__back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.st__card { width: min(440px, 100%); margin-top: clamp(40px, 10vh, 110px); padding: 30px 30px 24px; border-radius: 28px; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 40px 80px -40px rgba(14, 14, 16, .35), 0 0 0 1px rgba(255, 255, 255, .7) inset; opacity: 0; transform: translateY(40px) scale(.96); filter: blur(8px); transition: opacity .55s, transform .9s var(--ease), filter .6s; transition-delay: .28s; }
.st__acct.is-t .st__card { background: rgba(24, 40, 70, .72); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08) inset; }
.st__acct.is-in .st__card { opacity: 1; transform: none; filter: none; }
.st__acct.is-in .st__back { opacity: 1; transform: none; }
.st__card > * { opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .7s var(--ease); }
.st__acct.is-in .st__card > * { opacity: 1; transform: none; }
.st__acct.is-in .st__card > :nth-child(1) { transition-delay: .42s; } .st__acct.is-in .st__card > :nth-child(2) { transition-delay: .47s; }
.st__acct.is-in .st__card > :nth-child(3) { transition-delay: .52s; } .st__acct.is-in .st__card > :nth-child(4) { transition-delay: .58s; } .st__acct.is-in .st__card > :nth-child(5) { transition-delay: .64s; }
.st__ck { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); }
.st__card h2 { margin-top: 8px; font-size: clamp(26px, 3vw, 32px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; }
.st__cs { margin-top: 10px; font-size: 14.5px; line-height: 1.5; color: var(--s-mute); }
.st__acct.is-t .st__cs { color: var(--t-mute); }
.st__form { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.st__f { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; overflow: hidden; max-height: 90px; transition: max-height .5s var(--ease), opacity .35s, margin .5s var(--ease); }
.st__f.is-gone { max-height: 0; opacity: 0; margin-bottom: -12px; }
.st__f input { height: 50px; padding: 0 16px; border: 0; border-radius: 14px; background: rgba(14, 14, 16, .06); color: inherit; font: inherit; font-size: 16px; font-weight: 500; outline: 0; transition: background-color .2s, box-shadow .25s; }
.st__acct.is-t .st__f input { background: rgba(255, 255, 255, .08); }
/* the ring is drawn inside the box: .st__f clips (overflow: hidden, for the fold animation), which cut an outside ring's sides off */
.st__f input:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--s-ink); }
.st__acct.is-t .st__f input:focus { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 2px var(--orange); }
.st__msg { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.45; color: #C2364B; }
.st__msg:empty { display: none; }
.st__acct.is-t .st__msg { color: #FF9AAA; }
.st__msg.is-info { color: #1E8A55; } .st__acct.is-t .st__msg.is-info { color: #7BE0A8; }
.st__go { margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 10px; height: 54px; border: 0; border-radius: 16px; background: var(--s-ink); color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; transition: transform .25s var(--ease), background-color .3s, opacity .2s; }
.st__acct.is-t .st__go { background: var(--orange); }
.st__go:hover { transform: translateY(-2px); }
.st__go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.st__go:hover svg { transform: translateX(4px); }
.st__go:disabled { opacity: .6; pointer-events: none; }
.st__go.is-ok { background: #1E8A55 !important; }
.st__forgot { align-self: center; margin-top: 2px; border: 0; background: none; padding: 2px 4px; color: var(--s-mute); font: inherit; font-size: 13.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.st__forgot[hidden] { display: none; }
.st__acct.is-t .st__forgot { color: var(--t-mute); }
.st__forgot:disabled { opacity: .6; pointer-events: none; }
.st__sw { margin-top: 16px; font-size: 14px; color: var(--s-mute); text-align: center; }
.st__acct.is-t .st__sw { color: var(--t-mute); }
.st__sw button { border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.st__acct.is-t .st__sw button { color: #fff; }
@media (max-width: 760px), (hover: none) {
  .st__acct { position: fixed; padding-top: 90px; background: var(--s-bg); overflow-y: auto; }
  .st__acct.is-t { background: var(--t-bg); }
  .st__card { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .st__card, .st__card > *, .st__back { transition: none !important; } }

/* the teacher side: "Coming soon" where you clicked (start.js TEACHERS_SOON) */
.st-soon { position: fixed; z-index: 2000; width: 280px; padding: 14px 18px; border-radius: 18px; background: #E5484D; color: #fff; box-shadow: 0 20px 40px -18px rgba(229, 72, 77, .7); pointer-events: none; animation: st-soon-in .45s cubic-bezier(.34, 1.56, .64, 1) both; transition: opacity .35s, transform .35s; }
.st-soon b { display: block; font-size: 18px; font-weight: 900; }
.st-soon span { font-size: 14px; opacity: .9; }
.st-soon.is-out { opacity: 0; transform: translateY(-8px); }
@keyframes st-soon-in { from { opacity: 0; transform: scale(.7) translateY(10px); } }
.st__side.is-nope { animation: st-nope .4s ease; }
@keyframes st-nope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .st-soon, .st__side.is-nope { animation: none; } }
