/* ===================================================================
   NYVORA DIGITAL — PANDUAN MEMBER (Documentation Page)
   Tokens: Primary #2563EB · Background #F8FAFC · Card #FFFFFF
   Text #0F172A · Muted #64748B · Border #E2E8F0 · Success #22C55E
   Typeface: Inter
=================================================================== */

/* ---------------------------------------------------------------
   1. RESET & BASE
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #DBEAFE;
  --color-bg: #F8FAFC;
  --color-card: #FFFFFF;
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;
  --color-success: #22C55E;
  --color-success-light: #DCFCE7;

  --accent-amber: #D97706;
  --accent-amber-bg: #FEF3C7;
  --accent-violet: #7C3AED;
  --accent-violet-bg: #EDE9FE;
  --accent-green: #16A34A;
  --accent-green-bg: #DCFCE7;
  --accent-rose: #E11D48;
  --accent-rose-bg: #FFE4E6;
  --accent-warn: #B45309;
  --accent-warn-bg: #FFFBEB;
  --accent-warn-border: #FDE68A;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.10), 0 2px 8px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.16), 0 8px 16px -8px rgba(15, 23, 42, 0.08);
  --shadow-primary: 0 12px 24px -8px rgba(37, 99, 235, 0.32);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;

  --shell-width: 1180px;
  --nav-height: 68px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--color-primary-light); color: var(--color-primary-dark); }

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

/* ---------------------------------------------------------------
   2. SCROLL PROGRESS BAR
--------------------------------------------------------------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #3B82F6, #2563EB);
  z-index: 200;
  transition: width 80ms linear;
}

/* ---------------------------------------------------------------
   3. NAVBAR
--------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.75);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

.navbar.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 8px 24px -16px rgba(15, 23, 42, 0.12);
}

.navbar__inner {
  max-width: var(--shell-width);
  margin: 0 auto;
  height: var(--nav-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand__mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, #3B82F6, #1D4ED8);
  box-shadow: var(--shadow-primary);
  flex-shrink: 0;
}

.brand__mark--sm { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }

.brand__logo-img {
  width: 65%;
  height: 65%;
  object-fit: contain;
  display: block;
}

.brand__text {
  display: flex; align-items: baseline; gap: 5px;
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap;
}

.brand__suffix { color: var(--color-text-muted); font-weight: 500; }

.navbar__links { display: none; align-items: center; gap: 2px; }

.navbar__link {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 13px;
  border-radius: var(--radius-full);
  font-size: 13.5px; font-weight: 500;
  color: var(--color-text-muted);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.navbar__link i { width: 15px; height: 15px; }
.navbar__link:hover { color: var(--color-text); background: rgba(15, 23, 42, 0.04); }
.navbar__link.is-active { color: var(--color-primary-dark); background: var(--color-primary-light); }

.navbar__actions { display: flex; align-items: center; gap: 10px; }

.navbar__burger {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 38px; height: 38px; border-radius: 10px;
}

.navbar__burger span {
  width: 18px; height: 2px; margin: 0 auto;
  background: var(--color-text); border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.navbar__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  max-height: 0; overflow: hidden;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  transition: max-height var(--dur-med) var(--ease-out);
}

.mobile-menu.is-open { max-height: 320px; }

.mobile-menu__link {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 24px; font-size: 14.5px; font-weight: 500;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
}

.mobile-menu__link i { width: 17px; height: 17px; color: var(--color-text-muted); }
.mobile-menu__link--accent { color: var(--color-primary-dark); }
.mobile-menu__link--accent i { color: var(--color-primary); }

@media (min-width: 980px) {
  .navbar__links { display: flex; }
  .navbar__burger { display: none; }
  .mobile-menu { display: none; }
}

/* ---------------------------------------------------------------
   4. HERO
--------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1D4ED8 0%, #2563EB 46%, #3B82F6 100%);
  color: #fff;
  padding: 56px 0 64px;
  isolation: isolate;
}

.hero__glow {
  position: absolute;
  top: -50%; right: -10%;
  width: 55%; padding-bottom: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.26), transparent 70%);
  z-index: -1;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  z-index: -1;
}

.hero__blob--a {
  width: 300px; height: 300px;
  bottom: -120px; left: 6%;
  background: radial-gradient(circle, #A7F3D0, transparent 70%);
  animation: floatA 18s ease-in-out infinite;
}

.hero__blob--b {
  width: 260px; height: 260px;
  top: -80px; left: 40%;
  background: radial-gradient(circle, #C4B5FD, transparent 70%);
  animation: floatB 22s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(30px, -20px); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(-24px, 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__blob { animation: none; }
}

.hero__inner { display: flex; flex-direction: column; gap: 16px; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
}

.hero__eyebrow i { width: 13px; height: 13px; }

.hero__title {
  font-size: clamp(28px, 4.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.hero__subtitle {
  max-width: 620px;
  font-size: 16px;
  color: rgba(255,255,255,0.88);
  line-height: 1.65;
}

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
}

.hero__meta span { display: flex; align-items: center; gap: 6px; }
.hero__meta i { width: 15px; height: 15px; }

/* ---------------------------------------------------------------
   5. PAGE LAYOUT — content + sticky TOC sidebar
--------------------------------------------------------------- */
.page { padding: 44px 20px 96px; }

.page__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

@media (min-width: 980px) {
  .page__grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; }
}

/* ---------------------------------------------------------------
   6. DOC CARDS
--------------------------------------------------------------- */
.doc-card {
  scroll-margin-top: calc(var(--nav-height) + 24px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}

.doc-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

.doc-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.doc-card__icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}

.doc-card__icon i { width: 19px; height: 19px; }

.doc-card__icon--blue { background: var(--color-primary-light); color: var(--color-primary-dark); }
.doc-card__icon--amber { background: var(--accent-amber-bg); color: var(--accent-amber); }
.doc-card__icon--violet { background: var(--accent-violet-bg); color: var(--accent-violet); }
.doc-card__icon--green { background: var(--accent-green-bg); color: var(--accent-green); }
.doc-card__icon--rose { background: var(--accent-rose-bg); color: var(--accent-rose); }

.doc-card__head h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.doc-card__body {
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-card__body p { font-size: 15px; color: var(--color-text-muted); line-height: 1.7; }
.doc-card__body p strong { color: var(--color-text); }

.doc-card__lead {
  font-size: 16.5px !important;
  font-weight: 700;
  color: var(--color-text) !important;
}

/* Checklist */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 2px 0 2px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.check-list i {
  width: 16px; height: 16px;
  color: var(--color-success);
  flex-shrink: 0;
}

/* Chip grid (Langkah 5 channels) */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 4px 0 2px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid #BFDBFE;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.chip i { width: 14px; height: 14px; }

/* Inline button inside Support card */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.btn i { width: 15px; height: 15px; }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -10px rgba(37, 99, 235, 0.4);
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transform: scale(0);
  animation: rippleAnim 620ms ease-out forwards;
  pointer-events: none;
}

@keyframes rippleAnim { to { transform: scale(2.6); opacity: 0; } }

/* ---------------------------------------------------------------
   7. DISCLAIMER BOX
--------------------------------------------------------------- */
.disclaimer {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--accent-warn-bg);
  border: 1px solid var(--accent-warn-border);
}

.disclaimer__icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #FEF3C7;
  color: var(--accent-warn);
}

.disclaimer__icon i { width: 19px; height: 19px; }

.disclaimer__body h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 6px;
}

.disclaimer__body p {
  font-size: 14px;
  line-height: 1.7;
  color: #78350F;
}

/* ---------------------------------------------------------------
   8. TABLE OF CONTENTS (sticky sidebar)
--------------------------------------------------------------- */
.toc-wrap { display: none; }

@media (min-width: 980px) {
  .toc-wrap { display: block; }
}

.toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
}

.toc__label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.toc__label i { width: 14px; height: 14px; }

.toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid var(--color-border);
}

.toc__link {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.4;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.toc__link:hover { color: var(--color-text); }

.toc__link.is-active {
  color: var(--color-primary-dark);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.toc__progress { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-border); }

.toc__progress-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 8px;
}

.toc__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3B82F6, #2563EB);
  border-radius: var(--radius-full);
  transition: width 120ms linear;
}

#tocProgressLabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------
   9. SCROLL REVEAL
--------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

/* ---------------------------------------------------------------
   10. FOOTER
--------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
  background: var(--color-bg);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.footer__brand { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; }
.footer__copy { font-size: 13px; color: var(--color-text-muted); }

@media (min-width: 640px) {
  .footer__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------------------------------------------------------------
   11. BACK TO TOP
--------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-text);
  color: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), background var(--dur-fast) var(--ease-out);
  z-index: 90;
}

.to-top i { width: 18px; height: 18px; }

.to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.to-top:hover { background: var(--color-primary); }

/* ---------------------------------------------------------------
   12. MOBILE REFINEMENTS
   Prioritas utama: mayoritas member membaca panduan ini dari HP.
--------------------------------------------------------------- */
@media (max-width: 480px) {
  :root { --nav-height: 60px; }

  .shell { padding: 0 16px; }

  .navbar__inner { gap: 8px; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__text { font-size: 14.5px; }
  .brand__suffix { display: none; }
  .navbar__burger { width: 42px; height: 42px; }

  /* Hero panduan: lebih ringkas di layar kecil */
  .hero { padding: 32px 0 40px; }
  .hero__title { font-size: 24px; }
  .hero__subtitle { font-size: 14.5px; }
  .hero__meta { gap: 14px; font-size: 12.5px; }

  /* Konten & doc-card lebih rapat, enak dibaca satu tangan */
  .page { padding: 28px 16px 72px; }
  .page__grid { gap: 24px; }
  .content { gap: 16px; }

  .doc-card { padding: 20px 18px; scroll-margin-top: calc(var(--nav-height) + 16px); }
  .doc-card__head { gap: 11px; margin-bottom: 12px; }
  .doc-card__icon { width: 36px; height: 36px; }
  .doc-card__head h2 { font-size: 17px; }
  .doc-card__body p { font-size: 14.5px; }
  .doc-card__lead { font-size: 15.5px !important; }

  .check-list li { font-size: 14px; padding: 9px 12px; }
  .chip { font-size: 13px; padding: 7px 12px; }

  .disclaimer { padding: 18px; gap: 12px; }
  .disclaimer__icon { width: 36px; height: 36px; }

  /* Tombol jadi target sentuh yang nyaman */
  .btn { min-height: 46px; padding: 12px 18px; }

  .to-top { width: 46px; height: 46px; right: 16px; bottom: 16px; }

  /* Progress bar sedikit lebih tebal supaya terlihat jelas di layar kecil */
  .progress-bar { height: 3.5px; }
}

@media (max-width: 360px) {
  .hero__title { font-size: 21px; }
  .doc-card__head h2 { font-size: 16px; }
  .btn { font-size: 14px; }
}