/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #0f172a;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== UTILS ===== */
.gradient-text {
  background: linear-gradient(135deg, #0d9488, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.badge {
  display: inline-block;
  background: #ccfbf1;
  color: #0f766e;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all .25s ease;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #0d9488, #059669);
  color: #fff;
  box-shadow: 0 8px 20px rgba(13,148,136,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(13,148,136,.4); }
.btn-outline {
  background: transparent;
  border: 2px solid #0d9488;
  color: #0d9488;
}
.btn-outline:hover { background: #f0fdfa; }
.btn-white {
  background: #fff;
  color: #0d9488;
  font-weight: 700;
}
.btn-white:hover { background: #f0fdfa; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: all .3s;
}
.navbar.scrolled {
  border-bottom-color: #e2e8f0;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  color: #0f172a;
}
.logo-icon { font-size: 24px; }
.logo-text .dot { color: #10b981; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-weight: 500;
  font-size: 15px;
  color: #475569;
  transition: color .2s;
}
.nav-links a:hover { color: #0d9488; }
.nav-links .btn { color: #fff !important; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 24px; height: 2px; background: #0f172a; border-radius: 2px;
  transition: .3s;
}

/* ===== HERO ===== */
.hero {
  padding: 130px 0 80px;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.lead {
  font-size: 17px;
  color: #475569;
  margin-bottom: 30px;
  max-width: 540px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-metrics {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.metric strong { display: block; font-size: 22px; color: #0d9488; font-weight: 800; }
.metric span { font-size: 13px; color: #64748b; }

/* HERO CARD */
.hero-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(13,148,136,.15);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.card-header {
  padding: 14px 20px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.dots span:nth-child(1) { background: #f87171; }
.dots span:nth-child(2) { background: #fbbf24; }
.dots span:nth-child(3) { background: #34d399; }
.card-title { font-size: 13px; font-weight: 600; color: #64748b; }
.card-body { padding: 22px; }
.card-body h3 { font-size: 18px; margin-bottom: 8px; }
.card-body p { font-size: 14px; color: #64748b; margin-bottom: 18px; }
.progress {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar { height: 100%; background: linear-gradient(90deg, #0d9488, #10b981); border-radius: 999px; }
.card-meta { display: flex; justify-content: space-between; font-size: 12px; color: #64748b; }
.card-footer {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.avatars { display: flex; }
.avatars span {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #ccfbf1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-left: -8px;
  border: 2px solid #fff;
}
.avatars span:first-child { margin-left: 0; }
.avatars span:last-child { background: #0d9488; color: #fff; font-size: 10px; font-weight: 700; }
.live { font-size: 12px; color: #dc2626; font-weight: 600; }

/* ===== SECTION ===== */
.section { padding: 90px 0; }
.section-alt { background: #f8fafc; }
.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 55px;
}
.section-head h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.section-head p { color: #64748b; font-size: 16px; }

/* ===== GRIDS ===== */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* BENEFIT CARD */
.benefit-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 24px;
  transition: all .3s;
}
.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,.06);
  border-color: #99f6e4;
}
.icon-circle {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ccfbf1, #d1fae5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.benefit-card h3 { font-size: 17px; margin-bottom: 8px; }
.benefit-card p { font-size: 14px; color: #64748b; }

/* TRACK CARD */
.track-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 26px 22px;
  transition: all .3s;
  display: flex;
  flex-direction: column;
}
.track-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,.06);
}
.track-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
}
.track-card h3 { font-size: 16px; margin-bottom: 14px; }
.track-card ul { margin-bottom: 18px; flex-grow: 1; }
.track-card ul li {
  font-size: 13.5px;
  color: #475569;
  padding: 5px 0 5px 20px;
  position: relative;
}
.track-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 700;
}
.track-meta { font-size: 12px; color: #0d9488; font-weight: 700; }

/* ===== QUIZ ===== */
.quiz-container { max-width: 720px; margin: 0 auto; }
.quiz-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,.06);
}
.quiz-progress {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  margin-bottom: 26px;
  overflow: hidden;
}
#quizProgressBar {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #10b981);
  width: 0%;
  transition: width .4s;
  border-radius: 999px;
}
.quiz-q-num { font-size: 12px; color: #0d9488; font-weight: 700; margin-bottom: 6px; letter-spacing: 1px; }
.quiz-q { font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: #334155;
  transition: all .2s;
}
.quiz-option:hover {
  border-color: #0d9488;
  background: #f0fdfa;
}
.quiz-result {
  text-align: center;
  padding: 12px 0;
}
.quiz-result .icon { font-size: 52px; margin-bottom: 12px; }
.quiz-result h3 { font-size: 22px; margin-bottom: 8px; color: #0d9488; }
.quiz-result p { color: #64748b; margin-bottom: 20px; }

/* ===== TESTIMONI ===== */
.testimoni {
  background: #fff;
  border-radius: 16px;
  padding: 26px 24px;
  border: 1px solid #e2e8f0;
}
.testimoni p { font-size: 14.5px; color: #334155; font-style: italic; margin-bottom: 18px; }
.author { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #ccfbf1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.author strong { display: block; font-size: 14px; }
.author small { color: #64748b; font-size: 12px; }

.community-stats {
  margin-top: 55px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.community-stats strong { display: block; font-size: 28px; color: #0d9488; font-weight: 800; }
.community-stats span { font-size: 13px; color: #64748b; }

/* ===== FAQ ===== */
.faq-container { max-width: 780px; margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  padding: 18px 22px;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q span { font-size: 22px; color: #0d9488; transition: transform .3s; }
.faq-item.open .faq-q span { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-a p { padding: 0 22px 18px; color: #64748b; font-size: 14.5px; }
.faq-a a { color: #0d9488; font-weight: 600; }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, #0f766e, #059669);
  color: #fff;
  padding: 70px 0;
}
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-inner h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 10px; }
.cta-inner p { opacity: .9; margin-bottom: 20px; }
.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-form input {
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-family: inherit;
  width: 280px;
  outline: none;
}
#subscribeMsg { display: block; margin-top: 10px; font-size: 14px; }

/* ===== FOOTER ===== */
.footer { background: #0f172a; color: #cbd5e1; padding: 60px 0 20px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer-desc { font-size: 14px; color: #94a3b8; max-width: 320px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer ul li { font-size: 14px; padding: 6px 0; color: #94a3b8; }
.footer ul li a:hover { color: #10b981; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 22px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

/* ===== FLOATING CTA ===== */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;// ===== NAVBAR SCROLL =====
const navbar = document.getElementById('navbar');
window.addEventListener('scroll', () => {
  navbar.classList.toggle('scrolled', window.scrollY > 20);
});

// ===== HAMBURGER MENU =====
const hamburger = document.getElementById('hamburger');
const navLinks = document.getElementById('navLinks');
hamburger.addEventListener('click', () => {
  navLinks.classList.toggle('open');
});
navLinks.querySelectorAll('a').forEach(link => {
  link.addEventListener('click', () => navLinks.classList.remove('open'));
});

// ===== FAQ ACCORDION =====
document.querySelectorAll('.faq-q').forEach(btn => {
  btn.addEventListener('click', () => {
    const item = btn.parentElement;
    const answer = item.querySelector('.faq-a');
    const isOpen = item.classList.contains('open');

    document.querySelectorAll('.faq-item').forEach(i => {
      i.classList.remove('open');
      i.querySelector('.faq-a').style.maxHeight = null;
    });

    if (!isOpen) {
      item.classList.add('open');
      answer.style.maxHeight = answer.scrollHeight + 'px';
    }
  });
});

// ===== QUIZ =====
const quizData = [
  {
    question: "Apa tujuan utama Anda belajar saat ini?",
    options: [
      { text: "Meningkatkan keterampilan digital & teknologi", value: "digital" },
      { text: "Mengembangkan diri & kepemimpinan", value: "leadership" },
      { text: "Menjadi pendidik yang lebih baik", value: "teacher" },
      { text: "Mengelola keuangan & wirausaha", value: "finance" }
    ]
  },
  {
    question: "Berapa waktu yang bisa Anda luangkan per hari?",
    options: [
      { text: "Kurang dari 15 menit", value: "short" },
      { text: "15–30 menit", value: "medium" },
      { text: "Lebih dari 30 menit", value: "long" }
    ]
  },
  {
    question: "Bagaimana gaya belajar favorit Anda?",
    options: [
      { text: "Video & visual", value: "visual" },
      { text: "Membaca teks & artikel", value: "reading" },
      { text: "Praktik langsung & proyek", value: "practice" }
    ]
  }
];

const recommendations = {
  digital: {
    icon: "📱",
    title: "Literasi Digital & AI",
    desc: "Jalur yang tepat untuk Anda! Mulai dari modul 'Pengenalan AI untuk Pemula' — 12 menit, praktis, dan langsung bisa diterapkan."
  },
  leadership: {
    icon: "🎯",
    title: "Kepemimpinan Diri",
    desc: "Cocok untuk Anda! Mulai dari modul 'Manajemen Waktu Efektif' — dirancang untuk profesional sibuk."
  },
  teacher: {
    icon: "👨‍🏫",
    title: "Inovasi Pengajaran Guru",
    desc: "Pilihan tepat untuk pendidik! Mulai dari 'Blended Learning untuk Kelas Modern'."
  },
  finance: {
    icon: "💰",
    title: "Kemandirian Finansial",
    desc: "Sesuai kebutuhan Anda! Mulai dari 'Perencanaan Keuangan Dasar' — mudah & aplikatif."
  }
};

let quizStep = 0;
let quizAnswers = [];
const quizContent = document.getElementById('quizContent');
const quizProgressBar = document.getElementById('quizProgressBar');

function renderQuiz() {
  if (quizStep < quizData.length) {
    quizProgressBar.style.width = ((quizStep) / quizData.length * 100) + '%';
    const q = quizData[quizStep];
    quizContent.innerHTML = `
      <div class="quiz-q-num">PERTANYAAN ${quizStep + 1} DARI ${quizData.length}</div>
      <div class="quiz-q">${q.question}</div>
      <div class="quiz-options">
        ${q.options.map((opt, i) =>
          `<button class="quiz-option" data-value="${opt.value}" data-index="${i}">${opt.text}</button>`
        ).join('')}
      </div>
    `;
    quizContent.querySelectorAll('.quiz-option').forEach(btn => {
      btn.addEventListener('click', () => {
        quizAnswers.push(btn.dataset.value);
        quizStep++;
        renderQuiz();
      });
    });
  } else {
    quizProgressBar.style.width = '100%';
    const rec = recommendations[quizAnswers[0]] || recommendations.digital;
    quizContent.innerHTML = `
      <div class="quiz-result">
        <div class="icon">${rec.icon}</div>
        <h3>Rekomendasi: ${rec.title}</h3>
        <p>${rec.desc}</p>
        <a href="http://belajarsepanjanghayat.id" target="_blank" rel="noopener" class="btn btn-primary">🚀 Mulai Modul Ini</a>
        <button class="quiz-option" style="margin-top:16px;" onclick="restartQuiz()">🔄 Ulangi Kuis</button>
      </div>
    `;
  }
}

function restartQuiz() {
  quizStep = 0;
  quizAnswers = [];
  renderQuiz();
}

renderQuiz();

// ===== SUBSCRIBE FORM =====
const subscribeForm = document.getElementById('subscribeForm');
const subscribeMsg = document.getElementById('subscribeMsg');
subscribeForm.addEventListener('submit', (e) => {
  e.preventDefault();
  const email = subscribeForm.querySelector('input').value;
  subscribeMsg.textContent = `✅ Terima kasih! Email ${email} berhasil terdaftar.`;
  subscribeMsg.style.color = '#d1fae5';
  subscribeForm.reset();
  setTimeout(() => { subscribeMsg.textContent = ''; }, 5000);
});

// ===== SMOOTH ANCHOR SCROLL OFFSET =====
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
  anchor.addEventListener('click', function (e) {
    const target = document.querySelector(this.getAttribute('href'));
    if (target) {
      e.preventDefault();
      const offset = 70;
      const top = target.getBoundingClientRect().top + window.pageYOffset - offset;
      window.scrollTo({ top, behavior: 'smooth' });
    }
  });
});
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(13,148,136,.5);
  z-index: 999;
  transition: transform .3s;
  animation: pulse 2.5s infinite;
}
.floating-cta:hover { transform: scale(1.1); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(13,148,136,.5); }
  50% { box-shadow: 0 10px 40px rgba(13,148,136,.8); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 480px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .community-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    gap: 18px;
    transform: translateY(-150%);
    transition: transform .3s;
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
    align-items: flex-start;
  }
  .nav-links.open { transform: translateY(0); }
  .hamburger { display: flex; }
  .hero { padding: 110px 0 60px; }
  .section { padding: 65px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .subscribe-form input { width: 100%; }
  .subscribe-form { width: 100%; }
  .subscribe-form button { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-metrics { gap: 22px; }
}