/* Base styles */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--foreground);
  background: var(--background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable; /* cegah lonjakan layout saat scrollbar muncul/hilang */
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
}

button, input, select, textarea { font: inherit; color: inherit; }

button, a, input, select, textarea, label { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

img, svg { display: block; }

[hidden] { display: none !important; }

h1, h2, h3, h4, p { margin: 0; }

h1 { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: var(--text-md); line-height: var(--lh-md); font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::placeholder { color: var(--foreground-tertiary); }

.tabular { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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