/* =============================================
   BASE — Reset, body defaults, typography baseline
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=JetBrains+Mono:wght@400;500&display=swap');

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

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

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

button,
a {
  cursor: pointer;
}

button {
  background: none;
  border: none;
  font: inherit;
}

ul, ol {
  list-style: none;
}

/* ─── Body ──────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography defaults ───────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--text-hero);  font-weight: 800; }
h2 { font-size: var(--text-3xl);   font-weight: 700; }
h3 { font-size: var(--text-2xl);   font-weight: 600; }
h4 { font-size: var(--text-xl);    font-weight: 600; }
h5 { font-size: var(--text-lg);    font-weight: 500; }
h6 { font-size: var(--text-base);  font-weight: 500; }

p {
  color: var(--ink-2);
  line-height: var(--leading-normal);
  max-width: 65ch;
  text-wrap: pretty;
}

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

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

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent);
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ─── Selection ─────────────────────────────── */
::selection {
  background-color: oklch(0.65 0.14 265 / 0.3);
  color: var(--ink);
}

/* ─── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

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

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

/* ─── Reduced Motion ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
