/* =========================================================================
   style.css — Roadmap Informatika Kelas VIII
   Token warna & tipografi dipakai bersama di semua halaman.
   ========================================================================= */

:root {
  --blue-900: #0b1b3f;
  --blue-800: #102a63;
  --blue-700: #17389a;
  --blue-600: #2050d6;
  --blue-500: #2f6bf0;
  --sky-400: #57c7ff;
  --sky-300: #8fdcff;

  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.16);
  --progress-amber: #fbbf24;
  --progress-bg: rgba(251, 191, 36, 0.16);
  --locked: #7d8aad;
  --locked-bg: rgba(125, 138, 173, 0.14);

  --bg: #eef3ff;
  --bg-2: #dfe9ff;
  --surface: rgba(255, 255, 255, 0.6);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --border: rgba(255, 255, 255, 0.55);
  --text: #0b1b3f;
  --text-soft: #4a5578;
  --shadow: 0 20px 45px -20px rgba(11, 27, 63, 0.35);
}

html.dark {
  --bg: #060b18;
  --bg-2: #0b1530;
  --surface: rgba(20, 30, 58, 0.55);
  --surface-strong: rgba(20, 30, 58, 0.78);
  --border: rgba(120, 150, 220, 0.18);
  --text: #eaf0ff;
  --text-soft: #a3b0d6;
  --shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--blue-700) 0%, transparent 55%),
    radial-gradient(900px 500px at 110% 10%, var(--sky-400) 0%, transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}

::selection { background: var(--sky-400); color: #06122a; }

/* ---------- Glassmorphism ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}

.glass-strong {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow);
}

/* ---------- Gradient text / buttons ---------- */
.text-gradient {
  background: linear-gradient(100deg, var(--sky-300), var(--blue-500) 60%, var(--blue-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-gradient {
  background: linear-gradient(100deg, var(--blue-600), var(--sky-400));
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(32, 80, 214, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-gradient:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 34px -8px rgba(32, 80, 214, 0.7); }
.btn-gradient:active { transform: translateY(0); }

/* ---------- Cards ---------- */
.node-card {
  transition: transform 0.35s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.35s ease, border-color 0.3s ease;
}
.node-card:hover { transform: translateY(-6px) scale(1.015); }

/* ---------- Tab pills (dipakai di semua halaman bab) ---------- */
.tab-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  white-space: nowrap; font-size: .78rem; font-weight: 600;
  padding: .55rem 1rem; border-radius: 999px;
  color: var(--text-soft); border: 1px solid var(--border);
  background: var(--surface); transition: all .25s ease; cursor: pointer;
}
.tab-pill:hover { transform: translateY(-1px); }
.tab-pill.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(100deg, var(--blue-600), var(--sky-400));
  box-shadow: 0 10px 24px -10px rgba(32,80,214,.6);
}
.tab-pill .done-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--success);
  box-shadow: 0 0 0 2px rgba(34,197,94,.25);
}

/* ---------- Section panel (tab content) ---------- */
.section-panel { display: none; }
.section-panel.active { display: block; }

.meeting-row {
  transition: transform 0.2s ease, background 0.2s ease;
}
.meeting-row:hover { transform: translateX(4px); }

/* ---------- Badges ---------- */
.badge { font-size: 0.72rem; font-weight: 600; letter-spacing: .02em; }
.badge-locked { color: var(--locked); background: var(--locked-bg); }
.badge-progress { color: #92660a; background: var(--progress-bg); }
html.dark .badge-progress { color: var(--progress-amber); }
.badge-done { color: #15803d; background: var(--success-bg); }
html.dark .badge-done { color: var(--success); }
.badge-available { color: var(--blue-600); background: rgba(47, 107, 240, 0.14); }
html.dark .badge-available { color: var(--sky-300); background: rgba(87, 199, 255, 0.14); }

/* ---------- Progress bar ---------- */
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(125, 138, 173, 0.22);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-600), var(--sky-400));
  width: 0%;
  transition: width 0.8s cubic-bezier(.2,.9,.3,1);
}

/* ---------- Roadmap path (signature element) ---------- */
.road-svg path.road-base { stroke: rgba(125, 138, 173, 0.35); }
.road-svg path.road-fill {
  stroke: url(#roadGradient);
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  transition: stroke-dashoffset 1.4s cubic-bezier(.2,.9,.2,1);
}

.node-dot {
  transition: transform 0.3s ease;
}
.node-card:hover .node-dot { transform: scale(1.12); }

#roadmap-track { position: relative; }
.roadmap-line-base,
.roadmap-line-fill {
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  display: none;
}
.roadmap-line-base { height: 100%; background: rgba(125, 138, 173, 0.28); }
.roadmap-line-fill {
  background: linear-gradient(180deg, var(--blue-600), var(--sky-400));
  transition: height 1s cubic-bezier(.2,.9,.2,1);
}
@media (min-width: 768px) {
  .roadmap-line-base, .roadmap-line-fill { display: block; }
}

/* ---------- Utility ---------- */
.scrollbar-thin::-webkit-scrollbar { height: 8px; width: 8px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(125,138,173,.4); border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

:focus-visible {
  outline: 2px solid var(--sky-400);
  outline-offset: 2px;
  border-radius: 6px;
}
