:root {
  --bg: #f6f7fb;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --blue: #2563eb;
  --card: #ffffff;
  --border: #e2e8f0;
  --dark: #0b1220;
  --dark2: #121a2b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: rgba(15, 23, 42, .06);
  padding: 1px 6px;
  border-radius: 6px;
}
.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

/* NAV — hitam solid */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #000;
  border-bottom: 1px solid #000;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.brand-logo {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}
.brand-logo.sm { height: 28px; max-width: 140px; border-radius: 4px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
}
.nav-links > a:not(.btn) {
  color: rgba(255, 255, 255, .78);
  font-weight: 600;
  font-size: .92rem;
}
.nav-links > a:not(.btn):hover { color: #fff; }
.nav .btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
}
.nav .btn.ghost:hover {
  background: rgba(255, 255, 255, .08);
  border-color: #fff;
}
.nav .btn.primary {
  box-shadow: none;
}
.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, .35);
  background: #000;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: .92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .15s ease;
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary), #fb923c);
  color: #fff;
  box-shadow: 0 8px 22px rgba(249, 115, 22, .28);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.btn.outline {
  background: transparent;
  border-color: #cbd5e1;
  color: var(--text);
}
.btn.outline.light {
  border-color: rgba(255,255,255,.35);
  color: #fff;
}
.btn.lg { padding: 13px 20px; font-size: .98rem; }

/* HERO */
.hero {
  padding: 48px 0 36px;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(249,115,22,.18), transparent 55%),
    radial-gradient(700px 360px at 90% 0%, rgba(37,99,235,.12), transparent 50%),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .95fr;
  gap: 36px;
  align-items: center;
}
.pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 700;
  font-size: .8rem;
  border: 1px solid #fed7aa;
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 540px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.hero-points li::before {
  content: "✓ ";
  color: #16a34a;
  font-weight: 800;
}

.mock-card {
  background: var(--dark);
  color: #e2e8f0;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  border: 1px solid #243049;
}
.mock-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #334155;
}
.dot:nth-child(1) { background: #ef4444; }
.dot:nth-child(2) { background: #f59e0b; }
.dot:nth-child(3) { background: #22c55e; }
.mock-title {
  margin-left: auto;
  font-size: .78rem;
  color: #94a3b8;
  font-weight: 600;
}
.mock-code {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #0a101c;
  color: #cbd5e1;
  font-size: .78rem;
  line-height: 1.55;
  overflow: auto;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.mock-result {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(34, 197, 94, .1);
  border: 1px solid rgba(34, 197, 94, .25);
}
.ok-badge {
  color: #4ade80;
  font-weight: 800;
  font-size: .78rem;
  margin-bottom: 4px;
}
.mock-result p { margin: 0; color: #cbd5e1; font-size: .9rem; }

/* STATS */
.stats {
  padding: 8px 0 28px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stats-grid > div {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.stats-grid strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 2px;
}
.stats-grid span { color: var(--muted); font-size: .88rem; }

/* SECTIONS */
.section { padding: 56px 0; }
.section.alt { background: #fff; border-block: 1px solid var(--border); }
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 32px;
}
.section-head.left { text-align: left; margin-left: 0; }
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -.02em;
}
.section-head p { margin: 0; color: var(--muted); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.section.alt .feature { background: #f8fafc; }
.feature .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: #fff7ed;
  margin-bottom: 12px;
  font-size: 1.15rem;
}
.feature h3 { margin: 0 0 8px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #fb923c);
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  margin-bottom: 10px;
}
.steps strong { display: block; margin-bottom: 6px; }
.steps span { color: var(--muted); font-size: .9rem; }

.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.api-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.api-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.method {
  font-size: .72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
  min-width: 48px;
  text-align: center;
}
.method.get { background: #2563eb; }
.method.post { background: #16a34a; }
.code-panel {
  background: var(--dark);
  color: #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #243049;
}
.code-head {
  padding: 12px 16px;
  background: #121a2b;
  color: #94a3b8;
  font-size: .85rem;
  font-weight: 600;
  border-bottom: 1px solid #243049;
}
.code-panel pre {
  margin: 0;
  padding: 16px;
  font-size: .82rem;
  line-height: 1.55;
  overflow: auto;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* CTA */
.cta {
  padding: 56px 0;
  background:
    radial-gradient(700px 300px at 20% 0%, rgba(249,115,22,.35), transparent 55%),
    linear-gradient(145deg, #0b1220, #1a2744);
  color: #fff;
}
.cta-inner { text-align: center; }
.cta h2 { margin: 0 0 10px; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.cta p { margin: 0 0 20px; color: #cbd5e1; }
.cta .hero-cta { justify-content: center; }

/* FOOTER */
.footer {
  background: #0b1220;
  color: #94a3b8;
  padding: 36px 0 24px;
}
.footer-inner {
  display: grid;
  gap: 16px;
}
.footer-brand p { margin: 8px 0 0; font-size: .9rem; max-width: 320px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-links a { color: #cbd5e1; font-weight: 600; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.copy { margin: 8px 0 0; font-size: .82rem; color: #64748b; }

@media (max-width: 920px) {
  .hero-grid, .api-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .nav-inner { position: relative; min-height: 64px; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 10px;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--dark, #0b1220);
    border-bottom: 1px solid var(--border, #1e293b);
    padding: 14px 18px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    z-index: 50;
    box-shadow: 0 16px 36px rgba(0,0,0,.35);
  }
  .nav-links.open { display: flex; }
  .nav-links > a:not(.btn) {
    padding: 12px 8px;
    font-size: .96rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav-links .btn { width: 100%; min-height: 44px; font-size: .95rem; }
  .section { padding: 40px 0; }
  .cta { padding: 40px 0; }
  .code-panel pre { font-size: .76rem; }
}
@media (max-width: 560px) {
  .container { width: min(1120px, calc(100% - 24px)); }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero { padding: 24px 0 28px; }
  .hero h1 { font-size: 1.6rem; line-height: 1.25; }
  .lead { font-size: .95rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; min-height: 46px; }
  .brand-logo { height: 40px; max-width: 160px; }
  .mock-card { padding: 12px; border-radius: 14px; }
  .mock-code { font-size: .72rem; }
  .feature, .steps li { padding: 16px; }
  .footer { padding: 28px 0 20px; }
  .footer-links { gap: 10px 14px; }
  .cta .hero-cta { flex-direction: column; align-items: stretch; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 1.4rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .btn.lg { padding: 11px 16px; font-size: .92rem; }
}

@supports (padding: env(safe-area-inset-top)) {
  .nav { padding-top: env(safe-area-inset-top); }
}

/* =========================================================
   SCROLL REVEAL (Cascading & Staggered Animations on Scroll)
   ========================================================= */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll.reveal-left {
  transform: translateX(-28px);
}
.reveal-on-scroll.reveal-left.is-revealed {
  transform: translateX(0);
}

.reveal-on-scroll.reveal-right {
  transform: translateX(28px);
}
.reveal-on-scroll.reveal-right.is-revealed {
  transform: translateX(0);
}

/* Stagger delays for cascading elements */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }
.stagger-6 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

