/* ==========================================================================
   Base — reset, tipografi, utilitas, motion
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hdr-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--l0);
  color: var(--tx-1);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-weight: 400;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, svg, canvas { display: block; max-width: 100%; }
img { max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a, button, input, select, textarea, label, summary, [role="tab"], [role="option"] { touch-action: manipulation; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p, h1, h2, h3, h4, h5, h6, figure, blockquote, dl, dd { margin: 0; }
:where(ul[class], ol[class]) { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
[hidden] { display: none !important; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-display);
  line-height: 1;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.05; }
h4 { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 600; line-height: 1.35; }
p { text-wrap: pretty; }

::selection { background: var(--brand); color: var(--on-brand); }

/* Focus ring jelas */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Eyebrow — sans 600 sentence case + garis pendek */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: currentColor;
  flex: none;
}
.eyebrow--plain::before { display: none; }
.eyebrow--signal { color: var(--signal-strong); }
.eyebrow--light { color: var(--on-ink); }

/* Mono — HANYA untuk string teknis: SKU, spesifikasi, digit countdown */
.sku {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--tx-3);
}
.num { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }

.lead { font-size: var(--fs-md); color: var(--tx-2); line-height: 1.6; }
.muted { color: var(--tx-2); }
.subtle { color: var(--tx-3); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  border-radius: var(--pill);
  transform: translateY(-160%);
  transition: transform var(--dur-1) var(--ease);
}
.skip-link:focus { transform: none; }

/* Prose — artikel & bantuan */
.prose { color: var(--tx-2); font-size: 1.0625rem; line-height: 1.75; max-width: 68ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  margin-top: 1.9em;
  color: var(--tx-1);
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  scroll-margin-top: calc(var(--hdr-h) + 24px);
}
.prose h3 { margin-top: 1.5em; color: var(--tx-1); font-size: 1.3125rem; }
.prose strong { color: var(--tx-1); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--brand); }
.prose a { color: var(--brand); font-weight: 500; }
.prose blockquote {
  border-left: 3px solid var(--brand);
  padding: 4px 0 4px 16px;
  color: var(--tx-1);
  font-weight: 500;
}

/* Tekstur ripstop halus — hanya header section, banner, footer */
.textured { position: relative; isolation: isolate; }
.textured::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../img/ui/texture-ripstop.jpg") repeat;
  background-size: 256px;
  opacity: var(--texture-op);
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* ---------- Motion ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wa-ring {
  0% { transform: scale(1); opacity: .55; }
  80%, 100% { transform: scale(1.75); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
