/* =========================================================
   Public pages (landing, login, sign-up)
   Loaded AFTER student.css, so it shares the same colour
   tokens, buttons and light/dark themes.
   ========================================================= */

:root {
    --grad-brand: linear-gradient(135deg, #2F5BEA 0%, #4F7BFF 45%, #22B8F0 100%);
    --grad-warm: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
    --hero-blob-1: rgba(47, 91, 234, .20);
    --hero-blob-2: rgba(34, 184, 240, .18);
    --hero-blob-3: rgba(249, 115, 22, .12);
    --grid-line: rgba(47, 91, 234, .07);
    --phone-frame: #0F172A;
    --container: 1180px;
}
[data-theme="dark"] {
    --grad-brand: linear-gradient(135deg, #5B7FFF 0%, #6A8BFF 45%, #38BDF8 100%);
    --hero-blob-1: rgba(106, 139, 255, .16);
    --hero-blob-2: rgba(56, 189, 248, .10);
    --hero-blob-3: rgba(251, 146, 60, .08);
    --grid-line: rgba(148, 163, 184, .06);
    --phone-frame: #020617;
}

html { scroll-behavior: smooth; }
body.site { background: var(--canvas); overflow-x: clip; }
#teacher { overflow-x: clip; }
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
.grad-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-text.shine { background-size: 200% auto; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }

/* ---------------- Scroll progress ---------------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad-brand); }

/* ---------------- Intro (first visit per session) ---------------- */
.intro {
    position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
    background: var(--canvas); transition: clip-path .9s cubic-bezier(.77, 0, .18, 1), opacity .6s ease;
    clip-path: circle(150% at 50% 50%);
}
.intro.out { clip-path: circle(0% at 50% 50%); pointer-events: none; }
.intro-stage { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
.intro-stage img { width: 112px; height: 112px; border-radius: 50%; position: relative; z-index: 2; opacity: 0; transform: scale(.6); animation: popIn .7s .25s cubic-bezier(.34, 1.56, .64, 1) forwards; background: #fff; box-shadow: 0 10px 40px -10px rgba(47, 91, 234, .45); }
.intro-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.intro-stage .orbit { fill: none; stroke: var(--primary); stroke-width: 1.4; stroke-dasharray: 600; stroke-dashoffset: 600; opacity: .55; animation: draw 1.1s cubic-bezier(.65, 0, .35, 1) forwards; }
.intro-stage .orbit.o2 { animation-delay: .12s; stroke: #22B8F0; }
.intro-stage .orbit.o3 { animation-delay: .24s; stroke: var(--accent); }
.intro-stage .e { fill: var(--primary); opacity: 0; animation: fadeIn .3s .9s forwards; }
.intro-stage .e2 { fill: #22B8F0; }
.intro-stage .e3 { fill: var(--accent); }
.intro-word { position: absolute; bottom: -54px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-weight: 800; font-size: 20px; letter-spacing: .02em; opacity: 0; animation: riseIn .6s .7s cubic-bezier(.22, .61, .36, 1) forwards; }
.intro-word span { color: var(--muted); font-weight: 600; font-size: 14px; display: block; text-align: center; letter-spacing: .08em; text-transform: uppercase; }
@keyframes popIn { to { opacity: 1; transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.spin-slow { transform-origin: 110px 110px; animation: spin 9s linear infinite; }
.spin-rev { transform-origin: 110px 110px; animation: spin 13s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Header ---------------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 90; transition: background .25s, box-shadow .25s, border-color .25s; border-bottom: 1px solid transparent; }
.site-header.scrolled { background: var(--glass); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom-color: var(--border); }
.site-header .bar { height: 72px; display: flex; align-items: center; gap: 16px; }
.site-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.site-brand img { width: 42px; height: 42px; border-radius: 50%; background: #fff; }
.site-brand strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.site-brand span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.site-nav { display: none; gap: 4px; margin-left: 18px; }
.site-nav a { padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 14.5px; color: var(--text-2); transition: color .15s, background .15s; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-actions .hide-sm { display: none; }
.menu-btn { display: inline-flex; }
@media (min-width: 640px) { .site-actions .hide-sm { display: inline-flex; } }
@media (min-width: 1024px) { .site-nav { display: flex; } .menu-btn { display: none; } }
.mobile-menu { position: fixed; top: 72px; left: 12px; right: 12px; z-index: 89; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 10px; display: flex; flex-direction: column; gap: 2px; transform-origin: top center; transform: translateY(-8px) scale(.98); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a { padding: 13px 14px; border-radius: 12px; font-weight: 600; }
.mobile-menu a:hover { background: var(--surface-2); }
.mobile-menu .btn { margin-top: 6px; }

.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-glow { position: relative; isolation: isolate; }
.btn-glow::after { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; background: var(--grad-brand); filter: blur(14px); opacity: .45; transition: opacity .25s; }
.btn-glow:hover::after { opacity: .7; }
[data-theme="dark"] .btn-glow::after { opacity: .25; }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding: 112px 0 64px; isolation: isolate; }
@media (min-width: 1024px) { .hero { padding: 140px 0 96px; min-height: 100svh; display: flex; align-items: center; } }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.blob.b1 { width: 560px; height: 560px; left: -140px; top: -120px; background: var(--hero-blob-1); animation: float1 18s ease-in-out infinite; }
.blob.b2 { width: 480px; height: 480px; right: -120px; top: 60px; background: var(--hero-blob-2); animation: float2 22s ease-in-out infinite; }
.blob.b3 { width: 380px; height: 380px; left: 38%; bottom: -160px; background: var(--hero-blob-3); animation: float1 26s ease-in-out infinite reverse; }
@keyframes float1 { 50% { transform: translate(60px, 40px) scale(1.08); } }
@keyframes float2 { 50% { transform: translate(-50px, 50px) scale(.94); } }
.grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); }

.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600; color: var(--text-2); }
.eyebrow b { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(21, 128, 61, .5); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); } }
.hero h1 { font-size: clamp(40px, 7.4vw, 76px); line-height: 1.02; letter-spacing: -.035em; font-weight: 850; margin: 22px 0 18px; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .w { display: inline-block; transform: translateY(105%); opacity: 0; }
.hero h1.go .w { transform: none; opacity: 1; transition: transform .9s cubic-bezier(.22, 1, .36, 1), opacity .5s ease; transition-delay: var(--wd, 0ms); }
.hero .lead { font-size: clamp(16.5px, 2vw, 19px); color: var(--text-2); max-width: 560px; margin: 0 0 30px; line-height: 1.65; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--success); width: 18px; height: 18px; }

/* Phone mock + floating cards */
.stage { position: relative; height: 560px; max-width: 520px; margin: 0 auto; width: 100%; perspective: 1400px; }
@media (max-width: 520px) { .stage { height: 500px; } }
.phone { position: absolute; left: 50%; top: 50%; width: 270px; height: 540px; margin: -270px 0 0 -135px; border-radius: 44px; padding: 11px; background: var(--phone-frame); box-shadow: 0 50px 100px -30px rgba(15, 23, 42, .5), 0 0 0 1px rgba(255, 255, 255, .06) inset; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
@media (max-width: 520px) { .phone { width: 240px; height: 480px; margin: -240px 0 0 -120px; border-radius: 40px; } }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 86px; height: 24px; margin-left: -43px; background: var(--phone-frame); border-radius: 20px; z-index: 3; }
.screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: var(--canvas); padding: 50px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 520px) { .screen { border-radius: 30px; padding-top: 46px; } }
.s-top { display: flex; align-items: center; gap: 8px; }
.s-top img { width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.s-top b { font-size: 12.5px; }
.s-top .s-streak { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 11.5px; }
.s-top .s-streak .icon { width: 12px; height: 12px; }
.s-hi { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 0; }
.s-card { background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.s-card .s-label { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.s-card .s-title { font-size: 13px; font-weight: 700; margin: 6px 0 8px; line-height: 1.35; }
.s-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 800; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.s-btn { height: 30px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 5px; }
[data-theme="dark"] .s-btn { color: #0B1220; }
.s-row { display: flex; gap: 10px; }
.s-row .s-card { flex: 1; }
.s-ring { width: 54px; height: 54px; margin: 4px auto 0; position: relative; }
.s-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.s-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.s-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 8px; }
.s-dots i { height: 14px; border-radius: 4px; background: var(--surface-3); }
.s-dots i.on { background: var(--accent); }
.s-list { display: flex; flex-direction: column; gap: 6px; }
.s-item { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; }
.s-item i { width: 24px; height: 24px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.s-item i .icon { width: 12px; height: 12px; }
.s-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-item em { font-style: normal; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 5px; background: var(--primary); color: #fff; }
[data-theme="dark"] .s-item em { color: #0B1220; }

.float { position: absolute; z-index: 4; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; align-items: center; gap: 12px; will-change: transform; }
.float .fi { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.float strong { display: block; font-size: 14px; line-height: 1.2; }
.float small { display: block; font-size: 12px; color: var(--muted); }
.float.f1 { left: -46px; top: 92px; }
.float.f2 { right: -44px; top: 236px; }
.float.f3 { left: -34px; bottom: 60px; }
.float.f1 img { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.bob { animation: bob 6s ease-in-out infinite; }
.bob.d2 { animation-delay: -2s; }
.bob.d3 { animation-delay: -4s; }
@keyframes bob { 50% { translate: 0 -10px; } }
@media (min-width: 521px) and (max-width: 640px) { .float.f1 { left: 0; } .float.f2 { right: 0; } .float.f3 { left: 0; } }
@media (max-width: 520px) {
    .float { padding: 9px 11px; border-radius: 14px; gap: 9px; }
    .float .fi { width: 32px; height: 32px; border-radius: 10px; }
    .float strong { font-size: 12.5px; } .float small { font-size: 11px; }
    .float.f1 img { width: 36px; height: 36px; }
    .float.f1 { left: -4px; top: 34px; } .float.f2 { right: -6px; top: 210px; } .float.f3 { left: -2px; bottom: 30px; }
}
.stage .orb-ring { position: absolute; left: 50%; top: 50%; width: 440px; height: 440px; margin: -220px 0 0 -220px; border-radius: 50%; border: 1px dashed var(--primary-line); opacity: .7; animation: spin 60s linear infinite; }
.stage .orb-ring.r2 { width: 340px; height: 340px; margin: -170px 0 0 -170px; animation-duration: 40s; animation-direction: reverse; border-style: solid; opacity: .35; }
.stage .orb-ring::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.stage .orb-ring.r2::after { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); top: auto; bottom: -5px; }
@media (max-width: 520px) { .stage .orb-ring { width: 360px; height: 360px; margin: -180px 0 0 -180px; } .stage .orb-ring.r2 { width: 290px; height: 290px; margin: -145px 0 0 -145px; } }

/* ---------------- Stats band ---------------- */
.stats-band { position: relative; z-index: 2; margin-top: -24px; }
.stats-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
@media (min-width: 900px) { .stats-card { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-cell { padding: 24px 20px; text-align: center; position: relative; }
.stat-cell + .stat-cell::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--border); }
@media (max-width: 899px) { .stat-cell:nth-child(3)::before { display: none; } .stat-cell:nth-child(n+3) { border-top: 1px solid var(--border); } }
.stat-cell .num-big { font-size: clamp(30px, 4.4vw, 44px); font-weight: 850; letter-spacing: -.03em; line-height: 1; }
.stat-cell p { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* ---------------- Marquee ---------------- */
.marquee { overflow: hidden; padding: 30px 0 10px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.marquee span .icon { color: var(--primary); width: 18px; height: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- Sections ---------------- */
.section { padding: 88px 0; position: relative; }
@media (max-width: 640px) { .section { padding: 64px 0; } }
.sec-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.sec-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.sec-kicker::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad-brand); }
.sec-head h2 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; letter-spacing: -.03em; font-weight: 820; margin: 12px 0 14px; }
.sec-head p { color: var(--text-2); font-size: 17px; margin: 0; }

/* Spotlight cards: a soft light follows the cursor */
.spot { position: relative; overflow: hidden; }
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--primary-soft), transparent 45%); }
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }

/* Grades */
.grades { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grade-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s; transform-style: preserve-3d; }
.grade-card:hover { box-shadow: var(--shadow-lg); }
.grade-card .gnum { width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 850; color: #fff; background: var(--grad-brand); box-shadow: 0 10px 24px -10px rgba(47, 91, 234, .6); }
.grade-card.sec .gnum { background: var(--grad-warm); box-shadow: 0 10px 24px -10px rgba(249, 115, 22, .6); }
.grade-card h3 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.grade-card .ar { color: var(--muted); font-size: 14px; margin-top: 2px; display: block; }
.grade-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 14px; }
.grade-card li { display: flex; gap: 8px; align-items: center; }
.grade-card li .icon { width: 16px; height: 16px; color: var(--success); }
.grade-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 700; font-size: 14.5px; }

/* Bento features */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bento .wide { grid-column: span 2; } .bento .tall { grid-row: span 2; } }
.tile { padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.tile .ti { width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.tile h3 { margin: 6px 0 0; font-size: 19px; letter-spacing: -.01em; }
.tile p { margin: 0; color: var(--text-2); font-size: 15px; }
.tile .demo { margin-top: auto; padding-top: 16px; }
.demo-list { display: flex; flex-direction: column; gap: 8px; }
.demo-list div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; font-weight: 600; }
.demo-list i { width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--primary); flex-shrink: 0; }
.demo-list i .icon { width: 15px; height: 15px; }
.demo-list em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--success); }
.demo-score { display: flex; align-items: center; gap: 16px; }
.demo-score .ring { width: 92px; height: 92px; }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 90px; }
.bar-chart i { flex: 1; border-radius: 8px 8px 4px 4px; background: var(--primary-soft); height: 20%; transition: height 1.2s cubic-bezier(.22, 1, .36, 1); }
.bar-chart i.hi { background: var(--grad-brand); }
.in .bar-chart i { height: var(--h); }
.tile.soon-tile { background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%); }

/* Steps */
.steps { position: relative; display: grid; gap: 22px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.steps-line { display: none; }
@media (min-width: 900px) {
    .steps-line { display: block; position: absolute; top: 36px; left: 16%; right: 16%; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
    .steps-line i { display: block; height: 100%; width: 100%; background: var(--grad-brand); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
}
.step { text-align: center; padding: 0 10px; position: relative; }
.step .sn { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; color: var(--primary); position: relative; z-index: 1; }
.step .sn .icon { width: 28px; height: 28px; }
.step .sn b { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12.5px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px var(--canvas); }
[data-theme="dark"] .step .sn b { color: #0B1220; }
.step h3 { margin: 0 0 8px; font-size: 19px; }
.step p { margin: 0 auto; color: var(--text-2); max-width: 300px; font-size: 15px; }

/* Meet the teacher */
.meet { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .meet { grid-template-columns: .9fr 1.1fr; gap: 64px; } }
.portrait { position: relative; width: min(360px, 82vw); aspect-ratio: 1; margin: 0 auto; }
.portrait .pimg { position: absolute; inset: 12%; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -25px rgba(15, 23, 42, .45), 0 0 0 8px var(--surface); }
.portrait .pimg img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ring1, .portrait .ring2 { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed var(--primary-line); animation: spin 50s linear infinite; }
.portrait .ring2 { inset: 5%; border: 1px solid var(--border); animation-direction: reverse; animation-duration: 70s; }
.portrait .ring1::before, .portrait .ring1::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); top: 50%; left: -7px; margin-top: -7px; }
.portrait .ring1::after { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); left: auto; right: -7px; top: 20%; }
.portrait .badge-logo { position: absolute; right: 4%; bottom: 6%; width: 86px; height: 86px; border-radius: 50%; background: #fff; padding: 6px; box-shadow: var(--shadow-lg); z-index: 2; }
.portrait .badge-years { position: absolute; left: -2%; top: 12%; z-index: 2; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-lg); text-align: center; }
.portrait .badge-years b { display: block; font-size: 26px; font-weight: 850; line-height: 1; letter-spacing: -.02em; }
.portrait .badge-years span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.meet h2 { font-size: clamp(32px, 4.6vw, 48px); letter-spacing: -.03em; line-height: 1.08; margin: 12px 0 16px; }
.meet p { color: var(--text-2); font-size: 17px; margin: 0 0 18px; line-height: 1.7; }
.creds { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 24px; }
.creds span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.creds .icon { width: 17px; height: 17px; color: var(--primary); }
.classes-note { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--primary-soft); margin-bottom: 22px; }
.classes-note .icon { color: var(--primary); width: 22px; height: 22px; margin-top: 2px; }
.classes-note strong { display: block; margin-bottom: 2px; }
.classes-note span { color: var(--text-2); font-size: 15px; }
.btn-wa { background: #16A34A; color: #fff; box-shadow: 0 8px 20px -8px rgba(22, 163, 74, .6); }
.btn-wa:hover { background: #15803D; }

/* Parents (Arabic) */
.parents { border-radius: 32px; padding: 44px 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); position: relative; overflow: hidden; }
@media (min-width: 768px) { .parents { padding: 56px; } }
.parents::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: var(--hero-blob-1); filter: blur(70px); top: -160px; left: -120px; pointer-events: none; }
.parents > * { position: relative; z-index: 1; }
.parents-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 30px; }
@media (min-width: 720px) { .parents-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.p-item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--surface-2); }
.p-item .pi { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.p-item strong { display: block; font-size: 16.5px; margin-bottom: 4px; }
.p-item span { color: var(--text-2); font-size: 14.5px; line-height: 1.7; }
.parents h2 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 10px; line-height: 1.3; }
.parents .lead-ar { color: var(--text-2); font-size: 17px; margin: 0; max-width: 640px; line-height: 1.8; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 22px; display: flex; align-items: center; gap: 14px; font-weight: 650; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { margin-left: auto; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .3s var(--ease), background .2s; }
.faq details[open] .plus { transform: rotate(45deg); background: var(--primary-soft); color: var(--primary); }
.faq .ans { padding: 0 22px 20px; color: var(--text-2); font-size: 15.5px; line-height: 1.7; }

/* Final CTA */
.final { position: relative; overflow: hidden; border-radius: 32px; padding: 64px 24px; text-align: center; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #4F7BFF 0%, #2F5BEA 40%, #1E3A8A 100%); isolation: isolate; }
[data-theme="dark"] .final { background: radial-gradient(120% 140% at 0% 0%, #2C46A8 0%, #1B2B6B 45%, #0F1A3D 100%); border: 1px solid var(--border); }
.final canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.final img { width: 76px; height: 76px; border-radius: 50%; background: #fff; margin: 0 auto 18px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .35); }
.final h2 { font-size: clamp(30px, 5vw, 50px); letter-spacing: -.03em; line-height: 1.08; margin: 0 0 14px; }
.final p { margin: 0 auto 28px; max-width: 520px; color: rgba(255, 255, 255, .85); font-size: 17px; }
.final .btn-white { background: #fff; color: #1E3A8A; }
.final .btn-white:hover { background: #EEF2FF; }
.final .btn-outline { border: 1.5px solid rgba(255, 255, 255, .45); color: #fff; }
.final .btn-outline:hover { background: rgba(255, 255, 255, .1); }

/* Footer */
.site-footer { padding: 56px 0 32px; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.site-footer .links { display: flex; flex-direction: column; gap: 8px; }
.site-footer .links a { color: var(--text-2); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.site-footer .links a:hover { color: var(--primary); }
.site-footer .links .icon { width: 17px; height: 17px; }
.foot-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--muted); font-size: 13.5px; }
.foot-bottom a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.foot-bottom a:hover { color: var(--text); }

/* Floating WhatsApp */
.wa-fab { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 56px; height: 56px; border-radius: 50%; background: #16A34A; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px -8px rgba(22, 163, 74, .6); transform: scale(0); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.wa-fab.show { transform: scale(1); }
.wa-fab .icon { width: 26px; height: 26px; }

/* Tilt (3D hover) */
.tilt { transition: transform .4s cubic-bezier(.22, 1, .36, 1); }

/* ---------------- Auth pages ---------------- */
.auth { min-height: 100svh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.auth-side { display: none; position: relative; overflow: hidden; color: #fff; padding: 48px; isolation: isolate; background: radial-gradient(120% 120% at 0% 0%, #4F7BFF 0%, #2F5BEA 40%, #1E3A8A 100%); }
[data-theme="dark"] .auth-side { background: radial-gradient(120% 120% at 0% 0%, #2C46A8 0%, #1B2B6B 45%, #0B1220 100%); }
@media (min-width: 1000px) { .auth-side { display: flex; flex-direction: column; } }
.auth-side canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.auth-side .site-brand strong { color: #fff; }
.auth-side .site-brand span { color: rgba(255, 255, 255, .7); }
.auth-side .side-body { margin: auto 0; max-width: 460px; }
.auth-side h2 { font-size: 44px; line-height: 1.08; letter-spacing: -.03em; margin: 0 0 16px; }
.auth-side p { color: rgba(255, 255, 255, .82); font-size: 17px; margin: 0 0 28px; }
.auth-side .perks { display: flex; flex-direction: column; gap: 12px; }
.auth-side .perks div { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.auth-side .perks i { width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-side .teacher { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px); margin-top: 36px; }
.auth-side .teacher img { width: 54px; height: 54px; border-radius: 50%; background: #fff; }
.auth-side .teacher small { display: block; color: rgba(255, 255, 255, .7); }
.auth-main { display: flex; flex-direction: column; padding: 20px; min-width: 0; }
@media (min-width: 640px) { .auth-main { padding: 28px 40px; } }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (min-width: 1000px) { .auth-top .site-brand { visibility: hidden; } }
.auth-card { width: 100%; max-width: 460px; margin: auto; padding: 32px 0; }
.auth-card h1 { font-size: 32px; letter-spacing: -.03em; margin: 0 0 6px; }
.auth-card .sub { color: var(--text-2); margin: 0 0 26px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field label small { color: var(--muted); font-weight: 500; }
.input { position: relative; display: flex; align-items: center; }
.input > .icon, .input > span > .icon { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.input input { width: 100%; height: 52px; padding: 0 14px 0 44px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input input::placeholder { color: var(--faint); }
.input input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.input .eye { position: absolute; right: 6px; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.input .eye:hover { background: var(--surface-2); }
.input input.has-eye { padding-right: 50px; }
.field.err input { border-color: var(--danger); }
.field.err input:focus { box-shadow: 0 0 0 4px var(--danger-soft); }
.field .msg { font-size: 13px; color: var(--danger); min-height: 0; display: none; }
.field.err .msg { display: block; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.form-error { display: none; margin-bottom: 16px; }
.form-error.show { display: flex; animation: shake .35s; }
.auth-foot { text-align: center; color: var(--text-2); margin-top: 22px; font-size: 15px; }
.auth-foot a { color: var(--primary); font-weight: 700; }
.link-btn { color: var(--primary); font-weight: 600; font-size: 14px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
[data-theme="dark"] .btn-primary .spinner { border-color: rgba(11, 18, 32, .3); border-top-color: #0B1220; }

/* Sign-up steps */
.stepper { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.stepper .st { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--faint); flex: 1; }
.stepper .st b { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--muted); font-size: 13px; flex-shrink: 0; transition: background .3s, color .3s, transform .3s; }
.stepper .st.active { color: var(--text); }
.stepper .st.active b { background: var(--primary); color: #fff; transform: scale(1.08); box-shadow: 0 0 0 5px var(--primary-soft); }
.stepper .st.done b { background: var(--success); color: #fff; }
[data-theme="dark"] .stepper .st.active b, [data-theme="dark"] .stepper .st.done b { color: #0B1220; }
.stepper .bar { height: 2px; flex: 1; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.stepper .bar i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .5s var(--ease); }
@media (max-width: 480px) { .stepper .st span { display: none; } .stepper .st { flex: 0; } }
.panes { position: relative; }
.pane { display: none; }
.pane.active { display: block; animation: paneIn .45s cubic-bezier(.22, 1, .36, 1); }
.pane.back.active { animation-name: paneInBack; }
@keyframes paneIn { from { opacity: 0; transform: translateX(26px); } }
@keyframes paneInBack { from { opacity: 0; transform: translateX(-26px); } }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 400px) { .two { grid-template-columns: 1fr; } }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); transition: border-color .15s, background .15s, transform .12s; height: 100%; }
.choice .opt:active { transform: scale(.98); }
.choice .opt i { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; font-style: normal; font-weight: 850; transition: background .15s, color .15s; }
.choice .opt strong { display: block; font-size: 15px; }
.choice .opt small { display: block; color: var(--muted); font-size: 12.5px; }
.choice input:checked + .opt { border-color: var(--primary); background: var(--primary-soft); }
.choice input:checked + .opt i { background: var(--primary); color: #fff; }
[data-theme="dark"] .choice input:checked + .opt i { color: #0B1220; }
.choice input:focus-visible + .opt { box-shadow: 0 0 0 4px var(--primary-soft); }
.field.err .choice .opt { border-color: var(--danger-line); }
.strength { display: flex; gap: 4px; margin-top: 4px; }
.strength i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background .25s; }
.strength.s1 i:nth-child(1) { background: var(--danger); }
.strength.s2 i:nth-child(-n+2) { background: var(--warning); }
.strength.s3 i:nth-child(-n+3) { background: var(--success); }
.strength.s4 i { background: var(--success); }
.pane-actions { display: flex; gap: 10px; margin-top: 8px; }
.pane-actions .btn { flex: 1; }
.pane-actions .btn-ghost { flex: 0 0 auto; }

/* Success screen */
.success { text-align: center; }
.success .check { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; animation: popIn .6s cubic-bezier(.34, 1.56, .64, 1) both; transform: scale(.6); opacity: 0; }
.success .check .icon { width: 40px; height: 40px; stroke-width: 2.5; }
.code-card { margin: 22px 0 10px; padding: 22px; border-radius: 20px; background: var(--primary-soft); border: 1.5px dashed var(--primary-line); }
.code-card span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.code-card strong { display: block; font-size: 38px; letter-spacing: .06em; color: var(--primary); font-weight: 850; margin: 6px 0 14px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: .95; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--r)); } }

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
    .blob, .bob, .marquee-track, .orb-ring, .portrait .ring1, .portrait .ring2, .grad-text.shine, .spin-slow, .spin-rev, .eyebrow .pulse { animation: none !important; }
    .hero h1 .w { transform: none; opacity: 1; }
    .intro { display: none; }
    .confetti { display: none; }
}

/* Install-app button in the landing header: icon only on phones */
.header-install .lbl { display: none; }
@media (min-width: 640px) { .header-install .lbl { display: inline; } }
