/* ============================================
   Opensim — Portal Open-Source Developer Lokal
   Clean · Fast · Accessible
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FFFFFF;
  --bg-soft: #F4F8F6;
  --bg-2: #ECF2EF;
  --ink: #122019;
  --ink-2: #2C3B34;
  --text: #41514A;
  --slate: #6B7A72;
  --muted: #97A39C;
  --line: #E1E9E4;
  --line-2: #CDD9D2;
  --paper: #FFFFFF;
  --emerald: #0E9F6E;
  --emerald-deep: #0A7C56;
  --emerald-soft: #E7F6EF;
  --amber: #E8920C;
  --blue: #2D7FF0;
  --violet: #7C5CE0;
  --danger: #DB4B43;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1140px;
  --fd: 'Space Grotesk', system-ui, sans-serif;
  --fb: 'Inter', system-ui, -apple-system, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, monospace;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--fb); background: var(--bg); color: var(--text); line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--emerald-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
code, kbd { font-family: var(--fm); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--emerald); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 200; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--fd); font-weight: 600; font-size: 14.5px; padding: 11px 22px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--emerald); color: #fff; }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(14,159,110,.3); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--emerald); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--fd); font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--emerald); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark svg { width: 18px; height: 18px; }
.brand .zip { color: var(--emerald); }
.nav { display: none; }
.nav ul { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--slate); font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.header-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
@media (min-width: 900px) { .nav { display: block; } .nav-toggle { display: none; } }
.mobile-nav { display: none; border-top: 1px solid var(--line); }
.mobile-nav.open { display: block; }
.mobile-nav ul { flex-direction: column; padding: 8px 0; }
.mobile-nav a { display: block; padding: 12px 20px; color: var(--slate); font-weight: 500; }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: 64px 56px; text-align: center; background: linear-gradient(180deg, var(--emerald-soft), transparent); }
.hero-inner { position: relative; max-width: 720px; margin-inline: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 15px; font-size: 13px; color: var(--slate); margin-bottom: 22px; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); }
.hero h1 { font-family: var(--fd); font-size: clamp(30px, 5.5vw, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 16px; }
.hero h1 .em { color: var(--emerald); }
.hero p { font-size: clamp(16px, 2.2vw, 19px); color: var(--slate); max-width: 56ch; margin: 0 auto 28px; }

/* Search box */
.searchbox { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; padding: 7px 7px 7px 16px; box-shadow: 0 6px 20px rgba(18,32,25,.05); }
.searchbox input { flex: 1; border: 0; outline: 0; font-family: var(--fb); font-size: 15.5px; color: var(--ink); background: transparent; }
.searchbox input::placeholder { color: var(--muted); }
.hero-meta { margin-top: 18px; font-size: 13px; color: var(--muted); display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* Section */
.section { padding-block: 56px; }
.section-head { margin-bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--fd); font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.section-head .more { font-size: 14px; font-weight: 600; }
.section-head p { color: var(--slate); font-size: 15px; margin-top: 6px; }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-tile { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .18s, box-shadow .18s, border-color .18s; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(18,32,25,.08); border-color: transparent; text-decoration: none; }
.cat-ic { width: 46px; height: 46px; border-radius: 11px; background: var(--emerald-soft); display: grid; place-items: center; font-size: 23px; margin-bottom: 14px; }
.cat-tile h3 { font-family: var(--fd); font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.cat-tile .count { font-size: 12.5px; color: var(--muted); }

/* Tool cards */
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .18s, box-shadow .18s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(18,32,25,.09); }
.tool-card .tc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.tc-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--bg-2); display: grid; place-items: center; font-size: 21px; flex-shrink: 0; }
.tool-card h3 { font-family: var(--fd); font-size: 17px; font-weight: 600; line-height: 1.25; }
.tool-card h3 a { color: var(--ink); }
.tool-card h3 a:hover { color: var(--emerald-deep); text-decoration: none; }
.tool-card .tc-desc { font-size: 13.5px; color: var(--slate); line-height: 1.55; flex: 1; margin-bottom: 14px; }
.tc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-family: var(--fm); font-size: 11px; color: var(--slate); background: var(--bg-2); border-radius: 5px; padding: 3px 8px; }
.tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 13px; }
.badge-lic { font-family: var(--fm); font-size: 11px; font-weight: 500; color: var(--emerald-deep); background: var(--emerald-soft); border-radius: 5px; padding: 3px 8px; }
.badge-diff { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 5px; }
.diff-pemula { background: rgba(14,159,110,.12); color: var(--emerald-deep); }
.diff-menengah { background: rgba(232,146,12,.14); color: #B5710A; }

/* Catalog page */
.catalog-layout { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 900px) { .catalog-layout { grid-template-columns: 230px 1fr; align-items: start; } }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 80px; }
.filters h4 { font-family: var(--fd); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 12px; }
.filter-group { margin-bottom: 22px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-btn { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font-family: var(--fb); font-size: 14px; color: var(--text); padding: 8px 10px; border-radius: 8px; transition: background .15s, color .15s; }
.filter-btn:hover { background: var(--bg-soft); }
.filter-btn.active { background: var(--emerald-soft); color: var(--emerald-deep); font-weight: 600; }
.catalog-main .searchbox { max-width: none; margin-bottom: 18px; }
.catalog-count { font-size: 14px; color: var(--slate); margin-bottom: 18px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Tool detail */
.detail-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) { .detail-layout { grid-template-columns: 1fr 320px; align-items: start; } }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--emerald-deep); }
.detail-header { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.detail-ic { width: 60px; height: 60px; border-radius: 14px; background: var(--emerald-soft); display: grid; place-items: center; font-size: 30px; flex-shrink: 0; }
.detail-header h1 { font-family: var(--fd); font-size: clamp(26px,4vw,36px); font-weight: 700; color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; }
.detail-header .tagline { color: var(--slate); font-size: 16px; margin-top: 5px; }
.detail-body h2 { font-family: var(--fd); font-size: 21px; font-weight: 600; color: var(--ink); margin: 30px 0 12px; }
.detail-body p { font-size: 16px; color: var(--text); margin-bottom: 14px; }
.steps-list { counter-reset: st; display: flex; flex-direction: column; gap: 12px; }
.step-item { display: flex; gap: 14px; align-items: flex-start; }
.step-item .num { counter-increment: st; flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--emerald); color: #fff; font-family: var(--fd); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.step-item .num::before { content: counter(st); }
.step-item .txt { font-size: 15px; color: var(--text); padding-top: 2px; }
.codebox { position: relative; background: var(--ink); border-radius: 10px; padding: 14px 16px; margin: 6px 0; overflow-x: auto; }
.codebox code { color: #C3E88D; font-size: 13px; }
.copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.1); border: 0; color: #fff; font-size: 11px; padding: 4px 9px; border-radius: 6px; cursor: pointer; font-family: var(--fm); }
.req-list { display: flex; flex-direction: column; gap: 8px; }
.req-list li { font-size: 15px; color: var(--text); padding-left: 22px; position: relative; }
.req-list li::before { content: "›"; position: absolute; left: 4px; color: var(--emerald); font-weight: 700; }

/* Download sidebar */
.dl-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 80px; }
.dl-card .dl-size { font-family: var(--fd); font-size: 24px; font-weight: 700; color: var(--ink); }
.dl-card .dl-meta { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.dl-info { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.dl-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.dl-row .k { color: var(--muted); }
.dl-row .v { color: var(--ink); font-weight: 500; text-align: right; }
.checksum { font-family: var(--fm); font-size: 11px; color: var(--slate); word-break: break-all; background: var(--bg-soft); border-radius: 7px; padding: 9px 11px; margin-top: 14px; }
.checksum b { display: block; color: var(--muted); font-weight: 500; margin-bottom: 3px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.safety-note { font-size: 12px; color: var(--slate); margin-top: 14px; line-height: 1.5; }

/* Prose (guides/policy) */
.prose { max-width: 760px; }
.prose h1 { font-family: var(--fd); font-size: clamp(28px,4.5vw,40px); font-weight: 700; color: var(--ink); line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 16px; }
.prose .lead { font-size: 19px; color: var(--slate); margin-bottom: 28px; }
.prose h2 { font-family: var(--fd); font-size: 24px; font-weight: 600; color: var(--ink); margin: 36px 0 12px; }
.prose h3 { font-family: var(--fd); font-size: 19px; font-weight: 600; color: var(--ink); margin: 24px 0 8px; }
.prose p { font-size: 16.5px; color: var(--text); margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 16px; }
.prose li { margin-bottom: 8px; }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose strong { color: var(--ink); }
.prose code { background: var(--bg-2); padding: 2px 6px; border-radius: 5px; font-size: 14px; color: var(--emerald-deep); }
.callout { background: var(--emerald-soft); border-left: 4px solid var(--emerald); border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 20px 0; }
.callout.warn { background: rgba(232,146,12,.1); border-color: var(--amber); }
.callout strong { display: block; margin-bottom: 4px; }

/* License table */
.lic-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 18px 0; }
.lic-table th { background: var(--bg-soft); text-align: left; padding: 12px 14px; font-family: var(--fd); font-size: 13px; color: var(--ink); border: 1px solid var(--line); }
.lic-table td { padding: 11px 14px; border: 1px solid var(--line); color: var(--text); }
.lic-table td:first-child { font-family: var(--fm); font-weight: 500; color: var(--ink); white-space: nowrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-block: 48px 28px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: var(--slate); max-width: 34ch; }
.footer-col h4 { font-family: var(--fd); font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 13px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--slate); font-size: 14px; }
.footer-col a:hover { color: var(--emerald-deep); }
.footer-bottom { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* h1 di section-head (untuk halaman katalog) */
.section-head h1 { font-family: var(--fd); font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
