/* ============================================================
   VELDION V5 — base.css
   Reset, typography, elemen dasar. Bergantung pada tokens.css.
   ============================================================ */

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== BODY ===== */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== MAIN — page entry animation ===== */
main {
  animation: pageEnter 0.4s var(--ease-out);
}
@keyframes pageEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== HEADING ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-heading);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  font-weight: var(--fw-bold);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

@media (max-width: 768px) {
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }
}

/* ===== PARAGRAF & TEKS ===== */
p {
  color: var(--text);
  line-height: var(--lh-normal);
}

small { font-size: var(--fs-sm); color: var(--text-muted); }
strong { font-weight: var(--fw-semi); }

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}
a:hover { color: var(--charcoal); }

/* ===== LIST ===== */
ul, ol { list-style: none; }

/* ===== MEDIA ===== */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== FORM ===== */
button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}
button { cursor: pointer; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--cream-200); }
::-webkit-scrollbar-thumb {
  background: var(--silver-light);
  border-radius: var(--radius-full);
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover { background: var(--silver); }

/* ===== SELECTION ===== */
::selection {
  background: var(--silver-light);
  color: var(--charcoal);
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid var(--silver);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--silver);
  outline-offset: 2px;
}

/* ===== SCROLL REVEAL (dipakai .reveal) ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  main { animation: none; }
  .reveal { opacity: 1; transform: none; }
}