/**
 * global.css
 * ------------------------------------------------------
 * Gaya dasar yang berlaku umum di seluruh aplikasi:
 * font loading, tipografi dasar, dan elemen bawaan.
 * ------------------------------------------------------
 */

/* Font Poppins dimuat lewat <link> di <head> tiap halaman (lebih cepat dari @import). */

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  line-height: 1.3;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  color: var(--color-text-secondary);
}

small,
.text-caption {
  font-size: var(--font-size-caption);
  color: var(--color-text-muted);
}

a {
  color: var(--color-primary);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-md) 0;
}

::selection {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-text-muted);
}

/* Focus ring aksesibilitas, konsisten untuk seluruh elemen interaktif */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}
