/* ===================================================================
   CHECKLIST MEMULAI BISNIS DIGITAL
   Dark, minimal, premium-but-friendly. Signature element: the 7-stage
   progress rail inside the hero progress card.
   Palette: near-black bg, indigo-violet accent, soft red for destructive.
=================================================================== */

/* ---------------------------------------------------------------
   1. RESET & TOKENS
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

:root {
  /* Surfaces */
  --bg: #0A0B0F;
  --bg-elevated: #14161C;
  --bg-elevated-2: #1B1E26;
  --border: #262A33;
  --border-soft: #1E212A;

  /* Text */
  --text-primary: #F3F4F7;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  /* Accent (indigo-violet, custom — not a stock Tailwind value) */
  --accent: #7C6FF0;
  --accent-strong: #9285FF;
  --accent-bg: rgba(124, 111, 240, 0.14);
  --accent-border: rgba(124, 111, 240, 0.35);

  /* Destructive (used only for the reset-confirm action) */
  --danger: #F17C7C;
  --danger-bg: rgba(241, 124, 124, 0.12);

  /* Radii & motion */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;

  --shell-width: 760px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

button:focus-visible,
a:focus-visible,
.item__checkbox:focus-visible + .item__box {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent-bg); color: var(--text-primary); }

/* ---------------------------------------------------------------
   2. AMBIENT BACKGROUND — one restrained glow, nothing else
--------------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(124, 111, 240, 0.16), transparent 70%);
  filter: blur(10px);
}

@media (max-width: 640px) {
  .ambient__glow { width: 600px; height: 340px; }
}

/* ---------------------------------------------------------------
   3. SHELL
--------------------------------------------------------------- */
.shell {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 56px 20px 80px;
}

/* ---------------------------------------------------------------
   4. HERO
--------------------------------------------------------------- */
.hero { text-align: center; margin-bottom: 32px; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 22px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.meta-row li {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------------------------------------------------------------
   5. PROGRESS HERO (signature element)
--------------------------------------------------------------- */
.progress-hero {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  margin-bottom: 40px;
}

.progress-hero__top {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 18px;
}

.progress-hero__figure {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.progress-hero__percent {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 44px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  transition: color var(--dur) var(--ease);
}

.progress-hero__count {
  font-size: 13.5px;
  color: var(--text-muted);
}

.progress-hero__actions {
  display: flex;
  gap: 10px;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-elevated-2);
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-track__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 480ms var(--ease);
}

.progress-hero__message {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

/* Stage rail — 7 nodes representing the 7 real, ordered categories */
.stage-rail {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  overflow-x: auto;
  padding-top: 4px;
}

.stage-rail::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.stage-node {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.stage-node.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.stage-node.is-complete {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.06);
}

.stage-node svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------
   6. BUTTONS
--------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover { border-color: #3A3F4B; color: var(--text-primary); }

.btn--accent {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn--accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.btn--danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(241, 124, 124, 0.4);
}

.btn--danger:hover { background: rgba(241, 124, 124, 0.2); }

.btn--lg { padding: 13px 24px; font-size: 14.5px; }

@media (min-width: 560px) {
  .progress-hero__top { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------------------------------------------------------------
   7. CATEGORIES
--------------------------------------------------------------- */
.categories {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.category {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  scroll-margin-top: 24px;
}

.category__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.category__icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated-2);
  border-radius: 12px;
}

.category__head-text { flex: 1; min-width: 0; }

.category__head-text h2 { font-size: 16.5px; margin-bottom: 3px; }
.category__head-text p { font-size: 13px; color: var(--text-muted); }

.category__count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-soft);
  padding: 4px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------------------------------------------------------------
   8. CHECKLIST ITEM
--------------------------------------------------------------- */
.item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.item:hover { background: var(--bg-elevated-2); }

.item__checkbox {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.item__box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--bg-elevated-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 180ms var(--ease);
}

.item__box::after {
  content: '';
  width: 11px;
  height: 8px;
  clip-path: polygon(9% 45%, 34% 70%, 91% 10%, 100% 19%, 36% 90%, 0% 55%);
  background: #fff;
  transform: scale(0);
  transition: transform 180ms var(--ease);
}

.item__checkbox:checked + .item__box {
  background: var(--accent);
  border-color: var(--accent);
}

.item__checkbox:checked + .item__box::after { transform: scale(1); }

.item__checkbox:checked ~ .item__text .item__title {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--border);
}

.item__checkbox:checked ~ .item__text .item__desc { color: var(--border); }

.item.is-just-checked .item__box { transform: scale(1.12); }

.item__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.item__title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--dur) var(--ease);
}

.item__desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  transition: color var(--dur) var(--ease);
}

/* ---------------------------------------------------------------
   9. MOTIVATION CARD
--------------------------------------------------------------- */
.motivation {
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  margin-bottom: 40px;
}

.motivation h2 { font-size: 22px; margin-bottom: 12px; }

.motivation p {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

/* ---------------------------------------------------------------
   10. FOOTER
--------------------------------------------------------------- */
.footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------
   11. MODAL
--------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 6, 9, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.modal-overlay[hidden] { display: none; }
.modal-overlay.is-visible { opacity: 1; }

.modal {
  width: 100%;
  max-width: 380px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.modal-overlay.is-visible .modal { transform: translateY(0) scale(1); opacity: 1; }

.modal h3 { font-size: 16.5px; margin-bottom: 10px; }
.modal p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }

.modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------------------------------------------------------
   12. ACCESSIBILITY: reduced motion
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------
   13. MOBILE REFINEMENTS
--------------------------------------------------------------- */
@media (max-width: 480px) {
  .shell { padding: 40px 16px 64px; }
  .progress-hero { padding: 22px 18px 20px; }
  .progress-hero__percent { font-size: 36px; }
  .progress-hero__actions { flex-direction: column; }
  .progress-hero__actions .btn { width: 100%; }
  .category { padding: 18px; }
  .item { padding: 12px; }
  .motivation { padding: 28px 18px; }
}