/* Felimo — Base / Reset
 * Sensible defaults and global element styles keyed to design tokens.
 */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-base);
}

/* ─── Typography defaults ──────────────────────────────────────── */

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

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); font-family: var(--font-sans); }
h6 { font-size: var(--text-lg);  font-family: var(--font-sans); }

p {
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
  max-width: 68ch;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--transition-micro);
}

a:hover {
  color: var(--accent-hover);
}

strong, b {
  font-weight: var(--weight-semibold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

code, pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

img, video {
  display: block;
  max-width: 100%;
}

/* ─── Form defaults ────────────────────────────────────────────── */

button, input, select, textarea {
  font-family: var(--font-sans);
  font-size: var(--text-base);
}

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

input, textarea, select {
  outline: none;
}

/* ─── Focus visible ────────────────────────────────────────────── */

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* ─── Selection ────────────────────────────────────────────────── */

::selection {
  background-color: var(--felimo-amber-100);
  color: var(--felimo-void);
}

/* ─── Scrollbar (subtle) ───────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--felimo-mist);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--felimo-silver);
}
