/* =====================================================
   AI Primary Education Platform — Design Tokens
   Signature: "Learning Trail" — a winding dotted path
   (game-board level map) used across onboarding &
   how-it-works sections; soft gradient blob backdrops
   behind subject/character tiles.
   ===================================================== */

:root {
  /* Color */
  --lime: #C6F135;
  --lime-dark: #9FCB1F;
  --sunshine: #FFC93C;
  --coral: #FF6B6B;
  --grass: #3FC98B;
  --grape: #8C6FF7;
  --ink: #223354;
  --ink-soft: #5B6B8C;
  --paper: #FBFBFE;
  --paper-alt: #F1F6FF;
  --white: #FFFFFF;
  --line: #E7ECF7;

  /* Radius */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-soft: 0 10px 30px rgba(34, 51, 84, 0.08);
  --shadow-pop: 0 16px 40px rgba(198, 241, 53, 0.35);

  /* Type */
  --font-display: 'Baloo 2', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

a { text-decoration: none; }

/* ---------- Buttons ---------- */
.btn-brand {
  background: linear-gradient(135deg, var(--lime) 0%, var(--lime-dark) 100%);
  color: var(--ink);
  border: none;
  border-radius: var(--r-pill);
  padding: 0.75rem 1.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  box-shadow: var(--shadow-pop);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-brand:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(198,241,53,0.45); color: var(--ink); }

.btn-brand-outline {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--lime-dark);
  border-radius: var(--r-pill);
  padding: 0.7rem 1.7rem;
  font-weight: 700;
  font-family: var(--font-display);
  transition: all 0.15s ease;
}
.btn-brand-outline:hover { background: var(--lime); color: var(--ink); }

.btn-sunshine {
  background: linear-gradient(135deg, var(--sunshine) 0%, #FFB300 100%);
  color: var(--ink);
  border: none;
  border-radius: var(--r-pill);
  padding: 0.75rem 1.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  box-shadow: 0 14px 30px rgba(255,201,60,0.35);
}
.btn-sunshine:hover { transform: translateY(-2px); color: var(--ink); }

/* ---------- Navbar ---------- */
.navbar-brand-custom {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink) !important;
}
.navbar-brand-custom .dot { color: var(--coral); }

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 6rem;
  background: radial-gradient(circle at 15% 20%, #EAF6FF 0%, transparent 45%),
              radial-gradient(circle at 90% 10%, #FFF6E0 0%, transparent 40%),
              var(--paper);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(2px);
  z-index: 0;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.4rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
}
.hero-title { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; }
.hero-sub { color: var(--ink-soft); font-size: 1.15rem; max-width: 520px; }

.hero-art-card {
  background: linear-gradient(160deg, #C6F135 0%, #8C6FF7 100%);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  position: relative;
  overflow: hidden;
}

/* ---------- Cards ---------- */
.card-soft {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card-soft:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(34,51,84,0.12); }

.subject-tile {
  border-radius: var(--r-lg);
  padding: 1.75rem 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease;
}
.subject-tile:hover { transform: translateY(-5px) scale(1.01); color: #fff; }
.subject-tile .icon-badge {
  width: 52px; height: 52px; border-radius: 16px;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1rem;
}

/* ---------- Learning Trail (signature element) ---------- */
.trail {
  position: relative;
  padding-top: 2rem;
}
.trail::before {
  content: '';
  position: absolute;
  top: 60px; left: 8%; right: 8%;
  height: 6px;
  background-image: radial-gradient(circle, var(--line) 3px, transparent 3.5px);
  background-size: 22px 6px;
  background-repeat: repeat-x;
  z-index: 0;
}
.trail-step {
  position: relative;
  z-index: 1;
  text-align: center;
}
.trail-step .trail-node {
  width: 76px; height: 76px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 800; color: #fff;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-pop);
  border: 5px solid #fff;
  font-family: var(--font-display);
}

/* ---------- Character picker ---------- */
.character-card {
  border-radius: var(--r-lg);
  background: #fff;
  border: 3px solid transparent;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-soft);
}
.character-card:hover, .character-card.selected {
  border-color: var(--lime);
  transform: translateY(-4px);
}
.character-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: #fff;
}

/* ---------- Progress ---------- */
.progress-ring-label { font-family: var(--font-display); font-weight: 800; }
.progress-thin { height: 10px; border-radius: var(--r-pill); background: var(--paper-alt); overflow: hidden; }
.progress-thin .bar { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--grass), #24B37A); }

/* ---------- Dashboard shell ---------- */
.dash-sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  min-height: 100vh;
}
.dash-sidebar .nav-link {
  color: var(--ink-soft);
  font-weight: 600;
  border-radius: var(--r-sm);
  padding: 0.65rem 1rem;
  margin-bottom: 0.25rem;
}
.dash-sidebar .nav-link.active, .dash-sidebar .nav-link:hover {
  background: var(--paper-alt);
  color: var(--lime-dark);
}
.dash-topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.stat-card {
  border-radius: var(--r-md);
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.stat-card .stat-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff; margin-bottom: 0.85rem;
}

.badge-soft {
  border-radius: var(--r-pill);
  padding: 0.3rem 0.8rem;
  font-weight: 600;
  font-size: 0.78rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ink-soft);
}

footer.site-footer {
  background: var(--ink);
  color: #C9D3EA;
}
footer.site-footer a { color: #E9EEFB; }
footer.site-footer a:hover { color: var(--sunshine); }

@media (max-width: 767px) {
  .trail::before { display: none; }
}
