/* ==========================================================================
   site.css — halaman publik: navbar (menyatu dengan latar, bar melayang saat digulir), footer, login/onboarding, dokumentasi,
   legal, dan error. Netral hangat + aksen hitam, sama dengan aplikasi.
   ========================================================================== */

.site-body { background: var(--page); background-image: var(--page-wash); }

.container { width: min(1180px, 100% - 40px); margin: 0 auto; }
.container-narrow { width: min(760px, 100% - 40px); margin: 0 auto; }

/* --- Navbar -------------------------------------------------------------------------
   Di posisi paling atas menyatu dengan latar (tanpa bar & bayangan); setelah digulir site.js menambah .is-scrolled
   dan bar melayang muncul. Lebar isi = .container (1180px) supaya logo sejajar dengan teks hero. */

.site-header { position: sticky; top: 12px; z-index: 40; padding: 0 8px; }
.site-header-inner {
    position: relative; isolation: isolate;
    display: flex; align-items: center; gap: 18px;
    width: min(1204px, 100%); height: 54px; margin: 12px auto 0; padding: 0 12px;
    border-radius: 16px;
}
/* Latar bar di lapisan sendiri supaya muncul dengan memudar (opacity), bukan menganimasikan bayangan. */
.site-header-inner::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
    background: rgba(255, 255, 255, .86); box-shadow: var(--sh-3);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    opacity: 0; transition: opacity .2s var(--ease);
}
.site-header.is-scrolled .site-header-inner::before { opacity: 1; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand .brand-app-icon { border-radius: 7px; box-shadow: var(--sh-ink); }
.brand-word { font-size: 15px; font-weight: 600; letter-spacing: -.35px; white-space: nowrap; }
.brand-word span { color: var(--ink-3); font-weight: 500; }
.site-nav {
    display: flex; align-items: center; gap: 2px; margin: 0 auto; padding: 3px;
    border-radius: 11px; background: rgba(19, 41, 61, .045);
}
.site-nav a {
    padding: 5px 12px; border-radius: 8px; color: var(--ink-2); font-size: var(--fs-md); font-weight: 500; text-decoration: none;
    transition: color .15s var(--ease), background-color .15s var(--ease);
}
.site-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .55); text-decoration: none; }
/* Menu aktif (halaman atau bagian beranda yang sedang dibaca): pil putih berbayang, teks hitam. */
.site-nav a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.site-cta { display: flex; align-items: center; gap: 6px; }
.site-login { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: var(--fs-md); font-weight: 500; }
.site-login:hover { color: var(--ink); background: rgba(19, 41, 61, .05); text-decoration: none; }
.site-cta .btn { border-radius: 9px; }

/* --- Footer --------------------------------------------------------------------- */

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .45); }
.site-footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; width: min(1120px, 100% - 40px); margin: 0 auto; padding: 48px 0 36px; }
.site-footer-brand { display: grid; gap: 10px; align-content: start; }
.site-footer-brand p { max-width: 34ch; font-size: var(--fs-md); color: var(--ink-2); }
.site-footer-by { font-size: var(--fs-sm) !important; color: var(--ink-3) !important; }
.site-footer-by a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
.site-footer-col { display: grid; gap: 8px; align-content: start; }
.site-footer-col .eyebrow { margin-bottom: 4px; color: var(--ink); }
.site-footer-col a { width: fit-content; color: var(--ink-2); font-size: var(--fs-md); }
.site-footer-col a:hover { color: var(--ink); }
.site-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; width: min(1120px, 100% - 40px); margin: 0 auto; padding: 16px 0 28px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-3); }
.site-footer-bottom a { color: var(--ink-3); }

/* --- Login / onboarding / undangan -------------------------------------------------- */

/* Grid tipis di belakang kartu login & error, memudar ke tepi (lapisan tetap di belakang isi). */
.auth-body::before, .error-body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 44px 44px; background-position: center center;
    -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 46%, #000 20%, transparent 78%);
    mask-image: radial-gradient(ellipse 58% 62% at 50% 46%, #000 20%, transparent 78%);
    opacity: .75;
}
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(1120px, 100% - 40px); margin: 0 auto; padding: 22px 0; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-md); color: var(--ink-2); }
.auth-back .icon { width: 13px; height: 13px; }
.auth-main { display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px 16px 64px; }
.auth-card {
    position: relative; display: grid; gap: 16px; width: min(420px, 100%); padding: 30px 28px;
    border-radius: 16px; background: var(--grad-card); box-shadow: var(--sh-3);
}
.auth-card::after { content: ""; position: absolute; inset: 0 0 auto; height: 1px; border-radius: 16px 16px 0 0; background: linear-gradient(90deg, transparent, #FFFFFF 22%, #FFFFFF 78%, transparent); }
.auth-card h1 { font-size: 21px; font-weight: 600; letter-spacing: -.6px; }
.auth-card .lede { margin-top: -8px; font-size: var(--fs-base); color: var(--ink-2); line-height: 1.55; }
.auth-foot { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.6; }
.auth-foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
.auth-legal { display: flex; gap: 16px; font-size: var(--fs-sm); }
.auth-legal a { color: var(--ink-3); }
.invite-list { display: grid; gap: 8px; }
.invite-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.invite-item .ws-initials-lg { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--grad-ink); color: #FFFFFF; font-size: 11px; font-weight: 600; box-shadow: var(--sh-ink); }
.invite-text { display: grid; flex: 1; min-width: 0; gap: 1px; line-height: 1.35; }
.invite-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.auth-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: var(--fs-sm); color: var(--ink-3); }
.auth-account strong { font-weight: 500; color: var(--ink-2); overflow-wrap: anywhere; }

/* Tombol Google versi gelap (sesuai panduan merek Google: latar #131314, logo G berwarna) */
.btn-google-dark { background: #131314; color: #FFFFFF; gap: 10px; box-shadow: var(--sh-ink); }
.btn-google-dark:hover { color: #FFFFFF; box-shadow: var(--sh-ink), 0 0 0 3px rgba(19, 41, 61, .12); }
.btn-google-dark img { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: #FFFFFF; box-sizing: content-box; }

/* --- Dokumen (dokumentasi & legal) ------------------------------------------------------ */

.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; width: min(1180px, 100% - 40px); margin: 40px auto 0; }
.doc-layout > * { min-width: 0; }
.doc-nav { position: sticky; top: 92px; align-self: start; display: grid; gap: 1px; padding: 12px; border-radius: var(--r-lg); background: var(--grad-card); box-shadow: var(--sh-2); }
.doc-nav .eyebrow { margin: 4px 8px 6px; }
.doc-nav a { padding: 6px 9px; border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-md); text-decoration: none; }
.doc-nav a:hover { background: rgba(19, 41, 61, .045); color: var(--ink); }
.doc-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--sh-1); }

.prose { max-width: 74ch; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.prose h1 { font-size: 30px; font-weight: 700; letter-spacing: -1px; color: var(--ink); margin-bottom: 8px; }
.prose h2 { font-size: 20px; letter-spacing: -.4px; color: var(--ink); margin: 36px 0 10px; }
.prose h3 { font-size: 16px; color: var(--ink); margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol, .prose table, .prose pre, .prose figure { margin-bottom: 14px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose ol { list-style: decimal; padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose li::marker { color: var(--ink-3); }
.prose strong { color: var(--ink); }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.prose a:hover { text-decoration-color: var(--ink); }
.prose .doc-meta { margin-bottom: 26px; font-size: var(--fs-base); color: var(--ink-3); }
.prose table { width: 100%; font-size: var(--fs-md); border-collapse: separate; border-spacing: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-2); overflow: hidden; }
.prose th, .prose td { padding: 9px 12px; border-top: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.prose thead th { border-top: 0; background: var(--surface-sub); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-3); }
.prose tbody tr:first-child td, .prose tbody tr:first-child th { border-top: 1px solid var(--line-soft); }
.prose table:not(:has(thead)) tbody tr:first-child td, .prose table:not(:has(thead)) tbody tr:first-child th { border-top: 0; }
.prose code { padding: 1px 5px; border-radius: 5px; background: var(--surface-alt); box-shadow: inset 0 0 0 1px var(--line-soft); font-size: .86em; color: var(--ink); }
.prose pre { padding: 14px 16px; border-radius: var(--r-lg); background: #18181A; color: #EDEDE8; overflow-x: auto; font-size: 12.5px; line-height: 1.6; box-shadow: var(--sh-2); }
.prose pre code { padding: 0; background: none; box-shadow: none; color: inherit; font-size: inherit; }
.prose figure img { width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.prose figure.shot { margin: 18px 0 22px; }
.prose figcaption { margin-top: 8px; font-size: var(--fs-md); color: var(--ink-3); }
.prose .callout { position: relative; padding: 11px 14px 11px 17px; border-radius: var(--r); background: var(--grad-card); box-shadow: var(--sh-1); overflow: hidden; }
.prose .callout::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--purple); }
.prose td code, .prose th code { overflow-wrap: anywhere; }

.doc-index { list-style: none !important; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.doc-index li { margin: 0 !important; }
.doc-index a { display: grid; align-content: start; gap: 3px; height: 100%; padding: 14px 16px 15px; border-radius: var(--r-lg); background: var(--grad-card); box-shadow: var(--sh-2); color: var(--ink); text-decoration: none; transition: box-shadow .14s; }
.doc-index a:hover { box-shadow: var(--sh-3); text-decoration: none; }
.doc-index-no { margin-bottom: 8px; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink-3); }
.doc-index strong { font-size: 15px; font-weight: 600; letter-spacing: -.25px; }
.doc-index-sum { font-size: var(--fs-md); line-height: 1.5; color: var(--ink-3); }
@media (max-width: 640px) { .doc-index { grid-template-columns: minmax(0, 1fr); } }
.prose kbd { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 5px; background: var(--surface); box-shadow: var(--sh-1); font-size: .8em; line-height: 1.6; text-align: center; color: var(--ink-2); }

/* Diagram alur di dokumentasi */
.prose ol.flow { list-style: none; padding: 0; counter-reset: flow; display: grid; gap: 0; }
.prose ol.flow li { position: relative; display: grid; gap: 2px; margin: 0; padding: 12px 14px 12px 50px; border-radius: var(--r-lg); background: var(--grad-card); box-shadow: var(--sh-2); counter-increment: flow; }
.prose ol.flow li + li { margin-top: 18px; }
.prose ol.flow li + li::before { content: ""; position: absolute; left: 26px; top: -19px; width: 1px; height: 18px; background: var(--line-strong); }
.prose ol.flow li::after { content: counter(flow); position: absolute; left: 14px; top: 13px; width: 24px; height: 24px; border-radius: 7px; background: var(--black); color: #FFFFFF; font-family: var(--font-mono); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.prose ol.flow li span { color: var(--ink-3); font-size: var(--fs-md); }

/* --- Error ------------------------------------------------------------------------------ */

.error-body { min-height: 100vh; display: grid; place-items: center; }
.error-page { display: grid; justify-items: center; gap: 10px; width: min(520px, 100% - 40px); padding: 36px 28px; border-radius: 16px; background: var(--grad-card); box-shadow: var(--sh-3); text-align: center; }
.error-brand { margin-bottom: 6px; }
.error-brand svg { border-radius: 10px; box-shadow: var(--sh-ink); }
.error-page h1 { font-size: 22px; font-weight: 600; letter-spacing: -.6px; }
.error-text { max-width: 44ch; font-size: var(--fs-base); color: var(--ink-2); }
.error-actions { display: flex; gap: 8px; margin-top: 10px; }

/* --- Responsif --------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .site-nav { display: none; }
    .site-cta { margin-left: auto; }
    .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 24px; }
    .doc-nav { position: static; grid-auto-flow: column; justify-content: start; overflow-x: auto; padding: 6px; }
    .doc-nav .eyebrow { display: none; }
    .doc-nav a { white-space: nowrap; }
    .site-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .site-header { top: 8px; }
    .site-header-inner { margin-top: 8px; gap: 10px; padding: 0 8px 0 12px; }

    .site-login { display: none; }
    .auth-card { padding: 24px 20px; }
    .prose table { display: block; overflow-x: auto; }
}

/* Kepala & poin di kartu masuk */
.auth-head { display: grid; gap: 6px; }
.auth-head .lede { margin-top: 0; }
.auth-points { display: grid; gap: 6px; margin: -2px 0 0; padding: 0; list-style: none; font-size: var(--fs-md); color: var(--ink-2); }
.auth-points li { display: flex; gap: 7px; align-items: flex-start; }
.auth-points .icon { width: 13px; height: 13px; margin-top: 3px; color: var(--green); }
