/* ===========================================================
   Kids Life Up (KLU) — shared design system
   Brand colours sampled from kidslifeup.com.au
=========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bubblegum+Sans&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --klu-teal: #29b9c4;
  --klu-teal-dark: #1c8f98;
  --klu-teal-light: #e6f8fa;
  --klu-yellow: #f2e71b;
  --klu-yellow-dark: #d9cf00;
  --klu-pink: #f75fcd;
  --klu-pink-dark: #e13cb3;
  --klu-blue: #1e9fd6;
  --klu-ink: #333338;
  --klu-ink-soft: #6b6b72;
  --klu-cream: #fffdf3;
  --klu-white: #ffffff;
  --klu-border: #ecebe2;

  --font-display: 'Bubblegum Sans', 'Nunito', cursive;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-card: 0 10px 30px rgba(41, 185, 196, 0.12);
  --shadow-pop: 0 14px 34px rgba(0, 0, 0, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--klu-ink);
  background: var(--klu-cream);
  scroll-behavior: smooth;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { line-height: 1.6; color: var(--klu-ink-soft); margin: 0 0 1em; }
a { color: var(--klu-teal-dark); text-decoration: none; }
ul { padding-left: 1.2em; }

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

/* ---------- Nav ---------- */
.klu-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--klu-teal);
  color: white;
}
.klu-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.klu-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: white;
}
.klu-nav .brand .logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--klu-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  color: var(--klu-teal-dark);
  font-size: 0.9rem;
  line-height: 1;
  text-align: center;
}
.klu-nav .links {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.klu-nav .links a {
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  opacity: 0.9;
}
.klu-nav .links a:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.klu-nav .links a.active { background: white; color: var(--klu-teal-dark); opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--klu-pink); color: white; box-shadow: 0 10px 22px rgba(247,95,205,0.35); }
.btn-primary:hover { box-shadow: 0 14px 28px rgba(247,95,205,0.45); }
.btn-teal { background: var(--klu-teal); color: white; box-shadow: 0 10px 22px rgba(41,185,196,0.3); }
.btn-outline { background: transparent; color: var(--klu-teal-dark); border: 2px solid var(--klu-teal); }
.btn-yellow { background: var(--klu-yellow); color: var(--klu-ink); box-shadow: 0 10px 22px rgba(242,231,27,0.4); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-ghost { background: rgba(255,255,255,0.15); color: white; }
.btn-danger { background: #fdeaea; color: #c0392b; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 40px;
  background: linear-gradient(180deg, var(--klu-teal-light) 0%, var(--klu-cream) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.blob-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.9;
}

.eyebrow {
  display: inline-block;
  background: var(--klu-pink);
  color: white;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Cards ---------- */
.card {
  background: white;
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--klu-border);
}
.card-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--klu-teal-light);
  color: var(--klu-teal-dark);
  margin: 2px 4px 2px 0;
}
.pill-pink { background: #fdeaf7; color: var(--klu-pink-dark); }
.pill-yellow { background: #fdfbdd; color: #8a8100; }

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--klu-border);
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--klu-teal), var(--klu-pink));
  border-radius: 999px;
}

/* ---------- Section helpers ---------- */
.section { padding: 64px 0; }
.section-alt { background: white; }
.section-teal { background: var(--klu-teal); color: white; }
.section-teal h2, .section-teal p { color: white; }
.section-title { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-title h2 { margin-bottom: 10px; }

.badge-num {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--klu-yellow);
  color: var(--klu-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---------- Persona tabs on landing ---------- */
.persona-tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 34px; flex-wrap: wrap; }
.persona-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--klu-border);
  background: white;
  font-weight: 800;
  cursor: pointer;
  color: var(--klu-ink-soft);
}
.persona-tab.active { border-color: var(--klu-teal); background: var(--klu-teal-light); color: var(--klu-teal-dark); }
.persona-panel { display: none; }
.persona-panel.active { display: block; }

/* ---------- Pricing ---------- */
.price-card {
  background: linear-gradient(160deg, var(--klu-teal) 0%, var(--klu-teal-dark) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-pop);
}
.price-card .amount { font-family: var(--font-display); font-size: 3.2rem; }
.price-card .amount span { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; }
.value-strike { text-decoration: line-through; opacity: 0.7; }

/* ---------- Footer ---------- */
.klu-footer {
  background: #21343a;
  color: #cbd6d8;
  padding: 40px 0;
  font-size: 0.9rem;
}
.klu-footer a { color: #cbd6d8; }
.klu-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Portal shell (educator/director/family) ---------- */
.portal-header {
  background: var(--klu-white);
  border-bottom: 1px solid var(--klu-border);
  padding: 26px 0;
}
.portal-header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.portal-tag { font-weight: 800; color: var(--klu-teal-dark); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.05em; }

.stat-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 24px 0 40px; }
.stat-card { background: white; border-radius: var(--radius-md); padding: 20px; border: 1px solid var(--klu-border); text-align: center; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 2.1rem; color: var(--klu-teal-dark); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--klu-ink-soft); font-weight: 700; }

.video-thumb {
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--klu-teal), var(--klu-blue));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  cursor: pointer;
  color: white;
  margin-bottom: 14px;
}
.video-thumb .play-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: white; color: var(--klu-teal-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}
.video-thumb .duration { position: absolute; bottom: 10px; right: 12px; background: rgba(0,0,0,0.45); padding: 2px 8px; border-radius: 6px; font-size: 0.76rem; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,30,32,0.55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: white; border-radius: var(--radius-lg); padding: 32px;
  max-width: 560px; width: 100%; max-height: 86vh; overflow-y: auto;
  box-shadow: var(--shadow-pop); position: relative;
}
.modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--klu-ink-soft); }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--klu-teal-dark); color: white; padding: 24px 16px; }
.admin-sidebar .brand { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 24px; padding: 0 8px; }
.admin-sidebar button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: rgba(255,255,255,0.85); padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font-weight: 700; font-size: 0.9rem; margin-bottom: 2px;
}
.admin-sidebar button:hover { background: rgba(255,255,255,0.12); }
.admin-sidebar button.active { background: white; color: var(--klu-teal-dark); }
.admin-main { padding: 32px 40px; background: var(--klu-cream); }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }

table.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
table.admin-table th, table.admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--klu-border); font-size: 0.9rem; }
table.admin-table th { background: var(--klu-teal-light); color: var(--klu-teal-dark); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
table.admin-table tr:last-child td { border-bottom: none; }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 800; font-size: 0.84rem; margin-bottom: 6px; color: var(--klu-ink); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--klu-border);
  font-family: var(--font-body); font-size: 0.92rem;
}
.form-field textarea { min-height: 90px; resize: vertical; }
.form-field .hint { font-size: 0.78rem; color: var(--klu-ink-soft); margin-top: 4px; }

.file-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.file-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: 10px; background: var(--klu-teal-light); font-size: 0.86rem;
}
.file-chip a { font-weight: 700; }
.file-remove {
  border: none; background: transparent; color: var(--klu-ink-soft); cursor: pointer;
  font-size: 0.9rem; line-height: 1; padding: 2px 4px;
}
.file-remove:hover { color: var(--klu-pink-dark); }

/* ---------- Quiz editor (Content Studio) ---------- */
.quiz-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 10px; }
.quiz-item {
  border: 1.5px solid var(--klu-border); border-radius: 12px; padding: 12px 14px; background: var(--klu-cream);
}
.quiz-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.quiz-q-input { font-weight: 700; margin-bottom: 8px; }
.quiz-option-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.quiz-option-row input[type="text"] { flex: 1; margin: 0; }
.quiz-option-row input[type="radio"] { flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--klu-teal); }

/* ---------- Quiz-taking (Educator Portal) ---------- */
.quiz-block { margin-top: 20px; padding-top: 16px; border-top: 1.5px dashed var(--klu-border); }
.quiz-question { margin-bottom: 14px; }
.quiz-option {
  display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.92rem; cursor: pointer;
}
.quiz-option input { accent-color: var(--klu-teal); width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Print (lesson download) ---------- */
#print-area { display: none; }
@media print {
  body.printing-lesson > *:not(#print-area) { display: none !important; }
  body.printing-lesson #print-area {
    display: block !important; padding: 20px; font-family: var(--font-body); color: #000;
  }
  body.printing-lesson #print-area h1 { font-family: var(--font-body); font-size: 1.6rem; }
}

.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--klu-ink); color: white;
  padding: 12px 20px; border-radius: 12px; font-weight: 700; z-index: 200; opacity: 0;
  transform: translateY(10px); transition: all 0.25s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 780px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; gap: 4px; padding: 12px; }
  .admin-sidebar .brand { display: none; }
  .admin-main { padding: 20px; }
}
