/**
 * NawalaCompany — gaya situs bersama (beranda, bulk, dokumentasi)
 */

:root {
  --nc-black: #000000;
  --nc-zinc-900: #18181b;
  --nc-zinc-800: #27272a;
  --nc-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nc-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --nc-container: 72rem;
  --nc-header-h: 3.5rem;
  --nc-nav-break: 900px;
  --nc-radius: 12px;
  --nc-radius-sm: 8px;
  --nc-radius-xs: 6px;

  /* Semantik (dipakai dokumentasi + status) */
  --text-primary: #fafafa;
  --text-secondary: #b4bcc8;
  --text-muted: #9ca3af;
  --text-tertiary: #71717a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: #27272a;

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.14);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.14);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.14);

  --link: #a5b4fc;
  --link-hover: #c7d2fe;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.2);

  /* Beranda (cek tunggal) */
  --home-green: #10b981;
  --home-input-bg: #0c0c0c;
  --home-input-border: #27272a;
  --home-btn-bg: #9ca3af;
  --home-btn-text: #111827;
  --home-card: #0a0a0a;
}

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

html {
  scroll-behavior: smooth;
}

.nc-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--nc-font);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.nc-body--home {
  background: radial-gradient(ellipse 120% 80% at 50% -30%, #14141c 0%, var(--nc-black) 55%);
}

.nc-body--bulk {
  background: radial-gradient(ellipse 120% 80% at 50% -30%, #14141c 0%, var(--nc-black) 55%);
}

.nc-body--docs {
  background: linear-gradient(180deg, #0c0c0f 0%, var(--nc-black) 45%);
}

.nc-body a {
  color: inherit;
  text-decoration: none;
}

.nc-body a:hover {
  opacity: 0.9;
}

/* ---------- Header (semua halaman) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  height: var(--nc-header-h);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: var(--nc-container);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .header-inner {
    padding: 0 1.5rem;
  }
}

.logo {
  font-size: 15px;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-primary);
}

.logo span {
  font-weight: 400;
  color: var(--text-muted);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.125rem;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop a {
  padding: 0.45rem 0.65rem;
  font-size: 14px;
  color: var(--text-tertiary);
  border-radius: var(--nc-radius-xs);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-desktop a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-desktop a.nav-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.nav-burger {
  position: relative;
}

@media (min-width: 900px) {
  .nav-burger {
    display: none;
  }
}

.nav-burger summary {
  list-style: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: -0.35rem;
  color: var(--text-muted);
  border-radius: var(--nc-radius-xs);
}

.nav-burger summary::-webkit-details-marker {
  display: none;
}

.nav-burger[open] summary {
  color: var(--text-primary);
}

.nav-burger .drawer {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 12rem;
  padding: 0.4rem;
  background: #0d0d0f;
  border: 1px solid var(--border-strong);
  border-radius: var(--nc-radius-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.nav-burger .drawer a {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: var(--nc-radius-xs);
}

.nav-burger .drawer a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.nav-burger .drawer a.nav-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Beranda ---------- */
.nc-main--home {
  flex: 1;
}

.hero {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4.25rem 1.25rem 2.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .hero {
    padding-top: 5.25rem;
    padding-bottom: 3.5rem;
  }
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 1.65rem;
}

.badge-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--home-green);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.hero-title .line1 {
  color: var(--text-primary);
  display: block;
}

.hero-title .line2 {
  color: #6b7280;
  display: block;
  margin-top: 0.12rem;
}

.hero-desc {
  margin: 1.45rem auto 0;
  max-width: 34rem;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
}

.hero-desc strong {
  color: #d4d4d8;
  font-weight: 500;
}

.search-wrap {
  margin-top: 2.25rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.search-form {
  display: flex;
  align-items: stretch;
  background: var(--home-input-bg);
  border: 1px solid var(--home-input-border);
  border-radius: var(--nc-radius);
  padding: 5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form:focus-within {
  border-color: #3f3f46;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  padding: 0.8rem 1rem;
  outline: none;
}

.search-form input::placeholder {
  color: #52525b;
}

.search-form button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.1rem;
  border: none;
  border-radius: 9px;
  background: var(--home-btn-bg);
  color: var(--home-btn-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.search-form button:hover {
  filter: brightness(1.06);
}

.search-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.search-form button svg {
  width: 17px;
  height: 17px;
  opacity: 0.88;
}

.hero-foot {
  margin-top: 1.2rem;
  font-size: 13px;
  color: #52525b;
}

.hero-foot a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-foot a:hover {
  color: var(--text-secondary);
  opacity: 1;
}

.result-zone {
  max-width: 36rem;
  margin: 1.75rem auto 0;
  padding: 0 1.25rem 4rem;
}

.result-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 1rem;
}

.result-card {
  display: none;
  background: var(--home-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--nc-radius);
  padding: 1.25rem 1.35rem;
  text-align: left;
}

.result-card.is-visible {
  display: block;
}

.result-card .domain {
  font-size: 15px;
  font-weight: 600;
  word-break: break-word;
  color: var(--text-primary);
}

.result-card .pill {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill-ok {
  background: var(--success-bg);
  color: var(--success);
}

.pill-bad {
  background: var(--danger-bg);
  color: var(--danger);
}

.result-meta {
  margin-top: 0.45rem;
  font-size: 13px;
  color: var(--text-muted);
}

.result-err {
  color: var(--danger);
  font-size: 14px;
  margin-top: 0.5rem;
}

/* ---------- Bulk ---------- */
.nc-main--bulk {
  flex: 1;
}

.bulk-wrap {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 3.5rem;
}

@media (min-width: 640px) {
  .bulk-wrap {
    padding: 2rem 1.5rem 4rem;
  }
}

.bulk-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.bulk-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.bulk-hint a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bulk-hint a:hover {
  color: var(--link-hover);
  opacity: 1;
}

.nc-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--nc-radius);
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.nc-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.nc-textarea {
  width: 100%;
  min-height: 220px;
  padding: 0.75rem 0.85rem;
  border-radius: var(--nc-radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--nc-font);
  resize: vertical;
  line-height: 1.5;
}

.nc-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nc-textarea::placeholder {
  color: var(--text-tertiary);
}

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1rem;
}

.bulk-source {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.bulk-source span {
  flex-shrink: 0;
}

.nc-select {
  padding: 0.45rem 0.55rem;
  border-radius: var(--nc-radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--nc-font);
}

.nc-btn {
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: var(--nc-radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--nc-font);
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.nc-btn:hover {
  filter: brightness(1.08);
}

.nc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.nc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bulk-status {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.bulk-status.err {
  color: #fecaca;
}

.bulk-sum {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.bulk-table-wrap {
  margin-top: 1rem;
  overflow: auto;
  max-height: min(55vh, 520px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--nc-radius-sm);
}

.bulk-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.bulk-table-wrap th,
.bulk-table-wrap td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.bulk-table-wrap th {
  position: sticky;
  top: 0;
  background: #12121a;
  z-index: 1;
  font-weight: 600;
  color: var(--text-secondary);
}

.bulk-table-wrap tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.bulk-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
}

.bulk-pill--ok {
  background: var(--success-bg);
  color: var(--success);
}

.bulk-pill--bad {
  background: var(--danger-bg);
  color: var(--danger);
}

.bulk-footer {
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.bulk-footer a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bulk-footer a:hover {
  color: var(--link-hover);
  opacity: 1;
}

.hp-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Dokumentasi ---------- */
.nc-main--docs {
  flex: 1;
}

.doc-wrap {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}

@media (min-width: 640px) {
  .doc-wrap {
    padding: 4.5rem 1.5rem 5rem;
  }
}

.doc-wrap a:not(.logo):not(.nav-desktop a):not(.drawer a):not(.foot-col a) {
  color: var(--link);
}

.doc-wrap a:not(.logo):not(.nav-desktop a):not(.drawer a):not(.foot-col a):hover {
  color: var(--link-hover);
  opacity: 1;
}

.heading-2 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.lead {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  max-width: 40rem;
  line-height: 1.65;
}

.lead strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--nc-radius);
  padding: 1.65rem 1.75rem;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-head {
  padding: 1.65rem 1.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nc-section-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.nc-section-head--spaced {
  margin-bottom: 1.25rem;
}

.text-caption {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.icon-wrap {
  color: var(--text-muted);
  flex-shrink: 0;
}

.icon-wrap svg {
  display: block;
  width: 16px;
  height: 16px;
}

.badge-get {
  font-size: 10px;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--success-bg);
  color: var(--success);
}

.badge-post {
  font-size: 10px;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--info-bg);
  color: var(--info);
}

.text-sm-muted {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0.25rem 0 1.2rem;
}

.text-secondary-sm {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 1rem;
}

.text-secondary-sm:last-child {
  margin-bottom: 0;
}

.code-inline {
  font-family: var(--nc-mono);
  font-size: 0.8125rem;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #e4e4e7;
}

.code-block {
  font-family: var(--nc-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--nc-radius-sm);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 0;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.text-dim {
  color: var(--text-muted);
}

.mono-path {
  display: block;
  font-family: var(--nc-mono);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.card table,
.card-flush table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table-header {
  padding: 0.65rem 1.75rem;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.table-row {
  border-bottom: 1px solid var(--border-subtle);
}

.table-cell {
  padding: 0.85rem 1.75rem;
  color: var(--text-secondary);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.status-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}

.code-status {
  font-family: var(--nc-mono);
  font-size: 10px;
  font-weight: 700;
  min-width: 2.75rem;
  text-align: center;
  padding: 0.2rem 0;
  border-radius: 4px;
}

.amp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.amp-pill a {
  font-weight: 500;
}

/* Footer dokumentasi */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  padding-top: 3rem;
}

.foot-inner {
  max-width: var(--nc-container);
  margin: 0 auto;
  padding: 0 1rem 3.5rem;
}

@media (min-width: 640px) {
  .foot-inner {
    padding: 0 1.5rem 4rem;
  }
}

.foot-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.foot-logo span {
  font-weight: 400;
  color: var(--text-muted);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .foot-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 3rem;
  }
}

.foot-brand {
  grid-column: span 2;
}

@media (min-width: 768px) {
  .foot-brand {
    grid-column: span 1;
  }
}

.foot-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 18rem;
  margin: 1rem 0 0;
}

.foot-col h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.15rem;
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-col li {
  margin-bottom: 0.7rem;
}

.foot-col a {
  font-size: 13px;
  color: var(--text-tertiary);
}

.foot-col a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.foot-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 13px;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .foot-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.rate-table-note {
  padding: 0 1.75rem 0.75rem;
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* Dokumentasi — judul kecil & status HTTP */
.text-caption--mb {
  margin-bottom: 0.5rem;
}

.text-caption--block {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.status-row .text-secondary-sm {
  margin: 0;
}

.code-status--ok {
  background: var(--success-bg);
  color: var(--success);
}

.code-status--warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.code-status--danger {
  background: var(--danger-bg);
  color: var(--danger);
}
