/* ============================================================
   Alight-MTCommunity — design system (redesign 2026-08-07)
   Spec: docs/superpowers/specs/2026-08-07-frontend-redesign-design.md
   ============================================================ */

:root {
  /* warna */
  --bg: #09090b;
  --surface: #101014;
  --surface-2: #18181d;
  --border: #26262c;
  --border-strong: #3f3f46;
  --fg: #fafafa;
  --fg-muted: #a1a1aa;
  --fg-dim: #6b6b74;
  --accent: #dfe104;
  --accent-fg: #000;
  --accent-dim: rgba(223, 225, 4, 0.08);
  --danger: #f87171;
  --success: #4ade80;
  --info: #60a5fa;

  /* tipografi */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* layout */
  --max-w: 72rem;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-full: 999px;
  --pad-section: clamp(4rem, 8vw, 6rem);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --glow-accent: 0 0 0 1px rgba(223, 225, 4, 0.4), 0 8px 32px rgba(223, 225, 4, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #000; }

a { color: inherit; text-decoration: none; }
.lead a, .muted a, .faq__body a, .label a { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ── Tipografi ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: none;
}

.display {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-weight: 700;
}
.h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); }
.h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.lead { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--fg-muted); max-width: 42rem; }

.mono { font-family: var(--font-mono); }
.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-dim);
}
.accent { color: var(--accent); }
.muted { color: var(--fg-muted); }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2rem); }
.section { padding-block: var(--pad-section); border-top: 1px solid var(--border); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.grid-2 { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── Tombol ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.5rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.btn:hover { border-color: var(--fg); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn--primary { background: var(--accent); color: #000; border-color: var(--accent); box-shadow: var(--glow-accent); }
.btn--primary:hover { background: #f0f210; border-color: #f0f210; }

.btn--outline:hover { background: var(--surface-2); border-color: var(--fg); }

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

.btn--lg { min-height: 56px; padding: 0.875rem 2rem; font-size: 1.0625rem; }
.btn--sm { min-height: 32px; padding: 0.25rem 0.75rem; font-size: 0.75rem; }

/* ── Badge method (GET/POST) ────────────────────────────── */
.method-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.method-badge--get { background: rgba(96, 165, 250, 0.15); color: var(--info); }
.method-badge--post { background: var(--accent-dim); color: var(--accent); }

/* ── Code window ────────────────────────────────────────── */
.code-window {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.code-window__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
}
.code-window__dot { width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--border-strong); }
.code-window__dot--accent { background: var(--accent); }
.code-window__title { margin-left: 0.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-window__copy { margin-left: auto; }
.code-window__body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.code-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  position: relative;
}
.code-block .c-comment, .code-window__body .c-comment { color: var(--fg-dim); }
.code-block .c-key, .code-window__body .c-key { color: var(--accent); }
.code-block .c-str, .code-window__body .c-str { color: #7dd3fc; }
.code-block .c-num, .code-window__body .c-num { color: #f0abfc; }

/* ── Stat bar ───────────────────────────────────────────── */
.stat-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  border-block: 1px solid var(--border);
  padding-block: 1.25rem;
}
.stat-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-bar__item + .stat-bar__item { border-left: 1px solid var(--border); }
.stat-bar__item strong { color: var(--accent); font-weight: 700; }

/* ── Kartu ──────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.75rem;
  transition: border-color 200ms ease, transform 200ms ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.feature-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.feature-card__title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.feature-card__desc { color: var(--fg-muted); font-size: 0.9375rem; }

.step-card { display: flex; flex-direction: column; gap: 0.75rem; }
.step-card__num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #000;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
}
.step-card__title { font-size: 1.125rem; }
.step-card__desc { color: var(--fg-muted); font-size: 0.9375rem; }
.step-card__desc code { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--accent); }

/* ── Pricing ────────────────────────────────────────────── */
.pricing-card { border-color: var(--border-strong); }
.pricing-card__price { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; margin-block: 0.75rem; }
.pricing-card__price span { font-size: 1rem; color: var(--fg-dim); font-weight: 400; }
.pricing-card__list { list-style: none; display: grid; gap: 0.625rem; margin-block: 1.5rem; }
.pricing-card__list li { display: flex; align-items: flex-start; gap: 0.625rem; color: var(--fg-muted); font-size: 0.9375rem; }
.pricing-card__list svg { flex: 0 0 auto; margin-top: 0.2rem; color: var(--accent); }
.pricing-card__desc { color: var(--fg-muted); font-size: 0.9375rem; }

/* ── FAQ ────────────────────────────────────────────────── */
.faq { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 0.75rem; overflow: hidden; }
.faq[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.125rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.25rem; color: var(--accent); transition: transform 200ms; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq__body { padding: 0 1.25rem 1.25rem; color: var(--fg-muted); font-size: 0.9375rem; }
.faq__body code { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--accent); }

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav__brand { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.0625rem; }
.nav__brand .accent { color: var(--accent); }
.nav__links { display: flex; gap: 1.5rem; font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; }
.nav__links a { color: var(--fg-muted); transition: color 150ms; padding-block: 0.375rem; }
.nav__links a:hover { color: var(--accent); }

.nav__toggle {
  display: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}
.nav__toggle span { display: block; width: 20px; height: 2px; background: var(--fg); transition: transform 200ms ease, opacity 200ms ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links a:hover { background: var(--surface); }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding-block: clamp(3rem, 8vw, 6rem); }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero__eyebrow { margin-bottom: 1.25rem; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.875rem; margin-top: 2rem; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 2rem; }

/* ── Status indicator ───────────────────────────────────── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--success); margin-right: 0.375rem; vertical-align: middle; }
.status-dot--unknown { background: var(--fg-dim); }

/* ── Tag ────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}
.tag--accent { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ── Tabel ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); }
.table-wrap table { min-width: 560px; margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; font-size: 0.9375rem; border-bottom: 1px solid var(--border); }
th { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--fg-dim); background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
td code { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--accent); }

/* ── Form / console ─────────────────────────────────────── */
.field {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.625rem 0.875rem;
}
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.field::placeholder { color: var(--fg-dim); }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.25rem; }

.console { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1.5rem; overflow: hidden; }
.console__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: -1.5rem -1.5rem 1.5rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
}
.console-output--error { border-color: var(--danger); color: #fca5a5; }
.console-output--success { border-color: var(--success); color: #bbf7d0; }

/* ── Docs layout ────────────────────────────────────────── */
.docs-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .docs-layout { grid-template-columns: 240px 1fr; } }
/* Grid children wajib bisa menyusut — tanpa min-width: 0, tabel (min-width
   560px) dan blok kode memaksa kolom melebar keluar container di layar kecil. */
.docs-layout > * { min-width: 0; }
.docs-section { min-width: 0; }
.docs-sidebar { position: sticky; top: 5.5rem; align-self: start; }
.docs-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.docs-sidebar a:hover { color: var(--accent); background: var(--surface); }
.docs-sidebar a.active { color: var(--accent); background: var(--accent-dim); }

@media (max-width: 1023px) {
  .docs-sidebar {
    position: static;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }
  .docs-sidebar a { flex: 0 0 auto; white-space: nowrap; margin-bottom: 0; }
}

/* ── Gate screen ────────────────────────────────────────── */
.gate { min-height: 70svh; display: flex; align-items: center; justify-content: center; text-align: center; }
.gate__card {
  max-width: 34rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-md);
}

/* ── Footer ─────────────────────────────────────────────── */
.footer { padding-block: 3rem; border-top: 1px solid var(--border); }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer__col p { color: var(--fg-muted); font-size: 0.9375rem; }
.footer__links { list-style: none; display: grid; gap: 0.5rem; }
.footer__links a { color: var(--fg-muted); font-size: 0.9375rem; }
.footer__links a:hover { color: var(--accent); }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* ── Reveal on scroll ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Utility spacing (pengganti inline style) ───────────── */
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.max-w-52 { max-width: 52rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-stack { display: grid; gap: 1.5rem; }
.docs-section { margin-top: 4rem; }
.cta-panel { text-align: center; padding: clamp(2.5rem, 6vw, 4rem); background: var(--accent-dim); border-color: rgba(223, 225, 4, 0.25); }

/* ── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn, .card, .nav__toggle span { transition: none; }
}

/* ── Responsive helpers ─────────────────────────────────── */
@media (max-width: 480px) {
  .hero__cta .btn { width: 100%; }
  .stat-bar__item { padding-inline: 1rem; }
  .stat-bar__item + .stat-bar__item { border-left: 0; }
  .code-window__body, .code-block { padding: 1rem; }
  th, td { padding: 0.5rem 0.625rem; font-size: 0.8125rem; }
}
