/* ==========================================================================
   9router.id × AppVerse AI Gateway
   Visual language adapted from 9router.id (Playfair Display + Source Sans 3)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --surface: #f8fafc;
  --surface-bright: #ffffff;
  --surface-container: #e0f2fe;
  --surface-sunken: #f1f5f9;

  --primary: #0284c7;
  --primary-ink: #0369a1;   /* AA-safe sky blue for text on light */
  --primary-deep: #075985;
  --accent: #f97316;
  --accent-soft: #fff1e6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #cbd5e1;
  --border-soft: #e2e8f0;

  --success: #16a34a;
  --success-ink: #166534;
  --success-soft: #dcfce7;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 24px 48px rgba(28, 25, 23, 0.10);

  --shell: 1152px;
  --nav-h: 73px;

  --font-display: "Playfair Display", Georgia, serif;
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  background: var(--surface-bright);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
code, pre { font-family: var(--font-mono); }

:focus-visible {
  outline: 3px solid rgba(2, 132, 199, 0.45);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--primary-deep);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Mesh background ---------- */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(14, 165, 233, 0.22), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(249, 115, 22, 0.18), transparent 24%),
    radial-gradient(circle at 68% 72%, rgba(59, 130, 246, 0.18), transparent 30%),
    radial-gradient(circle at 18% 82%, rgba(6, 182, 212, 0.14), transparent 26%),
    linear-gradient(135deg, #ffffff, #f8fafc 44%, #eef6ff);
}

.mesh-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  mask-image: radial-gradient(circle, #000 0%, transparent 70%);
}

.mesh-bg::after {
  content: "";
  position: absolute;
  left: var(--ripple-x, 50%);
  top: var(--ripple-y, 50%);
  width: 520px;
  height: 520px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(var(--ripple-scale, 0.2));
  opacity: var(--ripple-opacity, 0);
  background: radial-gradient(circle, rgba(2, 132, 199, 0.22), rgba(14, 165, 233, 0.12), transparent 68%);
  transition: transform 0.52s ease, opacity 0.52s ease;
}

main, .site-nav, .site-footer { position: relative; z-index: 1; }

/* ---------- Typography helpers ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-ink);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.lede {
  margin-top: 22px;
  max-width: 34rem;
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.micro { font-size: 0.875rem; color: var(--text-muted); }

.fineprint { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn--primary {
  background: var(--primary-ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
}
.btn--primary:hover { background: var(--primary-deep); box-shadow: 0 6px 18px rgba(7, 89, 133, 0.28); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--border);
  color: var(--text-primary);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: var(--surface); border-color: #94a3b8; }

.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--primary-ink);
}
.btn--outline:hover { border-color: var(--primary); background: rgba(2, 132, 199, 0.06); }

.btn--sm { min-height: 42px; padding: 9px 18px; font-size: 0.9375rem; }
.btn--lg { min-height: 54px; padding: 15px 30px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.cta-row--center { justify-content: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--primary-ink);
  white-space: nowrap;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.18s ease; }
.link-arrow:hover { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 3px; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Chips / pills ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-bright);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.chip--sm { padding: 4px 9px; font-size: 0.75rem; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pill--live { background: var(--success-soft); color: var(--success-ink); }
.pill--live .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
  padding-block: 12px;
}

.nav-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.managed-chip {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.managed-chip:hover { border-color: var(--primary); color: var(--primary-ink); }
.managed-chip__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }

.nav-links { display: none; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--primary-ink); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  padding-block: 56px 40px;
  align-items: center;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.4rem, 6.2vw, 4.25rem);
  max-width: 15ch;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 26rem;
  margin: 36px 0 0;
  padding-top: 26px;
  border-top: 1px solid rgba(203, 213, 225, 0.7);
}
.stats dt {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stats dd {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Console mock */
.console {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow-lg);
}
.console__inner {
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 20px;
}

.console__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.console__kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.console__title { margin-top: 2px; font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; }

.keybox {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
}
.keybox__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
}
.keybox__row span { color: var(--text-muted); white-space: nowrap; }
.keybox__row code {
  font-size: 0.72rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat { display: grid; gap: 12px; margin-top: 16px; }

.bubble {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.bubble--user {
  justify-self: end;
  max-width: 88%;
  background: var(--surface-container);
  border-color: #bae6fd;
  color: #0c4a6e;
}
.bubble--ai { background: #fff; box-shadow: var(--shadow-sm); }
.bubble--ai code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-sunken);
  font-size: 0.85em;
}
.bubble__meta {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--primary-ink);
  overflow-wrap: anywhere;
}

.usage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.usage__cost { font-weight: 700; color: var(--text-primary); }

.bar {
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--surface-sunken);
  overflow: hidden;
}
.bar span {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #0ea5e9);
}

.console__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Quick facts ---------- */
.quickfacts { padding-block: 4px 10px; }

.quickfacts__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border-soft);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.quickfacts__grid > div {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.92);
}
.quickfacts dt {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.quickfacts dd {
  margin: 4px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}
.quickfacts code { font-size: 0.8125rem; overflow-wrap: anywhere; }

/* ---------- Model strip ---------- */
.models {
  display: grid;
  gap: 14px;
  padding-block: 8px 40px;
}
.models__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.models__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.models__list li {
  padding: 6px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.models__more {
  border-style: dashed;
  color: var(--primary-ink);
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section--tint {
  background: rgba(248, 250, 252, 0.82);
  border-block: 1px solid rgba(203, 213, 225, 0.6);
}

.section-head { max-width: 46rem; }
.section-head h2 {
  margin-top: 16px;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
}
.section-sub {
  margin-top: 16px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 42rem;
}

/* ---------- Plans ---------- */
.plans {
  display: grid;
  gap: 20px;
  margin-top: 40px;
  grid-template-columns: 1fr;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.plan:hover {
  transform: translateY(-4px);
  border-color: #94a3b8;
  box-shadow: var(--shadow-md);
}
.plan--featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
}
.plan--featured:hover { box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg); }

.plan__badge {
  position: absolute;
  top: -12px;
  right: 20px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.35);
}

.plan__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-ink);
}
.plan__name {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.plan__desc {
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
  min-height: 3.9em;
}

.plan__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
}
.plan__now { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.plan__was { font-size: 0.9375rem; color: var(--text-muted); text-decoration: line-through; }
.plan__save {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success-ink);
  font-size: 0.6875rem;
  font-weight: 700;
}

.plan__list {
  display: grid;
  gap: 9px;
  margin: 20px 0 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}
.plan__list li {
  position: relative;
  padding-left: 25px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
.plan__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--surface-container);
}
.plan__list li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 7px;
  width: 7px;
  height: 4px;
  border-left: 1.8px solid var(--primary-ink);
  border-bottom: 1.8px solid var(--primary-ink);
  transform: rotate(-45deg);
}

.plan__cta { margin-top: auto; width: 100%; }

.fineprint { margin-top: 18px; }

/* ---------- PAYG ---------- */
.payg {
  margin-top: 48px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 0%, rgba(249, 115, 22, 0.10), transparent 38%),
    #fff;
  box-shadow: var(--shadow-sm);
}
.payg__head {
  display: grid;
  gap: 12px;
}
.payg__head h3 { margin-top: 10px; font-size: clamp(1.55rem, 3vw, 2rem); }
.payg__note { font-size: 0.875rem; color: var(--text-secondary); max-width: 26rem; }

.payg__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.saldo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
.saldo:hover {
  border-color: var(--primary);
  background: #fff;
  transform: translateY(-2px);
}
.saldo__usd { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.saldo__idr { font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); }

/* ---------- Standards ---------- */
.standards {
  display: grid;
  gap: 18px;
  margin-top: 40px;
  grid-template-columns: 1fr;
}
.standard {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.standard:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.standard__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--surface-container);
  color: var(--primary-ink);
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.12);
}
.standard__icon svg { width: 24px; height: 24px; }
.standard h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; }
.standard p { margin-top: 8px; font-size: 0.9375rem; line-height: 1.55; color: var(--text-secondary); }

/* ---------- Pricing table ---------- */
.tablewrap {
  margin-top: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-sm);
}
.tablewrap:focus-visible { outline-offset: 4px; }

.pricing {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.pricing thead th {
  position: sticky;
  top: 0;
  padding: 14px 18px;
  background: var(--surface-sunken);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-secondary);
  white-space: nowrap;
}
.pricing tbody th[colspan] {
  padding: 10px 18px;
  background: var(--surface);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-ink);
  text-align: left;
  border-block: 1px solid var(--border-soft);
}
.pricing tbody td {
  padding: 13px 18px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-secondary);
  white-space: nowrap;
}
.pricing tbody tr:hover td { background: rgba(224, 242, 254, 0.35); }
.pricing tbody td:first-child { color: var(--text-primary); }
.pricing code {
  font-size: 0.78rem;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.table-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.table-foot .fineprint { max-width: 34rem; }

/* ---------- Integration ---------- */
.integrasi {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.integrasi > * { min-width: 0; }
.integrasi h2 { margin-top: 16px; font-size: clamp(1.9rem, 4.4vw, 2.9rem); }

.steps {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}
.steps li { display: flex; gap: 14px; }
.steps__num {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--primary-ink);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}
.steps strong { display: block; font-size: 1rem; }
.steps p { margin-top: 2px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary); }
.steps code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(2, 132, 199, 0.09);
  font-size: 0.85em;
  color: var(--primary-deep);
}

.harnesses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.codecard {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #0f172a;
  box-shadow: var(--shadow-md);
}
.codecard__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #1e293b;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.codecard__dots { display: inline-flex; gap: 5px; }
.codecard__dots i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #475569;
}
.codecard__dots i:first-child { background: #f87171; }
.codecard__dots i:nth-child(2) { background: #fbbf24; }
.codecard__dots i:nth-child(3) { background: #4ade80; }
.codecard__file {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
}
.copybtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.copybtn:hover { background: rgba(148, 163, 184, 0.16); color: #fff; }
.copybtn svg { width: 15px; height: 15px; }

.codecard pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #e2e8f0;
}
.tok-str { color: #7dd3fc; }
.tok-fn { color: #fbbf24; }

.kv {
  display: grid;
  gap: 1px;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
}
.kv__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  background: #fff;
}
.kv__row span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kv__row code { font-size: 0.75rem; overflow-wrap: anywhere; text-align: right; }

.integrasi__code > .btn { margin-top: 16px; }

/* ---------- Flow ---------- */
.flow {
  display: grid;
  gap: 18px;
  margin-top: 38px;
  grid-template-columns: 1fr;
}
.flow__item {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}
.flow__num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}
.flow__item h3 { margin-top: 10px; font-size: 1.0625rem; }
.flow__item p { margin-top: 6px; font-size: 0.9375rem; color: var(--text-secondary); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
.faq__list { display: grid; gap: 10px; }

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.faq details:hover { border-color: #94a3b8; }
.faq details[open] { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 16px 20px;
  font-size: 0.9875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 {
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
}
.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary-ink);
  border-bottom: 2px solid var(--primary-ink);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }

.faq details p {
  padding: 0 20px 18px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 46rem;
}
.faq details p code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-sunken);
  font-size: 0.85em;
}

/* ---------- Final CTA ---------- */
.finalcta {
  position: relative;
  overflow: hidden;
  padding: 44px 24px;
  border: 1px solid rgba(2, 132, 199, 0.35);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.20), transparent 42%),
    radial-gradient(circle at 88% 100%, rgba(249, 115, 22, 0.16), transparent 40%),
    #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.finalcta .eyebrow { justify-content: center; }
.finalcta h2 {
  margin: 16px auto 0;
  max-width: 20ch;
  font-size: clamp(2rem, 5vw, 3.1rem);
}
.finalcta > p:not(.eyebrow, .micro) {
  margin: 16px auto 0;
  max-width: 34rem;
  font-size: 1.0625rem;
  color: var(--text-secondary);
}
.finalcta .micro { margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.9);
  padding-top: 48px;
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 40px;
}
.footer-brand p {
  margin-top: 14px;
  max-width: 24rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.footer-col h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-col a {
  display: flex;
  align-items: center;
  min-height: 40px;
  margin-top: 4px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}
.footer-col a:hover { color: var(--primary-ink); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-bottom p { max-width: 46rem; }
.footer-byline { margin-top: 6px; font-size: 0.75rem; color: var(--text-muted); }
.fineprint a { text-decoration: underline; text-underline-offset: 2px; }
.fineprint a:hover { color: var(--primary-ink); }
.footer-meta { white-space: nowrap; }
.footer-meta a { text-decoration: underline; text-underline-offset: 2px; }
.footer-meta a:hover { color: var(--primary-ink); }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .managed-chip { display: inline-flex; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .standards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payg__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding-block: 80px; }
  .hero { padding-block: 72px 48px; }
  .finalcta { padding: 60px 40px; }
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 56px;
    padding-block: 88px 64px;
  }
  .console { transform: rotate(-0.4deg); }
  .quickfacts__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .integrasi { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: 56px; }
  .faq { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 48px; }
  .faq__head { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
  .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
  .payg { padding: 36px; }
  .payg__head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}

@media (min-width: 1024px) {
  .standards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section { padding-block: 96px; }
}

@media (min-width: 1100px) {
  .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (pointer: coarse) {
  .copybtn { min-height: 44px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .mesh-bg::after { display: none; }
  .console { transform: none; }
}
