/* ===== Design tokens ===== */
:root {
  --blue: #3b5bdb;
  --blue-dark: #2b46c4;
  --navy: #0f1b35;
  --surface: #f8faff;
  --surface-2: #eef2ff;
  --border: #e2e8f0;
  --text: #0f1b35;
  --muted: #64748b;
  --white: #ffffff;
  --green: #16a34a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 27, 53, 0.06), 0 8px 24px rgba(15, 27, 53, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 27, 53, 0.12);
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 14px;
}
.brand-mark.sm { width: 30px; height: 30px; font-size: 12px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--muted); transition: all .15s ease;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--blue); background: var(--surface-2); }
.nav-login {
  margin-left: 8px; color: var(--blue); border: 1px solid var(--blue);
}
.nav-login:hover { background: var(--blue); color: #fff; }
.menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer;
}
.menu-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ===== Pages ===== */
.page { display: none; min-height: 60vh; padding-bottom: 60px; }
.page.active { display: block; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  padding: 80px 24px 70px;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.hero-content { text-align: left; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface-2); color: var(--blue); font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: clamp(32px, 4.6vw, 50px); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 18px;
}
.grad {
  background: linear-gradient(90deg, var(--blue), #6366f1);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-content p { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; }
.hero-actions.center { justify-content: center; }
.stats { display: flex; gap: 40px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 30px; font-weight: 800; color: var(--navy); }
.stat span { font-size: 13px; color: var(--muted); }

/* ===== Hero visual: Placement Journey card ===== */
.hero-visual { display: flex; justify-content: center; }
.journey-card {
  width: 100%; max-width: 420px; background: linear-gradient(160deg, var(--blue), #4f5ee0);
  border-radius: 20px; padding: 30px; color: #fff; box-shadow: var(--shadow-lg);
}
.journey-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 20px; }
.journey-item { margin-bottom: 16px; }
.journey-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 8px; }
.journey-row strong { font-weight: 700; }
.progress-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.28); overflow: hidden; }
.progress-fill { height: 100%; background: #fff; border-radius: 999px; }
.journey-stats {
  display: flex; justify-content: space-between; gap: 8px; margin-top: 24px;
  background: rgba(255,255,255,0.14); border-radius: 12px; padding: 16px 10px;
}
.jstat { text-align: center; flex: 1; }
.jstat strong { display: block; font-size: 17px; font-weight: 800; }
.jstat span { font-size: 11px; opacity: 0.85; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
  font-family: inherit;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface); }
.btn-ghost { background: rgba(255,255,255,.6); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #fff; }
.btn.wfull { width: 100%; }

/* ===== Section titles / banners ===== */
.section-title {
  font-size: 24px; font-weight: 700; margin: 44px 0 20px; letter-spacing: -0.01em;
}
.section-title.center { text-align: center; font-size: 30px; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--muted); font-size: 16px; max-width: 640px; margin: 0 auto 28px; }
.page-head { margin-top: 48px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); font-size: 17px; margin-top: 8px; }
.mvp-banner {
  margin-top: 24px; padding: 14px 18px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid #c7d2fe;
  color: #3730a3; font-size: 14px;
}

/* ===== Grid / cards ===== */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid.grid-5 { grid-template-columns: repeat(5, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: all .2s ease;
}
.module-card { cursor: pointer; }
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 16px;
}
.card-icon.blue { background: #dbeafe; }
.card-icon.indigo { background: #e0e7ff; }
.card-icon.teal { background: #ccfbf1; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.card-link { display: inline-block; margin-top: 12px; color: var(--blue); font-weight: 600; font-size: 14px; }

.cat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 24px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white); transition: all .2s ease; text-align: left;
}
.cat span {
  font-size: 22px; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 10px; background: var(--surface-2); margin-bottom: 6px;
}
.cat strong { font-size: 15px; font-weight: 700; color: var(--text); }
.cat em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--blue); }
.cat:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow); }

/* ===== Topic list ===== */
.topic-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; margin-top: 8px;
}
.topic-list li {
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; font-size: 15px;
}
.topic-list li::before { content: "✓ "; color: var(--blue); font-weight: 700; }

.module-summary { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.module-summary p { color: var(--muted); }

/* ===== CTA ===== */
.cta {
  margin-top: 56px; padding: 56px 24px; text-align: center;
  background: linear-gradient(135deg, var(--blue), #6366f1); border-radius: 20px; color: #fff;
}
.cta h2 { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.cta p { color: #e0e4ff; margin-bottom: 28px; }
.btn-cta-primary { background: #fff; color: var(--blue); }
.btn-cta-primary:hover { background: #eef2ff; transform: translateY(-1px); }
.btn-cta-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-cta-outline:hover { background: rgba(255,255,255,0.12); }

/* ===== Auth ===== */
.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 48px 24px; background: var(--surface); }
.auth-card {
  width: 100%; max-width: 420px; background: var(--white);
  border: 1px solid var(--border); border-radius: 20px; padding: 36px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.login-wrap { background: #fff; }
.auth-icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--blue);
  display: grid; place-items: center; margin: 0 auto 18px;
}
.label-row { display: flex; align-items: center; justify-content: space-between; }
.forgot-link { color: var(--blue); font-weight: 600; font-size: 13px; }
.forgot-link:hover { text-decoration: underline; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; z-index: 1; }
.auth-card h1 { font-size: 26px; font-weight: 800; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; text-align: left; }
.auth-form label { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.auth-form input {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: inherit; transition: border .15s;
}
.auth-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,91,219,.15); }
.auth-form .input-icon input { padding-left: 42px; }
.auth-result {
  margin-top: 16px; padding: 16px; border-radius: 12px; font-size: 14px; text-align: left;
}
.auth-result.success { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }

/* ===== Footer ===== */
.footer { background: var(--navy); color: #cbd5e1; padding: 48px 0 24px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 32px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer .brand { font-size: 16px; color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: #94a3b8; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: #94a3b8; margin-bottom: 10px; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-copy { text-align: center; font-size: 13px; color: #64748b; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 100;
  transition: opacity .25s ease, transform .25s ease;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .grid, .grid.grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.grid-5 { grid-template-columns: repeat(3, 1fr); }
  .topic-list { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-content { text-align: center; }
  .hero-content p { margin: 0 auto 28px; }
  .hero-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 12px; gap: 4px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .25s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-login { margin-left: 0; text-align: center; }
  .menu-toggle { display: flex; }
  .grid, .grid.grid-4, .grid.grid-5 { grid-template-columns: 1fr; }
  .stats { gap: 24px; }
  .hero { padding: 56px 20px 44px; }
  .footer-grid { grid-template-columns: 1fr; }
}
