:root {
  --ink: #08100e;
  --ink-2: #0e1915;
  --ink-3: #15231d;
  --line: rgba(231, 237, 233, .14);
  --line-strong: rgba(231, 237, 233, .32);
  --mist: #e7ede9;
  --mist-dim: #9fb0a8;
  --moss: #8fc49a;
  --tide: #7aa2ff;
  --sand: #d9c48f;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --prose: "Newsreader", Georgia, "Times New Roman", serif;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --header-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0; min-height: 100vh; background: var(--ink); color: var(--mist);
  font-family: var(--display); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body:has(dialog[open]) { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--moss); color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip {
  position: fixed; left: var(--pad); top: -4rem; z-index: 300; background: var(--mist); color: var(--ink);
  padding: .6rem 1rem; transition: top .2s;
}
.skip:focus { top: .75rem; }

/* grain halus statis (tanpa animasi berkelanjutan) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress {
  position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 120; background: var(--moss);
  transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(8, 16, 14, .92), rgba(8, 16, 14, 0));
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-sub { font-size: .75rem; color: var(--mist-dim); }
.brand-sub a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.brand-sub a:hover { color: var(--mist); }
.header-actions { display: flex; align-items: center; gap: .75rem; }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button { padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; color: var(--mist-dim); transition: background .2s, color .2s; }
.lang button[aria-pressed="true"] { background: var(--mist); color: var(--ink); }

.pill {
  display: inline-flex; align-items: center; gap: .6rem; padding: .55rem 1.1rem; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: .9rem; transition: background .25s, color .25s, border-color .25s;
}
.pill:hover { background: var(--mist); color: var(--ink); border-color: var(--mist); }
.back-link { display: none; }
@media (min-width: 880px) { .back-link { display: inline-flex; } }

.menu-icon { width: 18px; height: 10px; position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; }
.menu-icon::before { top: 0; } .menu-icon::after { bottom: 0; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 1rem 1.7rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; transition: background .25s, color .25s, border-color .25s;
}
.btn-solid { background: var(--mist); color: var(--ink); }
.btn-solid:hover { background: var(--moss); }
.btn-ghost { border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--mist); background: rgba(231, 237, 233, .08); }
.btn-inner { display: block; pointer-events: none; }

/* ---------- Hero ---------- */
.hero-track { position: relative; height: 100svh; min-height: 640px; }
.motion .hero-track { height: 190svh; }
.hero-stage {
  position: sticky; top: 0; height: 100svh; min-height: 640px; overflow: hidden;
  display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; padding: var(--header-h) var(--pad) 3rem; column-gap: 1.5rem;
}
.hero-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 55% at 72% 48%, rgba(143, 196, 154, .13), transparent 70%),
              radial-gradient(40% 40% at 10% 100%, rgba(122, 162, 255, .08), transparent 70%);
}
.hero-copy { grid-column: 1 / -1; grid-row: 1; position: relative; z-index: 2; max-width: 60rem; }
.hero-title {
  font-size: clamp(3rem, 9.2vw, 9.5rem); line-height: .94; font-weight: 600; letter-spacing: -.035em;
  font-variation-settings: "wdth" 82; margin-bottom: 2rem;
}
.hero-title .line { display: block; }
.hero-title .line + .line { color: var(--moss); font-style: normal; }
.mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.word { display: inline-block; will-change: transform; }
.js .hero .word { transform: translateY(105%); }
.js .hero-fade, .js #calyptra-art, .js .site-header { opacity: 0; }
.hero-desc { max-width: 34rem; color: var(--mist-dim); font-size: clamp(1rem, 1.3vw, 1.15rem); margin-bottom: 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero-art { grid-column: 7 / -1; grid-row: 1; justify-self: end; align-self: center; width: min(46vw, 560px); opacity: .95; z-index: 1; }
@media (max-width: 879px) {
  .hero-art { grid-column: 1 / -1; justify-self: center; width: min(78vw, 360px); opacity: .28; position: absolute; right: -8%; top: 14%; }
}
#calyptra-art { color: var(--moss); overflow: visible; }
#calyptra-art #cap { transform-box: view-box; transform-origin: 240px 262px; }
#calyptra-art .spore { transform-box: fill-box; transform-origin: center; }

.hero-cue { position: absolute; left: var(--pad); bottom: 1.5rem; z-index: 2; font-size: .85rem; color: var(--mist-dim); display: flex; align-items: center; gap: .75rem; }
.hero-cue::before { content: ""; width: 2.5rem; height: 1px; background: var(--line-strong); }

/* ---------- Prinsip ---------- */
.principle { padding: clamp(6rem, 16vw, 14rem) var(--pad); border-top: 1px solid var(--line); }
.principle-body {
  max-width: 62rem; margin: 0 auto; font-family: var(--prose); font-style: italic; font-weight: 300;
  font-size: clamp(1.7rem, 4.2vw, 3.6rem); line-height: 1.22; letter-spacing: -.01em;
}
.motion .principle .pw { opacity: .16; }
.principle-src { max-width: 62rem; margin: 2.25rem auto 0; font-size: .9rem; color: var(--mist-dim); }

/* ---------- Bidang kerja ---------- */
.section { padding: clamp(5rem, 11vw, 9rem) var(--pad); }
.section-head { max-width: 80rem; margin: 0 auto clamp(2.5rem, 6vw, 5rem); }
.section-head h2 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.03em; font-weight: 600; font-variation-settings: "wdth" 88; margin-bottom: 1rem; }
.section-head p { color: var(--mist-dim); max-width: 36rem; }

.pillars { max-width: 80rem; margin: 0 auto; }
.pillar { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; padding: clamp(1.75rem, 4vw, 3rem) 0; }
.pillar-line { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong); transform-origin: 0 50%; }
.motion .pillar-line { transform: scaleX(0); }
.motion .mark { transform: scale(0); }
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar h3 { grid-column: 1 / span 7; font-size: clamp(1.8rem, 4.6vw, 4rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 600; font-variation-settings: "wdth" 86; display: flex; gap: 1rem; align-items: flex-start; }
.pillar p { grid-column: 9 / -1; color: var(--mist-dim); align-self: end; max-width: 26rem; }
.mark { flex: none; width: .55em; height: .55em; border-radius: 50%; margin-top: .22em; background: var(--c, var(--moss)); box-shadow: 0 0 0 .2em rgba(255, 255, 255, .04); }
@media (max-width: 879px) {
  .pillar h3, .pillar p { grid-column: 1 / -1; }
  .pillar p { margin-top: 1rem; }
}

/* ---------- Dokumentasi ---------- */
.docs { background: var(--ink-2); border-top: 1px solid var(--line); }
.docs-top { max-width: 80rem; margin: 0 auto clamp(2rem, 4vw, 3rem); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.docs-top .section-head { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; color: var(--mist-dim); transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--line-strong); color: var(--mist); }
.chip[aria-pressed="true"] { background: var(--mist); color: var(--ink); border-color: var(--mist); }

.doc-grid { max-width: 80rem; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem) 1.5rem; }
@media (min-width: 900px) { .doc-grid .doc:first-child { grid-column: span 2; } }
.doc { position: relative; display: flex; flex-direction: column; gap: .9rem; }
.doc-media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink-3); border-radius: 2px; }
.doc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.doc:hover .doc-media img { transform: scale(1.04); }
.doc-media.ph { display: grid; place-items: center; color: var(--c, var(--moss)); background: radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--c, var(--moss)) 22%, transparent), transparent 75%), var(--ink-3); }
.doc-media.ph svg { width: 28%; opacity: .8; }
.doc-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .85rem; color: var(--mist-dim); }
.doc-meta .cat { color: var(--c, var(--moss)); }
.doc h3 { font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 600; }
.doc-sum { color: var(--mist-dim); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 48ch; }
.doc-open { position: absolute; inset: 0; z-index: 1; }
.doc-open:focus-visible { outline-offset: 6px; }
.draft-flag { position: absolute; left: .75rem; top: .75rem; background: var(--sand); color: var(--ink); font-size: .75rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; z-index: 2; }

.state { max-width: 80rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; align-items: start; }
.state h3 { grid-column: 1 / span 6; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 600; }
.state p { grid-column: 8 / -1; color: var(--mist-dim); max-width: 28rem; }
.state .btn { grid-column: 8 / -1; justify-self: start; margin-top: 1.25rem; }
@media (max-width: 879px) { .state h3, .state p, .state .btn { grid-column: 1 / -1; } .state p { margin-top: .75rem; } }

.note { max-width: 80rem; margin: clamp(3.5rem, 8vw, 6rem) auto 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 1.5rem; }
.note h3 { grid-column: 1 / span 4; font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.note p { grid-column: 6 / -1; font-family: var(--prose); font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.45; color: var(--mist); max-width: 40rem; }
@media (max-width: 879px) { .note h3, .note p { grid-column: 1 / -1; } .note p { margin-top: .75rem; } }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(4rem, 9vw, 7rem) var(--pad) 2rem; border-top: 1px solid var(--line); }
.footer-cta { display: inline-block; font-size: clamp(2rem, 7vw, 6rem); line-height: 1; letter-spacing: -.035em; font-weight: 600; font-variation-settings: "wdth" 84; border-bottom: 2px solid var(--line-strong); padding-bottom: .15em; transition: color .3s, border-color .3s; }
.footer-cta:hover { color: var(--moss); border-color: var(--moss); }
.footer-meta { margin-top: clamp(3rem, 6vw, 5rem); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; font-size: .85rem; color: var(--mist-dim); }
.footer-meta p + p { margin-top: .25rem; }
.footer-links { display: flex; gap: 1.25rem; align-items: flex-start; }
.footer-links button { color: var(--mist-dim); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.footer-links button:hover { color: var(--mist); }
.is-admin-only[hidden], [hidden] { display: none !important; }

.fab { position: fixed; right: var(--pad); bottom: 1.25rem; z-index: 90; background: var(--moss); color: var(--ink); font-weight: 600; padding: .8rem 1.3rem; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.fab:hover { background: var(--mist); }

/* ---------- Menu layar penuh ---------- */
dialog { color: var(--mist); }
.menu { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; padding: 0; background: var(--ink); }
.menu::backdrop { background: var(--ink); }
.menu-inner { min-height: 100%; padding: 1.25rem var(--pad) 2.5rem; display: flex; flex-direction: column; }
.menu-bar { display: flex; justify-content: space-between; align-items: center; height: calc(var(--header-h) - 1.25rem); }
.menu-links { margin: auto 0; display: flex; flex-direction: column; padding: 2rem 0; }
.menu-links a { display: block; font-size: clamp(2.6rem, 9vw, 6.5rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; font-variation-settings: "wdth" 82; padding: .15em 0; border-bottom: 1px solid var(--line); transition: color .25s, padding-left .35s var(--ease); }
.menu-links a:hover, .menu-links a:focus-visible { color: var(--moss); padding-left: .35em; }
.menu-foot { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }

/* ---------- Dialog detail & admin ---------- */
.sheet { width: min(960px, calc(100% - 1.5rem)); max-height: min(92vh, 100%); margin: auto; padding: 0; border: 1px solid var(--line-strong); background: var(--ink-2); border-radius: 6px; overflow: auto; overscroll-behavior: contain; }
.sheet::backdrop { background: rgba(4, 8, 7, .78); backdrop-filter: blur(6px); }
.sheet-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.25rem; background: rgba(14, 25, 21, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.sheet-bar h2 { font-size: 1.05rem; font-weight: 600; }
.icon-btn { padding: .4rem .9rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .85rem; }
.icon-btn:hover { background: var(--mist); color: var(--ink); }
.sheet-body { padding: clamp(1.25rem, 4vw, 2.75rem); }
.detail-cover { margin: calc(-1 * clamp(1.25rem, 4vw, 2.75rem)) calc(-1 * clamp(1.25rem, 4vw, 2.75rem)) 2rem; aspect-ratio: 16 / 8; overflow: hidden; background: var(--ink-3); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail h2 { font-size: clamp(1.9rem, 4.5vw, 3.4rem); line-height: 1.02; letter-spacing: -.03em; font-weight: 600; font-variation-settings: "wdth" 88; margin: .75rem 0 1.5rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem 1.5rem; padding: 1.1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.facts dt { font-size: .8rem; color: var(--mist-dim); }
.facts dd { margin: .1rem 0 0; font-weight: 600; }
.prose { font-family: var(--prose); font-size: 1.2rem; line-height: 1.65; max-width: 62ch; }
.prose p + p { margin-top: 1.1em; }
.gallery { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .75rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink-3); border-radius: 2px; }

/* ---------- Form admin ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .85rem; color: var(--mist-dim); margin-bottom: .3rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--mist); background: var(--ink); border: 1px solid var(--line-strong); border-radius: 4px; padding: .65rem .8rem;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--tide); outline: none; box-shadow: 0 0 0 2px rgba(122, 162, 255, .35); }
.field .hint { font-size: .8rem; color: var(--mist-dim); margin-top: .3rem; }
.check { display: flex; align-items: center; gap: .6rem; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--moss); }
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.thumb { position: relative; width: 84px; height: 64px; border-radius: 3px; overflow: hidden; background: var(--ink-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; right: 2px; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .75); font-size: .8rem; line-height: 1; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.form-error { color: #ffb4a8; font-size: .9rem; margin-top: 1rem; min-height: 1.2em; }
.admin-list { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.admin-row strong { font-weight: 600; }
.admin-row small { display: block; color: var(--mist-dim); }
.admin-row .acts { display: flex; gap: .5rem; flex: none; }
.login-body { max-width: 26rem; }
.login-body .btn { width: 100%; margin-top: .75rem; }
.divider { text-align: center; color: var(--mist-dim); font-size: .85rem; margin: 1.25rem 0 .25rem; }

/* ---------- Kursor & toast ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 250; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(143, 196, 154, .7); border-radius: 50%; pointer-events: none; opacity: 0; transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s, opacity .3s; }
.cursor.on { opacity: 1; }
.cursor.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(143, 196, 154, .1); }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .cursor { display: none; } }

#toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 400; transform: translate(-50%, 240%); opacity: 0; visibility: hidden; background: var(--mist); color: var(--ink); padding: .8rem 1.3rem; border-radius: 999px; font-size: .92rem; max-width: calc(100% - 2rem); transition: transform .5s var(--ease), opacity .3s, visibility .5s; }
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Tambahan ---------- */
#mk2 { --c: var(--tide); }
#mk3 { --c: var(--sand); }
.js .hero-title .line { visibility: hidden; }

.cat-bantuan { --c: var(--moss); }
.cat-pendidikan { --c: var(--tide); }
.cat-pemberdayaan { --c: var(--sand); }
.cat-laporan { --c: var(--mist-dim); }
