/* ==========================================================================
   base.css — reset, elemen dasar, layout umum, aksesibilitas
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-wrap: balance;
}

h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p {
  margin: 0 0 1em;
  max-width: 68ch;
}

p:last-child { margin-bottom: 0; }

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a { color: inherit; }

/* Bagian gelap: judul putih, fokus oranye */
.is-dark { --focus-color: var(--orange); }
.is-dark :is(h1, h2, h3, h4) { color: var(--white); }

:focus-visible {
  outline: 3px solid var(--focus-color, var(--navy));
  outline-offset: 3px;
}

/* Layout */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section { padding-block: var(--space-section); }
.section--white { background: var(--white); }
.section--paper { background: var(--paper); }

/* Utilitas aksesibilitas */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -4rem;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--orange);
  color: var(--navy);
  font-weight: 700;
  border-radius: var(--radius);
}

.skip-link:focus { top: var(--space-3); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
