/* StudyNova — premium marketing site */

:root {
  --purple: #6B4FBB;
  --purple-dark: #4E2FA5;
  --purple-deep: #2A1768;
  --lav: #9B7FD4;
  --lav-soft: #C9B8EE;
  --lav-tint: #EDE6FB;
  --green: #2FA980;
  --coral: #F0714E;
  --yellow: #ECA62F;
  --bg: #ffffff;
  --bg-tint: #F7F3FF;
  --ink: #1c1330;
  --ink-soft: #574a73;
  --muted: #8d83a8;
  --line: rgba(78, 47, 165, 0.10);
  --shadow-sm: 0 4px 16px rgba(60, 30, 110, 0.07);
  --shadow-md: 0 16px 40px rgba(60, 30, 110, 0.12);
  --shadow-lg: 0 30px 70px rgba(50, 25, 100, 0.20);
  --maxw: 1180px;
  --display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.08;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display);
  font-weight: 700; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--purple-dark);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--display);
  font-weight: 700; font-size: 15px;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer; border: none;
  transition: transform 0.16s ease, box-shadow 0.22s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--lav) 0%, var(--purple) 60%, var(--purple-dark) 100%);
  color: #fff;
  box-shadow: 0 12px 26px rgba(107, 79, 187, 0.36);
}
.btn-primary:hover { box-shadow: 0 16px 34px rgba(107, 79, 187, 0.48); transform: translateY(-2px); }
.btn-ghost {
  background: #fff; color: var(--purple-dark);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--lav); transform: translateY(-2px); }
.btn-light {
  background: rgba(255,255,255,0.16); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-light:hover { background: rgba(255,255,255,0.26); }
.btn-white { background: #fff; color: var(--purple-dark); box-shadow: var(--shadow-md); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.scrolled {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(60,30,110,0.06);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--lav), var(--purple));
  display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(107,79,187,0.34);
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink-soft);
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--purple-dark); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-login { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); }
.nav-login:hover { color: var(--purple); }
.nav-toggle { display: none; }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 150px 0 90px;
  background:
    radial-gradient(900px 520px at 78% 12%, rgba(155,127,212,0.18), transparent 60%),
    radial-gradient(700px 500px at 8% 80%, rgba(107,79,187,0.10), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-tint) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 56px; align-items: center;
}
.hero h1 { font-size: 58px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--purple) 10%, var(--lav) 60%, var(--coral) 120%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 19px; color: var(--ink-soft); font-weight: 500;
  margin-top: 22px; max-width: 480px;
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 14px; margin-top: 32px; }
.avatars { display: flex; }
.avatars .av {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid #fff; margin-left: -10px;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px;
  font-family: var(--display);
  box-shadow: 0 2px 6px rgba(60,30,110,0.15);
}
.avatars .av:first-child { margin-left: 0; }
.hero-trust .trust-text { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.hero-trust .trust-text b { color: var(--ink); font-weight: 800; }
.stars { color: var(--yellow); font-size: 14px; letter-spacing: 1px; }

/* Hero visual */
.hero-visual { position: relative; }
.video-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(160deg, #fff, #f3eeff);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.7);
  aspect-ratio: 16 / 11;
}
.video-frame video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  mix-blend-mode: multiply;
}
.video-frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 70px rgba(155,127,212,0.18);
  border-radius: 28px;
}
.float-card {
  position: absolute;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.8);
  display: flex; align-items: center; gap: 11px;
  animation: floaty 5s ease-in-out infinite;
}
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-9px);} }
.float-card .fc-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.float-card .fc-label { font-size: 11px; color: var(--muted); font-weight: 700; }
.float-card .fc-value { font-size: 16px; color: var(--ink); font-weight: 800; font-family: var(--display); letter-spacing: -0.01em; }
.fc-1 { top: 8%; left: -34px; animation-delay: 0s; }
.fc-2 { bottom: 12%; right: -30px; animation-delay: 1.6s; }
.fc-3 { bottom: -22px; left: 16%; animation-delay: 0.8s; }

/* ── Stat strip ── */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 38px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -0.03em; color: var(--purple-dark); }
.stat .lbl { font-size: 14px; color: var(--ink-soft); font-weight: 600; margin-top: 4px; }

/* ── Section heading ── */
.section { padding: 104px 0; }
.section-tint { background: var(--bg-tint); }
.sec-head { max-width: 660px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.sec-head h2 { font-size: 42px; margin-top: 16px; }
.sec-head p { font-size: 18px; color: var(--ink-soft); margin-top: 16px; font-weight: 500; text-wrap: pretty; }

/* ── Feature grid ── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.feat {
  background: #fff; border-radius: 22px; padding: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.feat:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.feat .ic {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 18px rgba(60,30,110,0.18);
}
.feat h3 { font-size: 20px; margin-top: 20px; }
.feat p { font-size: 15px; color: var(--ink-soft); margin-top: 10px; font-weight: 500; }
.feat .tag { display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 800; color: var(--purple); font-family: var(--display); }

/* ── Spotlight (alternating) ── */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.spotlight.rev .sp-visual { order: -1; }
.sp-copy h2 { font-size: 38px; margin-top: 16px; }
.sp-copy > p { font-size: 18px; color: var(--ink-soft); margin-top: 16px; font-weight: 500; }
.sp-list { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.sp-item { display: flex; gap: 14px; align-items: flex-start; }
.sp-item .check { width: 26px; height: 26px; border-radius: 8px; background: var(--lav-tint); color: var(--purple); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.sp-item .t { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); }
.sp-item .d { font-size: 14.5px; color: var(--ink-soft); font-weight: 500; margin-top: 2px; }

/* ── Chat mock ── */
.mock {
  background: #fff; border-radius: 26px; padding: 22px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  position: relative;
}
.mock-head { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mock-head .ava { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--lav), var(--purple)); display: grid; place-items: center; }
.mock-head .nm { font-family: var(--display); font-weight: 800; font-size: 15px; }
.mock-head .st { font-size: 12px; color: var(--green); font-weight: 700; display: flex; align-items: center; gap: 5px; }
.mock-head .st .d { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.chat { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.bub { max-width: 84%; padding: 11px 14px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.bub.ai { align-self: flex-start; background: var(--bg-tint); color: var(--ink); border-radius: 16px 16px 16px 5px; }
.bub.me { align-self: flex-end; background: linear-gradient(135deg, var(--lav), var(--purple)); color: #fff; border-radius: 16px 16px 5px 16px; }
.bub.tag-warn { border: 1.5px dashed var(--coral); background: rgba(240,113,78,0.07); color: var(--coral); font-weight: 700; align-self: flex-start; border-radius: 14px; }

/* ── Topics ── */
.subject-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.subject-tab {
  font-family: var(--display); font-weight: 700; font-size: 14.5px;
  padding: 10px 20px; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--ink-soft);
  border: 1.5px solid var(--line);
  transition: all 0.18s ease;
}
.subject-tab:hover { border-color: var(--lav); color: var(--purple-dark); }
.subject-tab.active {
  background: linear-gradient(135deg, var(--lav), var(--purple));
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 18px rgba(107,79,187,0.32);
}
.topics-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 28px; }
.topic-chip {
  border-radius: 18px; padding: 20px 16px; color: #fff;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  min-height: 124px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.topic-chip:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.topic-chip .glyph {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.22);
  display: grid; place-items: center;
  font-family: Georgia, serif; font-size: 22px; font-weight: 700;
}
.topic-chip .tname { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.topic-chip .tles { font-size: 12px; opacity: 0.85; font-weight: 700; margin-top: 2px; }
.topic-chip .blob { position: absolute; top: -16px; right: -16px; width: 70px; height: 70px; border-radius: 50%; background: rgba(255,255,255,0.12); }

/* ── Leaderboard mock ── */
.lb-mock { background: #fff; border-radius: 24px; padding: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; }
.lb-row + .lb-row { margin-top: 6px; }
.lb-row.me { background: linear-gradient(135deg, var(--lav), var(--purple)); color: #fff; box-shadow: 0 8px 18px rgba(107,79,187,0.28); }
.lb-rank { width: 24px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--muted); }
.lb-row.me .lb-rank { color: #fff; }
.lb-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--display); font-size: 14px; flex-shrink: 0; }
.lb-nm { font-family: var(--display); font-weight: 700; font-size: 14.5px; flex: 1; }
.lb-xp { font-family: var(--display); font-weight: 800; font-size: 14px; }
.lb-duel { font-family: var(--display); font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(135deg, #ff9b7d, var(--coral)); padding: 6px 11px; border-radius: 999px; }

/* ── For Schools ── */
.schools {
  background:
    radial-gradient(700px 400px at 85% 10%, rgba(155,127,212,0.28), transparent 60%),
    linear-gradient(150deg, #3a2299 0%, var(--purple-deep) 100%);
  color: #fff;
}
.schools .sec-head h2 { color: #fff; }
.schools .sec-head p { color: rgba(255,255,255,0.78); }
.schools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.school-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.school-feat { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); border-radius: 18px; padding: 20px; }
.school-feat .ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,0.16); display: grid; place-items: center; }
.school-feat h4 { font-size: 16px; margin-top: 14px; color: #fff; }
.school-feat p { font-size: 13.5px; color: rgba(255,255,255,0.72); margin-top: 6px; font-weight: 500; }
.invite-card { background: rgba(255,255,255,0.1); border: 1.5px dashed rgba(255,255,255,0.4); border-radius: 22px; padding: 26px; text-align: center; }
.invite-card .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.7); font-weight: 800; font-family: var(--display); }
.invite-card .code { font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: 0.16em; margin-top: 8px; }

/* ── Pricing ── */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; align-items: stretch; }
.price {
  background: #fff; border-radius: 24px; padding: 30px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.price.feat-plan { border: 2px solid var(--purple); box-shadow: var(--shadow-md); position: relative; }
.price .badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--purple); color: #fff; font-family: var(--display); font-weight: 800; font-size: 12px; padding: 5px 14px; border-radius: 999px; }
.price .pname { font-family: var(--display); font-weight: 800; font-size: 19px; }
.plan-tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.plan-tag .tag-dot { width: 8px; height: 8px; border-radius: 50%; }
.price .pdesc { font-size: 14px; color: var(--ink-soft); margin-top: 6px; font-weight: 500; min-height: 40px; }
.price .pcost { margin-top: 18px; }
.price .pcost .amt { font-family: var(--display); font-weight: 800; font-size: 42px; letter-spacing: -0.03em; color: var(--ink); }
.price .pcost .per { font-size: 15px; color: var(--muted); font-weight: 600; }
.price ul { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.price li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); font-weight: 600; }
.price li .ck { width: 20px; height: 20px; border-radius: 6px; background: var(--lav-tint); color: var(--purple); display: grid; place-items: center; flex-shrink: 0; }

/* ── Testimonials ── */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 52px; }
.quote { background: #fff; border-radius: 22px; padding: 26px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.quote .stars { font-size: 15px; }
.quote p { font-size: 15.5px; color: var(--ink); margin-top: 14px; font-weight: 600; line-height: 1.5; }
.quote .who { display: flex; align-items: center; gap: 11px; margin-top: 20px; }
.quote .who .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--display); }
.quote .who .nm { font-family: var(--display); font-weight: 800; font-size: 14.5px; }
.quote .who .role { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ── Final CTA ── */
.cta-final {
  border-radius: 32px;
  background:
    radial-gradient(600px 300px at 80% 0%, rgba(244,123,90,0.30), transparent 60%),
    linear-gradient(135deg, var(--lav) 0%, var(--purple) 55%, var(--purple-dark) 100%);
  padding: 70px 56px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-final h2 { font-size: 46px; color: #fff; }
.cta-final p { font-size: 19px; color: rgba(255,255,255,0.85); margin-top: 16px; font-weight: 500; }
.cta-final .hero-actions { justify-content: center; }

/* ── Footer ── */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 14px; }
.footer .fdesc { font-size: 14.5px; color: var(--ink-soft); font-weight: 500; max-width: 280px; }
.footer h5 { font-family: var(--display); font-weight: 800; font-size: 14px; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { font-size: 14.5px; color: var(--ink-soft); font-weight: 600; }
.footer ul a:hover { color: var(--purple); }
.footer-bottom { max-width: var(--maxw); margin: 40px auto 0; padding: 24px 28px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* ── Reveal animation ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-card { animation: none; }
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .hero-grid, .spotlight, .schools-grid { grid-template-columns: 1fr; gap: 44px; }
  .spotlight.rev .sp-visual { order: 0; }
  .hero h1 { font-size: 46px; }
  .features, .price-grid, .quotes { grid-template-columns: 1fr 1fr; }
  .topics-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .float-card { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  /* Phones: hide the section links + the WIDE "Get started" button (it was the
     right-edge overflow culprit), but KEEP the Log in link — existing users need
     a way in; the hero only carries sign-UP CTAs. */
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .nav-login {
    padding: 8px 14px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: #fff;
  }
  .hero { padding: 120px 0 70px; }
  .hero h1 { font-size: 38px; }
  .hero-sub { font-size: 17px; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(2) { border-right: none; }
  .section { padding: 70px 0; }
  .sec-head h2, .cta-final h2 { font-size: 32px; }
  .features, .price-grid, .quotes, .topics-grid, .school-feats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-final { padding: 48px 26px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
