/* ============================================================
   Knoty Network — Base layer
   Reset, document defaults, typography primitives.
   Load after tokens.css, before components.css.
   ============================================================ */

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

html {
  background: var(--sand);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* An author `display` rule outranks the UA's [hidden] rule — enforce it here. */
[hidden] { display: none !important; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

::selection { background: rgba(217, 96, 58, 0.22); }

/* ---------- Focus: visible, never removed ---------- */
:focus-visible {
  outline: 2px solid var(--papaya);
  outline-offset: 2px;
  border-radius: var(--r-chip);
}

/* ---------- Headings ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); line-height: 1.3; }

p { text-wrap: pretty; }

/* ---------- Inline primitives ---------- */

/* The brush accent — use for one human phrase per screen, never more */
.hand {
  font-family: var(--font-brush);
  font-style: normal;
  font-weight: 700;
  color: var(--papaya);
  letter-spacing: -0.01em;
}

/* Small mono label — the "technical" voice */
.eyebrow,
.label-mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--ink-45);
}

/* Quiet footnote */
.note {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-30);
  line-height: 1.6;
}

.lede {
  font-size: var(--text-md);
  color: var(--ink-70);
  line-height: 1.7;
  max-width: 44rem;
}

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

/* ---------- Motion: honour the user ---------- */
@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;
  }
}
