/* ═══════════════════════════════════════════════════════════════════════════
   Peace Infinite — Halaman Legal (Privacy Policy & Terms of Service)
   Tema terang modern, responsif (laptop, iPad, HP), dengan watermark logo
   Peace Infinite di tengah dokumen layaknya lisensi resmi.
   ═══════════════════════════════════════════════════════════════════════════ */

.lg-progress {
  position: fixed; top: 0; left: 0; z-index: 1200;
  width: 100%; height: 3px; pointer-events: none;
  background: transparent;
}
.lg-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-sky));
  box-shadow: 0 0 10px rgba(76, 185, 234, .45);
  transition: width .08s linear;
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.lg-hero {
  position: relative; overflow: hidden;
  padding: clamp(112px, 10vw + 52px, 152px) 0 var(--sp-10);
  background:
    radial-gradient(ellipse 70% 60% at 85% 15%, rgba(76, 185, 234, .12), transparent 65%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(74, 112, 182, .08), transparent 60%),
    linear-gradient(180deg, var(--surface-muted) 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
}
.lg-hero-inner {
  position: relative; z-index: 1;
  max-width: 820px;
  animation: lgFadeUp .55s var(--ease) both;
}
.lg-hero h1 {
  margin: 0 0 var(--sp-4);
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--brand-navy);
}
.lg-hero-lead {
  margin: 0 0 var(--sp-6);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 64ch;
}
.lg-meta {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  margin-bottom: var(--sp-6);
}
.lg-meta-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--border);
  font-size: .8125rem; color: var(--text-muted);
  box-shadow: 0 1px 2px rgba(30, 47, 85, .04);
}
.lg-meta-item .icon { color: var(--brand-blue); flex: none; }

/* Switcher Privacy <-> Terms */
.lg-switch {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
  padding: 5px; border-radius: 14px;
  background: #EAF1FA; border: 1px solid #D6E6F7;
}
.lg-switch a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  font-size: .875rem; font-weight: 600;
  color: var(--text-muted); text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.lg-switch a:hover { color: var(--brand-navy); }
.lg-switch a[aria-current="page"] {
  background: #fff; color: var(--brand-navy);
  box-shadow: 0 2px 8px -2px rgba(30, 47, 85, .14);
}
.lg-switch a[aria-current="page"] .icon { color: var(--brand-blue); }

/* ─── Layout Utama ─────────────────────────────────────────────────────── */
.lg-main { padding: var(--sp-10) 0 var(--sp-16); background: #F8FAFD; }
.lg-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
}

/* Sidebar TOC (Desktop) */
.lg-toc-aside {
  position: sticky; top: 96px;
  background: #fff; border: 1px solid #DCE7F5; border-radius: 18px;
  padding: 20px;
  box-shadow: 0 4px 20px -12px rgba(30, 47, 85, .14);
  animation: lgFadeUp .6s var(--ease) .08s both;
}
.lg-toc-title {
  margin: 0 0 12px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-blue);
  display: flex; align-items: center; gap: 7px;
}
.lg-toc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lg-toc-list a {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 10px; border-radius: 10px;
  font-size: .875rem; line-height: 1.35;
  color: var(--text-muted); text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.lg-toc-list a span.lg-toc-num {
  flex: none; font-size: .75rem; font-weight: 700;
  color: var(--text-subtle); min-width: 18px; margin-top: 1px;
}
.lg-toc-list a:hover { background: #F2F7FD; color: var(--brand-navy); transform: translateX(2px); }
.lg-toc-list a.is-active {
  background: #EAF2FC; color: var(--brand-navy); font-weight: 600;
  border-left-color: var(--brand-blue);
}
.lg-toc-list a.is-active span.lg-toc-num { color: var(--brand-blue); }

/* Mobile / Tablet TOC Accordion */
.lg-toc-mobile {
  display: none;
  margin-bottom: var(--sp-5);
  background: #fff; border: 1px solid #DCE7F5; border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px -6px rgba(30, 47, 85, .12);
}
.lg-toc-mobile summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px;
  font-size: .9375rem; font-weight: 600; color: var(--brand-navy);
}
.lg-toc-mobile summary::-webkit-details-marker { display: none; }
.lg-toc-mobile summary span { display: inline-flex; align-items: center; gap: 8px; }
.lg-toc-mobile summary .icon { color: var(--brand-blue); transition: transform .22s var(--ease); }
.lg-toc-mobile[open] summary .lg-toc-chev { transform: rotate(180deg); }
.lg-toc-mobile .lg-toc-list { padding: 0 12px 14px; border-top: 1px solid var(--border); padding-top: 10px; }

/* ─── Dokumen Paper + Watermark Logo Peace Infinite ────────────────────── */
.lg-paper {
  position: relative; overflow: hidden;
  background: #fff;
  border: 1px solid #D6E6F7;
  border-radius: 22px;
  padding: clamp(26px, 4vw, 52px);
  box-shadow:
    0 1px 2px rgba(30, 47, 85, .04),
    0 18px 46px -24px rgba(30, 47, 85, .18);
  animation: lgFadeUp .6s var(--ease) .12s both;
}
.lg-paper::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; z-index: 3;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-blue), var(--brand-sky));
}

/* Watermark layer: deretan logo Peace Infinite menjulang di tengah belakang teks */
.lg-watermark {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; user-select: none; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: space-around;
  gap: clamp(120px, 18vh, 220px);
  padding: clamp(64px, 10vh, 120px) 24px;
}
.lg-wm-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  opacity: 0.075;
  filter: grayscale(100%) contrast(1.08);
  transform: rotate(-11deg);
  animation: lgWmFloat 14s ease-in-out infinite;
}
.lg-wm-item:nth-child(even) {
  transform: rotate(9deg);
  animation-delay: -7s;
  opacity: 0.06;
}
.lg-wm-item picture,
.lg-wm-item img {
  display: block;
  width: clamp(190px, 32vw, 310px);
  height: auto;
}
.lg-wm-seal {
  font-family: var(--font-display, inherit);
  font-size: clamp(.72rem, 1.1vw, .95rem);
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--brand-navy);
  white-space: nowrap;
}

/* Konten teks berada di atas watermark */
.lg-body { position: relative; z-index: 1; max-width: 74ch; }

/* Kartu ringkasan di bagian atas dokumen */
.lg-summary {
  background: linear-gradient(135deg, rgba(234, 242, 252, .85) 0%, rgba(246, 250, 255, .92) 100%);
  border: 1px solid #CFE1F6;
  border-radius: 16px;
  padding: clamp(18px, 2.5vw, 24px);
  margin-bottom: var(--sp-8);
  backdrop-filter: blur(2px);
}
.lg-summary-head {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
  font-size: 1rem; font-weight: 700; color: var(--brand-navy);
}
.lg-summary-head .icon { color: var(--brand-blue); flex: none; }
.lg-summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lg-summary li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .9375rem; line-height: 1.55; color: var(--text);
}
.lg-summary li .pi-tick { margin-top: 2px; flex: none; }

/* Bagian / Pasal dokumen */
.lg-sec {
  padding-top: var(--sp-7);
  margin-top: var(--sp-7);
  border-top: 1px solid rgba(214, 230, 247, .85);
  scroll-margin-top: 104px;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.lg-sec:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.lg-sec.lg-anim { opacity: 0; transform: translateY(16px); }
.lg-sec.lg-anim.is-in { opacity: 1; transform: none; }

.lg-sec-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.lg-sec-num {
  flex: none; display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, #EAF2FC, #DCEBFB);
  border: 1px solid #C8DDF6;
  font-size: .8125rem; font-weight: 700; color: var(--brand-blue);
}
.lg-sec h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.28;
  color: var(--brand-navy);
}
.lg-sec p {
  margin: 0 0 14px;
  font-size: .96875rem; line-height: 1.75; color: var(--text);
}
.lg-sec p:last-child { margin-bottom: 0; }
.lg-sec ul {
  margin: 0 0 14px; padding: 0 0 0 20px;
  display: grid; gap: 8px;
}
.lg-sec li {
  font-size: .95rem; line-height: 1.68; color: var(--text);
}
.lg-sec li strong { color: var(--brand-navy); }
.lg-sec a {
  color: var(--brand-blue); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}
.lg-sec a:hover { color: var(--brand-navy); }

/* Kartu grid kecil di dalam pasal (misal hak pengguna / cakupan layanan) */
.lg-pill-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin: 16px 0;
}
.lg-pill-card {
  background: rgba(248, 250, 253, .92);
  border: 1px solid #DCE7F5;
  border-radius: 14px;
  padding: 14px 16px;
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.lg-pill-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-sky-light);
  box-shadow: 0 8px 20px -14px rgba(74, 112, 182, .35);
}
.lg-pill-card strong {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px; font-size: .925rem; color: var(--brand-navy);
}
.lg-pill-card strong .icon { color: var(--brand-blue); flex: none; }
.lg-pill-card p { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--text-muted); }

/* Kartu Kontak Legal di bawah dokumen */
.lg-contact-box {
  margin-top: var(--sp-8);
  padding: clamp(20px, 3vw, 28px);
  border-radius: 18px;
  background: linear-gradient(135deg, #162544 0%, #243C6B 100%);
  color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.lg-contact-box h3 { margin: 0 0 6px; font-size: 1.15rem; color: #fff; }
.lg-contact-box p { margin: 0; font-size: .9rem; color: rgba(255, 255, 255, .82); max-width: 48ch; }
.lg-contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lg-contact-actions .btn { white-space: nowrap; }

/* ─── Keyframes ────────────────────────────────────────────────────────── */
@keyframes lgFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes lgWmFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* ─── Responsif Tablet / iPad (<= 1024px) ──────────────────────────────── */
@media (max-width: 1024px) {
  .lg-layout { grid-template-columns: 1fr; gap: 0; }
  .lg-toc-aside { display: none; }
  .lg-toc-mobile { display: block; }
  .lg-paper { padding: clamp(24px, 4vw, 38px); }
  .lg-wm-item picture, .lg-wm-item img { width: clamp(180px, 38vw, 260px); }
}

/* ─── Responsif HP (<= 640px) ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .lg-hero { padding: 104px 0 var(--sp-8); }
  .lg-main { padding: var(--sp-6) 0 var(--sp-12); }
  .lg-switch { display: flex; width: 100%; }
  .lg-switch a { flex: 1; justify-content: center; padding: 9px 10px; font-size: .8125rem; }
  .lg-paper { padding: 22px 18px; border-radius: 18px; }
  .lg-pill-grid { grid-template-columns: 1fr; }
  .lg-sec { scroll-margin-top: 84px; }
  .lg-wm-item { opacity: 0.048; }
  .lg-wm-item picture, .lg-wm-item img { width: 175px; }
  .lg-wm-seal { font-size: .68rem; letter-spacing: .22em; }
  .lg-contact-actions { width: 100%; }
  .lg-contact-actions .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-hero-inner, .lg-toc-aside, .lg-paper, .lg-wm-item { animation: none !important; }
  .lg-sec.lg-anim { opacity: 1; transform: none; transition: none; }
  .lg-progress-bar { transition: none; }
}