/* ==========================================================
   SCI MEDIA — BASE
   Modern reset + global element defaults + accessibility
   foundations. No component or section-specific styling here.
   ========================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  font-family: var(--font-base);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-ink-900);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

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

table {
  border-collapse: collapse;
}

/* ---------- Typography defaults ---------- */
h1,
h2,
h3,
h4 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-navy-900);
}

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

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

h3 {
  font-size: var(--fs-h3);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
}

p {
  max-width: 65ch;
}

p:not([class]) {
  color: var(--color-ink-600);
}

/* ---------- Selection ---------- */
::selection {
  background-color: var(--color-orange-100);
  color: var(--color-navy-900);
}

/* ---------- Accessibility: focus ---------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-blue-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Focus ring on navy backgrounds needs a lighter, higher-contrast color */
.site-header :focus-visible,
[data-surface='navy'] :focus-visible {
  outline-color: var(--color-blue-400);
}

/* ---------- Accessibility: anchor scroll offset ---------- */
/* Section anchors (from the navbar/footer) must not end up
   scrolled to a position where their heading sits underneath
   the sticky header. */
#produk,
#tentang,
#testimoni,
#kontak {
  scroll-margin-top: 96px;
}

/* ---------- Accessibility: skip link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-modal);
  padding: var(--space-3) var(--space-5);
  background-color: var(--color-navy-900);
  color: var(--color-white);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease-standard);
}

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

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Utility: visually hidden but accessible ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}