/* ==========================================================================
   Reset + fondamenta
   ========================================================================== */

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

* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02" 1, "cv03" 1, "cv04" 1, "ss01" 1;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 640;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-base); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

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

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--brand-soft); color: var(--text-primary); }

/* Scrollbar --------------------------------------------------------------- */
.scroll-y { overflow-y: auto; overscroll-behavior: contain; }
.scroll-x { overflow-x: auto; overscroll-behavior-x: contain; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--r-full);
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: content-box; }

/* Utility ------------------------------------------------------------------ */
.u-tnum { font-variant-numeric: tabular-nums; }
.u-mono { font-family: var(--font-mono); }
.u-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.u-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.u-row { display: flex; align-items: center; }
.u-col { display: flex; flex-direction: column; }
.u-gap-1 { gap: var(--s-1); } .u-gap-2 { gap: var(--s-2); }
.u-gap-3 { gap: var(--s-3); } .u-gap-4 { gap: var(--s-4); }
.u-gap-5 { gap: var(--s-5); } .u-gap-6 { gap: var(--s-6); }
.u-grow { flex: 1 1 auto; min-width: 0; }
.u-center { display: flex; align-items: center; justify-content: center; }
.u-between { display: flex; align-items: center; justify-content: space-between; }
.u-wrap { flex-wrap: wrap; }
.u-hide { display: none !important; }

.eyebrow {
  font-size: var(--fs-2xs);
  font-weight: 660;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.muted { color: var(--text-secondary); }
.faint { color: var(--text-tertiary); }

@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;
  }
}
