/* =========================================================
   NUXS ENVIRONMENT — style.css
   Gaya kustom di luar utility Tailwind (CDN).
   ========================================================= */

:root {
  --nx-accent: #62d9de;
  --nx-ink: #161616;
  --nx-body: #333333;
  --nx-line: #ebebeb;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Tipografi dasar ---------- */
body {
  font-family: 'Inter', sans-serif;
  color: var(--nx-body);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}
h1, h2, h3, h4, h5, h6 {
  color: #111111;
  letter-spacing: -0.015em;
}
.dark body {
  background-color: #121212;
  color: #d0d0d0;
}
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: #f8fafc;
}

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

:focus-visible {
  outline: 2px solid var(--nx-accent);
  outline-offset: 2px;
}

/* ---------- Utilitas kecil ---------- */
.search-input-wrapper { position: relative; }
.top-post-number { font-feature-settings: "tnum"; }

.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Loader ---------- */
#nuxsen-loader {
  transition: opacity 0.5s ease;
}
#nuxsen-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Kartu artikel ---------- */
.post-card {
  position: relative;
}
.post-card .card-thumb img {
  transition: transform 0.3s ease;
}
.post-card:hover .card-thumb img {
  transform: scale(1.02);
}
.badge-soon {
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(98, 217, 222, 0.18);
  color: #12798a;
}
.dark .badge-soon {
  color: #9ee8eb;
}

/* =========================================================
   Konten artikel (halaman tutorial)
   ========================================================= */
.prose-nx {
  font-size: 16px;
  line-height: 1.8;
  color: #3b3b3b;
}
.dark .prose-nx { color: #d0d0d0; }

.prose-nx > * + * { margin-top: 1.1rem; }

.prose-nx h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  font-weight: 800;
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--nx-line);
  scroll-margin-top: 6rem;
}
.dark .prose-nx h2 { border-top-color: #262626; }
.prose-nx h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.prose-nx h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.8rem;
}

.prose-nx a {
  color: #12798a;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dark .prose-nx a { color: #9ee8eb; }

.prose-nx ul, .prose-nx ol { padding-left: 1.4rem; }
.prose-nx ul { list-style: disc; }
.prose-nx ol { list-style: decimal; }
.prose-nx li + li { margin-top: 0.35rem; }
.prose-nx li::marker { color: #9ca3af; }

.prose-nx code:not(pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: #f3f3f3;
  color: #7c2d12;
  padding: 0.12em 0.4em;
  border-radius: 4px;
}
.dark .prose-nx code:not(pre code) {
  background: #262626;
  color: #fcd34d;
}

.prose-nx table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.prose-nx th, .prose-nx td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--nx-line);
  vertical-align: top;
}
.prose-nx th {
  background: #fafafa;
  font-weight: 700;
  color: #161616;
}
.dark .prose-nx th, .dark .prose-nx td { border-color: #262626; }
.dark .prose-nx th { background: #161616; color: #f8fafc; }

.table-wrap { overflow-x: auto; }

/* Blok kode */
.code-block {
  position: relative;
  border-radius: 8px;
  background: #0b0b0b;
  border: 1px solid #262626;
  overflow: hidden;
}
.code-block .code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  background: #161616;
  border-bottom: 1px solid #262626;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: #9ca3af;
}
.code-block pre {
  margin: 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #e6edf3;
  tab-size: 2;
}
.copy-btn {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d1d5db;
  border: 1px solid #333333;
  border-radius: 4px;
  padding: 2px 8px;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--nx-accent); border-color: var(--nx-accent); }
.copy-btn.is-copied { color: #34d399; border-color: #34d399; }

/* Callout */
.callout {
  border-left: 4px solid var(--nx-accent);
  background: #effcfb;
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #115b5d;
}
.callout strong { color: #161616; }
.callout.callout-info {
  border-left-color: #6366f1;
  background: #eef2ff;
  color: #312e81;
}
.callout.callout-warn {
  border-left-color: #ef4444;
  background: #fef2f2;
  color: #5b1a1a;
}
.dark .callout { background: rgba(98, 217, 222, 0.08); color: #a8efe8; }
.dark .callout strong { color: #f8fafc; }
.dark .callout.callout-info { background: rgba(99, 102, 241, 0.12); color: #c7d2fe; }
.dark .callout.callout-warn { background: rgba(239, 68, 68, 0.1); color: #fecaca; }

/* Daftar isi */
.toc-box {
  border: 1px solid var(--nx-line);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  background: #fcfcfc;
}
.dark .toc-box { border-color: #262626; background: #161616; }
.toc-box a { text-decoration: none; }
.toc-box a:hover { text-decoration: underline; }

/* Cetak */
@media print {
  #nuxsen-loader, header, footer, .copy-btn, .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* Daftar bersub-huruf (a, b, c) untuk langkah praktik */
.prose-nx ol.list-alpha { list-style: lower-alpha; }


/* =========================================================
   Landing page
   ========================================================= */
.hero-grid {
  background-image:
    radial-gradient(60% 50% at 50% 0%, rgba(98, 217, 222, 0.22), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}
.lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.lift:hover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .lift { transition: none; } .lift:hover { transform: none; } }

/* Hero foto: teks selalu putih di atas overlay gelap (mode terang maupun gelap) */
.hero-photo h1, .dark .hero-photo h1 { color: #ffffff; }
.hero-photo h1 span { color: #62d9de; }

/* Halaman legal (Privacy Policy, Terms) */
.legal-body p { margin: 0 0 0.9rem; }
.legal-body ul { margin: 0 0 0.9rem; padding-left: 0; list-style: none; }
.legal-body ul li { position: relative; padding-left: 1.4rem; margin-bottom: 0.45rem; }
.legal-body ul li::before { content: ""; position: absolute; left: 0.2rem; top: 0.65rem; width: 6px; height: 6px; border-radius: 999px; background: var(--nx-accent); }
.legal-body a { color: #12798a; text-decoration: underline; text-underline-offset: 2px; }
.legal-body strong { color: #1b2238; }

/* Tabel referensi panjang (resep Slimefun) */
.table-tall { max-height: 70vh; overflow: auto; border: 1px solid var(--nx-line); border-radius: 8px; }
.table-tall table { margin: 0; }
.table-tall th { position: sticky; top: 0; z-index: 1; box-shadow: 0 1px 0 var(--nx-line); }
.table-tall td, .table-tall th { border-left: 0; border-right: 0; }
.prose-nx table.table-wide { min-width: 640px; }
.prose-nx tbody tr:nth-child(even) td { background: #fafafa; }
.prose-nx tbody tr:hover td { background: #effcfd; }
.prose-nx tbody td:first-child { font-weight: 600; color: #161616; white-space: nowrap; }
.crystal {
  display: inline-block; padding: 1px 10px; border-radius: 999px;
  background: #effcfd; border: 1px solid #c4f1f3; color: #12798a;
  font-size: 0.82rem; font-weight: 600; white-space: nowrap;
}
.table-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 0.75rem; }
.table-filter input {
  flex: 1 1 220px; min-width: 0; padding: 0.6rem 0.9rem; border: 1px solid #d9d9d9; border-radius: 8px;
  font-size: 0.92rem; background: #fff; color: #161616;
}
.table-filter input:focus { outline: none; border-color: #25b4c0; box-shadow: 0 0 0 3px rgba(98, 217, 222, 0.3); }
.table-filter .table-count { font-size: 0.8rem; font-weight: 600; color: #666; white-space: nowrap; }

/* Menu header ala IDN: chevron berputar saat submenu terbuka */
.chev { transition: transform .2s ease; }
[aria-expanded="true"] > .chev, [aria-expanded="true"] .chev { transform: rotate(180deg); }
