/* ============================================================
   ENBOX BASE STYLES
   Reset + global styles that apply to every product page.
   Import after tokens.css
   ============================================================ */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-0);
  overflow-x: hidden;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 {
  font-size: clamp(var(--text-3xl), 5.5vw, var(--text-5xl));
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  letter-spacing: var(--tracking-tighter);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  color: var(--text-secondary);
  max-width: 65ch;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--accent-hover);
}

strong {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code {
  color: var(--text-code);
  background: var(--surface-code);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  overflow-x: auto;
  color: var(--text-code);
}
pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ---- Selection ---- */
::selection {
  background: var(--accent-muted);
  color: var(--text-primary);
}

/* ---- Scrollbar (webkit) ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--gray-700);
  border-radius: var(--radius-full);
}

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

/* ---- Images ---- */
img, svg {
  display: block;
  max-width: 100%;
}

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

/* ---- Utility: Visually Hidden ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
