/* ============================================
   Jalur Samping — Base / Reset / Typography
   Mobile-first foundation
   ============================================ */

/* ---- Box-Sizing Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- Document ---- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* ---- Body ---- */
body {
  font-family: var(--sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--text-main);
  background-color: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ---- Links ---- */
a {
  color: var(--brand-gold);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--brand-gold-light);
}

/* ---- Images ---- */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---- Form Elements ---- */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

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

/* ---- Lists ---- */
ul, ol {
  list-style: none;
}

/* ---- Tables ---- */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--brand-navy);
}

h1 { font-size: var(--fs-4xl); margin-bottom: var(--sp-6); }
h2 { font-size: var(--fs-3xl); margin-bottom: var(--sp-5); }
h3 { font-size: var(--fs-2xl); margin-bottom: var(--sp-4); }
h4 { font-size: var(--fs-xl);  margin-bottom: var(--sp-3); }
h5 { font-size: var(--fs-lg);  margin-bottom: var(--sp-3); }
h6 { font-size: var(--fs-base); margin-bottom: var(--sp-2); }

/* ---- Paragraphs ---- */
p {
  margin-bottom: var(--sp-4);
  line-height: var(--lh-relaxed);
}

/* ---- Strong / Bold ---- */
strong, b {
  font-weight: var(--fw-semibold);
}

/* ---- Code ---- */
code {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  background: var(--brand-gold-pale);
  padding: 0.15em 0.4em;
  border-radius: var(--r-sm);
}

pre {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  background: var(--brand-navy-dark);
  color: var(--brand-gold-pale);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: var(--border-card);
  overflow-x: auto;
  margin-bottom: var(--sp-4);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ---- Horizontal Rule ---- */
hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: var(--sp-8) 0;
}

/* ---- Selection ---- */
::selection {
  background: var(--brand-gold);
  color: #fff;
}

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 2px;
}

/* ============================================
   Utility Classes
   ============================================ */

/* ---- Text Alignment ---- */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

/* ---- Text Colors ---- */
.text-navy   { color: var(--brand-navy); }
.text-gold   { color: var(--brand-gold); }
.text-muted  { color: var(--text-muted); }
.text-white  { color: #fff; }
.text-error  { color: var(--error-red); }
.text-success { color: var(--success-green); }

/* ---- Font Families ---- */
.font-serif { font-family: var(--serif); }
.font-sans  { font-family: var(--sans); }
.font-mono  { font-family: var(--mono); }

/* ---- Font Sizes ---- */
.fs-xs   { font-size: var(--fs-xs); }
.fs-sm   { font-size: var(--fs-sm); }
.fs-base { font-size: var(--fs-base); }
.fs-lg   { font-size: var(--fs-lg); }
.fs-xl   { font-size: var(--fs-xl); }
.fs-2xl  { font-size: var(--fs-2xl); }
.fs-3xl  { font-size: var(--fs-3xl); }

/* ---- Font Weights ---- */
.fw-normal   { font-weight: var(--fw-normal); }
.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }

/* ---- Display ---- */
.hidden     { display: none; }
.block      { display: block; }
.inline     { display: inline; }
.flex       { display: flex; }
.grid       { display: grid; }

/* ---- Flex Utilities ---- */
.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* ---- Margin Utilities ---- */
.mt-0  { margin-top: 0; }
.mt-2  { margin-top: var(--sp-2); }
.mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: var(--sp-2); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }
.mx-auto { margin-inline: auto; }

/* ---- Padding Utilities ---- */
.p-0  { padding: 0; }
.p-2  { padding: var(--sp-2); }
.p-4  { padding: var(--sp-4); }
.p-6  { padding: var(--sp-6); }
.p-8  { padding: var(--sp-8); }
.px-4 { padding-inline: var(--sp-4); }
.py-4 { padding-block: var(--sp-4); }
.px-6 { padding-inline: var(--sp-6); }
.py-6 { padding-block: var(--sp-6); }

/* ---- Width ---- */
.w-full { width: 100%; }

/* ---- Overflow ---- */
.overflow-hidden { overflow: hidden; }

/* ---- Screen Reader Only ---- */
.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;
}

/* ---- Responsive visibility ---- */
@media (min-width: 768px) {
  .md\:hidden { display: none; }
  .md\:block  { display: block; }
  .md\:flex   { display: flex; }
}

@media (min-width: 1024px) {
  .lg\:hidden { display: none; }
  .lg\:block  { display: block; }
  .lg\:flex   { display: flex; }
}
