/* ============================================================
   ASTA — Reset, tipografi dasar, utilitas
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--s-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--primary-600); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

ul, ol { margin: 0; padding-left: 1.2em; }

code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }

hr {
  border: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--bg);
  box-shadow: var(--nm-in-soft);
  margin: var(--s-5) 0;
}

/* ---- Fokus terlihat (wajib untuk aksesibilitas) ---- */
:focus-visible {
  outline: 3px solid var(--primary-400);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ---- Screen reader only ---- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--s-3);
  z-index: 999;
  background: var(--primary);
  color: var(--text-inv);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
}
.skip-link:focus { left: var(--s-3); }

/* ---- Scrollbar halus ---- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--sh-dark);
  border-radius: var(--r-pill);
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ============================================================
   Utilitas layout
   ============================================================ */
.row { display: flex; align-items: center; gap: var(--s-3); }
.row-t { display: flex; align-items: flex-start; gap: var(--s-3); }
.col { display: flex; flex-direction: column; gap: var(--s-3); }
.between { justify-content: space-between; }
.center { justify-content: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.shrink-0 { flex-shrink: 0; }

.grid { display: grid; gap: var(--s-4); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
}

/* ---- Teks ---- */
.t-xs { font-size: var(--fs-xs); }
.t-sm { font-size: var(--fs-sm); }
.t-lg { font-size: var(--fs-lg); }
.t-xl { font-size: var(--fs-xl); }
.t-2xl { font-size: var(--fs-2xl); }
.muted { color: var(--text-3); }
.muted-2 { color: var(--text-2); }
.bold { font-weight: 650; }
.semi { font-weight: 600; }
.upper { text-transform: uppercase; letter-spacing: .09em; font-size: var(--fs-xs); font-weight: 700; }
.right { text-align: right; }
.center-t { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.c-primary { color: var(--primary); }
.c-success { color: var(--success); }
.c-warning { color: var(--warning); }
.c-danger  { color: var(--danger); }
.c-teal    { color: var(--teal); }
.c-violet  { color: var(--violet); }

/* ---- Spasi ---- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); } .mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); }
.gap-4 { gap: var(--s-4); } .gap-5 { gap: var(--s-5); }

.hidden { display: none !important; }
.full { width: 100%; }
.rel { position: relative; }
