/* ── RESET & TOKENS ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:       #6366f1;
  --brand-dark:  #4f46e5;
  --brand-light: #e0e7ff;
  --accent:      #f59e0b;
  --bg:          #0f0f13;
  --bg-card:     #18181f;
  --bg-card2:    #1e1e2a;
  --text:        #f1f1f5;
  --text-muted:  #9898b0;
  --border:      rgba(255,255,255,0.07);
  --radius:      14px;
  --radius-sm:   8px;
  --transition:  0.22s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }

/* ── TYPOGRAPHY ──────────────────────────────── */
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }

.section-title { text-align: center; margin-bottom: 12px; }
.section-sub   { text-align: center; color: var(--text-muted); max-width: 540px; margin: 0 auto 56px; }

.gradient-text {
  background: linear-gradient(90deg, #818cf8, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); border: none;
  white-space: nowrap;
}
.btn-primary  { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost    { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-outline  { border: 1.5px solid var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-white    { background: #fff; color: var(--brand-dark); }
.btn-white:hover { background: #f0f0ff; transform: translateY(-1px); }
.btn-lg { padding: 14px 30px; font-size: 1rem; }

/* ── NAV ─────────────────────────────────────── */
.nav-wrap {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,19,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav-wrap.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}
.nav {
  display: flex; align-items: center; gap: 32px;
  height: 68px;
}
.logo { font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; font-weight: 700; color: #fff; }
.logo span { color: var(--brand); }
.nav-links { display: flex; gap: 28px; margin-right: auto; }
.nav-links a { font-size: 0.9rem; color: var(--text-muted); transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.hamburger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 1.4rem; cursor: pointer; margin-left: auto;
}

/* ── HERO ────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  padding: 80px 24px 100px;
  max-width: 1160px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.78rem; font-weight: 600;
  padding: 5px 14px; border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 { margin-bottom: 20px; }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 480px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats { display: flex; align-items: center; gap: 24px; }
.stat { display: flex; flex-direction: column; }
.stat-num  { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; font-weight: 700; color: #fff; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-div { width: 1px; height: 36px; background: var(--border); }

/* hero visual */
.hero-visual { position: relative; height: 460px; }

.dashboard-mock {
  position: absolute; inset: 40px 0 0 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.dm-top { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.dm-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.dm-name  { font-weight: 600; font-size: 0.9rem; }
.dm-grade { font-size: 0.75rem; color: var(--text-muted); }
.dm-streak { margin-left: auto; font-size: 0.8rem; background: rgba(245,158,11,0.15); color: var(--accent); padding: 4px 10px; border-radius: 999px; }
.dm-subject { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; margin-top: 14px; }
.progress-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width 0.6s ease; }
.dm-score { margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 14px; }
.dm-score strong { color: #fff; }

/* floating cards */
.card-float {
  position: absolute;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: float 4s ease-in-out infinite;
  z-index: 2;
}
.card-float small { display: block; color: var(--text-muted); font-size: 0.72rem; margin-top: 2px; }
.card-icon { font-size: 1.4rem; }

.card-1 { top: 0; right: 10px; animation-delay: 0s; }
.card-2 { top: 50%; left: 0; transform: translateY(-50%); animation-delay: 1.3s; }
.card-3 { bottom: 16px; right: 30px; animation-delay: 0.7s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.card-2 { animation: float2 4s ease-in-out infinite 1.3s; }
@keyframes float2 {
  0%, 100% { transform: translateY(-50%); }
  50%       { transform: translateY(calc(-50% - 8px)); }
}

/* ── GRADES ──────────────────────────────────── */
.grades { background: var(--bg-card); }

.grade-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.grade-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  transition: var(--transition);
  cursor: pointer;
}
.grade-card:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.2);
}
.grade-card--accent { border-color: rgba(99,102,241,0.35); }
.grade-num  { font-family: 'Space Grotesk', sans-serif; font-size: 2.4rem; font-weight: 700; color: var(--brand); line-height: 1; }
.grade-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin: 6px 0 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.grade-topics { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; }

/* ── SUBJECTS ────────────────────────────────── */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.subject-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: attr(data-color color, var(--brand));
  /* JS sets this via inline var */
  background: var(--sub-color, var(--brand));
  border-radius: var(--radius) var(--radius) 0 0;
}
.subject-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.sub-icon { font-size: 2rem; margin-bottom: 12px; }
.subject-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; }
.sub-link { font-size: 0.85rem; font-weight: 600; color: var(--brand); transition: gap var(--transition); }
.sub-link:hover { text-decoration: underline; }

/* ── FEATURES ────────────────────────────────── */
.features { background: var(--bg-card); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.feature-card:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-3px); }
.feature-card--highlight {
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(167,139,250,0.08));
  border-color: rgba(99,102,241,0.4);
}
.feat-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card p { font-size: 0.88rem; color: var(--text-muted); }

/* ── HOW IT WORKS ────────────────────────────── */
.steps {
  display: flex; align-items: flex-start; gap: 0;
  justify-content: center;
}
.step {
  flex: 1; max-width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem; font-weight: 700;
  color: var(--brand); opacity: 0.6;
  margin-bottom: 12px;
}
.step p { font-size: 0.88rem; color: var(--text-muted); margin-top: 8px; }
.step-arrow {
  font-size: 1.8rem; color: var(--text-muted);
  margin: 0 8px; padding-top: 40px;
  flex-shrink: 0;
}

/* ── TESTIMONIALS ────────────────────────────── */
.testimonials { background: var(--bg-card); }
.testi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.testi-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.testi-card p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 20px; font-style: italic; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; flex-shrink: 0;
}
.testi-author strong { display: block; font-size: 0.88rem; }
.testi-author small { font-size: 0.75rem; color: var(--text-muted); }

/* ── CTA ─────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, #4338ca, #6366f1, #8b5cf6);
  padding: 100px 24px;
  text-align: center;
}
.cta-inner h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 16px; }
.cta-inner p  { color: rgba(255,255,255,0.8); max-width: 520px; margin: 0 auto 36px; }

/* ── FOOTER ──────────────────────────────────── */
.footer { background: #0a0a0e; padding-top: 72px; }
.footer-inner {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: 64px; padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.footer-brand p { font-size: 0.88rem; color: var(--text-muted); margin-top: 12px; max-width: 260px; }
.footer-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
.footer-links h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.footer-links ul li + li { margin-top: 10px; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; font-size: 0.8rem; color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text); }

/* ── SUBJECT CARD COLOURS via JS ─────────────── */
/* Set --sub-color on each card via inline style */

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1024px) {
  .grade-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; gap: 48px; min-height: auto; }
  .hero-visual { height: 340px; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; align-items: center; gap: 16px; }
  .step { max-width: 100%; }
  .step-arrow { transform: rotate(90deg); padding-top: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #0f0f13; flex-direction: column; gap: 0;
    border-bottom: 1px solid var(--border); padding: 12px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 24px; }
  .nav-cta { display: none; }
  .hamburger { display: block; }
  .nav { position: relative; }
}

@media (max-width: 580px) {
  .grade-grid { grid-template-columns: repeat(2, 1fr); }
  .subject-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 260px; }
  .card-float { display: none; }
  .hero-stats { gap: 16px; }
  .stat-num { font-size: 1.3rem; }
}
