/* ============================================================
   Harmony — base
   Reset, element defaults, scrollbars and text helpers.
   Depends on the token files. No component classes here
   (those live in harmony.css).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* the yin ⇄ yang cross-fade — decorative, never blocks input */
  transition: background var(--dur-theme) var(--ease), color var(--dur-theme) var(--ease);
}

/* — headings are Spectral, the serif voice — */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  margin: 0;
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
}
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-title); }
h3 { font-size: var(--fs-subtitle); }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

code, kbd, samp, pre, .mono { font-family: var(--font-mono); }
::selection { background: var(--accent-soft); }

/* — quiet scrollbars — */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--r-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- Text helpers ---------- */
.display     { font-family: var(--font-display); }
.mono        { font-family: var(--font-mono); }
.overline    { font-size: var(--fs-caption); font-weight: var(--fw-bold); letter-spacing: var(--ls-overline); text-transform: uppercase; color: var(--muted); }
.caption     { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--faint); }
.text-muted  { color: var(--muted); }
.text-faint  { color: var(--faint); }
.text-accent { color: var(--accent-text); }

/* ---------- The mark as loader, and skeleton ---------- */
.mark-spin { animation: hm-spin 2.2s linear infinite; }
.skeleton  { background: var(--skeleton); border-radius: 4px; animation: hm-shimmer 1.5s var(--ease) infinite; }
.fade-in   { animation: hm-fade .5s var(--ease) both; }
