/* ==========================================================================
   BASE.CSS — Reset, Tipografi Dasar, Aksesibilitas, & Utilitas Layout
   ========================================================================== */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--text-secondary);
  background-color: var(--white);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Kunci scroll body saat drawer menu mobile dibuka */
body.menu-open {
  overflow: hidden;
}

/* --- Tipografi Judul & Isi --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: var(--lh-snug);
}

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: 600;
  color: var(--text-primary);
}

.text-lead {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}

.text-caption {
  font-size: var(--fs-caption);
  line-height: 1.45;
  color: var(--text-secondary);
}

/* --- Elemen Media & Interaktif --- */
img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

[hidden] {
  display: none !important;
}

/* --- Aksesibilitas Fokus Keyboard & Skip Link --- */
:focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 999;
  padding: var(--space-3) var(--space-5);
  background-color: var(--brand-black);
  color: var(--white);
  font-weight: 600;
  font-size: var(--fs-caption);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-float);
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--brand-red);
}

/* Utilitas teks khusus pembaca layar */
.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;
}

/* --- Struktur Container & Section --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  position: relative;
  padding-block: var(--section-py);
  scroll-margin-top: var(--nav-height);
  overflow-x: clip;
}

.section--cream {
  background-color: var(--cream);
}

.section--white {
  background-color: var(--white);
}

.section--slate {
  background-color: var(--slate-soft);
}

/* --- Ikon SVG Sprite Gaya Garis (Lucide) --- */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 1rem;
  height: 1rem;
}

.icon--lg {
  width: 1.5rem;
  height: 1.5rem;
}

.icon--xl {
  width: 2rem;
  height: 2rem;
}

/* Matikan smooth scroll bawaan bila pengguna memilih gerak minimal */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

