/* ==========================================================================
   Base: reset ringan + tipografi global
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  /* Scroll terjadi di dalam frame, bukan di dokumen. */
  overflow: hidden;
  overscroll-behavior: none;
}

/* Background halaman = area kiri-kanan frame di desktop. */
html {
  background: var(--color-page);
}

/* Di layar selebar HP, background halaman hanya terlihat di belakang status
   bar & toolbar browser (mis. Safari iOS 26) — samakan dengan warna section
   yang sedang tampil (--chrome-bg diisi browser-chrome.js). */
@media (max-width: 30rem) {
  html {
    background: var(--chrome-bg, var(--color-paper));
  }
}

body {
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: var(--border-w) solid var(--color-accent);
  outline-offset: 0.1875rem;
}

/* --- Utilitas ------------------------------------------------------------ */

/* Ampersand dekoratif pakai Oi */
.amp {
  font-family: var(--font-amp);
  font-weight: 400;
}

.icon {
  font-family: "Material Symbols Sharp";
  font-weight: normal;
  font-style: normal;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  /* Lebar tetap 1em: selama font ikon belum termuat, nama ikon (teks panjang)
     tidak mendorong layout. */
  width: 1em;
  overflow: hidden;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  user-select: none;
}

/* Atribut hidden selalu menang atas display bawaan komponen (mis. section flex) */
[hidden] {
  display: none !important;
}

.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;
}
