/* ==========================================================
   DESIGN TOKENS — "Signal Gate"
   Tema: gerbang sinyal yang harus dilewati sebelum link terbuka.
   ========================================================== */
:root {
  --bg: #0B0F14;
  --surface: #131A24;
  --surface-2: #1B2430;
  --border: #263140;
  --text: #E6EDF3;
  --muted: #7C8B9B;
  --amber: #FFB454;   /* sinyal aktif / CTA utama */
  --blue: #5B8DEF;    /* aksen sekunder / link */
  --green: #4ADE80;   /* status aman / berhasil */
  --red: #F87171;     /* error */
  --radius: 14px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 20% -10%, rgba(255,180,84,0.08), transparent),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgba(91,141,239,0.10), transparent);
}
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -0.02em; }
code, .mono, .slug { font-family: var(--font-mono); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 460px; }

/* ---------- Nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.nav-links { display: flex; gap: 10px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, opacity .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--amber); color: #1A1206; }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--blue); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* ---------- Cards / Surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.surface-2 { background: var(--surface-2); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); padding: 12px 14px; border-radius: 10px; font-size: 0.95rem;
  font-family: var(--font-body);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 14px; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 540px; margin: 0 auto 28px; }
.hero .accent { color: var(--amber); }

/* Slug preview terminal on landing page */
.slug-preview {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 20px; margin: 0 auto 40px;
  font-family: var(--font-mono); color: var(--muted); font-size: 0.9rem;
}
.slug-preview .live { color: var(--green); }
.slug-preview .cursor { color: var(--amber); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Feature grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0; }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } }
.feature { padding: 20px; }
.feature .icon { font-size: 1.4rem; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 1.02rem; }
.feature p { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
td.mono { color: var(--blue); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; }
.badge-green { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-amber { background: rgba(255,180,84,0.15); color: var(--amber); }
.badge-red { background: rgba(248,113,113,0.15); color: var(--red); }

/* ---------- Stat cards ---------- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { padding: 18px; }
.stat .num { font-family: var(--font-mono); font-size: 1.8rem; color: var(--amber); }
.stat .label { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }

/* ---------- Gate (halaman iklan multi-step) ---------- */
.gate-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 40px 16px; }
.gate-chain { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.gate-node {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted);
  background: var(--surface); transition: all .3s ease;
}
.gate-node.active { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 14px rgba(255,180,84,0.5); }
.gate-node.done { border-color: var(--green); color: var(--green); background: rgba(74,222,128,0.1); }
.gate-line { width: 40px; height: 2px; background: var(--border); }
.gate-line.done { background: var(--green); }

.ad-slot {
  width: 100%; max-width: 680px; min-height: 250px;
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px);
  border: 1px dashed var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.85rem; margin-bottom: 28px;
}

.gate-card { max-width: 480px; width: 100%; text-align: center; }
.gate-timer { font-family: var(--font-mono); font-size: 2.4rem; color: var(--amber); margin: 6px 0 18px; }
.gate-title { font-size: 1.2rem; margin-bottom: 6px; }
.gate-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }

.footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 40px 20px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }

.helper-error { color: var(--red); font-size: 0.85rem; margin-top: 8px; display: none; }
.helper-ok { color: var(--green); font-size: 0.85rem; margin-top: 8px; display: none; }

.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
